/**
* PHPDevShell is a RAD Framework aimed at developing administrative applications.
*
* @package PHPDevShell
* @link <a href="http://www.phpdevshell.org<br />
" title="http://www.phpdevshell.org<br />
">http://www.phpdevshell.org<br />
</a> * @copyright Copyright (C) 2007 Jason Schoeman, All rights reserved.
* @license GNU/LGPL, see readme/licensed_under_lgpl or <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html<br />
" title="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html<br />
">http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html<br />
</a> * @author Jason Schoeman, Contact: titan [at] phpdevshell [dot] org.
*
* Copyright notice: See readme/notice
* By using PHPDevShell you agree to notice and license, if you dont agree to this notice/license you are not allowed to use PHPDevShell.
*/
////////////////////////////////////////////////////////////////////////////////////////
// Plugin config file //////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Name you would like to give your plugin.
$plugin['plugin_name']
= 'Simple Phonebook';
////////////////////////////////////////////////////////////////////////////////////////
// The version like the end user will see it, like "V0.4.5-RC1".
$plugin['software_version']
= 'Simple Phonebook V 0.0.5-Demo';
////////////////////////////////////////////////////////////////////////////////////////
// a Description of your plugin. What does it do.
$plugin['plugin_description']
=
'
Simple Phonebook allows you to enter phone numbers in a phonebook database.
';
////////////////////////////////////////////////////////////////////////////////////////
// If it is a modified plugin, give the original author here.
$plugin['original_author_name']
= 'Jason Schoeman';
////////////////////////////////////////////////////////////////////////////////////////
// If you are the author of the plugin, write your name here.
$plugin['author_name']
= 'Jason Schoeman';
////////////////////////////////////////////////////////////////////////////////////////
// Email address of author.
$plugin['author_email']
= 'titan@phpdevshell.org';
////////////////////////////////////////////////////////////////////////////////////////
// Website of the author.
$plugin['author_url']
= 'http://www.phpdevshell.org';
////////////////////////////////////////////////////////////////////////////////////////
// Date plugin was created.
$plugin['create_date']
= '13 February 2008';
////////////////////////////////////////////////////////////////////////////////////////
// Copyright notice.
$plugin['copyright']
= 'Copyright © 2007 PHPDevShell.org All rights reserved.';
////////////////////////////////////////////////////////////////////////////////////////
// Release license.
$plugin['license']
= 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU/LGPL';
////////////////////////////////////////////////////////////////////////////////////////
// The plugin version to use for upgrades.
// Please READ!
// This is what the system will use to create database updates from, when a user copies a newer version of a plugin,
// the system will use this number to upgrade from what the user have, to the latest database version.
// -------------------------------------------------------------------------------------
// Say I have database version 2 installed, and you bring out a database update of 4 and I upgrade, the system will run,
// all upwards database queries from version 2. If nothing is installed all queries from first version will be installed freshly.
$plugin['database_version']
= 1;
////////////////////////////////////////////////////////////////////////////////////////
// Query to run on activation, lower value arrays will be executed first.
// The example queries below shows how you would go ahead to update your plugins database.
// This is database version 1.
// PS You cant put multiple sql queries in one array!
$plugin['db_query_install'][1][1]
= <<<SQL
CREATE TABLE `pds_simple_phonebook` (
`user_id` int(20) unsigned NOT NULL auto_increment,
`cell_number` varchar(255) default NULL,
`home_number` varchar(255) default NULL,
`work_number` varchar(255) default NULL,
`fax_number` varchar(255) default NULL,
) ENGINE=MyISAM AUTO_INCREMENT=154 DEFAULT CHARSET=latin1;
SQL;
// Still database 1 but entry next query.
$plugin['db_query_install'][1][2]
= <<<SQL
INSERT INTO `pds_simple_phonebook` VALUES ('1', '+2713 333 cell', '+2712 012 home', '+2712 012 work', '+2712 012 ifax');
SQL;
// Example : When an update is released, EXAMPLE : change $plugin['database_version'] to 2 and check it out, user will now be able to upgrade from plugin manager.
// Note how the array integers changed, this will now install the next sql scripts from here and will skip above queries when upgrading.
// You can used advanced queries here as well!
// Below will not run until $plugin['database_version'] is set to 2 or 3.
$plugin['db_query_install'][2][1]
= <<<SQL
REPLACE INTO `pds_simple_phonebook` VALUES ('111', '+2712 012 cell', '+2712 012 home', '+2712 012 work', '+2712 012 ifax');
SQL;
$plugin['db_query_install'][2][2]
= <<<SQL
REPLACE INTO `pds_simple_phonebook` VALUES ('112', '+2712 012 cell', '+2712 012 home', '+2712 012 work', '+2712 012 ifax');
SQL;
// Below will not run until $plugin['database_version'] is set to 2 or 3.
// If other options like write_settings goes beyond the db_query_install, then fill db_query_install up with blanks to match the same number.
$plugin['db_query_install'][3][1] = '';
// You could also install general plugin configuration settings.
$plugin['write_settings'][1][1] =
array('setting_1'=>
'some_value_1',
'setting_2'=>
'some_value_2',
'setting_3'=>
'some_value_3');
// And on updates, you can add more settings.
// Below will not run until $plugin['database_version'] is set to 2 or 3.
$plugin['write_settings'][2][1] =
array('setting_3'=>
'some_value_8');
// We can issue a delete settings like this.
$plugin['delete_settings'][3][1] =
array('setting_1',
'setting_2');
// If you have some menu items to delete on an upgrade, you can do the following:
// Sometimes you don't need a menu item anymore, and might want to delete it on next upgrade.
// Issue menu delete command.
// Below will not run until $plugin['database_version'] is set to 2 or 3.
$plugin['delete_menus'][3][1] =
array(1684409841);
// PS. Hooks does not to be deleted seperately as it simply re-installs the latest available hook list.
////////////////////////////////////////////////////////////////////////////////////////
// Query to run on deactivation.
// Uninstall is simple, it will always use the latest uninstall script, the user will first need to upgrade first,
// before he will be able to uninstall if it is a newer script.
$plugin['db_query_uninstall'][1]
= <<<SQL
DROP TABLE IF EXISTS pds_simple_phonebook
SQL;
// You can continue with uninstall tables like below.
/**
$plugin['db_query_uninstall'][2]
= <<<SQL
DROP TABLE IF EXISTS pds_simple_phonebook
SQL;
*/
////////////////////////////////////////////////////////////////////////////////////////
// Menu items to include in menu structure, will have a ranking as per rank in array.
// In folder item, no front or trailing slashes required, could be like example2/example3/example4.
// PS TEMPLATE : For the template option, leave blank 'template'=>'' to use default template, or use 'template'=>'empty' to set template as empty, user 'template'=>'your_custom_template_folder' for custom template.
// When using a custom template will automatically create a template in the template manager, you must make sure the template files are under /templates though.
$plugin['menu'][]
=
array('filename'=>
'list_entries.php',
'deeper_folder'=>
'',
'parent_filename'=>
'',
'menu_visible'=>true,
'new_window'=>false,
'template'=>
'');