From 94be4c4ba699cfcc0d75915522c915baffd39229 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 27 Dec 2011 01:02:32 -0800 Subject: [PATCH] Remove carriage returns, clean up description --- .../controllers/admin_content_warning.php | 122 ++++++++--------- .../controllers/content_warning.php | 52 +++---- .../helpers/content_warning_event.php | 58 ++++---- .../helpers/content_warning_installer.php | 82 +++++------ .../helpers/content_warning_theme.php | 110 +++++++-------- 3.0/modules/content_warning/jqModal.css | 128 +++++++++--------- 3.0/modules/content_warning/module.info | 4 +- .../views/admin_content_warning.html.php | 10 +- 8 files changed, 283 insertions(+), 283 deletions(-) diff --git a/3.0/modules/content_warning/controllers/admin_content_warning.php b/3.0/modules/content_warning/controllers/admin_content_warning.php index 18f4bebc..c03cf31d 100644 --- a/3.0/modules/content_warning/controllers/admin_content_warning.php +++ b/3.0/modules/content_warning/controllers/admin_content_warning.php @@ -1,62 +1,62 @@ -_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - - if ($form->validate()) { - module::set_var("content_warning", "title", $form->content_warning->inputs["title"]->value); - module::set_var("content_warning", "message", $form->content_warning->inputs["message"]->value); - module::set_var("content_warning", "enter_link_text", $form->content_warning->inputs["enter_link_text"]->value); - //module::set_var("content_warning", "enter_link_url", $form->content_warning->inputs["enter_link_url"]->value); - module::set_var("content_warning", "exit_link_text", $form->content_warning->inputs["exit_link_text"]->value); - module::set_var("content_warning", "exit_link_url", $form->content_warning->inputs["exit_link_url"]->value); - url::redirect("admin/content_warning"); - } - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_content_warning.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin/content_warning/handler", "", "post", - array("id" => "gAdminContentWerning")); - $group = $form->group("content_warning"); - $group->input("title")->label(t('Title (Will be displayed within H3)'))->rules("required")->value(module::get_var("content_warning", "title")); - $group->textarea("message")->label(t('Message (you can use HTML tags)'))->rules("required")->value(module::get_var("content_warning", "message")); - $group->input("enter_link_text")->label(t('Enter Label'))->rules("required")->value(module::get_var("content_warning", "enter_link_text")); - //$group->input("enter_link_url")->label(t('Enter Url (Leave empty to redirect to the previous page)'))->value(module::get_var("content_warning", "enter_link_url")); - $group->input("exit_link_text")->label(t('Exit Label'))->rules("required")->value(module::get_var("content_warning", "exit_link_text")); - $group->input("exit_link_url")->label(t('Exit Url'))->rules("required")->value(module::get_var("content_warning", "exit_link_url")); - - $group->submit("submit")->value(t("Save")); - return $form; - } +_get_view(); + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_form(); + + if ($form->validate()) { + module::set_var("content_warning", "title", $form->content_warning->inputs["title"]->value); + module::set_var("content_warning", "message", $form->content_warning->inputs["message"]->value); + module::set_var("content_warning", "enter_link_text", $form->content_warning->inputs["enter_link_text"]->value); + //module::set_var("content_warning", "enter_link_url", $form->content_warning->inputs["enter_link_url"]->value); + module::set_var("content_warning", "exit_link_text", $form->content_warning->inputs["exit_link_text"]->value); + module::set_var("content_warning", "exit_link_url", $form->content_warning->inputs["exit_link_url"]->value); + url::redirect("admin/content_warning"); + } + print $this->_get_view($form); + } + + private function _get_view($form=null) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_content_warning.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; + } + + private function _get_form() { + $form = new Forge("admin/content_warning/handler", "", "post", + array("id" => "gAdminContentWerning")); + $group = $form->group("content_warning"); + $group->input("title")->label(t('Title (Will be displayed within H3)'))->rules("required")->value(module::get_var("content_warning", "title")); + $group->textarea("message")->label(t('Message (you can use HTML tags)'))->rules("required")->value(module::get_var("content_warning", "message")); + $group->input("enter_link_text")->label(t('Enter Label'))->rules("required")->value(module::get_var("content_warning", "enter_link_text")); + //$group->input("enter_link_url")->label(t('Enter Url (Leave empty to redirect to the previous page)'))->value(module::get_var("content_warning", "enter_link_url")); + $group->input("exit_link_text")->label(t('Exit Label'))->rules("required")->value(module::get_var("content_warning", "exit_link_text")); + $group->input("exit_link_url")->label(t('Exit Url'))->rules("required")->value(module::get_var("content_warning", "exit_link_url")); + + $group->submit("submit")->value(t("Save")); + return $form; + } } \ No newline at end of file diff --git a/3.0/modules/content_warning/controllers/content_warning.php b/3.0/modules/content_warning/controllers/content_warning.php index 4d4be6af..c514931b 100644 --- a/3.0/modules/content_warning/controllers/content_warning.php +++ b/3.0/modules/content_warning/controllers/content_warning.php @@ -1,27 +1,27 @@ -get("settings_menu") - ->append(Menu::factory("link") - ->id("content_warning_menu") - ->label(t("Content Warning")) - ->url(url::site("admin/content_warning"))); - } -} +get("settings_menu") + ->append(Menu::factory("link") + ->id("content_warning_menu") + ->label(t("Content Warning")) + ->url(url::site("admin/content_warning"))); + } +} diff --git a/3.0/modules/content_warning/helpers/content_warning_installer.php b/3.0/modules/content_warning/helpers/content_warning_installer.php index 6c0df195..04e7b000 100644 --- a/3.0/modules/content_warning/helpers/content_warning_installer.php +++ b/3.0/modules/content_warning/helpers/content_warning_installer.php @@ -1,41 +1,41 @@ - - - - - '; - return $h; - } - - static function page_top($theme) { - $cw = ' -
-
-

'.module::get_var("content_warning", "title").'

-
-

'.nl2br(module::get_var("content_warning", "message")).'

-
- -
- '; - if(!isset($_COOKIE['cw_agree'])) { - return $cw; - } - } + + + + + '; + return $h; + } + + static function page_top($theme) { + $cw = ' +
+
+

'.module::get_var("content_warning", "title").'

+
+

'.nl2br(module::get_var("content_warning", "message")).'

+
+ +
+ '; + if(!isset($_COOKIE['cw_agree'])) { + return $cw; + } + } } \ No newline at end of file diff --git a/3.0/modules/content_warning/jqModal.css b/3.0/modules/content_warning/jqModal.css index 02698748..d20b96ce 100644 --- a/3.0/modules/content_warning/jqModal.css +++ b/3.0/modules/content_warning/jqModal.css @@ -1,65 +1,65 @@ -/* jqModal base Styling courtesy of; - Brice Burgess */ - -/* The Window's CSS z-index value is respected (takes priority). If none is supplied, - the Window's z-index value will be set to 3000 by default (via jqModal.js). */ - -.jqmWindow { - display: none; - position: fixed; - top: 5%; - left: 5%; - /*margin-left: -500px;*/ - width: 90%; - height: 90%; - background-color: #EEE; - color: #333; - border: 1px solid black; - padding: 12px; -} - -.jqmOverlay { - background-color: #000; -} - -/* Background iframe styling for IE6. Prevents ActiveX bleed-through ( form elements, etc.) */ +* iframe.jqm { + position:absolute; + top:0; + left:0; + z-index:-1; + width: expression(this.parentNode.offsetWidth+'px'); + height: expression(this.parentNode.offsetHeight+'px'); +} + +/* Fixed posistioning emulation for IE6 + Star selector used to hide definition from browsers other than IE6 + For valid CSS, use a conditional include instead */ +* html .jqmWindow { + position: absolute; + top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px'); +} + +#cw_buttons_container { + width: 100%; + height: 200px; + text-align:center; +} + +.cw_buttons { + margin:10px; + padding:10px; + width: 300px; + font-weight: bold; +} + +#cw_ko { + margin-left: 100px; + border:1px solid #FF0000; + float: left; +} +#cw_ok { + margin-right: 100px; + border:1px solid #00FF00; + float:right; } \ No newline at end of file diff --git a/3.0/modules/content_warning/module.info b/3.0/modules/content_warning/module.info index 7987353a..d87ae97c 100644 --- a/3.0/modules/content_warning/module.info +++ b/3.0/modules/content_warning/module.info @@ -1,7 +1,7 @@ name = Content Warning -description = Display a cookie based warning to prevent display inopportune content. +description = "Display a cookie based warning to alert users about inappropriate content." version = 1 author_name = "Manuel Sechi" author_url = "http://www.manuelsechi.com" info_url = "http://www.manuelsechi.com/progetti/gallery3-content-warning/" -discuss_url = "http://www.manuelsechi.com/progetti/gallery3-content-warning/" \ No newline at end of file +discuss_url = "http://www.manuelsechi.com/progetti/gallery3-content-warning/" diff --git a/3.0/modules/content_warning/views/admin_content_warning.html.php b/3.0/modules/content_warning/views/admin_content_warning.html.php index faadf290..c46f9557 100644 --- a/3.0/modules/content_warning/views/admin_content_warning.html.php +++ b/3.0/modules/content_warning/views/admin_content_warning.html.php @@ -1,5 +1,5 @@ - -
-

- -
+ +
+

+ +