? .project
Index: ie6nomore.css
===================================================================
RCS file: ie6nomore.css
diff -N ie6nomore.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ie6nomore.css	1 Feb 2010 15:29:36 -0000
@@ -0,0 +1,49 @@
+#ie6nomore {
+  border: 1px solid #F7941D;
+  background: #FEEFDA;
+  text-align: center;
+  height: 75px;
+  position: relative;
+  display: none;
+}
+
+#ie6nomore-wrapper {
+  width: 640px;
+  margin: 0 auto;
+  text-align: left;
+  padding: 0;
+  overflow: hidden;
+  color: black;
+}
+
+#ie6nomore-warning {
+  width: 75px; 
+  float: left;
+}
+
+#ie6nomore-message {
+  width: 265px;
+  float: left;
+  font-family: Arial, sans-serif;
+}
+
+#ie6nomore-title {
+  font-size: 14px;
+  font-weight: bold;
+  margin-top: 12px;
+}
+
+#ie6nomore-description {
+  font-size: 12px;
+  margin-top: 6px;
+  line-height: 12px;
+}
+
+.ie6nomore-browser-wrapper {
+  width: 75px;
+  float: left;
+}
+
+.ie6nomore-browser-image {
+  border: none;
+}
\ No newline at end of file
Index: ie6nomore.js
===================================================================
RCS file: ie6nomore.js
diff -N ie6nomore.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ie6nomore.js	1 Feb 2010 15:29:36 -0000
@@ -0,0 +1,28 @@
+(function($) {
+  Drupal.behaviors.ie6nomore = function(context) {
+    if ($.browser.msie == true && $.browser.version < 7) {
+      // There is an issue with IE6 incorrectly rendering the page layout
+      // when the content is just prepended to the page. If the content is
+      // hidden, inserted, and then shown the page renders correctly.
+      $("body").prepend(Drupal.theme('ie6nomore')).find('#ie6nomore').show();
+    }
+  }
+
+  Drupal.theme.prototype.ie6nomore = function() {
+    $output = '';
+    $output += '<div id="ie6nomore" class="clear-block">';
+    $output += '<div id="ie6nomore-wrapper">';
+    $output += '  <div id="ie6nomore-warning"><img src="http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg" alt="Warning!" /></div>';
+    $output += '  <div id="ie6nomore-message">';
+    $output += '    <div id="ie6nomore-title">' + Drupal.t('You are using an outdated browser') + '</div>';
+    $output += '    <div id="ie6nomore-description">' + Drupal.t('For a better experience using this site, please upgrade to a modern web browser.') + '</div>';
+    $output += '  </div>';
+    $output += '  <div class="ie6nomore-browser-wrapper"><a href="http://www.firefox.com" target="_blank"><img src="http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg" class="ie6nomore-browser-image" alt="Get Firefox 3.6"/></a></div>';
+    $output += '  <div class="ie6nomore-browser-wrapper"><a href="http://www.browserforthebetter.com/download.html" target="_blank"><img src="http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg" class="ie6nomore-browser-image" alt="Get Internet Explorer 8"/></a></div>';
+    $output += '  <div class="ie6nomore-browser-wrapper"><a href="http://www.apple.com/safari/download/" target="_blank"><img src="http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg" class="ie6nomore-browser-image" alt="Get Safari 4"/></a></div>';
+    $output += '  <div class="ie6nomore-browser-wrapper"><a href="http://www.google.com/chrome" target="_blank"><img src="http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg" class="ie6nomore-browser-image" alt="Get Google Chrome"/></a></div>';
+    $output += '</div>';
+    $output += '</div>';
+    return $output;
+  }
+})(jQuery);
Index: ie6nomore.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ie6nomore/ie6nomore.module,v
retrieving revision 1.1
diff -u -p -r1.1 ie6nomore.module
--- ie6nomore.module	1 Feb 2010 09:56:07 -0000	1.1
+++ ie6nomore.module	1 Feb 2010 15:29:36 -0000
@@ -4,52 +4,13 @@
  * @file
  * Adds a banner prompting Internet Explorer 6 users to upgrade to a better or newer browser.
  * Based on code from http://www.ie6nomore.com/
- *
- * @author Jonathan Hunt ie6nomore.module@huntdesign.co.nz
- *
- * The IE6 upgrade banner is injected to the page via javascript. If you wish to have a non-js solution, you can use the $ie6nomore
- * variable in your page template.
  */
-define('IE6NOMORE_BANNER_HTML', "<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'><div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>      <div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>      <div style='width: 275px; float: left; font-family: Arial, sans-serif;'><div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div><div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this site, please upgrade to a modern web browser.</div></div><div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div><div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>      <div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>      <div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div></div></div>");
 
 /**
- * Define module settings path and path for display of upgrade advice.
- * Implementation of hook_menu().
+ * Implementation of hook_init().
  */
-function ie6nomore_menu() {
-/*  $items['admin/settings/ie6upgrade'] = array(
-    'title' => 'IE6 upgrade',
-    'description' => 'Settings for IE6 upgrade',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('ie6upgrade_admin_settings'),
-    'access arguments' => array('administer site configuration'),
-    'type' => MENU_NORMAL_ITEM,
-    'file' => 'ie6upgrade.admin.inc',
-  );*/
-
-  $items['ie6nomore.js'] = array(
-    'page callback' => 'ie6nomore_js',
-    'access callback' => TRUE,
-    'type' => MENU_CALLBACK,
-  );
-  return $items;
-}
-
-/**
- * Return javascript to inject IE6 No more banner markup.
- */
-function ie6nomore_js() {
-  echo 'Drupal.behaviors.ie6nomore = function (context) { $("body").prepend("'. IE6NOMORE_BANNER_HTML .'"); }';
-  exit;
-}
-
-/**
- * Make the upgrade banner markup available in the page template.
- */
-function ie6nomore_preprocess_page(&$vars) {
-  $vars['ie6nomore'] = '<!--[if lt IE 7]>'. IE6NOMORE_BANNER_HTML .'<![endif]-->';
-
-  $vars['scripts'] .= '<!--[if lte IE 7]>';
-  $vars['scripts'] .= '<script type="text/javascript" src="/ie6nomore.js"></script>';
-  $vars['scripts'] .= '<![endif]-->'."\n";
+function ie6nomore_init() {
+  $path = drupal_get_path('module', 'ie6nomore');
+  drupal_add_css($path .'/ie6nomore.css');
+  drupal_add_js($path .'/ie6nomore.js');
 }
\ No newline at end of file
