Uh yeah...so my friend and I half-rewrote our 3 column Zen theme to make it look good..and cool IE7 breaks it down like a biatch. Ie 6 is not a lot better..but atleast not as worse. Firefox, Safari3, Knoqueror, Epiphany et al worked with it as smooth as clockwork..Validates..except for the Star Selectors (Which I later realised dint work with IE7 anymore)
Much to my selective Php n00bishness.. I thought the get_browser() would be blocked by most hosts as it would have to 'phone out' to the client browser... Contradictorily, It wasnt.. Much to my lethargy to write elonquent code lines with hundreds of $_SERVER[HTTP_USER_AGENT] thingys, I ran into the Browscap module whilst randomly browsing in the contrib.module section on the cvs...Just what I needed!
So now that the Browscap module populates a full list of browsers that exist, all I had to do was spend a couple of hours on writing something to filter site compatibility by browser...and obviously IE 7 was getting nothing but the phptemplate_maintenence_page!
Earlier, I was driven to the verge of baldness, suicide, depression after continual pissing around with conditional comment lines to get IE7 to use a stylesheet it likes...But sadly enough, IE remained obstinate.
All that done, Ie7 blocked and IE6 warded off with a warning, a google ad script for the IE7 maitenence page... It was a happy ending.
function phptemplate_maintenance_page($content, $messages = TRUE, $partial = FALSE) {
drupal_set_header('Content-Type: text/html; charset=utf-8');
drupal_set_html_head('@import "'. base_path() . drupal_get_path('module', 'system') .'/defaults.css";');
drupal_set_html_head('@import "'. base_path() . drupal_get_path('module', 'system') .'/system.css";');
drupal_set_html_head('@import "'. base_path() . path_to_theme() .'/maintenance.css";');
drupal_set_html_head('
');
$output = "\n";
$output .= '';
$output .= '';
$output .= ' ';
$output .= drupal_get_html_head();
$output .= drupal_get_js();
$output .= '';
$output .= "";
$output .= '
';
$output .= '
.path_to_theme().'/images/header.jpg)
';
$output .= '
';
if ($messages) {
$output .= theme('status_messages');
}
$output .= $content;
$output .= "
";
$output .= "
";
$output .= "";
return $output;
}
So that was the override of the default maintenence page in the template.php.. Ofcourse, you can add all the styles you want in the maintenence.css...but again, Dont take the trouble for it's IE7.. you may have to do another maintenence / persuasion page for IE7 might screw up on the CSS again. Feels like heaven to get IE7 out of the way.
Might do some more tweaking.. a filter by navigator.Platform / OS detection as a parallel disparate set that can be operated on with various combos of browsers.. Maybe make it easier for myself to block this stupid linux chauvinist I know