<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Autoinstall_Feature</id>
		<title>Autoinstall Feature - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://gwiki3.thatlinuxbox.com/index.php?action=history&amp;feed=atom&amp;title=Autoinstall_Feature"/>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Autoinstall_Feature&amp;action=history"/>
		<updated>2026-04-06T00:44:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Autoinstall_Feature&amp;diff=5812&amp;oldid=prev</id>
		<title>Rasade: /* Autoinstall Feature */</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Autoinstall_Feature&amp;diff=5812&amp;oldid=prev"/>
				<updated>2010-04-21T20:21:59Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Autoinstall Feature&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;From Geeklog 1.6 onwards, plugins have an alternate installation method, the 'Autoinstall'. This is implemented in the form of a file named &amp;lt;tt&amp;gt;autoinstall.php&amp;lt;/tt&amp;gt; in the same location within the plugin directory as the &amp;lt;tt&amp;gt;functions.inc&amp;lt;/tt&amp;gt; file. To install a plugin using the Autoinstall function, all users need to do is go to the 'Plugins' section of the Admin panel and choose the relevant tarball for the plugin and upload it. The Autoinstall function will take care of the rest, as in creation of database tables, new plugin-specific user groups, as well as moving the required plugin files to the relevant locations within the Geeklog installation. However, this only works with Geeklog 1.6 and above. &lt;br /&gt;
For backward compatibility, plugin developers might feel the need to include the old &amp;lt;tt&amp;gt;install.php&amp;lt;/tt&amp;gt; script along with their plugins as well.&lt;br /&gt;
The main function included in &amp;lt;tt&amp;gt;autoinstall.php&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;plugin_autoinstall_{plugin}&amp;lt;/tt&amp;gt;, where {plugin} is replaced by the name of the plugin. There are optional functions available for inclusion within &amp;lt;tt&amp;gt;authoinstall.php&amp;lt;/tt&amp;gt;. You can read about them in the [documentation : http://wiki.geeklog.net/index.php/Plugin_Autoinstall]. As an example we will take a look at the &amp;lt;tt&amp;gt;autoinstall.php&amp;lt;/tt&amp;gt; file written by Javed Khan for the Boilerplate plugin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Plugin autoinstall function&lt;br /&gt;
*&lt;br /&gt;
* @param    string  $pi_name    Plugin name&lt;br /&gt;
* @return   array               Plugin information&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
function plugin_autoinstall_sample($pi_name)&lt;br /&gt;
{&lt;br /&gt;
    $pi_name         = 'sample';&lt;br /&gt;
    $pi_display_name = 'Boilerplate Plugin';    &lt;br /&gt;
    &lt;br /&gt;
    $info = array(&lt;br /&gt;
        'pi_name'         =&amp;gt; $pi_name,&lt;br /&gt;
        'pi_display_name' =&amp;gt; $pi_display_name,&lt;br /&gt;
        'pi_version'      =&amp;gt; '1.6.3',&lt;br /&gt;
        'pi_gl_version'   =&amp;gt; '1.6.1',&lt;br /&gt;
        'pi_homepage'     =&amp;gt; 'http://www.geeklog.net/'&lt;br /&gt;
    );&lt;br /&gt;
    &lt;br /&gt;
    $tables = array(&lt;br /&gt;
        'base',&lt;br /&gt;
        'financialData'&lt;br /&gt;
    );&lt;br /&gt;
    &lt;br /&gt;
    $inst_parms = array(&lt;br /&gt;
        'info'      =&amp;gt; $info,&lt;br /&gt;
        'tables'    =&amp;gt; $tables&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    return $inst_parms;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, it's fairly simple. For further clarification, we will take a look at each set of values implemented here.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$info = array(&lt;br /&gt;
        'pi_name'         =&amp;gt; $pi_name,&lt;br /&gt;
        'pi_display_name' =&amp;gt; $pi_display_name,&lt;br /&gt;
        'pi_version'      =&amp;gt; '1.6.3',&lt;br /&gt;
        'pi_gl_version'   =&amp;gt; '1.6.1',&lt;br /&gt;
        'pi_homepage'     =&amp;gt; 'http://www.geeklog.net/'&lt;br /&gt;
    );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This array holds general information regarding the plugin and should be fairly self-explanatory.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$tables = array(&lt;br /&gt;
        'base',&lt;br /&gt;
        'financialData'&lt;br /&gt;
    );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This array holds the table names that should be created in the database when the plugin is installed. The table creation scripts would normally be included in &amp;lt;tt&amp;gt;/admin/install.php&amp;lt;/tt&amp;gt;. For the Boilerplate plugin, the table creation scripts are included in special install files based on the type of database query language being used. (The Boilerplate plugin has been built to demonstrate compatibility with different query languages)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$inst_parms = array(&lt;br /&gt;
        'info'      =&amp;gt; $info,&lt;br /&gt;
        'tables'    =&amp;gt; $tables&lt;br /&gt;
    );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the array in the autoinstall script which holds all the parameters that the plugin refers to. It assigns all the variables defined above to special array keys which are recognized by Geeklog during installation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Of course, more parameters could be added for usergroups, features, permissions etc.&lt;br /&gt;
&lt;br /&gt;
As always, the best way to get a good idea about how Geeklog handles plugins would be to take a good look at &amp;lt;tt&amp;gt;lib-plugins.php&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Rasade</name></author>	</entry>

	</feed>