From b5a8963f0094390c2b32cc04e92dea615f8fe5bb Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 27 Nov 2012 02:34:02 -0800 Subject: [PATCH] Radio button fix and support for VIEWPORT in the admin area. More admin-menu fixes. --- e107_admin/header.php | 9 +++++- e107_admin/wmessage.php | 11 +++---- .../shortcodes/batch/admin_shortcodes.php | 30 ++++++++++++++----- e107_handlers/form_handler.php | 6 ++-- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/e107_admin/header.php b/e107_admin/header.php index e68403975..9a941395a 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -152,7 +152,7 @@ else // XHTML echo(defined("CORE_LC")) ? "\n" : ""; echo "\n"; } - +echo (defined("VIEWPORT")) ? "\n" : ""; echo "".(defined("e_PAGETITLE") ? e_PAGETITLE." - " : (defined("PAGE_NAME") ? PAGE_NAME." - " : "")).LAN_head_4." :: ".SITENAME."\n"; @@ -663,6 +663,7 @@ if ($e107_popup != 1) return e_admin_menu($title, $active_page, $e107_vars, false, false, $sortlist); + /* global $ns,$BUTTON,$BUTTON_OVER,$BUTTONS_START,$BUTTONS_END,$SUB_BUTTON,$SUB_BUTTON_OVER,$SUB_BUTTONS_START,$SUB_BUTTONS_END; $id_title = "yop_".str_replace(" ", "", $title); @@ -782,9 +783,15 @@ if ($e107_popup != 1) { $ns->tablerender($title, $text, array('id'=>$id_title, 'style'=>'button_menu')); } + */ } } + + + + + if (file_exists(THEME.'admin_template.php')) { require_once (THEME.'admin_template.php'); diff --git a/e107_admin/wmessage.php b/e107_admin/wmessage.php index 9869cb9de..6ae0842b0 100644 --- a/e107_admin/wmessage.php +++ b/e107_admin/wmessage.php @@ -254,11 +254,12 @@ if ($action == "opt") { } -function wmessage_adminmenu() { - global $action; - if ($action == "") { - $action = "main"; - } +function wmessage_adminmenu() +{ + + $act = e_QUERY; + $action = vartrue($act,'main'); + $var['main']['text'] = WMLAN_00; $var['main']['link'] = e_SELF; $var['create']['text'] = WMLAN_01; diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index cbe6db4cc..920685294 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -315,7 +315,7 @@ class admin_shortcodes $active_uploads = $sql -> db_Count('upload', '(*)', 'WHERE upload_active = 0'); $submitted_news = $sql -> db_Count('submitnews', '(*)', 'WHERE submitnews_auth = 0'); - $text = "
".E_16_NEWS.($submitted_news ? " ".ADLAN_LAT_2.": $submitted_news" : ' '.ADLAN_LAT_2.': 0').'
'; + $text = "
".E_16_NEWS.($submitted_news ? " ".ADLAN_LAT_2.": $submitted_news" : ' '.ADLAN_LAT_2.': 0').'
'; $text .= "
".E_16_UPLOADS.($active_uploads ? " ".ADLAN_LAT_7.": $active_uploads" : ' '.ADLAN_LAT_7.': '.$active_uploads).'
'; if(vartrue($pref['e_latest_list'])) @@ -815,6 +815,17 @@ class admin_shortcodes $obj = e107::getDateConvert(); $install_date = $obj->convert_date($pref['install_date'], 'long'); + if(is_readable(THEME."theme.xml")) + { + $xml = e107::getXml(); + $data = $xml->loadXMLfile(THEME."theme.xml",true); + + $themename = $data['@attributes']['name']; + $themeversion = $data['@attributes']['version']; + $themedate = $data['@attributes']['date']; + $themeauthor = $data['author']['@attributes']['name']; + } + $text = "".FOOTLAN_1."
". SITENAME." @@ -886,7 +897,7 @@ class admin_shortcodes $comments = $sql -> db_Count('comments'); - $unver = ($unverified ? " ".ADLAN_111."" : ADLAN_111); + $unver = ($unverified ? " ".ADLAN_111."" : ADLAN_111); $text = "
@@ -1223,12 +1234,15 @@ class admin_shortcodes } // MAIN LINK - $menu_vars = array(); - $menu_vars['adminhome']['text'] = ADLAN_151; - $menu_vars['adminhome']['link'] = e_ADMIN_ABS.'admin.php'; - $menu_vars['adminhome']['image'] = "".ADLAN_151.""; - $menu_vars['adminhome']['image_src'] = ADLAN_151; - $menu_vars['adminhome']['perm'] = ''; + if($parm != 'no-main') + { + $menu_vars = array(); + $menu_vars['adminhome']['text'] = ADLAN_151; + $menu_vars['adminhome']['link'] = e_ADMIN_ABS.'admin.php'; + $menu_vars['adminhome']['image'] = "".ADLAN_151.""; + $menu_vars['adminhome']['image_src'] = ADLAN_151; + $menu_vars['adminhome']['perm'] = ''; + } //ALL OTHER ROOT LINKS - temporary data transformation - data structure will be changed in the future and this block will be removed diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 445a94f30..48701c93f 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -851,7 +851,7 @@ class e_form { $options = $this->format_options('radio', $name, $options); $options['checked'] = $checked; //comes as separate argument just for convenience - $options['class'] = 'inline'; + // $options['class'] = 'inline'; return "get_attributes($options, $name, $value)." />"; } @@ -899,7 +899,7 @@ class e_form function label($text, $name = '', $value = '') { $for_id = $this->_format_id('', $name, $value, 'for'); - return "{$text}"; + return "{$text}"; } function help($text) @@ -1354,7 +1354,7 @@ class e_form break; case 'radio': - $def_options['class'] = 'radio'; + $def_options['class'] = 'radio inline'; unset($def_options['size'], $def_options['selected']); break;