WikyBlog
Download

Plugins > Reference

The creation of plugins for WikyBlog is accomplished with the usage of the following variables, functions and files.

File: config.php

Variable Value Description
$installInfo Array An array of information for class.php
$requiredVersion String The first version of WikyBlog the plugin is compatible with. Ex: $requiredVersion = '1.5.3';
$requiredMySQL String The minimum version of MySQL required for plugin installation. Available as of WikyBlog V1.5.5. Ex: $requiredMySQL = '4.1';
$requiredPHP String The minimum version of PHP required for plugin installation. Available as of WikyBlog V1.7b1 Ex: $requiredPHP = '5.0';
$requiredFunctions Array An array of php function names required for plugin installation. Available as of WikyBlog V1.7b2 Ex: $requiredFunctions = array('gd_info','mysqli_affected_rows');
$upgradeScriptBefore PRI The location of a file to include just before the automated upgrade is done. Available as of WikyBlog V1.5.5.
$upgradeScriptAfter PRI The location of a file to include just after the automated upgrade is done. Available as of WikyBlog V1.5.5.
$installScript PRI The location of a file to include after normal installation is complete. Available as of WikyBlog V1.5.6
$installAs String Force this plugin to be installed with a set name. Available as of WikyBlog V1.5.6

File: links.php

Variable Value Description
$specialLinks Link Defintions Used to register special pages. These special pages may be listed on or hidden from the Control Panel.
$adminLinks Link Definitions Used to register admin pages. These special pages may be listed on or hidden from the Control Panel.
$langFile Language File The name of a file in your /lang directory
$maintenance PRI If your plugin is significant enough, you may want to use this variable to add to the "Powered By" text at the bottom of each WikyBlog page.
$poweredBy String String to be added to the "Powered By" value at the bottom of each page. Should only be used by significant plugins.

File: sql.php

The contents of this file are only required for distributing a plugin that requires additional MySQL tables. During the installation of your plugin, the tables defined by sql.php will be added.

The contents of this file can be created by your installation of WikyBlog. After creating the appropriate tables manually or with an application like [www.phpmyadmin.net/ phpMyAdmin], use the Plugin SQL tool to select the tables and export the necessary code for your sql.php file.

The Plugin SQl tool can be found here: Control Panel > Administration

File: class.php

Required for Namespace usage.


Global Functions

Function Description
pluginIncludeFile( PRI ) Should be used instead of php's include() or require() functions to ensure portability.
wbLang::pluginFile( [$langFile] ) Can be used to select the appropriate language file for your plugin.

Global Variables

Variable Value Description
$wbPluginDir String Automatically set to the name of the folder in /plugins used by the plugin.
$wbPluginSpace String Automatically set to the name of the Namespace the plugin was installed as.
Last modified 21:46 Mon, 5 May 2008 by Main. Accessed 184 times What Links Here share Share Except where expressly noted, this work is licensed under a Creative Commons License.