Universal Plugin Toolkit

The Universal Plugin Toolkit provides the files to quickly get past the requirements of the plugin API in Geeklog and get down to the business of writing your plugin application. It consists of all the necessary files you will need to interface your code with Geeklog. It includes:

Included Files:

How to use the Universal Plugin Toolkit

After copying the files to their proper locations, the first thing you should do is decide on a name for your plugin. Then, using your text editor,

  1. replace all instances of {plugin} with the name of plugin
  2. replace all instances of {conf_var_prefix} with the prefix of the plugin's config array (defined in config.php)
  3. replace all instances of {lang_var_postfix} with the postfix of the plugin's language array (defined in the plugin's language files)
  4. replace all instances of {display_name} with the display name

in

The PHP script named make_pi.php developed by mystral-kk is bundled in this distribution. This script will make these changes for you. You might give it a try.

For example, when you mant to make the plugin named "upkit",
and replace string {plugin} with "upkit",
and replace string {conf_var_prefix} with "UPK",
and replace string {lang_var_postfix} with "UPK",
and replace string {display_name} with "UPKit",
execute the script specifying the parameter as follows

php.exe -f make_pi upkit UPK UPK UPKit

Note: due to the use of the gl_vars table your plugin name should not be over 15 characters.

Second open up config.php and insert the names of any tables you want to create. This allows them to be included in the $_TABLES array. You should also update the variables containing your plugin version.

Next open up the spl/mysql_install.php file, and set the structure of the table. Add and delete SQL commands referring to the sample in the file the $_SQL array. (In the same way, edit spl/mssql_install.php. )

Next open up the admin/install.php file, and set the version of Geeklog and plugin production person's URL.
In addition, set the value to four arrays in this file.
The first array ($GROUPS) contains your security groups.
The second array ($FEATURES) contains your security features.
The third array ($MAPPINGS) set the relation of your security features and security groups.
The fourth array ($DEFVALUES) contains your SQL commands required to insert any sample or default data in your tables.

Finally open up functions.inc and insert in the uninstall_plugin function the names of your tables and security features, so that the plugin can be uninstalled.

At this point you should have a skeletal functioning plugin -- run the install page and it will show up in Geeklog. Now write your code and share it with the rest of the Geeklog community.

After you get your plugin functioning, you should edit the INSTALL document and the install.html in the root of the plugin directory.

If any of this is confusing (how could that be?), you can also examine the standard Links plugin and Polls plugin, etc.