diff --git a/e107_admin/includes/flexpanel.php b/e107_admin/includes/flexpanel.php
index 943de431a..c7433a648 100644
--- a/e107_admin/includes/flexpanel.php
+++ b/e107_admin/includes/flexpanel.php
@@ -66,12 +66,17 @@ class adminstyle_flexpanel extends adminstyle_infopanel
// "Help" box.
- $panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=site_info}{ADMIN_HELP}', true, $admin_sc);
+ $tp->parseTemplate("{SETSTYLE=flexpanel}");
+ $panels['Area01'] .= $tp->parseTemplate('{ADMIN_HELP}', true, $admin_sc);
+
// "Latest" box.
- $panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=admin_menu}{ADMIN_LATEST=infopanel}', true, $admin_sc);
+ $tp->parseTemplate("{SETSTYLE=flexpanel}");
+ $panels['Area01'] .= $tp->parseTemplate('{ADMIN_LATEST=infopanel}', true, $admin_sc);
+
// "Status" box.
- $panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=admin_menu}{ADMIN_STATUS=infopanel}', true, $admin_sc);
-
+ $tp->parseTemplate("{SETSTYLE=flexpanel}");
+ $panels['Area01'] .= $tp->parseTemplate('{ADMIN_STATUS=infopanel}', true, $admin_sc);
+
// --------------------- Personalized Panel -----------------------
if(getperms('0') && !vartrue($user_pref['core-infopanel-mye107'])) // Set default icons.
@@ -95,7 +100,9 @@ class adminstyle_flexpanel extends adminstyle_infopanel
);
$user_pref['core-infopanel-mye107'] = vartrue($pref['core-infopanel-default'], $defArray);
}
- $tp->parseTemplate("{SETSTYLE=core-infopanel}");
+
+ $tp->parseTemplate("{SETSTYLE=flexpanel}");
+
$mainPanel = "
";
$mainPanel .= "
";
foreach($this->iconlist as $key => $val)
@@ -107,9 +114,11 @@ class adminstyle_flexpanel extends adminstyle_infopanel
}
$mainPanel .= "
";
// Rendering the saved configuration.
- $tp->parseTemplate("{SETSTYLE=core-infopanel}");
+
+ $tp->parseTemplate("{SETSTYLE=flexpanel}");
+
$caption = $tp->lanVars(LAN_CONTROL_PANEL, ucwords(USERNAME));
- $coreInfoPanelMyE107 = $ns->tablerender($caption, $mainPanel, "core-infopanel_mye107", true);
+ $coreInfoPanelMyE107 = $ns->tablerender($caption, $mainPanel, "core-my-e107", true);
$panels['Area07'] .= $coreInfoPanelMyE107;
@@ -119,17 +128,17 @@ class adminstyle_flexpanel extends adminstyle_infopanel
$newsTabs['pluginFeed'] = array('caption' => LAN_PLUGIN, 'text' => "");
$newsTabs['themeFeed'] = array('caption' => LAN_THEMES, 'text' => "");
- $coreInfoPanelNews = $ns->tablerender(LAN_LATEST_e107_NEWS, e107::getForm()->tabs($newsTabs, array('active' => 'coreFeed')), "core-infopanel_news", true);
+ $coreInfoPanelNews = $ns->tablerender(LAN_LATEST_e107_NEWS, e107::getForm()->tabs($newsTabs, array('active' => 'coreFeed')), "core-e107-news", true);
$panels['Area08'] .= $coreInfoPanelNews;
// --------------------- Website Status ---------------------------
- $coreInfoPanelWebsiteStatus = $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(), "", true);
+ $coreInfoPanelWebsiteStatus = $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(), "core-website-status", true);
$panels['Area08'] .= $coreInfoPanelWebsiteStatus;
// --------------------- Latest Comments --------------------------
- $panels['Area01'] .= $this->renderLatestComments();
+ // $panels['Area01'] .= $this->renderLatestComments(); // TODO
// --------------------- User Selected Menus ----------------------
@@ -137,7 +146,16 @@ class adminstyle_flexpanel extends adminstyle_infopanel
{
foreach($user_pref['core-infopanel-menus'] as $val)
{
- $inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
+ // Custom menu.
+ if(is_numeric($val))
+ {
+ $inc = e107::getMenu()->renderMenu($val, null, null, true);
+ }
+ else
+ {
+ $inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
+ }
+
$panels['Area01'] .= $inc;
}
}
diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php
index b218a8aa8..8596633a3 100644
--- a/e107_admin/includes/infopanel.php
+++ b/e107_admin/includes/infopanel.php
@@ -257,16 +257,23 @@ class adminstyle_infopanel
// $text2 .= $ns->tablerender('Visitors Online : '.vartrue($nOnline), $panelOnline,'core-infopanel_online',true);
// --------------------- User Selected Menus -------------------
-
-
- if (varset($pref['core-infopanel-menus']))
+
+
+ if(varset($user_pref['core-infopanel-menus']))
{
- foreach ($pref['core-infopanel-menus'] as $val)
+ foreach($user_pref['core-infopanel-menus'] as $val)
{
- $id = $frm->name2id('core-infopanel_'.$val);
- $inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
+ // Custom menu.
+ if(is_numeric($val))
+ {
+ $inc = e107::getMenu()->renderMenu($val, null, null, true);
+ }
+ else
+ {
+ $inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
+ }
+
$text .= $inc;
- // $text .= $ns->tablerender("", $inc, $id,true);
}
}
@@ -670,26 +677,33 @@ class adminstyle_infopanel
}
$frm = e107::getForm();
- $pref = e107::getPref();
+ global $user_pref;
$text = "";
$menu_qry = 'SELECT * FROM #menus WHERE menu_id!= 0 GROUP BY menu_name ORDER BY menu_name';
- $settings = varset($pref['core-infopanel-menus'],array());
+ $settings = varset($user_pref['core-infopanel-menus'],array());
if (e107::getDb()->gen($menu_qry))
{
while ($row = e107::getDb()->db_Fetch())
{
- // if(!is_numeric($row['menu_path']))
+ // Custom menu.
+ if(is_numeric($row['menu_path']))
{
- $label = str_replace("_menu","",$row['menu_name']);
- $path_to_menu = $row['menu_path'].$row['menu_name'];
- $checked = ($settings && in_array($path_to_menu, $settings)) ? true : false;
- $text .= "\n
";
- $text .= $frm->checkbox_label($label, "e-mymenus[]",$path_to_menu, $checked);
- $text .= "
";
+ $path_to_menu = $row['menu_path'];
}
+ // Plugin menu.
+ else
+ {
+ $path_to_menu = $row['menu_path'].$row['menu_name'];
+ }
+
+ $label = str_replace("_menu","",$row['menu_name']);
+ $checked = ($settings && in_array($path_to_menu, $settings)) ? true : false;
+ $text .= "\n
";
+ $text .= $frm->checkbox_label($label, "e-mymenus[]",$path_to_menu, $checked);
+ $text .= "
";
}
}
diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php
index ebe5f2832..c7d41e62f 100644
--- a/e107_core/shortcodes/batch/admin_shortcodes.php
+++ b/e107_core/shortcodes/batch/admin_shortcodes.php
@@ -405,7 +405,7 @@ class admin_shortcodes
if(isset($params['nomenu'])) { return $select; }
if($select) { $text .= "
{$select}
"; }
- return $ns->tablerender(UTHEME_MENU_L2, $text, '', true);
+ return $ns->tablerender(UTHEME_MENU_L2, $text, 'core-menu-lang', true);
}
@@ -507,7 +507,7 @@ class admin_shortcodes
// $text .= "
";
- return ($parm != 'norender') ? $ns -> tablerender(ADLAN_LAT_1, $text, '', TRUE) : $text;
+ return ($parm != 'norender') ? $ns -> tablerender(ADLAN_LAT_1, $text, 'core-menu-latest', TRUE) : $text;
}
}
@@ -1208,7 +1208,7 @@ class admin_shortcodes
// $text .= "\n\t\t\t\t\t";
- return ($parm != 'norender') ? $ns -> tablerender(LAN_STATUS, $text, '', TRUE) : $text;
+ return ($parm != 'norender') ? $ns -> tablerender(LAN_STATUS, $text, 'core-menu-status', TRUE) : $text;
}
}
diff --git a/e107_themes/bootstrap3/admin_theme.php b/e107_themes/bootstrap3/admin_theme.php
index 24b253d1a..0dccdb505 100644
--- a/e107_themes/bootstrap3/admin_theme.php
+++ b/e107_themes/bootstrap3/admin_theme.php
@@ -98,171 +98,113 @@ class bootstrap3_admintheme
function tablestyle($caption, $text, $mode, $data)
{
// global $style;
-
+
$style = $data['setStyle'];
- // echo "Style: ".$style;
$class = '';
- if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
-
+ if(is_string($mode) && $mode == 'admin_help')
+ {
+ $class = ' ' . str_replace('_', '-', $mode);
+ }
+
if($mode == 'e_help')
{
- $style = 'admin_menu';
+ $style = 'admin_menu';
}
-
+
if($mode == 'core-infopanel_latest' || $mode == 'core-infopanel_status')
{
- //return;
- echo '
-
-
-
-
-
+ echo '
+
+
- '.$text.'
+ ' . $text . '
-
-
-
-
+
+
';
+
return;
- }
-
+ }
+
if($mode == 'personalize')
{
- /*echo '
-
-
-
-
- '.$text.'
-
-
-
- ';*/
$style = 'admin_menu';
- // return;
}
-
-
- /*
-
- if($style == 'core-infopanel')
- {
- echo '
-
-
-
-
-
-
-
- '.$text.'
-
-
-
-
-
- ';
- return;
- }
- */
-
+
if(deftrue('e_IFRAME'))
{
- echo '
+ echo '
- '.$text.'
+ ' . $text . '
';
-
+
return;
}
-
+
if(trim($caption) == '')
{
- $style = 'no_caption';
+ $style = 'no_caption';
}
- $panelType = array('core-infopanel'=>'panel-default','admin_menu'=>'panel-primary', 'site_info'=>'panel-default');
-
-
-
-
+ $panelType = array(
+ 'core-infopanel' => 'panel-default',
+ 'admin_menu' => 'panel-primary',
+ 'site_info' => 'panel-default',
+ 'flexpanel' => 'panel-default',
+ );
switch(varset($style, 'admin_content'))
{
- case 'core-infopanel' :
- case 'admin_menu' :
- case 'site_info' :
- echo '
+ case 'flexpanel':
+ echo '
-
'.$caption.'
+ ' . $caption . '
- '.$text.'
+ ' . $text . '
';
-
- /*
- echo '
-
- ';
- **/
- break;
-
- /*case 'site_info' :
- echo '
-
-
'.$caption.'
-
- '.$text.'
-
-
- ';
- break;*/
- /*
- case 'admin_content':
- echo '
+ break;
+
+ case 'core-infopanel':
+ case 'admin_menu':
+ case 'site_info':
+ echo '
+
+
' . $caption . '
+
+
+ ' . $text . '
+
+
';
+ break;
+
+ case 'no_caption':
+ echo '
-
'.$caption.'
- '.$text.'
+ ' . $text . '
';
- break;
- */
-
- case 'no_caption' :
- echo '
-
- ';
- break;
-
-
+ break;
+
+
default:
- echo '
+ echo '
-
'.$caption.'
+
' . $caption . '
- '.$text.'
+ ' . $text . '
';
- break;
+ break;
}
}
}