Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 5 files changed
  • 0 comments
  • 1 contributor
2  catalog/includes/languages/english.php
@@ -247,6 +247,4 @@ function tep_date_raw($date, $reverse = false) {
247 247
248 248 define('FOOTER_TEXT_BODY', 'Copyright &copy; ' . date('Y') . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a><br />Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a>');
249 249
250   -define('NO_SCRIPT_TEXT', '<p><strong>JavaScript seems to be disabled in your browser.</strong></p><p>You must have JavaScript enabled in your browser to utilize the functionality of this website.</p>');
251   -
252 250 ?>
16 catalog/includes/languages/english/modules/header_tags/ht_noscript.php
... ... @@ -0,0 +1,16 @@
  1 +<?php
  2 +/*
  3 + $Id$
  4 +
  5 + osCommerce, Open Source E-Commerce Solutions
  6 + http://www.oscommerce.com
  7 +
  8 + Copyright (c) 2010 osCommerce
  9 +
  10 + Released under the GNU General Public License
  11 +*/
  12 +
  13 + define('MODULE_HEADER_TAGS_NOSCRIPT_TITLE', 'No Script Message');
  14 + define('MODULE_HEADER_TAGS_NOSCRIPT_DESCRIPTION', 'Shows a message to the user if they are browsing with javascript off.');
  15 + define('MODULE_HEADER_TAGS_NOSCRIPT_TEXT', '<p><strong>JavaScript seems to be disabled in your browser.</strong></p><p>You must have JavaScript enabled in your browser to utilize the functionality of this website.</p>');
  16 +?>
60 catalog/includes/modules/header_tags/ht_noscript.php
... ... @@ -0,0 +1,60 @@
  1 +<?php
  2 +/*
  3 + $Id$
  4 +
  5 + osCommerce, Open Source E-Commerce Solutions
  6 + http://www.oscommerce.com
  7 +
  8 + Copyright (c) 2012 osCommerce
  9 + Copyright (c) 2012 Club osCommerce www.clubosc.com
  10 +
  11 + Released under the GNU General Public License
  12 +*/
  13 +
  14 + class ht_noscript {
  15 + var $code = 'ht_noscript';
  16 + var $group = 'header_tags';
  17 + var $title;
  18 + var $description;
  19 + var $sort_order;
  20 + var $enabled = false;
  21 +
  22 + function ht_noscript() {
  23 + $this->title = MODULE_HEADER_TAGS_NOSCRIPT_TITLE;
  24 + $this->description = MODULE_HEADER_TAGS_NOSCRIPT_DESCRIPTION;
  25 +
  26 + if ( defined('MODULE_HEADER_TAGS_NOSCRIPT_STATUS') ) {
  27 + $this->sort_order = MODULE_HEADER_TAGS_NOSCRIPT_SORT_ORDER;
  28 + $this->enabled = (MODULE_HEADER_TAGS_NOSCRIPT_STATUS == 'True');
  29 + }
  30 + }
  31 +
  32 + function execute() {
  33 + global $oscTemplate;
  34 +
  35 + $oscTemplate->addBlock('<noscript><div class="no-script"><div class="no-script-inner">' . tep_output_string(MODULE_HEADER_TAGS_NOSCRIPT_TEXT) . '</div></div></noscript>', $this->group);
  36 + $oscTemplate->addBlock('<style>.no-script { border: 1px solid #ddd; border-width: 0 0 1px; background: #ffff90; font: 14px verdana; line-height: 1.25; text-align: center; color: #2f2f2f; } .no-script .no-script-inner { width: 950px; margin: 0 auto; padding: 5px; } .no-script p { margin: 0; }</style>', $this->group);
  37 + }
  38 +
  39 + function isEnabled() {
  40 + return $this->enabled;
  41 + }
  42 +
  43 + function check() {
  44 + return defined('MODULE_HEADER_TAGS_NOSCRIPT_STATUS');
  45 + }
  46 +
  47 + function install() {
  48 + tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable No Script Module', 'MODULE_HEADER_TAGS_NOSCRIPT_STATUS', 'True', 'Add message for people with .js turned off?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  49 + tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_TAGS_NOSCRIPT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
  50 + }
  51 +
  52 + function remove() {
  53 + tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
  54 + }
  55 +
  56 + function keys() {
  57 + return array('MODULE_HEADER_TAGS_NOSCRIPT_STATUS', 'MODULE_HEADER_TAGS_NOSCRIPT_SORT_ORDER');
  58 + }
  59 + }
  60 +?>
8 catalog/includes/template_top.php
@@ -64,14 +64,6 @@
64 64 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
65 65 <?php echo $oscTemplate->getBlocks('header_tags'); ?>
66 66
67   -<noscript>
68   - <div class="no-script">
69   - <div class="no-script-inner">
70   - <?php echo NO_SCRIPT_TEXT; ?>
71   - </div>
72   - </div>
73   -</noscript>
74   -
75 67 </head>
76 68 <body>
77 69
21 catalog/stylesheet.css
@@ -414,24 +414,3 @@ SPAN.errorText {
414 414 float: left;
415 415 margin-right: 5px;
416 416 }
417   -
418   -/* No Javascript Message */
419   -
420   -.no-script {
421   - border: 1px solid #ddd;
422   - border-width: 0 0 1px;
423   - background: #ffff90;
424   - font: 14px verdana;
425   - line-height: 1.25;
426   - text-align: center;
427   - color: #2f2f2f;
428   -}
429   -.no-script .no-script-inner {
430   - width: 950px;
431   - margin: 0 auto;
432   - padding: 5px;
433   -}
434   -
435   -.no-script p {
436   - margin: 0;
437   -}

No commit comments for this range

Something went wrong with that request. Please try again.