From 4e6dde3c2e7d994f30e8969b6eb3b3a659753bb8 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 10 Sep 2019 17:02:39 -0400 Subject: [PATCH] Integrated popup page improvements and cleaned it up. Added popup page colors, positioning, and border into Usage Report Settings form. --- activate.php | 4 -- defines.php | 1 + models/adminServerStats.php | 18 +++++- models/frontCookiePopUp.php | 60 ++++++++++++------- views/adminServerStats.html | 105 +++++++++++++++++++++++++++++++++- views/ui/f6/radioButtons.html | 37 ++++++++++++ views/ui/f6/text.html | 12 +++- 7 files changed, 204 insertions(+), 33 deletions(-) create mode 100644 views/ui/f6/radioButtons.html diff --git a/activate.php b/activate.php index e67ffde..182a55f 100755 --- a/activate.php +++ b/activate.php @@ -59,10 +59,6 @@ class glmServerStatsPluginActivate trigger_error("*** SLUG NOT FOUND ***", E_USER_NOTICE); $pageContent = " -
-Cookies and Privacy
-Additional Privacy Information
-

Cookies and Privacy

This site uses temporary \"Cookies\" to store limited information that's required to provide you with a consistent user experience. We don't store personally identifying or other sensitive information in these Cookies and these Cookies are erased when you close your Web Browser unless otherwise stated when you click \"Show more\".

diff --git a/defines.php b/defines.php index 46361b6..34bb6de 100755 --- a/defines.php +++ b/defines.php @@ -52,6 +52,7 @@ define('GLM_SERVERSTATS_PLUGIN_HOST', $host); // Define policy page title define('GLM_SERVERSTATS_PLUGIN_POLICY_PAGE', 'Website User Privacy and Policies'); +define('GLM_SERVERSTATS_PLUGIN_POLICY_PAGE_SLUG', sanitize_title(GLM_SERVERSTATS_PLUGIN_POLICY_PAGE)); // Determine current http/https protocol $pageProtocol = 'http'; diff --git a/models/adminServerStats.php b/models/adminServerStats.php index 2cb1f47..133d073 100755 --- a/models/adminServerStats.php +++ b/models/adminServerStats.php @@ -146,7 +146,14 @@ class adminServerStats extends glmServerStatsBandwidthSupport 'contact_state' => FILTER_SANITIZE_STRING, 'contact_zip' => FILTER_SANITIZE_STRING, 'contact_phone' => FILTER_SANITIZE_STRING, - 'contact_email' => FILTER_SANITIZE_STRING + 'contact_email' => FILTER_SANITIZE_STRING, + 'color_background' => FILTER_SANITIZE_STRING, + 'color_buttons' => FILTER_SANITIZE_STRING, + 'color_text' => FILTER_SANITIZE_STRING, + 'color_buttontext' => FILTER_SANITIZE_STRING, + 'popup_border' => FILTER_SANITIZE_STRING, + 'popup_position' => FILTER_SANITIZE_STRING + ),true ); @@ -168,9 +175,16 @@ class adminServerStats extends glmServerStatsBandwidthSupport contact_state = '".$vals['contact_state']."', contact_zip = '".$vals['contact_zip']."', contact_phone = '".$vals['contact_phone']."', - contact_email = '".$vals['contact_email']."' + contact_email = '".$vals['contact_email']."', + color_background = '".$vals['color_background']."', + color_buttons = '".$vals['color_buttons']."', + color_text = '".$vals['color_text']."', + color_buttontext = '".$vals['color_buttontext']."', + popup_border = '".$vals['popup_border']."', + popup_position = '".$vals['popup_position']."' WHERE name = '".$currentSiteName."' "; +echo "
$sql
"; if (!$bwdb->query($sql)) { printf("Error: %s\n", $bwdb->error); } diff --git a/models/frontCookiePopUp.php b/models/frontCookiePopUp.php index 3d28d84..7b8e2a0 100755 --- a/models/frontCookiePopUp.php +++ b/models/frontCookiePopUp.php @@ -1,21 +1,28 @@
Please read!
-'.nl2br($serverstatsConfig['cookie_message']).'

'; } ?> -

+'.nl2br($settings['cookie_message']).'

'; } ?> + +
Show more - Got it! -

+ Got it! +
+