mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Fixed <body> tag when using Menu Manager. Stored HTML-theme true/false var for each theme.
This commit is contained in:
@@ -489,11 +489,20 @@ e107Event.trigger('loaded', null, document);
|
|||||||
|
|
||||||
e107::getJs()->renderJs('header_inline', 5);
|
e107::getJs()->renderJs('header_inline', 5);
|
||||||
|
|
||||||
echo "</head>
|
echo "</head>";
|
||||||
<body".$body_onload.">\n";
|
|
||||||
|
|
||||||
echo getModal();
|
if(deftrue('e_MENUMANAGER_ACTIVE') && defset('THEME_LAYOUT') && e_theme::loadLayout(THEME_LAYOUT)) // v2.2.2+ html layout is active which contains <body> tag.
|
||||||
echo getAlert();
|
{
|
||||||
|
echo "\n\n<!-- Start theme.html -->\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "
|
||||||
|
<body".$body_onload.">\n";
|
||||||
|
|
||||||
|
echo getModal();
|
||||||
|
echo getAlert();
|
||||||
|
}
|
||||||
|
|
||||||
function getModal()
|
function getModal()
|
||||||
{
|
{
|
||||||
|
@@ -1405,7 +1405,7 @@ class e_menuManager {
|
|||||||
|
|
||||||
if(strpos($LAYOUT,'<body ') !== false) // FIXME Find a way to remove the <body> tag from the admin header when menu-manager is active.
|
if(strpos($LAYOUT,'<body ') !== false) // FIXME Find a way to remove the <body> tag from the admin header when menu-manager is active.
|
||||||
{
|
{
|
||||||
$LAYOUT = preg_replace('/<body[^>]*>/','', $LAYOUT);
|
// $LAYOUT = preg_replace('/<body[^>]*>/','', $LAYOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split up using the same function as the shortcode handler
|
// Split up using the same function as the shortcode handler
|
||||||
@@ -1512,9 +1512,40 @@ class e_menuManager {
|
|||||||
// }
|
// }
|
||||||
elseif(strstr($str, '{---MODAL---}'))
|
elseif(strstr($str, '{---MODAL---}'))
|
||||||
{
|
{
|
||||||
echo "\n<!-- Modal would appear here --> \n";
|
//echo "\n<!-- Modal would appear here --> \n";
|
||||||
//echo '<div id="uiAlert" class="notifications center"><!-- empty --></div>';
|
echo '<div id="uiAlert" class="notifications center"><!-- empty --></div>';
|
||||||
//echo getAlert();
|
|
||||||
|
//TODO Store in a central area - currently used in header.php, header_default.php and here.
|
||||||
|
echo '
|
||||||
|
|
||||||
|
<div id="uiModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-caption"> </h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>Loading…</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
|
|
||||||
|
//echo getModal();
|
||||||
|
}
|
||||||
|
elseif(strstr($str, '{---CAPTION---}'))
|
||||||
|
{
|
||||||
|
echo LAN_CAPTION;
|
||||||
|
}
|
||||||
|
elseif(strstr($str, '{LAYOUT_ID}'))
|
||||||
|
{
|
||||||
|
echo 'layout-'.e107::getForm()->name2id($this->curLayout);
|
||||||
}
|
}
|
||||||
elseif(strstr($str, "ALERT"))
|
elseif(strstr($str, "ALERT"))
|
||||||
{
|
{
|
||||||
|
@@ -765,6 +765,7 @@ class e_theme
|
|||||||
// echo "<h2>".$themeArray['name']."</h2>";
|
// echo "<h2>".$themeArray['name']."</h2>";
|
||||||
// print_a($lays);
|
// print_a($lays);
|
||||||
$themeArray['legacy'] = true;
|
$themeArray['legacy'] = true;
|
||||||
|
$themeArray['html'] = false;
|
||||||
|
|
||||||
return $themeArray;
|
return $themeArray;
|
||||||
}
|
}
|
||||||
@@ -808,6 +809,7 @@ class e_theme
|
|||||||
$vars['@attributes']['default'] = (varset($vars['@attributes']['default']) && strtolower($vars['@attributes']['default']) == 'true') ? 1 : 0;
|
$vars['@attributes']['default'] = (varset($vars['@attributes']['default']) && strtolower($vars['@attributes']['default']) == 'true') ? 1 : 0;
|
||||||
$vars['preview'] = varset($vars['screenshots']['image']);
|
$vars['preview'] = varset($vars['screenshots']['image']);
|
||||||
$vars['thumbnail'] = isset($vars['preview'][0]) && file_exists(e_THEME.$path.'/'.$vars['preview'][0]) ? $vars['preview'][0] : '';
|
$vars['thumbnail'] = isset($vars['preview'][0]) && file_exists(e_THEME.$path.'/'.$vars['preview'][0]) ? $vars['preview'][0] : '';
|
||||||
|
$vars['html'] = file_exists(e_THEME.$path.'/theme.html') && is_dir(e_THEME.$path.'/layouts') ? true : false;
|
||||||
|
|
||||||
|
|
||||||
if(!empty($vars['themePrefs']))
|
if(!empty($vars['themePrefs']))
|
||||||
|
Reference in New Issue
Block a user