'send_percent' => FILTER_VALIDATE_INT,
'show_notifications' => FILTER_VALIDATE_BOOLEAN,
'show_cookie_popup' => FILTER_VALIDATE_BOOLEAN,
+ 'show_bottom' => FILTER_VALIDATE_BOOLEAN,
+ 'show_dark_theme' => FILTER_VALIDATE_BOOLEAN,
'cookie_popup_timeout' => FILTER_VALIDATE_INT,
- 'cookie_message' => FILTER_SANITIZE_STRING,
+ 'cookie_message' => FILTER_UNSAFE_RAW,
'cookie_opt_gdpr' => FILTER_VALIDATE_BOOLEAN,
'cookie_opt_access_logs' => FILTER_VALIDATE_BOOLEAN,
'cookie_opt_permanent' => FILTER_VALIDATE_BOOLEAN,
}
-?>
\ No newline at end of file
+?>
<?php
// Get Configuration for Cookie info popup
$serverstatsConfig = get_option(GLM_SERVERSTATS_PLUGIN_CONFIG_OPTION);
+if ( $serverstatsConfig['show_dark_theme'] ) {
+ $bgColorBackground = '#002b38';
+ $bgColorButtons = '#073642';
+ $colorText = '#839496';
+ $buttonColorText = '#ffffff';
+} else {
+ $bgColorBackground = '#eee8d5';
+ $bgColorButtons = '#268bd2';
+ $colorText = '#839496';
+ $buttonColorText = '#ffffff';
+}
+if ( $serverstatsConfig['show_bottom'] ) {
+ $position = 'bottom: 0px;';
+} else {
+ $position = 'top: 0px;';
+}
?>
<style>
#cookieNoticeBox {
position: absolute;
- top: 200px;
- left: 30px;
- width: 70%;
+ <?php echo $position;?>
+ left: 0;
+ width: 100%;
margin: 0 auto;
- background: white;
+ background: <?php echo $bgColorBackground;?>;
padding: 15px;
- border: 2px solid black;
- border-radius: 20px/20px;
background-clip: padding-box;
text-align: left;
z-index: 99999 !important;
}
#cookieNoticeBox p {
font-size: .9em;
+ color: <?php echo $colorText;?>;
}
#cookieNoticeBox .title {
font-size: .9em;
font-weight: bold;
padding-bottom: .5em;
- border-bottom: 2px solid black;
margin-bottom: .5em;
+ color: #268bd2;
}
#cookieNoticeBox .button {
- color: black;
+ color: <?php echo $buttonColorText;?>;
+ background: <?php echo $bgColorButtons;?>;
+ border: 1px solid black;
+ border-radius: 10px;
+
font-size: 1rem;
- background-color: lightgrey;
padding: 2px 10px;
z-index: 20;
left: 0;
top: 0;
margin: 0;
- border-radius: 4px;
cursor: pointer;
}
+ #cookieMoreInfo {
+ height: 50vh;
+ margin: 0;
+ overflow: auto;
+ }
</style>
<div id="cookieNoticeBox" class="opensearchserver.ignore">
<div class="title">Please read!<br></div>
]}
{include file="ui/f6/number.html"}
+ {* Show Bottom *}
+ {$ui = [
+ 'field' => 'show_bottom',
+ 'value' => {!empty($show_bottom)},
+ 'label' => 'Show at the Bottom'
+ ]}
+ {include file="ui/f6/checkbox.html"}
+
+ {* Theme Options Dark or Light *}
+ {$ui = [
+ 'field' => 'show_dark_theme',
+ 'value' => {!empty($show_dark_theme)},
+ 'label' => 'Show Dark Theme'
+ ]}
+ {include file="ui/f6/checkbox.html"}
+
{* cookie_message *}
{$ui = [
'field' => 'cookie_message',