62,68 → 62,43 |
} |
} |
|
$add_css_args = array(); |
if (class_exists('OIDplusPageAdminColors')) { |
// Usually, such things would be done using "features" (implementsFeature), |
// but there are following reasons why we DON'T do it: |
// 1. Just having a "CSS URL parameter feature" would change the URL parameter, |
// but it would not affect the custom code in oidplus.min.css.php |
// 2. The JS function OIDplusPageAdminColors.test_color_theme() has an hardcoded set of parameters |
// and does not follow the arguments that might be set by other plugins. |
$add_css_args[] = 'theme='.urlencode(OIDplus::config()->getValue('design')); |
$add_css_args[] = 'invert='.urlencode(OIDplus::config()->getValue('color_invert')); |
$add_css_args[] = 'h_shift='.urlencode(number_format(OIDplus::config()->getValue('color_hue_shift')/360,5,'.','')); |
$add_css_args[] = 's_shift='.urlencode(number_format(OIDplus::config()->getValue('color_sat_shift')/100,5,'.','')); |
$add_css_args[] = 'v_shift='.urlencode(number_format(OIDplus::config()->getValue('color_val_shift')/100,5,'.','')); |
} |
$add_css_args = count($add_css_args) > 0 ? '?'.implode('&',$add_css_args) : ''; |
// Get theme color (color of title bar) |
$design_plugin = OIDplus::getActiveDesignPlugin(); |
$theme_color = is_null($design_plugin) ? '' : $design_plugin->getThemeColor(); |
|
// Get theme color (color of title bar) |
$theme_color = ''; |
$plugins = OIDplus::getDesignPlugins(); |
$head_elems = array(); |
$head_elems[] = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; |
$head_elems[] = '<meta name="OIDplus-SystemTitle" content="'.htmlentities(OIDplus::config()->getValue('system_title')).'">'; // Do not remove. This meta tag is acessed by oidplus_base.js |
if ($theme_color != '') $head_elems[] = '<meta name="theme-color" content="'.$theme_color.'">'; |
$head_elems[] = '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; |
$head_elems[] = '<title>'.htmlentities(combine_systemtitle_and_pagetitle(OIDplus::config()->getValue('system_title'), $static_title)).'</title>'; |
$head_elems[] = '<script src="polyfill.min.js.php"></script>'; |
$head_elems[] = OIDplus::getActiveCaptchaPlugin()->captchaDomHead(); |
$head_elems[] = '<script src="oidplus.min.js.php"></script>'; |
$head_elems[] = '<link rel="stylesheet" href="oidplus.min.css.php">'; |
$head_elems[] = '<link rel="shortcut icon" type="image/x-icon" href="favicon.ico.php">'; |
$head_elems[] = '<link rel="canonical" href="'.OIDplus::canonicalURL().'">'; |
|
$plugins = OIDplus::getPagePlugins(); |
foreach ($plugins as $plugin) { |
if ((basename($plugin->getPluginDirectory())) == OIDplus::config()->getValue('design','default')) { |
$theme_color = $plugin->getThemeColor(); |
if (($theme_color != '') && class_exists('OIDplusPageAdminColors')) { |
$hs = OIDplus::config()->getValue('color_hue_shift',0)/360; |
$ss = OIDplus::config()->getValue('color_sat_shift',0)/100; |
$vs = OIDplus::config()->getValue('color_val_shift',0)/100; |
$theme_color = changeHueOfCSS($theme_color, $hs, $ss, $vs); // "changeHueOfCSS" can also change a single color value if it has the form #xxyyzz or #xyz |
$plugin->htmlHeaderUpdate($head_elems); |
} |
} |
} |
|
?><!DOCTYPE html> |
<html lang="<?php echo substr(OIDplus::getCurrentLang(),0,2); ?>"> |
// --- |
|
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<meta name="OIDplus-SystemTitle" content="<?php echo htmlentities(OIDplus::config()->getValue('system_title')); /* Do not remove. This meta tag is acessed by oidplus_base.js */ ?>"> |
<?php |
if ($theme_color != '') echo '<meta name="theme-color" content="'.$theme_color.'">'; |
?> |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
echo '<!DOCTYPE html>'."\n"; |
echo '<html lang="'.substr(OIDplus::getCurrentLang(),0,2).'">'; |
echo '<head>'; |
echo implode("\n",$head_elems); |
echo '</head>'; |
|
<title><?php echo htmlentities(combine_systemtitle_and_pagetitle(OIDplus::config()->getValue('system_title'), $static_title)); ?></title> |
echo '<body>'; |
|
<script src="polyfill.min.js.php"></script> |
<?php |
echo OIDplus::getActiveCaptchaPlugin()->captchaDomHead(); |
?> |
<script src="oidplus.min.js.php"></script> |
echo '<div id="loading" style="display:none">Loading…</div>'; |
|
<link rel="stylesheet" href="oidplus.min.css.php<?php echo htmlentities($add_css_args); ?>"> |
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico.php"> |
<link rel="canonical" href="<?php echo OIDplus::canonicalURL(); ?>"> |
</head> |
echo '<div id="frames">'; |
echo '<div id="content_window" class="borderbox">'; |
|
<body> |
|
<div id="loading" style="display:none">Loading…</div> |
|
<div id="frames"> |
<div id="content_window" class="borderbox"> |
<?php |
$static_content = preg_replace_callback( |
'|<a\s([^>]*)href="mailto:([^"]+)"([^>]*)>([^<]*)</a>|ismU', |
function ($treffer) { |
141,17 → 116,17 |
echo '</p>'; |
} |
echo '<br>'; |
?> |
</div> |
|
<div id="system_title_bar"> |
<?php |
echo '</div>'; |
|
echo '<div id="system_title_bar">'; |
|
echo '<div id="system_title_menu" onclick="mobileNavButtonClick(this)" onmouseenter="mobileNavButtonHover(this)" onmouseleave="mobileNavButtonHover(this)">'; |
echo ' <div id="bar1"></div>'; |
echo ' <div id="bar2"></div>'; |
echo ' <div id="bar3"></div>'; |
echo '</div>'; |
echo ''; |
|
echo '<div id="system_title_text">'; |
echo ' <a '.OIDplus::gui()->link('oidplus:system').' id="system_title_a">'; |
echo ' <span id="system_title_logo"></span>'; |
159,34 → 134,28 |
echo ' <span id="system_title_2">'.htmlentities(OIDplus::config()->getValue('system_title')).'</span>'; |
echo ' </a>'; |
echo '</div>'; |
?> |
</div> |
|
<?php |
echo '</div>'; |
|
echo OIDplus::gui()->getLanguageBox($static_node_id, true); |
?> |
|
<div id="gotobox"> |
<?php |
echo '<div id="gotobox">'; |
echo '<input type="text" name="goto" id="gotoedit" value="'.htmlentities($static_node_id).'">'; |
echo '<input type="button" value="'._L('Go').'" onclick="gotoButtonClicked()" id="gotobutton">'; |
?> |
</div> |
echo '</div>'; |
|
<div id="oidtree" class="borderbox"> |
<?php |
echo '<div id="oidtree" class="borderbox">'; |
//echo '<noscript>'; |
//echo '<p><b>'._L('Please enable JavaScript to use all features').'</b></p>'; |
//echo '</noscript>'; |
OIDplus::menuUtils()->nonjs_menu(); |
?> |
</div> |
</div> |
echo '</div>'; |
|
</body> |
</html> |
<?php |
echo '</div>'; |
|
echo '</body>'; |
echo '</html>'; |
|
$cont = ob_get_contents(); |
ob_end_clean(); |
|