1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Some defaults for _blank plugin. An example for plugin development

This commit is contained in:
CaMer0n
2009-10-30 09:11:01 +00:00
parent d0111eec57
commit 91814acaf7
2 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
<?php
/*
* e107 website system
*
* Copyright ( c ) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Custom install/uninstall/update routines
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/_blank/_blank_setup.php,v $
* $Revision: 1.1 $
* $Date: 2009-10-30 09:11:01 $
* $Author: e107coders $
*
*/
class _blank_setup
{
function install_pre($var)
{
// print_a($var);
// echo "custom install 'pre' function<br /><br />";
}
function install_post($var)
{
$sql = e107::getDb();
$mes = e107::getMessage();
// $query = "INSERT INTO #_blank SQL insert query goes here;";
// if($sql->db_Select_gen($query))
{
$mes->add("Custom - Install Message.", E_MESSAGE_SUCCESS);
}
// else
{
$mes->add("Custom - Failed to add default table data.", E_MESSAGE_ERROR);
}
}
function uninstall_options()
{
$listoptions = array(0=>'option 1',1=>'option 2');
$options = array();
$options['mypref'] = array(
'label' => 'Custom Uninstall Label',
'preview' => 'Preview Area',
'helpText' => 'Custom Help Text',
'itemList' => $listoptions,
'itemDefault' => 1
);
return $options;
}
function uninstall_post($var)
{
// print_a($var);
}
function upgrade_post($var)
{
// $sql = e107::getDb();
}
}
?>