1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 15:31:41 +02:00

More work on the blank plugin example

This commit is contained in:
Cameron
2012-11-27 19:55:38 -08:00
parent d8d5151933
commit 67da27109f
7 changed files with 456 additions and 12 deletions

View File

@@ -2,17 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 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$
* $Date$
* $Author$
*
* Custom install/uninstall/update routines for blank plugin
**
*/
class _blank_setup
@@ -24,18 +19,33 @@ class _blank_setup
// echo "custom install 'pre' function<br /><br />";
}
/**
* For inserting default database content during install after table has been created by the blank_sql.php file.
*/
function install_post($var)
{
$sql = e107::getDb();
$mes = e107::getMessage();
// $query = "INSERT INTO #_blank SQL insert query goes here;";
$e107_blank = array(
'blank_id' =>'1',
'blank_icon' =>'{e_PLUGIN}_blank/images/blank_32.png',
'blank_type' =>'type_1',
'blank_name' =>'My Name',
'blank_folder' =>'Folder Value',
'blank_version' =>'1',
'blank_author' =>'bill',
'blank_authorURL' =>'http://e107.org',
'blank_date' =>'1352871240',
'blank_compatibility' =>'2',
'blank_url' =>'http://e107.org'
);
// if($sql->db_Select_gen($query))
if($sql->insert('blank',$e107_blank))
{
$mes->add("Custom - Install Message.", E_MESSAGE_SUCCESS);
}
// else
else
{
$mes->add("Custom - Failed to add default table data.", E_MESSAGE_ERROR);
}