diff --git a/e107_admin/admin.php b/e107_admin/admin.php index f1d3fd97c..498298594 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -28,6 +28,11 @@ if(vartrue($_GET['iframe']) == 1) $e_sub_cat = 'main'; +if (varset($pref['adminstyle'])=='cascade' || varset($pref['adminstyle'])=='beginner') // Deprecated Admin-include. +{ + $pref['adminstyle'] = 'infopanel'; +} + if(strpos($pref['adminstyle'], 'infopanel') === 0) { require_once(e_ADMIN.'includes/'.$pref['adminstyle'].'.php'); @@ -43,10 +48,10 @@ if(strpos($pref['adminstyle'], 'infopanel') === 0) require_once(e_ADMIN.'boot.php'); require_once(e_ADMIN.'auth.php'); require_once(e_HANDLER.'upload_handler.php'); -// require_once (e_HANDLER."message_handler.php"); + $mes = e107::getMessage(); -if (!isset($pref['adminstyle'])) $pref['adminstyle'] = 'classis'; // Shouldn't be needed - but just in case +if (!isset($pref['adminstyle'])) $pref['adminstyle'] = 'infopanel'; // Shouldn't be needed - but just in case // --- check for htmlarea. @@ -175,79 +180,7 @@ $td = 1; // DEPRECATED function render_links($link, $title, $description, $perms, $icon = FALSE, $mode = FALSE) { - return e107::getNav()->renderAdminButton($link, $title, $description, $perms, $icon, $mode); - - - /* - global $td,$tp; - $text = ''; - if (getperms($perms)) - { - $description = strip_tags($description); - if ($mode == 'adminb') - { - $text = " -
- ".$icon." ".$title." ".($description ? "[ ".$description." ]" : "")."
"; - } - else - { - - if($mode != "div" && $mode != 'div-icon-only') - { - if ($td == (ADLINK_COLS+1)) - { - $text .= ''; - $td = 1; - } - if ($td == 1) - { - $text .= ''; - } - } - - - switch ($mode) - { - case 'default': - $text .= "".$icon." ".$tp->toHTML($title,FALSE,"defs, emotes_off").""; - break; - - case 'classis': - $text .= "".$icon."
- ".$tp->toHTML($title,FALSE,"defs, emotes_off")."

"; - break; - - case 'beginner': - $text .= "".$icon." -
- ".$tp->toHTML($title,FALSE,"defs, emotes_off")."



"; - break; - - case 'div': - $text .= "
".$icon."
- ".$tp->toHTML($title,FALSE,"defs, emotes_off")." -
"; - break; - - case 'div-icon-only': - $text .= "
".$icon."
"; - break; - - default: - - break; - } - - $td++; - } - } - return $text; - - */ } diff --git a/e107_admin/includes/beginner.php b/e107_admin/includes/beginner.php deleted file mode 100644 index 52e5e561b..000000000 --- a/e107_admin/includes/beginner.php +++ /dev/null @@ -1,63 +0,0 @@ -

- "; - - // $newarray[28] = array(e_ADMIN."plugin.php", ADLAN_98, ADLAN_99, "Z", 2, E_16_PLUGMANAGER, E_32_PLUGMANAGER); - - $selection = array(22,12,17,25,5,19,7,23,28,26); - // $selection = array(21,11,17,24,5,19,7,27,28,25); - foreach($selection as $id) - { - $buts .= e107::getNav()->renderAdminButton($newarray[$id][0],$newarray[$id][1],$newarray[$id][2],$newarray[$id][3],$newarray[$id][6],'beginner'); - } - - $text .= $buts; - $text .= render_clean(); - $text .= "\n

"; - - $text .= "
".ADLAN_144." ".ADLAN_145."  
"; - - if($buts != '') - { - $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); - } - - - - - - - $text = "
- "; - - - $text .= e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "classis"); - - $text .= render_clean(); - $text .= "
"; - - $ns->tablerender(ADLAN_CL_7, $text); - -?> diff --git a/e107_admin/includes/cascade.php b/e107_admin/includes/cascade.php deleted file mode 100644 index 4f3cd0f4d..000000000 --- a/e107_admin/includes/cascade.php +++ /dev/null @@ -1,40 +0,0 @@ - - "; - -while (list($key, $funcinfo) = each($newarray)) -{ - $text .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'adminb'); -} - -$text .= " - - "; - - - -$text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'adminb'); - -$text .= "
- ".ADLAN_CL_7." -
"; - -$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); - -?> diff --git a/e107_admin/includes/categories.php b/e107_admin/includes/categories.php index 5ec1be766..093e0ba2d 100644 --- a/e107_admin/includes/categories.php +++ b/e107_admin/includes/categories.php @@ -15,10 +15,13 @@ if (!defined('e107_INIT')) { exit; } $mes = e107::getMessage(); $text = "
- "; +
"; $admin_cat = e107::getNav()->adminCats(); + $newarray = e107::getNav()->adminLinks('core'); +$plugin_array = e107::getNav()->adminLinks('plugin'); + foreach ($admin_cat['id'] as $cat_key => $cat_id) { $text_check = FALSE; @@ -44,49 +47,12 @@ foreach ($admin_cat['id'] as $cat_key => $cat_id) { $text_rend = e107::getNav()->renderAdminButton(e_ADMIN."plugin.php", ADLAN_98, ADLAN_99, "Z", E_16_PLUGMANAGER, 'default'); - $xml = e107::getXml(); - $xml->filter = array('@attributes' => FALSE,'administration' => FALSE); // .. and they're all going to need the same filter - if ($text_rend) { $text_check = TRUE; } $text_cat .= $text_rend; - if ($sql->db_Select("plugin", "*", "plugin_installflag=1")) - { - while ($row = $sql->db_Fetch()) - { - extract($row); // plugin_id int(10) unsigned NOT NULL auto_increment, - // plugin_name varchar(100) NOT NULL default '', - // plugin_version varchar(10) NOT NULL default '', - // plugin_path varchar(100) NOT NULL default '', - // plugin_installflag tinyint(1) unsigned NOT NULL default '0', - // plugin_addons text NOT NULL, - - if (is_readable(e_PLUGIN.$plugin_path."/plugin.xml")) - { - $readFile = $xml->loadXMLfile(e_PLUGIN.$plugin_path.'/plugin.xml', true, true); - $eplug_name = $tp->toHTML($readFile['name'],FALSE,"defs, emotes_off"); - $eplug_conffile = $readFile['administration']['configFile']; - $eplug_icon_small = $plugin_path.'/'.$readFile['administration']['iconSmall']; - $eplug_icon = $plugin_path.'/'.$readFile['administration']['icon']; - $eplug_caption = $readFile['administration']['caption']; - } - elseif (is_readable(e_PLUGIN.$plugin_path."/plugin.php")) - { - include(e_PLUGIN.$plugin_path."/plugin.php"); - } - if ($eplug_conffile) - { - $eplug_name = $tp->toHTML($eplug_name,FALSE,"defs, emotes_off"); - $plugin_icon = $eplug_icon_small ? "".$eplug_caption."" : E_16_PLUGIN; - $plugin_array[ucfirst($eplug_name)] = array('link' => e_PLUGIN.$plugin_path."/".$eplug_conffile, 'title' => $eplug_name, 'caption' => $eplug_caption, 'perms' => "P".$plugin_id, 'icon' => $plugin_icon); - $text_check = TRUE; - } - unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small); - } - } - ksort($plugin_array, SORT_STRING); + foreach ($plugin_array as $plug_key => $plug_value) { $text_cat .= e107::getNav()->renderAdminButton($plug_value['link'], $plug_value['title'], $plug_value['caption'], $plug_value['perms'], $plug_value['icon'], 'default'); diff --git a/e107_admin/includes/classis.php b/e107_admin/includes/classis.php index 505d1c4b9..d0993b014 100644 --- a/e107_admin/includes/classis.php +++ b/e107_admin/includes/classis.php @@ -15,6 +15,8 @@ if (!defined('e107_INIT')) { exit; } $mes = e107::getMessage(); $buts = ""; + $newarray = e107::getNav()->adminLinks('core'); + while (list($key, $funcinfo) = each($newarray)) { $buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], "classis"); @@ -22,14 +24,14 @@ while (list($key, $funcinfo) = each($newarray)) if($buts != "") { $text = "
-
"; +
"; $text .= $buts; $text .= render_clean(); $text .= "
"; $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } $text = "
- "; +
"; $text .= e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "classis"); @@ -37,6 +39,6 @@ $text .= render_clean(); $text .= "
"; -$ns->tablerender(ADLAN_CL_7, $text); +$ns->tablerender(ADLAN_CL_7, $text,'infopanel'); ?> diff --git a/e107_admin/includes/combo.php b/e107_admin/includes/combo.php index e0223e532..781fb2396 100644 --- a/e107_admin/includes/combo.php +++ b/e107_admin/includes/combo.php @@ -12,11 +12,12 @@ if (!defined('e107_INIT')) { exit; } -require_once(e_HANDLER."message_handler.php"); $mes = e107::getMessage(); +$newarray = e107::getNav()->adminLinks('core'); + $text = "
- "; +
"; $buts = ""; while (list($key, $funcinfo) = each($newarray)) { $buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default'); @@ -33,7 +34,7 @@ if($buts != ""){ } $text = "
-
"; +
"; $text .= e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "classis"); diff --git a/e107_admin/includes/compact.php b/e107_admin/includes/compact.php index 4acdc3a7d..18012277e 100644 --- a/e107_admin/includes/compact.php +++ b/e107_admin/includes/compact.php @@ -20,15 +20,17 @@ $newarray = e107::getNav()->adminLinks('core'); $buts = ""; $text = "
-
"; +
"; -while (list($key, $funcinfo) = each($newarray)) { +while (list($key, $funcinfo) = each($newarray)) +{ $buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default'); } $text .= $buts; $text_cat = ''; -while ($td <= 5) { +while ($td <= 5) +{ $text_cat .= ""; $td++; } @@ -36,12 +38,13 @@ $td = 1; $text .= "
"; -if($buts !=""){ +if($buts !="") +{ $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } $text = "
- "; +
"; $text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'default'); diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index 9ee89b82a..3cf188dee 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1187,7 +1187,7 @@ class e_navigation global $td; $tp = e107::getParser(); $mes = e107::getMessage(); - $cols = defset('ADLINK_COLS',3); + $cols = defset('ADLINK_COLS',5); $text = ''; @@ -1221,13 +1221,13 @@ class e_navigation switch ($mode) { case 'default': - $text .= ""; + $text .= ""; break; case 'classis': $text .= ""; + ".$tp->toHTML($title,FALSE,"defs, emotes_off").""; break; case 'beginner':
".$icon." ".$tp->toHTML($title,FALSE,"defs, emotes_off")." + ".$icon." ".$tp->toHTML($title,FALSE,"defs, emotes_off")."".$icon."
- ".$tp->toHTML($title,FALSE,"defs, emotes_off")."