mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 20:41:27 +02:00
Menu-Manager theme preview styling fix. Added message about embedded custom-menus.
This commit is contained in:
@@ -951,6 +951,8 @@ class e_menuManager {
|
|||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//FIXME - XHTML cleanup, front-end standards (elist, forms etc)
|
//FIXME - XHTML cleanup, front-end standards (elist, forms etc)
|
||||||
echo "<div id='portal'>";
|
echo "<div id='portal'>";
|
||||||
$this->parseheader($HEADER); // $layouts_str;
|
$this->parseheader($HEADER); // $layouts_str;
|
||||||
@@ -1041,7 +1043,19 @@ class e_menuManager {
|
|||||||
|
|
||||||
$text .= "</tr></table>";
|
$text .= "</tr></table>";
|
||||||
|
|
||||||
|
if(!count($this->menu_areas))
|
||||||
|
{
|
||||||
|
$text = "<div class='alert alert-block alert-warning text-left'>";
|
||||||
|
$text .= "This layout does NOT contain any dynamic {MENU} areas.<br />";
|
||||||
|
|
||||||
|
if(count($this->customMenu))
|
||||||
|
{
|
||||||
|
$text .= "<p>It DOES contain the following custom menus: <ul ><li>".implode("</li><li>",$this->customMenu)."</li></ul></p>";
|
||||||
|
$text .= "<p><a href='".e_ADMIN."cpage.php?mode=menu&action=list&tab=2' class='button btn btn-primary'>Go to Custom-Menu area</a></p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "</div>";
|
||||||
|
}
|
||||||
// $ns -> tablerender(MENLAN_22.'blabla', $text);
|
// $ns -> tablerender(MENLAN_22.'blabla', $text);
|
||||||
echo $this->renderPanel(MENLAN_22, $text);
|
echo $this->renderPanel(MENLAN_22, $text);
|
||||||
echo $rs->form_close();
|
echo $rs->form_close();
|
||||||
@@ -1165,7 +1179,7 @@ class e_menuManager {
|
|||||||
|
|
||||||
function checklayout($str)
|
function checklayout($str)
|
||||||
{ // Displays a basic representation of the theme
|
{ // Displays a basic representation of the theme
|
||||||
global $PLUGINS_DIRECTORY, $rs, $sc_style, $menu_order;
|
global $PLUGINS_DIRECTORY, $rs, $sc_style, $menu_order, $style; // global $style required.
|
||||||
$PLUGINS_DIRECTORY = e107::getFolder('PLUGINS');
|
$PLUGINS_DIRECTORY = e107::getFolder('PLUGINS');
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
@@ -1190,6 +1204,10 @@ class e_menuManager {
|
|||||||
{
|
{
|
||||||
echo "[SiteLinks]";
|
echo "[SiteLinks]";
|
||||||
}
|
}
|
||||||
|
elseif(strstr($str, "NAVIGATION"))
|
||||||
|
{
|
||||||
|
echo "[Navigation Area]";
|
||||||
|
}
|
||||||
elseif(strstr($str, "LANGUAGELINKS"))
|
elseif(strstr($str, "LANGUAGELINKS"))
|
||||||
{
|
{
|
||||||
echo "<div class=text style='padding: 2px; text-align: center'>[Language]</div>";
|
echo "<div class=text style='padding: 2px; text-align: center'>[Language]</div>";
|
||||||
@@ -1202,6 +1220,7 @@ class e_menuManager {
|
|||||||
elseif(strstr($str, "CMENU"))
|
elseif(strstr($str, "CMENU"))
|
||||||
{
|
{
|
||||||
$cust = preg_replace("/\W*\{CMENU=(.*?)(\+.*)?\}\W*/si", "\\1", $str);
|
$cust = preg_replace("/\W*\{CMENU=(.*?)(\+.*)?\}\W*/si", "\\1", $str);
|
||||||
|
$this->customMenu[] = $cust;
|
||||||
echo $tp->parseTemplate("{CMENU=".$cust."}",true);
|
echo $tp->parseTemplate("{CMENU=".$cust."}",true);
|
||||||
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
||||||
}
|
}
|
||||||
@@ -1211,7 +1230,16 @@ class e_menuManager {
|
|||||||
echo $tp->parseTemplate("{SETIMAGE".$cust."}",true);
|
echo $tp->parseTemplate("{SETIMAGE".$cust."}",true);
|
||||||
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
||||||
}
|
}
|
||||||
|
elseif(strstr($str, "{WMESSAGE"))
|
||||||
|
{
|
||||||
|
echo "<div class=text style='padding: 30px; text-align: center'>[Welcome Message Area]</div>";
|
||||||
|
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
||||||
|
}
|
||||||
|
elseif(strstr($str, "{FEATUREBOX"))
|
||||||
|
{
|
||||||
|
echo "<div class=text style='padding: 80px; text-align: center'>[Featurebox Area]</div>";
|
||||||
|
// echo $this->renderPanel('Embedded Custom Menu',$cust);
|
||||||
|
}
|
||||||
// Display embedded Plugin information.
|
// Display embedded Plugin information.
|
||||||
else if(strstr($str, "PLUGIN"))
|
else if(strstr($str, "PLUGIN"))
|
||||||
{
|
{
|
||||||
@@ -1316,6 +1344,7 @@ class e_menuManager {
|
|||||||
{
|
{
|
||||||
$tmp = explode("=", $str);
|
$tmp = explode("=", $str);
|
||||||
$style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str);
|
$style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str);
|
||||||
|
|
||||||
$this->style = $style;
|
$this->style = $style;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user