diff --git a/e107_plugins/chatbox_menu/admin_chatbox.php b/e107_plugins/chatbox_menu/admin_chatbox.php
index 47baca6a8..c4ac14a0e 100644
--- a/e107_plugins/chatbox_menu/admin_chatbox.php
+++ b/e107_plugins/chatbox_menu/admin_chatbox.php
@@ -11,50 +11,66 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/admin_chatbox.php,v $
-| $Revision: 1.4 $
-| $Date: 2007-01-28 13:51:45 $
+| $Revision: 1.5 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
-if(!getperms("P")) { header("location:".e_BASE."index.php"); exit; }
+if (!plugInstalled('chatbox_menu') || !getperms("P"))
+{
+ header("Location: ".e_BASE."index.php");
+ exit;
+}
-@include_once e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE."_config.php";
-@include_once e_PLUGIN."chatbox_menu/languages/English/English_config.php";
+@include_lan( e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/admin_chatbox_menu.php");
require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."userclass_class.php");
-if (isset($_POST['updatesettings'])) {
-
- $pref['chatbox_posts'] = $_POST['chatbox_posts'];
- $pref['cb_layer'] = $_POST['cb_layer'];
- $pref['cb_layer_height'] = ($_POST['cb_layer_height'] ? $_POST['cb_layer_height'] : 200);
- $pref['cb_emote'] = $_POST['cb_emote'];
- $pref['cb_mod'] = $_POST['cb_mod'];
- save_prefs();
- $e107cache->clear("nq_chatbox");
- $message = CHBLAN_1;
+if (isset($_POST['updatesettings']))
+{
+ $temp = array();
+ $temp['chatbox_posts'] = min(intval($_POST['chatbox_posts']), 5);
+ $temp['cb_layer'] = intval($_POST['cb_layer']);
+ $temp['cb_layer_height'] = max(varset($_POST['cb_layer_height'], 200), 150);
+ $temp['cb_emote'] = intval($_POST['cb_emote']);
+ $temp['cb_mod'] = intval($_POST['cb_mod']);
+ if ($admin_log->logArrayDiffs($temp, $pref, 'CHBLAN_01'))
+ {
+ save_prefs(); // Only save if changes
+ $e107cache->clear("nq_chatbox");
+ $message = CHBLAN_1;
+ }
+ else
+ {
+ $message = CHBLAN_39;
+ }
}
-if (isset($_POST['prune'])) {
- $chatbox_prune = $_POST['chatbox_prune'];
+
+if (isset($_POST['prune']))
+{
+ $chatbox_prune = intval($_POST['chatbox_prune']);
$prunetime = time() - $chatbox_prune;
- $sql->db_Delete("chatbox", "cb_datestamp < '$prunetime' ");
+ $sql->db_Delete("chatbox", "cb_datestamp < '{$prunetime}' ");
+ $admin_log->log_event('CHBLAN_02', $chatbox_prune.', '.$prunetime, E_LOG_INFORMATIVE, '');
$e107cache->clear("nq_chatbox");
$message = CHBLAN_28;
}
-if (isset($_POST['recalculate'])) {
+if (isset($_POST['recalculate']))
+{
$sql->db_Update("user", "user_chats = 0");
$qry = "SELECT u.user_id AS uid, count(c.cb_nick) AS count FROM #chatbox AS c
LEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id
WHERE u.user_id > 0
GROUP BY uid";
- if ($sql -> db_Select_gen($qry)) {
+ if ($sql -> db_Select_gen($qry))
+ {
$ret = array();
while($row = $sql -> db_Fetch())
{
@@ -66,10 +82,12 @@ if (isset($_POST['recalculate'])) {
{
$sql->db_Update("user", "user_chats = '{$cnt}' WHERE user_id = '{$uid}'");
}
+ $admin_log->log_event('CHBLAN_03','', E_LOG_INFORMATIVE, '');
$message = CHBLAN_33;
}
-if (isset($message)) {
+if (isset($message))
+{
$ns->tablerender("", "
".$message."
");
}
diff --git a/e107_plugins/chatbox_menu/chat.php b/e107_plugins/chatbox_menu/chat.php
index db38eed98..a16081ad3 100644
--- a/e107_plugins/chatbox_menu/chat.php
+++ b/e107_plugins/chatbox_menu/chat.php
@@ -11,23 +11,26 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/chat.php,v $
-| $Revision: 1.7 $
-| $Date: 2007-04-30 20:17:05 $
+| $Revision: 1.8 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
-if (file_exists(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php")) {
- include_once(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php");
-} else {
- include_once(e_PLUGIN."chatbox_menu/languages/English/English.php");
+if (!plugInstalled('chatbox_menu'))
+{
+ header("Location: ".e_BASE."index.php");
+ exit;
}
+
+@include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php");
require_once(HEADERF);
$sql->db_Select("menus", "*", "menu_name='chatbox_menu'");
$row = $sql->db_Fetch();
-if (!check_class($row['menu_class'])) {
+if (!check_class($row['menu_class']))
+{
$ns->tablerender(CHATBOX_L23, "".CHATBOX_L24."
");
require_once(FOOTERF);
exit;
diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php
index e021f4827..6e3f0568e 100644
--- a/e107_plugins/chatbox_menu/chatbox_menu.php
+++ b/e107_plugins/chatbox_menu/chatbox_menu.php
@@ -11,13 +11,17 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/chatbox_menu.php,v $
-| $Revision: 1.11 $
-| $Date: 2008-01-27 11:02:34 $
-| $Author: e107coders $
+| $Revision: 1.12 $
+| $Date: 2008-12-11 21:13:48 $
+| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
global $tp, $e107cache, $e_event, $e107, $pref, $footer_js, $PLUGINS_DIRECTORY;
+if (!plugInstalled('chatbox_menu'))
+{
+ return '';
+}
if(($pref['cb_layer']==2) || isset($_POST['chatbox_ajax']))
{
diff --git a/e107_plugins/chatbox_menu/languages/English/English_config.php b/e107_plugins/chatbox_menu/languages/English/admin_chatbox_menu.php
similarity index 79%
rename from e107_plugins/chatbox_menu/languages/English/English_config.php
rename to e107_plugins/chatbox_menu/languages/English/admin_chatbox_menu.php
index 875d57861..b2ddaccdb 100644
--- a/e107_plugins/chatbox_menu/languages/English/English_config.php
+++ b/e107_plugins/chatbox_menu/languages/English/admin_chatbox_menu.php
@@ -3,10 +3,10 @@
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
-| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/languages/English/English_config.php,v $
-| $Revision: 1.1.1.1 $
-| $Date: 2006-12-02 04:34:51 $
-| $Author: mcfly_e107 $
+| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/languages/English/admin_chatbox_menu.php,v $
+| $Revision: 1.1 $
+| $Date: 2008-12-11 21:13:48 $
+| $Author: e107steved $
| Encoding:
+----------------------------------------------------------------------------+
*/
@@ -52,5 +52,18 @@ define("CHBLAN_35", "Recalculate");
define("CHBLAN_36", "Chatbox Display options");
define("CHBLAN_37", "Normal chatbox");
define("CHBLAN_38", "Use javascript code to update posts dynamically (AJAX)");
+define('CHBLAN_39', 'Nothing changed - not updated');
+define('CHBLAN_40', 'Chatbox');
+define('CHBLAN_41', 'Chatbox Menu');
+define('CHBLAN_42', '');
+define('CHBLAN_43', '');
+
+// Admin Log
+define('LAN_AL_CHBLAN_01','Chatbox settings updated');
+define('LAN_AL_CHBLAN_02','Chatbox pruned');
+define('LAN_AL_CHBLAN_03','Chatbox posts recalculated');
+define('LAN_AL_CHBLAN_04','');
+define('LAN_AL_CHBLAN_05','');
+
?>
\ No newline at end of file
diff --git a/e107_plugins/chatbox_menu/plugin.php b/e107_plugins/chatbox_menu/plugin.php
deleted file mode 100644
index 75c7afba6..000000000
--- a/e107_plugins/chatbox_menu/plugin.php
+++ /dev/null
@@ -1,102 +0,0 @@
- '10',
- 'cb_wordwrap' => '20',
- 'cb_layer' => '0',
- 'cb_layer_height' => '200',
- 'cb_emote' => '0',
- 'cb_mod' => e_UC_ADMIN
-);
-
-// List of table names -----------------------------------------------------------------------------------------------
-$eplug_table_names = array(
- "chatbox"
-);
-
-// List of sql requests to create tables -----------------------------------------------------------------------------
-$eplug_tables = array(
- "CREATE TABLE ".MPREFIX."chatbox (
- cb_id int(10) unsigned NOT NULL auto_increment,
- cb_nick varchar(30) NOT NULL default '',
- cb_message text NOT NULL,
- cb_datestamp int(10) unsigned NOT NULL default '0',
- cb_blocked tinyint(3) unsigned NOT NULL default '0',
- cb_ip varchar(45) NOT NULL default '',
- PRIMARY KEY (cb_id)
- ) TYPE=MyISAM;"
-);
-
-// Create a link in main menu (yes=TRUE, no=FALSE) -------------------------------------------------------------
-$eplug_link = FALSE;
-$eplug_link_name = '';
-$eplug_link_url = '';
-
-
-// upgrading ... //
-$upgrade_add_prefs = "";
-$upgrade_remove_prefs = "";
-$upgrade_alter_tables = "";
-
-
-if (!function_exists('chatbox_menu_uninstall')) {
- function chatbox_menu_uninstall() {
- global $sql;
- $sql -> db_Update("user", "user_chats='0'");
- }
-}
-
-if (!function_exists('chatbox_menu_install')) {
- function chatbox_menu_install() {
- global $sql;
- $sql -> db_Update("user", "user_chats='0'");
- }
-}
-
-?>
diff --git a/e107_plugins/chatbox_menu/plugin.xml b/e107_plugins/chatbox_menu/plugin.xml
new file mode 100644
index 000000000..84ba447d6
--- /dev/null
+++ b/e107_plugins/chatbox_menu/plugin.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ CHBLAN_41
+ e107v0.7+
+ chatbox_menu
+
+ Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
+
+ admin_chatbox.php
+ images/chatbox_32.png
+ images/chatbox_16.png
+ LAN_CONFIGURE
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/e107_plugins/featurebox/admin_config.php b/e107_plugins/featurebox/admin_config.php
index ffcb81ad6..ba4e61b53 100644
--- a/e107_plugins/featurebox/admin_config.php
+++ b/e107_plugins/featurebox/admin_config.php
@@ -11,13 +11,14 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/admin_config.php,v $
-| $Revision: 1.5 $
-| $Date: 2008-12-10 22:41:39 $
+| $Revision: 1.6 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
-if (!getperms("P")) {
+if (!getperms("P") || !plugInstalled('featurebox'))
+{
header("location:".e_BASE."index.php");
exit;
}
diff --git a/e107_plugins/featurebox/featurebox.php b/e107_plugins/featurebox/featurebox.php
index 650b6b079..46cd578b6 100644
--- a/e107_plugins/featurebox/featurebox.php
+++ b/e107_plugins/featurebox/featurebox.php
@@ -11,13 +11,17 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/featurebox.php,v $
-| $Revision: 1.3 $
-| $Date: 2007-01-20 16:19:43 $
-| $Author: mrpete $
+| $Revision: 1.4 $
+| $Date: 2008-12-11 21:13:48 $
+| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
+if (!plugInstalled('featurebox'))
+{
+ return '';
+}
if($sql -> db_Select("featurebox", "*", "fb_mode=1 AND fb_class IN (".USERCLASS_LIST.") ORDER BY fb_class ASC"))
{
diff --git a/e107_plugins/log/admin_config.php b/e107_plugins/log/admin_config.php
index 911f021ad..15d61b05f 100644
--- a/e107_plugins/log/admin_config.php
+++ b/e107_plugins/log/admin_config.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/log/admin_config.php,v $
-| $Revision: 1.6 $
-| $Date: 2008-12-07 21:41:04 $
+| $Revision: 1.7 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
@@ -20,11 +20,10 @@
require_once("../../class2.php");
-if (!plugInstalled('log')) header("Location: ".e_BASE."index.php");
-if (!getperms("P"))
+if (!getperms("P") || !plugInstalled('log'))
{
- header("location:../../index.php");
- exit;
+ header("Location: ".e_BASE."index.php");
+ exit;
}
require_once(e_ADMIN."auth.php");
diff --git a/e107_plugins/log/stats.php b/e107_plugins/log/stats.php
index 2e00bfe0e..fb783b04a 100644
--- a/e107_plugins/log/stats.php
+++ b/e107_plugins/log/stats.php
@@ -11,16 +11,19 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/log/stats.php,v $
-| $Revision: 1.9 $
-| $Date: 2008-10-07 19:08:50 $
+| $Revision: 1.10 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
+if (!plugInstalled('log'))
+{
+ header("Location: ".e_BASE."index.php");
+ exit;
+}
-@include_once(e_PLUGIN."log/languages/".e_LANGUAGE.".php");
-@include_once(e_PLUGIN."log/languages/English.php");
-
+@include_lan(e_PLUGIN."log/languages/".e_LANGUAGE.".php");
$bar = (file_exists(THEME."images/bar.png") ? THEME."images/bar.png" : e_IMAGE."generic/bar.png");
$eplug_css[] = "";
-/*
-function core_head() {
- $bar = (file_exists(THEME."images/bar.png") ? THEME."images/bar.png" : e_IMAGE."generic/bar.png");
- return "";
-}
-*/
require_once(HEADERF);
diff --git a/e107_plugins/poll/admin_config.php b/e107_plugins/poll/admin_config.php
index ae6d3e814..e70fd0044 100644
--- a/e107_plugins/poll/admin_config.php
+++ b/e107_plugins/poll/admin_config.php
@@ -11,21 +11,21 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/admin_config.php,v $
-| $Revision: 1.6 $
-| $Date: 2008-08-17 11:54:38 $
+| $Revision: 1.7 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
if (!is_object($tp)) $tp = new e_parse;
-if (!getperms("P"))
+if (!getperms("P") || !plugInstalled('poll'))
{
header("location:".e_BASE."index.php");
exit;
}
$e_sub_cat = 'poll';
-include_lan_admin('poll');
+include_lan(e_PLUGIN.'poll/languages/English_admin_poll.php');
require_once(e_ADMIN."auth.php");
require_once(e_PLUGIN."poll/poll_class.php");
require_once(e_HANDLER."form_handler.php");
diff --git a/e107_plugins/poll/oldpolls.php b/e107_plugins/poll/oldpolls.php
index 0f462f3e1..f9200ab41 100644
--- a/e107_plugins/poll/oldpolls.php
+++ b/e107_plugins/poll/oldpolls.php
@@ -11,12 +11,17 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/oldpolls.php,v $
-| $Revision: 1.3 $
-| $Date: 2007-03-03 19:41:00 $
+| $Revision: 1.4 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
+if (!plugInstalled('poll'))
+{
+ header("Location: ".e_BASE."index.php");
+ exit;
+}
require_once(HEADERF);
require_once(e_HANDLER."comment_class.php");
$cobj = new comment;
diff --git a/e107_plugins/poll/poll.php b/e107_plugins/poll/poll.php
index 8d340d94a..24b9315e5 100644
--- a/e107_plugins/poll/poll.php
+++ b/e107_plugins/poll/poll.php
@@ -11,12 +11,18 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll.php,v $
-| $Revision: 1.1.1.1 $
-| $Date: 2006-12-02 04:35:40 $
-| $Author: mcfly_e107 $
+| $Revision: 1.2 $
+| $Date: 2008-12-11 21:13:48 $
+| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
+if (!plugInstalled('poll'))
+{
+ header("Location: ".e_BASE."index.php");
+ exit;
+}
+
require_once(HEADERF);
require_once(e_PLUGIN."poll/poll_menu.php");
diff --git a/e107_plugins/poll/poll_menu.php b/e107_plugins/poll/poll_menu.php
index e4af55ff3..a68039c84 100644
--- a/e107_plugins/poll/poll_menu.php
+++ b/e107_plugins/poll/poll_menu.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_menu.php,v $
-| $Revision: 1.2 $
-| $Date: 2008-06-03 21:31:31 $
+| $Revision: 1.3 $
+| $Date: 2008-12-11 21:13:48 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -25,6 +25,11 @@ if(defined("POLLRENDERED"))
{
// return;
}
+if (!plugInstalled('poll'))
+{
+ return '';
+}
+
if(!defined("POLLCLASS"))
{
require(e_PLUGIN."poll/poll_class.php");
@@ -37,8 +42,7 @@ if(!isset($poll) || !is_object($poll))
if(!defined("POLL_1"))
{
/* if menu is being called from comments, lan files have to be included manually ... */
- @include_once(e_PLUGIN."poll/languages/".e_LANGUAGE.".php");
- @include_once(e_PLUGIN."poll/languages/English.php");
+ @include_lan(e_PLUGIN."poll/languages/".e_LANGUAGE.".php");
}
if (empty($poll_to_show))