mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Adding setup files
This commit is contained in:
parent
5656cce43d
commit
a9050cc2a3
82
e107_plugins/calendar_menu/calendar_setup.php
Normal file
82
e107_plugins/calendar_menu/calendar_setup.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| (c) e107 Inc 2008-2009
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_setup.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-10-20 03:58:47 $
|
||||
| $Author: e107coders $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
class calendar_menu_setup // must match folder name ie. <pluginfolder>_setup
|
||||
{
|
||||
|
||||
function calendar_menu_install_post($param)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(FALSE))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
|
||||
$mes->add(EC_ADINST_LAN_04, E_MESSAGE_SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function calendar_menu_install_pre($param)
|
||||
{
|
||||
// echo "Calendar uninstall routine<br />";
|
||||
}
|
||||
|
||||
|
||||
function calendar_menu_upgrade_post($param)
|
||||
{
|
||||
$mes = eMessage::getInstance();
|
||||
if($this->insertDefaultCategory(TRUE))
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_06, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->add(EC_ADINST_LAN_07, E_MESSAGE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function insertDefaultCategory($isUpgrade = FALSE) // Insert the text for the default category into the DB here
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
require_once('ecal_class.php'); // Gets the define for the 'Default' category
|
||||
if ($isUpgrade && $sql->db_Select('event_cat','event_cat_name',"event_cat_name='".EC_DEFAULT_CATEGORY."' ", TRUE))
|
||||
{
|
||||
return EC_ADINST_LAN_08.'<br />';
|
||||
}
|
||||
$ec_insert_entries = "INSERT INTO `#event_cat` (event_cat_name, event_cat_description, event_cat_ahead, event_cat_msg1, event_cat_msg2, event_cat_lastupdate)
|
||||
VALUES ('".EC_DEFAULT_CATEGORY."', '".EC_ADINST_LAN_03."', 5,
|
||||
'".EC_ADINST_LAN_01."', '".EC_ADINST_LAN_02."',
|
||||
'".intval(time())."') ";
|
||||
|
||||
return $sql->db_Select_gen($ec_insert_entries);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
53
e107_plugins/download/download_setup.php
Normal file
53
e107_plugins/download/download_setup.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright ( c ) 2001-2008 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Custom download install/uninstall/update routines
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/download/download_setup.php,v $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2009-10-20 03:58:47 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
class download_setup
|
||||
{
|
||||
function download_install_pre(&$var)
|
||||
{
|
||||
// print_a($var);
|
||||
$mes = eMessage::getInstance();
|
||||
// $mes->add("custom install 'pre' function.", E_MESSAGE_SUCCESS);
|
||||
}
|
||||
|
||||
function download_install_post(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
// $mes->add("custom install 'post' function.", E_MESSAGE_SUCCESS);
|
||||
}
|
||||
|
||||
function download_uninstall_pre(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
// $mes->add("custom uninstall 'pre' function.", E_MESSAGE_SUCCESS);
|
||||
}
|
||||
|
||||
function download_upgrade_post(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
// $mes->add("custom upgrade 'post' function.", E_MESSAGE_SUCCESS);
|
||||
|
||||
//if(version_compare($var['current_plug']['plugin_version'], "1.2", "<"))
|
||||
//{
|
||||
// $qry = "ALTER TABLE #download ADD download_postclass TINYINT( 3 ) UNSIGNED DEFAULT '0' NOT NULL ;";
|
||||
// $sql->db_Select_gen($qry);
|
||||
//}
|
||||
}
|
||||
}
|
59
e107_plugins/forum/forum_setup.php
Normal file
59
e107_plugins/forum/forum_setup.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright ( c ) 2001-2008 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Custom forum install/uninstall/update routines
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_setup.php,v $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2009-10-20 03:58:47 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
class forum_setup
|
||||
{
|
||||
function forum_install_pre(&$var)
|
||||
{
|
||||
print_a($var);
|
||||
echo "custom install 'pre' function<br /><br />";
|
||||
}
|
||||
|
||||
function forum_install_post(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
|
||||
if($sql -> db_Update("user", "user_forums='0'"))
|
||||
{
|
||||
$mes->add("Setting all user_forums to 0.", E_MESSAGE_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
function forum_uninstall_post(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
|
||||
if($sql -> db_Update("user", "user_forums='0'"))
|
||||
{
|
||||
$mes->add("Setting all user_forums to 0.", E_MESSAGE_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
function forum_upgrade_post(&$var)
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$mes = eMessage::getInstance();
|
||||
|
||||
if(version_compare($var['current_plug']['plugin_version'], "1.2", "<"))
|
||||
{
|
||||
$qry = "ALTER TABLE #forum ADD forum_postclass TINYINT( 3 ) UNSIGNED DEFAULT '0' NOT NULL ;";
|
||||
$sql->db_Select_gen($qry);
|
||||
}
|
||||
}
|
||||
}
|
@ -9,9 +9,9 @@
|
||||
* Login menu template
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu_template.php,v $
|
||||
* $Revision: 1.8 $
|
||||
* $Date: 2009-07-18 18:23:44 $
|
||||
* $Author: marj_nl_fr $
|
||||
* $Revision: 1.9 $
|
||||
* $Date: 2009-10-20 03:58:47 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
if ( ! isset($LOGIN_MENU_FORM))
|
||||
@ -79,6 +79,7 @@ if ( ! isset($LOGIN_MENU_FORM))
|
||||
{LM_SIGNUP_LINK}
|
||||
{LM_FPW_LINK}
|
||||
{LM_RESEND_LINK}
|
||||
{FB_LOGIN_BUTTON}
|
||||
</div>
|
||||
";
|
||||
}
|
||||
|
26
e107_plugins/pm/pm_setup.php
Normal file
26
e107_plugins/pm/pm_setup.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?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)
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_setup.php,v $
|
||||
* $Revision: 1.1 $
|
||||
* $Date: 2009-10-20 03:58:47 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
class pm_setup
|
||||
{
|
||||
|
||||
function pm_uninstall_post()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$sql->db_Delete("core", "e107_name = 'pm_prefs'");
|
||||
$sql->db_Delete("menus", "menu_name = 'private_msg_menu'");
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user