diff --git a/e107_admin/ad_links.php b/e107_admin/ad_links.php
index 8b9d1bc55..2d584d787 100644
--- a/e107_admin/ad_links.php
+++ b/e107_admin/ad_links.php
@@ -9,9 +9,9 @@
* Admin Navigation
*
* $Source: /cvs_backup/e107_0.8/e107_admin/ad_links.php,v $
- * $Revision: 1.9 $
- * $Date: 2009-05-03 19:13:32 $
- * $Author: bugrain $
+ * $Revision: 1.10 $
+ * $Date: 2009-07-09 02:47:09 $
+ * $Author: e107coders $
*/
if (!defined('e107_INIT')) { exit; }
@@ -39,6 +39,12 @@ if (!defined('E_16_CAT_TOOL')) {
if (!defined('E_16_CAT_PLUG')) {
define('E_16_CAT_PLUG', e_IMAGE.'admin_images/cat_plugins_16.png');
}
+if (!defined('E_16_CAT_MANAGE')) {
+ define('E_16_CAT_MANAGE', e_IMAGE.'admin_images/manage_16.png');
+}
+if (!defined('E_16_CAT_MISC')) {
+ define('E_16_CAT_MISC', e_IMAGE.'admin_images/settings_16.png');
+}
if (!defined('E_16_CAT_ABOUT')) {
define('E_16_CAT_ABOUT', e_IMAGE.'admin_images/info_16.png');
}
@@ -62,6 +68,12 @@ if (!defined('E_32_CAT_TOOL')) {
if (!defined('E_32_CAT_PLUG')) {
define('E_32_CAT_PLUG', "
");
}
+if (!defined('E_32_CAT_MANAGE')) {
+ define('E_32_CAT_MANAGE', "
");
+}
+if (!defined('E_32_CAT_MISC')) {
+ define('E_32_CAT_MISC', "
");
+}
if (!defined('E_32_CAT_ABOUT')) {
define('E_32_CAT_ABOUT', "
");
}
@@ -467,18 +479,37 @@ $admin_cat['img'][4] = E_16_CAT_TOOL;
$admin_cat['lrg_img'][4] = E_32_CAT_TOOL;
$admin_cat['sort'][4] = true;
-$admin_cat['title'][5] = ADLAN_CL_7;
-$admin_cat['id'][5] = 'plugMenu';
-$admin_cat['img'][5] = E_16_CAT_PLUG;
-$admin_cat['lrg_img'][5] = E_32_CAT_PLUG;
-$admin_cat['sort'][5] = false;
+// Manage
+$admin_cat['title'][5] = LAN_MANAGE;
+$admin_cat['id'][5] = 'managMenu';
+$admin_cat['img'][5] = E_16_CAT_MANAGE;
+$admin_cat['lrg_img'][5] = E_32_CAT_MANAGE;
+$admin_cat['sort'][5] = TRUE;
-//About menu
-$admin_cat['title'][6] = ADLAN_CL_8;
-$admin_cat['id'][6] = 'aboutMenu';
-$admin_cat['img'][6] = E_16_CAT_ABOUT;//E_16_NAV_DOCS
-$admin_cat['lrg_img'][6] = E_32_CAT_ABOUT;
-$admin_cat['sort'][6] = false;
+if(varsettrue($pref['admin_separate_plugins']))
+{
+ $admin_cat['title'][6] = ADLAN_CL_7;
+ $admin_cat['id'][6] = 'plugMenu';
+ $admin_cat['img'][6] = E_16_CAT_PLUG;
+ $admin_cat['lrg_img'][6] = E_32_CAT_PLUG;
+ $admin_cat['sort'][6] = false;
+}
+else
+{
+ // Misc.
+ $admin_cat['title'][6] = ADLAN_CL_8;
+ $admin_cat['id'][6] = 'miscMenu';
+ $admin_cat['img'][6] = E_16_CAT_MISC;
+ $admin_cat['lrg_img'][6] = E_32_CAT_MISC;
+ $admin_cat['sort'][6] = TRUE;
+}
+
+//About menu - No 20 - leave space for user-categories.
+$admin_cat['title'][20] = ADLAN_CL_20;
+$admin_cat['id'][20] = 'aboutMenu';
+$admin_cat['img'][20] = E_16_CAT_ABOUT;//E_16_NAV_DOCS
+$admin_cat['lrg_img'][20] = E_32_CAT_ABOUT;
+$admin_cat['sort'][20] = false;
// Info about attributes
/*
@@ -490,15 +521,23 @@ attribute 5 = category
1 - settings
2 - users
3 - content
- 4 - tools
- 5 - plugins
- 6 - about
+ 4 - tools (maintenance)
+ 5 - plugins/misc
+ 6 - manage
+
+ 7 - user-category
+ 8 - user-category etc.
+
+ 20 - help
+
attribute 6 = 16 x 16 image
attribute 7 = 32 x 32 image
*/
//FIXME array structure suitable for e_admin_menu - see shortcodes/admin_navigation.php
//TODO find out where is used $array_functions elsewhere, refactor it
+
+
$array_functions = array(
0 => array(e_ADMIN.'administrator.php', ADLAN_8, ADLAN_9, '3', 2, E_16_ADMIN, E_32_ADMIN),
1 => array(e_ADMIN.'updateadmin.php', ADLAN_10, ADLAN_11, '', 2, E_16_ADPASS, E_32_ADPASS),
@@ -509,7 +548,7 @@ $array_functions = array(
6 => array(e_ADMIN.'db.php', ADLAN_44, ADLAN_45, '0', 4, E_16_DATAB, E_32_DATAB),
7 => array(e_ADMIN.'download.php', ADLAN_24, ADLAN_25, 'R', 3, E_16_DOWNL, E_32_DOWNL),
8 => array(e_ADMIN.'emoticon.php', ADLAN_58, ADLAN_59, 'F', 1, E_16_EMOTE, E_32_EMOTE),
- 9 => array(e_ADMIN.'filemanager.php', ADLAN_30, ADLAN_31, '6', 4, E_16_FILE, E_32_FILE),
+ 9 => array(e_ADMIN.'filemanager.php', ADLAN_30, ADLAN_31, '6', 5, E_16_FILE, E_32_FILE),
10 => array(e_ADMIN.'frontpage.php', ADLAN_60, ADLAN_61, 'G', 1, E_16_FRONT, E_32_FRONT),
11 => array(e_ADMIN.'image.php', ADLAN_105, ADLAN_106, 'A', 1, E_16_IMAGES, E_32_IMAGES),
12 => array(e_ADMIN.'links.php', ADLAN_138, ADLAN_139, 'I', 1, E_16_LINKS, E_32_LINKS),
@@ -518,11 +557,11 @@ $array_functions = array(
15 => array(e_ADMIN.'menus.php', ADLAN_6, ADLAN_7, '2', 3, E_16_MENUS, E_32_MENUS),
16 => array(e_ADMIN.'meta.php', ADLAN_66, ADLAN_67, 'T', 1, E_16_META, E_32_META),
17 => array(e_ADMIN.'newspost.php', ADLAN_0, ADLAN_1, 'H', 3, E_16_NEWS, E_32_NEWS),
- 18 => array(e_ADMIN.'phpinfo.php', ADLAN_68, ADLAN_69, '0', 4, E_16_PHP, E_32_PHP),
+ 18 => array(e_ADMIN.'phpinfo.php', ADLAN_68, ADLAN_69, '0', 20, E_16_PHP, E_32_PHP),
19 => array(e_ADMIN.'prefs.php', ADLAN_4, ADLAN_5, '1', 1, E_16_PREFS, E_32_PREFS),
20 => array(e_ADMIN.'search.php', ADLAN_142, ADLAN_143, 'X', 1, E_16_SEARCH, E_32_SEARCH),
21 => array(e_ADMIN.'admin_log.php', ADLAN_155, ADLAN_156, 'S', 4, E_16_ADMINLOG, E_32_ADMINLOG),
- 22 => array(e_ADMIN.'theme.php', ADLAN_140, ADLAN_141, '1', 4, E_16_THEMEMANAGER, E_32_THEMEMANAGER),
+ 22 => array(e_ADMIN.'theme.php', ADLAN_140, ADLAN_141, '1', 5, E_16_THEMEMANAGER, E_32_THEMEMANAGER),
23 => array(e_ADMIN.'upload.php', ADLAN_72, ADLAN_73, 'V', 3, E_16_UPLOADS, E_32_UPLOADS),
24 => array(e_ADMIN.'users.php', ADLAN_36, ADLAN_37, '4', 2, E_16_USER, E_32_USER),
25 => array(e_ADMIN.'userclass2.php', ADLAN_38, ADLAN_39, '4', 2, E_16_USERCLASS, E_32_USERCLASS),
@@ -533,10 +572,10 @@ $array_functions = array(
30 => array(e_ADMIN.'notify.php', ADLAN_149, ADLAN_150, 'O', 4, E_16_NOTIFY, E_32_NOTIFY),
31 => array(e_ADMIN.'cron.php', ADLAN_157, ADLAN_158, 'U', 4, E_16_CRON, E_32_CRON),
32 => array(e_ADMIN.'eurl.php', ADLAN_159, ADLAN_160, 'L', 1, E_16_EURL, E_32_EURL),
- 33 => array(e_ADMIN.'plugin.php', ADLAN_98, ADLAN_99, 'Z', 5, E_16_PLUGMANAGER, E_32_PLUGMANAGER),
- 34 => array(e_ADMIN.'docs.php', ADLAN_12, ADLAN_13, '', 6, E_16_DOCS, E_32_DOCS),
- 35 => array('#TODO', 'System Info', 'System Information', '', 6, '', ''),
- 36 => array(e_ADMIN.'credits.php', LAN_CREDITS, LAN_CREDITS, '', 6, '', '')
+ 33 => array(e_ADMIN.'plugin.php', ADLAN_98, ADLAN_99, 'Z', 5 , E_16_PLUGMANAGER, E_32_PLUGMANAGER),
+ 34 => array(e_ADMIN.'docs.php', ADLAN_12, ADLAN_13, '', 20, E_16_DOCS, E_32_DOCS),
+ 35 => array('#TODO', 'System Info', 'System Information', '', 20, '', ''),
+ 36 => array(e_ADMIN.'credits.php', LAN_CREDITS, LAN_CREDITS, '', 20, '', '')
);
//FIXME array structure suitable for e_admin_menu - see shortcodes/admin_navigation.php
diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index 0739033b4..8afcc1314 100644
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
-| $Revision: 1.27 $
-| $Date: 2009-07-07 07:25:26 $
+| $Revision: 1.28 $
+| $Date: 2009-07-09 02:47:10 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -57,7 +57,7 @@ class pluginManager{
global $user_pref,$admin_log,$ns;
$tmp = explode('.', e_QUERY);
- $this -> action = $tmp[0];
+ $this -> action = ($tmp[0]) ? $tmp[0] : "installed";
$this -> id = intval($tmp[1]);
@@ -68,6 +68,7 @@ class pluginManager{
"plugin_name" => array("title" => EPL_ADLAN_10, "type"=>"text", "width" => "30", "thclass" => "middle", "url" => ""),
"plugin_version" => array("title" => EPL_ADLAN_11, "type"=>"numeric", "width" => "5%", "thclass" => "middle", "url" => ""),
"plugin_folder" => array("title" => EPL_ADLAN_64, "type"=>"text", "width" => "10%", "thclass" => "middle", "url" => ""),
+ "plugin_category" => array("title" => LAN_CATEGORY, "type"=>"text", "width" => "15%", "thclass" => "middle", "url" => ""),
"plugin_author" => array("title" => EPL_ADLAN_12, "type"=>"text", "width" => "auto", "thclass" => "middle", "url" => ""),
"plugin_website" => array("title" => EPL_WEBSITE, "type"=>"url", "width" => "5%", "thclass" => "middle center", "url" => ""),
"plugin_notes" => array("title" => EPL_ADLAN_83, "type"=>"url", "width" => "5%", "thclass" => "middle center", "url" => ""),
@@ -88,17 +89,9 @@ class pluginManager{
save_prefs('user');
}
- $this -> fieldpref = (is_array($user_pref['admin_pluginmanager_columns'])) ? $user_pref['admin_pluginmanager_columns'] : array("plugin_icon","plugin_name","plugin_version","plugin_description","plugin_author","plugin_website","plugin_notes");
+ $this -> fieldpref = (is_array($user_pref['admin_pluginmanager_columns'])) ? $user_pref['admin_pluginmanager_columns'] : array("plugin_icon","plugin_name","plugin_version","plugin_description","plugin_category","plugin_author","plugin_website","plugin_notes");
+
- if(isset($_POST['install-selected']))
- {
- foreach($_POST['plugin_checkbox'] as $val)
- {
- $this -> id = intval($val);
- $this -> pluginInstall();
- }
- $this -> action = "installed";
- }
/* if(isset($_POST['uninstall-selected']))
{
@@ -115,11 +108,20 @@ class pluginManager{
}*/
+ /*
+ if($this->action == 'avail' || $this->action == 'installed') // Plugin Check is done during upgrade_routine.
+ {
+ $this -> pluginCheck();
+ }
+ */
+
+
if($this->action == "uninstall")
{
$this -> pluginUninstall();
- $this -> action = "installed";
+
+
}
if($this->action == "install")
@@ -151,16 +153,28 @@ class pluginManager{
$ns->tablerender(NWSLAN_4, $emessage->render());
}
+ if(isset($_POST['install-selected']))
+ {
+ foreach($_POST['plugin_checkbox'] as $val)
+ {
+ $this -> id = intval($val);
+ $this -> pluginInstall();
+ }
+ $this -> action = "installed";
+ }
+
if($this->action != 'avail')
{
unset($this-> fields['plugin_checkboxes']);
}
- if($this->action !='upload')
+ if($this->action !='upload' && $this->action !='uninstall')
{
$this -> pluginRenderList();
}
+
+
}
@@ -172,7 +186,7 @@ class pluginManager{
if(!isset($_POST['uninstall_confirm']))
{ // $id is already an integer
$this->pluginConfirmUninstall($this->id);
- exit;
+ return;
}
$plug = $plugin->getinfo($this->id);
@@ -312,6 +326,8 @@ class pluginManager{
$this->show_message($text, E_MESSAGE_SUCCESS);
// $ns->tablerender(EPL_ADLAN_1.' '.$tp->toHtml($plug['plugin_name'], "", "defs,emotes_off,no_make_clickable"), $text);
$text = '';
+ $this->action = "installed";
+ return;
}
@@ -767,6 +783,7 @@ class pluginManager{
$text .= (in_array("plugin_name",$this->fieldpref)) ? "
".$plugName." | " : "";
$text .= (in_array("plugin_version",$this->fieldpref)) ? "".$plug['plugin_version']." | " : "";
$text .= (in_array("plugin_folder",$this->fieldpref)) ? "".$plug['plugin_path']." | " : "";
+ $text .= (in_array("plugin_category",$this->fieldpref)) ? "".$plug['plugin_category']." | " : "";
$text .= (in_array("plugin_author",$this->fieldpref)) ? "".$plugAuthor." | " : "";
$text .= (in_array("plugin_website",$this->fieldpref)) ? "".($plugURL ? " " : "")." | " : "";
$text .= (in_array("plugin_notes",$this->fieldpref)) ? "".($plugReadme ? " " : " ")." | " : "";
@@ -976,8 +993,7 @@ class pluginManager{
";
$ns->tablerender(EPL_ADLAN_63." ".$tp->toHtml($plug_vars['name'], "", "defs,emotes_off, no_make_clickable"), $text);
- require_once(e_ADMIN."footer.php");
- exit;
+
}
function show_message($message, $type = E_MESSAGE_INFO, $session = false)
@@ -986,30 +1002,37 @@ class pluginManager{
$emessage = &eMessage::getInstance();
$emessage->add($message, $type, $session);
}
+
+ function pluginOptions()
+ {
+ // $e107 = &e107::getInstance();
+
+ $var['installed']['text'] = EPL_ADLAN_22;
+ $var['installed']['link'] = e_SELF;
+
+ $var['avail']['text'] = EPL_ADLAN_23;
+ $var['avail']['link'] = e_SELF."?avail";
+
+ $var['upload']['text'] = EPL_ADLAN_38;
+ $var['upload']['link'] = e_SELF."?upload";
+
+ $keys = array_keys($var);
+
+ $action = (in_array($this->action,$keys)) ? $this->action : "installed";
+
+ e_admin_menu(ADLAN_98, $action, $var);
+ }
+
+
+
} // end of Class.
function plugin_adminmenu()
{
- // $e107 = &e107::getInstance();
-
- $var['installed']['text'] = EPL_ADLAN_22;
- $var['installed']['link'] = e_SELF;
-
- $var['avail']['text'] = EPL_ADLAN_23;
- $var['avail']['link'] = e_SELF."?avail";
-
-/* $var['choose']['text'] = TPVLAN_51;
- $var['choose']['link'] = e_SELF."?choose";*/
-
- $var['upload']['text'] = EPL_ADLAN_38;
- $var['upload']['link'] = e_SELF."?upload";
-
- $selected = (e_QUERY) ? e_QUERY : "installed";
-
-
- e_admin_menu(ADLAN_98, $selected, $var);
+ global $pman;
+ $pman -> pluginOptions();
}
?>
\ No newline at end of file
diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php
index 560a3c63b..5a0bf1244 100644
--- a/e107_admin/prefs.php
+++ b/e107_admin/prefs.php
@@ -9,9 +9,9 @@
* Administration - Site Preferences
*
* $Source: /cvs_backup/e107_0.8/e107_admin/prefs.php,v $
- * $Revision: 1.30 $
- * $Date: 2009-06-12 20:41:34 $
- * $Author: e107steved $
+ * $Revision: 1.31 $
+ * $Date: 2009-07-09 02:47:11 $
+ * $Author: e107coders $
*
*/
require_once ("../class2.php");
@@ -377,6 +377,12 @@ $text .= "
".$frm->radio_switch('admin_slidedown_subs', $pref['admin_slidedown_subs'])."
".PRFLAN_200."
+
+ ".PRFLAN_204." |
+
+ ".$frm->radio_switch('admin_separate_plugins', $pref['admin_separate_plugins'])."
+ ".PRFLAN_205."
+ |
diff --git a/e107_admin/sql/core_sql.php b/e107_admin/sql/core_sql.php
index b657ff454..493f5dbfe 100644
--- a/e107_admin/sql/core_sql.php
+++ b/e107_admin/sql/core_sql.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $
-| $Revision: 1.18 $
-| $Date: 2009-07-07 12:54:47 $
+| $Revision: 1.19 $
+| $Date: 2009-07-09 02:47:12 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -385,6 +385,7 @@ CREATE TABLE plugin (
plugin_path varchar(100) NOT NULL default '',
plugin_installflag tinyint(1) unsigned NOT NULL default '0',
plugin_addons text NOT NULL,
+ plugin_category varchar(100) NOT NULL default '',
PRIMARY KEY (plugin_id),
UNIQUE KEY plugin_path (plugin_path)
) TYPE=MyISAM;
diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php
index 98cc84025..99293ca46 100644
--- a/e107_admin/update_routines.php
+++ b/e107_admin/update_routines.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $
-| $Revision: 1.39 $
-| $Date: 2009-07-07 12:54:46 $
+| $Revision: 1.40 $
+| $Date: 2009-07-09 02:47:11 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -244,7 +244,7 @@ function update_706_to_800($type='')
// List of changed DB tables (defined in core_sql.php)
// (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster)
- $changed_tables = array('user', 'dblog','admin_log', 'userclass_classes', 'banlist', 'menus');
+ $changed_tables = array('user', 'dblog','admin_log', 'userclass_classes', 'banlist', 'menus', 'plugin');
// List of changed DB tables from core plugins (defined in pluginname_sql.php file)
@@ -332,6 +332,17 @@ function update_706_to_800($type='')
catch_error();
}
+ if($sql->db_Select("plugin", "plugin_category", "plugin_category = ''"))
+ {
+ if ($just_check) return update_needed();
+ require_once(e_HANDLER."plugin_class.php");
+ $ep = new e107plugin;
+ $ep -> update_plugins_table();
+ $updateMessages[] = LAN_UPDATE_24;
+ // catch_error();
+ }
+
+
//change menu_path for userlanguage_menu
if($sql->db_Select("menus", "menu_path", "menu_path='userlanguage_menu' || menu_path='userlanguage_menu/'"))
{
diff --git a/e107_files/shortcode/batch/admin_shortcodes_class.php b/e107_files/shortcode/batch/admin_shortcodes_class.php
index 9978e1ac2..c292cac38 100644
--- a/e107_files/shortcode/batch/admin_shortcodes_class.php
+++ b/e107_files/shortcode/batch/admin_shortcodes_class.php
@@ -1,7 +1,7 @@
".E_16_NEWS.($submitted_news ? " ".ADLAN_LAT_2.": $submitted_news" : ' '.ADLAN_LAT_2.': 0').'';
$text .= "';
- foreach($pref['e_latest_list'] as $val)
+ if(isset($pref['e_latest_list']))
{
- if (is_readable(e_PLUGIN.$val.'/e_latest.php'))
+ foreach($pref['e_latest_list'] as $val)
{
- include_once(e_PLUGIN.$val.'/e_latest.php');
+ if (is_readable(e_PLUGIN.$val.'/e_latest.php'))
+ {
+ include_once(e_PLUGIN.$val.'/e_latest.php');
+ }
}
- }
+ }
$messageTypes = array('Broken Download', 'Dev Team Message');
$queryString = '';
@@ -920,7 +923,7 @@ class admin_shortcodes
{
/*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org)
- * $Id: admin_shortcodes_class.php,v 1.5 2009-07-07 07:25:26 e107coders Exp $
+ * $Id: admin_shortcodes_class.php,v 1.6 2009-07-09 02:47:12 e107coders Exp $
*/
if (ADMIN)
@@ -971,8 +974,9 @@ class admin_shortcodes
$text .= adnav_cat(ADLAN_151, e_ADMIN.'admin.php', E_16_NAV_MAIN);
- for ($i = 1; $i < 5; $i++)
- {
+ for ($i = 1; $i < 6; $i++)
+ {
+
$ad_tmpi = 0;
$ad_links_array = asortbyindex($array_functions, 1);
$nav_main = adnav_cat($admin_cat['title'][$i], '', $admin_cat['img'][$i], $admin_cat['id'][$i]);
@@ -1028,13 +1032,13 @@ class admin_shortcodes
$plugs_text .= $plugin_compile;
}
}
-
+ /*
if (getperms('Z'))
{
$pclass_extended = $active_plugs ? 'header' : '';
$plugin_text = adnav_main(ADLAN_98, e_ADMIN.'plugin.php', E_16_PLUGMANAGER, FALSE, $pclass_extended);
$render_plugins = TRUE;
- }
+ }*/
if ($render_plugins)
{
@@ -1104,7 +1108,6 @@ class admin_shortcodes
-
// MAIN LINK
$menu_vars = array();
$menu_vars['main']['text'] = ADLAN_151;
@@ -1114,8 +1117,8 @@ class admin_shortcodes
$menu_vars['main']['perm'] = '';
//ALL OTHER ROOT LINKS - temporary data transformation - data structure will be changed in the future and this block will be removed
- $cnt = count($admin_cat['id']);
- for ($i = 1; $i <= $cnt; $i++)
+
+ foreach($admin_cat['id'] as $i => $cat)
{
$id = $admin_cat['id'][$i];
$menu_vars[$id]['text'] = $admin_cat['title'][$i];
@@ -1171,7 +1174,7 @@ class admin_shortcodes
$plug = new e107plugin;
$tmp = array();
- if($sql->db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path"))
+ if($sql->db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path"))
{
while($row = $sql->db_Fetch())
{
@@ -1187,7 +1190,8 @@ class admin_shortcodes
$id = 'plugnav-'.$row['plugin_path'];
- $tmp[$id]['text'] = $e107->tp->toHTML($plug_vars['@attributes']['name'], FALSE, "defs");
+
+ $tmp[$id]['text'] = $e107->tp->toHTML($plug_vars['@attributes']['name'], FALSE, "defs");
$tmp[$id]['description'] = $plug_vars['description'];
$tmp[$id]['link'] = e_PLUGIN_ABS.$row['plugin_path'].'/'.$plug_vars['administration']['configFile'];
$tmp[$id]['image'] = $icon_src ? "
" : E_16_PLUGIN;
@@ -1196,7 +1200,9 @@ class admin_shortcodes
$tmp[$id]['image_large_src'] = $icon_src_lrg;
$tmp[$id]['perm'] = 'P'.$row['plugin_id'];
$tmp[$id]['sub_class'] = '';
- $tmp[$id]['sort'] = false;
+ $tmp[$id]['sort'] = 2;
+ $tmp[$id]['category'] = $row['plugin_category'];
+
if($pref['admin_slidedown_subs'] && varsettrue($plug_vars['administration']['subMenuItem']))
{
@@ -1222,9 +1228,37 @@ class admin_shortcodes
}
}
}
- $menu_vars['plugMenu']['sub'] += multiarray_sort($tmp, 'text');
+
+ $menu_vars['plugMenu']['sub'] = multiarray_sort($tmp, 'text');
}
+
+ // ---------------- Cameron's Bit ---------------------------------
+
+ if(!varsettrue($pref['admin_separate_plugins']))
+ {
+ // Convert Plugin Categories to Core Categories.
+ $convert = array(
+ 'settings' => array(1,'setMenu'),
+ 'users' => array(2,'userMenu'),
+ 'content' => array(3,'contMenu'),
+ 'tools' => array(4,'toolMenu'),
+ 'manage' => array(6,'managMenu'),
+ 'misc' => array(7,'miscMenu'),
+ 'help' => array(20,'helpMenu')
+ );
+
+ foreach($tmp as $pg)
+ {
+ $id = $convert[$pg['category']][1];
+ $menu_vars[$id]['sub'][] = $pg;
+ }
+ unset($menu_vars['plugMenu']);
+ }
+
+ // print_a($menu_vars);
+ // ------------------------------------------------------------------
+
return e_admin_menu('', '', $menu_vars, $$tmpl, false, false);
}
diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php
index b8f4a7579..040e29bf4 100644
--- a/e107_handlers/plugin_class.php
+++ b/e107_handlers/plugin_class.php
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
-| $Revision: 1.64 $
-| $Date: 2008-12-30 19:01:09 $
-| $Author: e107steved $
+| $Revision: 1.65 $
+| $Date: 2009-07-09 02:47:12 $
+| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -80,7 +80,8 @@ class e107plugin
'plugin_version', // Version - arbitrary text field
'plugin_path', // Name of the directory off e_PLUGIN - unique
'plugin_installflag', // '0' = not installed, '1' = installed
- 'plugin_addons' // List of any extras associated with plugin - bbcodes, e_XXX files...
+ 'plugin_addons', // List of any extras associated with plugin - bbcodes, e_XXX files...
+ 'plugin_category' // Plugin Category: settings, users, content, management, tools, misc
);
var $plug_vars;
@@ -173,12 +174,24 @@ class e107plugin
$eplug_addons = $this->getAddons($plugin_path); // Returns comma-separated list
// $eplug_addons = $this->getAddons($plugin_path,'check'); // Checks opening/closing tags on addon files
+
+
//Ensure the plugin path lives in the same folder as is configured in the plugin.php/plugin.xml
if ($plugin_path == $plug_info['folder'])
{
if(array_key_exists($plugin_path, $pluginDBList))
{ // Update the addons needed by the plugin
$pluginDBList[$plugin_path]['status'] = 'exists';
+
+ // Check for missing plugin_category in plugin table.
+ if ($pluginDBList[$plugin_path]['plugin_category'] == '')
+ {
+ // print_a($plug_info);
+ $pluginDBList[$plugin_path]['status'] = 'update';
+ $pluginDBList[$plugin_path]['plugin_category'] = (isset($plug_info['category'])) ? $plug_info['category'] : "misc";
+ }
+
+
// If plugin not installed, and version number of files changed, update version as well
if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $plug_info['@attributes']['version']))
{ // Update stored version
@@ -219,7 +232,7 @@ class e107plugin
// Can just add to DB - shouldn't matter that its not in our current table
// echo "Trying to insert: ".$eplug_folder."
";
$_installed = ($plug_info['@attributes']['installRequired'] == 'true' || $plug_info['@attributes']['installRequired'] == 1 ? 0 : 1 );
- $sql->db_Insert("plugin", "0, '".$tp -> toDB($plug_info['@attributes']['name'], true)."', '".$tp -> toDB($plug_info['@attributes']['version'], true)."', '".$tp -> toDB($plugin_path, true)."', {$_installed}, '{$eplug_addons}' ");
+ $sql->db_Insert("plugin", "0, '".$tp -> toDB($plug_info['@attributes']['name'], true)."', '".$tp -> toDB($plug_info['@attributes']['version'], true)."', '".$tp -> toDB($plugin_path, true)."', {$_installed}, '{$eplug_addons}', '".$plug_info['category']."' ");
}
}
}
@@ -227,6 +240,8 @@ class e107plugin
{ // May be useful that we ignore what will usually be copies/backups of plugins - but don't normally say anything
// echo "Plugin copied to wrong directory. Is in: {$plugin_path} Should be: {$plug_info['folder']}
";
}
+
+ /// print_a($plug_info);
}
// Now scan the table, updating the DB where needed
@@ -1568,6 +1583,7 @@ class e107plugin
$ret['@attributes']['name'] = varset($eplug_name);
$ret['@attributes']['compatibility'] = varset($eplug_compatible);
$ret['folder'] = varset($eplug_folder);
+ $ret['category'] = varset($eplug_category);
$ret['description'] = varset($eplug_description);
$ret['author']['@attributes']['name'] = varset($eplug_author);
$ret['author']['@attributes']['url'] = varset($eplug_url);
@@ -1576,6 +1592,7 @@ class e107plugin
$ret['compliant'] = varset($eplug_compliant);
$ret['menuName'] = varset($eplug_menu_name);
+
$ret['administration']['icon'] = varset($eplug_icon);
$ret['administration']['caption'] = varset($eplug_caption);
$ret['administration']['iconSmall'] = varset($eplug_icon_small);
diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php
index 3c8e1815b..1a4b79d31 100644
--- a/e107_handlers/theme_handler.php
+++ b/e107_handlers/theme_handler.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
-| $Revision: 1.27 $
-| $Date: 2009-07-08 06:58:00 $
+| $Revision: 1.28 $
+| $Date: 2009-07-09 02:47:12 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -301,12 +301,9 @@ class themeHandler{
$text = "";
foreach($this -> themeArray as $key => $theme)
{
- // if($key != $pref['admintheme'] && $key != $pref['sitetheme'])
- // {
- $text .= $this -> renderTheme(FALSE, $theme);
- // }
+ $text .= $this -> renderTheme(FALSE, $theme);
}
-
+ $text .= "
";
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_39, $text);
}
@@ -470,10 +467,10 @@ class themeHandler{
$this->id = $theme['path'];
- $text = "
+ $text = "
+
".$theme['name']."
-
- ".$theme['name']." |
+ |
".TPVLAN_11." | ".$theme['version']." |
$newpreview |
";
diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php
index 618b2e773..858c600df 100644
--- a/e107_languages/English/admin/lan_admin.php
+++ b/e107_languages/English/admin/lan_admin.php
@@ -1,7 +1,7 @@
diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php
index d9f5a888c..cc0f4d177 100644
--- a/e107_languages/English/admin/lan_prefs.php
+++ b/e107_languages/English/admin/lan_prefs.php
@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_prefs.php,v $
-| $Revision: 1.19 $
-| $Date: 2009-03-08 18:48:12 $
+| $Revision: 1.20 $
+| $Date: 2009-07-09 02:47:13 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -218,4 +218,7 @@ define("PRFLAN_200", "If enabled, Admin slide down navigation menu (if supported
define("PRFLAN_201", "Username and Password");
define("PRFLAN_202", "Email and Password");
define("PRFLAN_203", "Username/Email and Password");
+define("PRFLAN_204", "Separate plugins into their own menu.");
+define("PRFLAN_205", "If enabled, plugins will be displayed in their own navigation menu, similar to e107 v0.7 and before.");
+
?>
\ No newline at end of file
diff --git a/e107_plugins/alt_auth/plugin.xml b/e107_plugins/alt_auth/plugin.xml
index 35e794782..dd54d6a14 100644
--- a/e107_plugins/alt_auth/plugin.xml
+++ b/e107_plugins/alt_auth/plugin.xml
@@ -1,11 +1,12 @@
-
+
LAN_ALT_66
alt_auth
+ users
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
diff --git a/e107_plugins/calendar_menu/plugin.xml b/e107_plugins/calendar_menu/plugin.xml
index 4996bd2bc..fe25df5c5 100644
--- a/e107_plugins/calendar_menu/plugin.xml
+++ b/e107_plugins/calendar_menu/plugin.xml
@@ -1,12 +1,13 @@
-
+
EC_ADLAN_A206
readme.pdf
calendar_menu
+ content
diff --git a/e107_plugins/chatbox_menu/plugin.xml b/e107_plugins/chatbox_menu/plugin.xml
index 354fe191c..c0afd0fc7 100644
--- a/e107_plugins/chatbox_menu/plugin.xml
+++ b/e107_plugins/chatbox_menu/plugin.xml
@@ -1,11 +1,12 @@
-
+
CHBLAN_41
chatbox_menu
+ content
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
diff --git a/e107_plugins/content/plugin.php b/e107_plugins/content/plugin.php
index 5c1b7d1dd..578e13e52 100644
--- a/e107_plugins/content/plugin.php
+++ b/e107_plugins/content/plugin.php
@@ -30,6 +30,7 @@ $eplug_compatible = "e107v0.7+";
$eplug_readme = ""; // leave blank if no readme file
$eplug_latest = TRUE; //Show reported threads in admin (use latest.php)
$eplug_status = TRUE; //Show post count in admin (use status.php)
+$eplug_category = "content";
// Name of the plugin's folder -------------------------------------------------------------------------------------
$eplug_folder = "content";
diff --git a/e107_plugins/download/plugin.xml b/e107_plugins/download/plugin.xml
index b483c3d7d..2bb9eda4c 100755
--- a/e107_plugins/download/plugin.xml
+++ b/e107_plugins/download/plugin.xml
@@ -1,9 +1,10 @@
-
+
DOWLAN_DESCRIPTION
download
+ content
download_admin.php
diff --git a/e107_plugins/featurebox/plugin.xml b/e107_plugins/featurebox/plugin.xml
index 3dfdcb71e..218dca60d 100644
--- a/e107_plugins/featurebox/plugin.xml
+++ b/e107_plugins/featurebox/plugin.xml
@@ -1,12 +1,13 @@
-
+
FBLAN_02
featurebox
+ content
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
admin_config.php
diff --git a/e107_plugins/forum/plugin.xml b/e107_plugins/forum/plugin.xml
index 34337974b..6c8299e00 100755
--- a/e107_plugins/forum/plugin.xml
+++ b/e107_plugins/forum/plugin.xml
@@ -1,9 +1,10 @@
-
+
This plugin is a fully featured Forum system
forum
+ content
forum_admin.php
diff --git a/e107_plugins/links_page/plugin.xml b/e107_plugins/links_page/plugin.xml
index 2d4b32678..dd91781a3 100644
--- a/e107_plugins/links_page/plugin.xml
+++ b/e107_plugins/links_page/plugin.xml
@@ -1,11 +1,12 @@
-
+
Links Page For Displaying External Web Links
links_page
+ content
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
diff --git a/e107_plugins/newsfeed/plugin.xml b/e107_plugins/newsfeed/plugin.xml
index 054f00c27..69408a0c9 100644
--- a/e107_plugins/newsfeed/plugin.xml
+++ b/e107_plugins/newsfeed/plugin.xml
@@ -1,12 +1,13 @@
-
+
NFLAN_02
newsfeed
+ content
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
diff --git a/e107_plugins/newsletter/plugin.php b/e107_plugins/newsletter/plugin.php
index 9a7a80f01..af349d454 100644
--- a/e107_plugins/newsletter/plugin.php
+++ b/e107_plugins/newsletter/plugin.php
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/newsletter/plugin.php,v $
-| $Revision: 1.1.1.1 $
-| $Date: 2006-12-02 04:35:32 $
-| $Author: mcfly_e107 $
+| $Revision: 1.2 $
+| $Date: 2009-07-09 02:47:15 $
+| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -31,6 +31,7 @@ $eplug_email = "jalist@e107.org";
$eplug_description = NLLAN_02;
$eplug_compatible = "e107v0.7+";
$eplug_readme = "";
+$eplug_category = "content";
// Name of the plugin's folder -------------------------------------------------------------------------------------
$eplug_folder = "newsletter";
diff --git a/e107_plugins/pm/plugin.xml b/e107_plugins/pm/plugin.xml
index b56f22235..e2c5df94f 100755
--- a/e107_plugins/pm/plugin.xml
+++ b/e107_plugins/pm/plugin.xml
@@ -1,9 +1,10 @@
-
+
{ADLAN_PM_57}
pm
+ users
pm_conf.php
images/pvt_message_32.png
diff --git a/e107_plugins/poll/plugin.xml b/e107_plugins/poll/plugin.xml
index 45e41771e..2d4d112f3 100644
--- a/e107_plugins/poll/plugin.xml
+++ b/e107_plugins/poll/plugin.xml
@@ -1,9 +1,10 @@
-
+
POLL_ADLAN02
poll
+ content
poll
diff --git a/e107_plugins/rss_menu/plugin.xml b/e107_plugins/rss_menu/plugin.xml
index 6fec7e819..d1de57859 100644
--- a/e107_plugins/rss_menu/plugin.xml
+++ b/e107_plugins/rss_menu/plugin.xml
@@ -1,12 +1,13 @@
-
+
RSS_PLUGIN_LAN_2
0.8
rss_menu
+ misc
Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)
diff --git a/e107_plugins/tagwords/plugin.xml b/e107_plugins/tagwords/plugin.xml
index c10cfe6ab..ea67fff27 100644
--- a/e107_plugins/tagwords/plugin.xml
+++ b/e107_plugins/tagwords/plugin.xml
@@ -1,9 +1,10 @@
-
+
A fully featured Tagword system
tagwords
+ misc
admin_tagwords_config.php
images/tagwords_32.png
diff --git a/e107_themes/_blank/admin_style.css b/e107_themes/_blank/admin_style.css
index d93460734..1505f8d0a 100644
--- a/e107_themes/_blank/admin_style.css
+++ b/e107_themes/_blank/admin_style.css
@@ -155,6 +155,9 @@ label { cursor: pointer; }
/* form used for settings */
.col-label { width: 250px; }
.col-control {}
+.col-selection { padding:5px; text-align:left; background-color: #FCFDFF; border: 1px outset black; width:200px; margin-right:0px;overflow:visible; position:absolute; z-index:101; right:0px;}
+
+
.adminform { width:100%; border:1px solid #ddd;}
@@ -416,6 +419,15 @@ ul.plugin-navigation ul.plugin-navigation-sub a.link-active {font-weight: bold;}
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
+
+
+/***** Admin Info Panel Buttons **/
+
+.core-mainpanel-block { text-align:center; width:100px; float:left; height:48px; display:block;margin:15px; }
+.core-mainpanel-link-text { font-weight:bold; text-decoration: none; padding:3px }
+
+/*****************************/
+
#core-banlist-times .textarea { width: 98%; }
#core-emoticon-configure input.input-text { width: 300px; }
diff --git a/e107_themes/jayya/style.css b/e107_themes/jayya/style.css
index 63b2e4a2c..597fac3dc 100644
--- a/e107_themes/jayya/style.css
+++ b/e107_themes/jayya/style.css
@@ -730,7 +730,7 @@ ul.plugin-navigation ul.plugin-navigation-sub a.link-active {font-weight: bold;}
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
-/***** Admin Main Panel Buttons **/
+/***** Admin Info Panel Buttons **/
.core-mainpanel-block { text-align:center; width:100px; float:left; height:48px; display:block;margin:15px; }
.core-mainpanel-link-text { font-weight:bold; text-decoration: none; padding:3px }