It is currently Sat Oct 11, 2008 6:42 pm

 

All times are UTC


Forum rules

Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks

This forum section will be closed and removed eventually.



Post new topic Reply to topic  [ 22 posts ] 
Author Message
 Post subject: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Sep 21, 2005 12:48 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Aug 17, 2005 10:30 pm
Posts: 728
Location: Vienna, VA US
Many existing Joomla templates have the following statement as the first line of the index.php file:

   

This conforms to the W3 specifications and is interpreted correctly by browsers other than Internet Explorer (IE).  Unfortunately, having this statement the head  of the template's index.php file causes IE (including the current 6.0 version) to go into Quirks Mode.  Read this to learn about Quirks Mode and IE.

To prevent IE from entering Quirks Mode, replace the and statements at the top of the template's index file with:

  $iso = split( '=', _ISO );
  $Browser_Type  =  strtok($HTTP_USER_AGENT,  "/");
  $doc_type = "";
if (ereg( "MSIE",  $HTTP_USER_AGENT)) 
{
  echo $doc_type;
  echo '';
  $browtype = "You are using IE";
}
else

  echo '';
  echo $doc_type; 
  $browtype = "You are not using IE";
}
?>


Hopefully the future IE 7 release will correct this and bring IE in line with the W3 specifications.

_________________
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com


Last edited by HarryB on Wed Sep 21, 2005 12:58 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Sep 21, 2005 2:10 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Mon Sep 05, 2005 6:18 am
Posts: 725
Location: India
Mmm Maybe this should be inculded in the upcoming joomla 1.0.1 ...... less headache for the end users

_________________
A. N. Jacob-New
The Tech & Design Blog http://www.Clazh.com


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Sep 21, 2005 2:16 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Aug 17, 2005 10:30 pm
Posts: 728
Location: Vienna, VA US
bluesaze wrote:
Mmm Maybe this should be inculded in the upcoming joomla 1.0.1 ...... less headache for the end users
No...its not a Joomla core deficiency...its an issue for 3rd-party template builders to consider, not the Joomla core developers.

_________________
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Fri Oct 14, 2005 5:25 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Oct 08, 2005 3:25 pm
Posts: 361
Location: Australia
is this why when i view some of my templates in IE it shows it all funny compared to firefox?

_________________
http://www.persianari.com


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Fri Oct 14, 2005 6:00 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 7:13 am
Posts: 11058
Basically yes. The current version of Internet Explorer is notorious for not keeping up with CSS standards. Hopefully version 7 which will be released next year will be better in this regard.

_________________
Antonie de Wilde - Forum admin


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Nov 02, 2005 5:31 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Nov 02, 2005 5:26 am
Posts: 1
Instead of browser sniffing (x_x)  couldn't you just insert the following in the segment?

Code:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />


That's what Jeffrey Zeldman recommends in his book, "designing with web standards," page 158.  See source code here: http://zeldman.com



Kevin


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Nov 02, 2005 6:54 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Aug 20, 2005 11:46 pm
Posts: 27
Location: Mexico City
Why? Mainly because IE sucks hardly.  >:(


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Thu Nov 03, 2005 11:25 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6425
The xml prolog isn't needed when serving pages as text/html. In Joomla 1.1 we have removed it from the included templates and are forcing the use of meta tag. We will advocate template developers todo the same.

_________________
Johan Janssens - Lead developer
'Making good things happen'
http://www.nooku.org - content translation system for Joomla! 1.5
http://www.joomlatools.org - training, consulting and extension development


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Jan 04, 2006 10:52 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Sep 12, 2005 5:23 am
Posts: 149
Location: Stockholm, Sweden
Hi! I am desperately searching for a cure for the rhuk solarflare ii template displaying weird in IE6 for Windows. I have modified the template and it looks fine in all my Mac-based browsers. The URL is http://www.anotherproject.se. I am, however, not savvy enough to understand how to alter the index file to make it work in all IE for Windows. Could someone with the expertise help me through this, by exemplifying it in the copied code below?

Code:
<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<?php


Thank you for your kind assistance!


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Mon Jan 09, 2006 5:07 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Aug 17, 2005 10:30 pm
Posts: 728
Location: Vienna, VA US
CHCG wrote:
Hi! I am desperately searching for a cure for the rhuk solarflare ii template displaying weird in IE6 for Windows. I have modified the template and it looks fine in all my Mac-based browsers. The URL is http://www.anotherproject.se. I am, however, not savvy enough to understand how to alter the index file to make it work in all IE for Windows. Could someone with the expertise help me through this, by exemplifying it in the copied code below?

Code:
<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<?php


Thank you for your kind assistance!

Change this statement..

  echo ''
to...

// echo ''

This may help some, but think you may also have to change the width in some of the css statements in the template_css.css file too....

Think there are more threads here in forum regarding this issue with the solarflare ii template....try searching the forum for more on this issue...

Good luck...

_________________
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Mon Jan 09, 2006 10:19 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Sep 12, 2005 5:23 am
Posts: 149
Location: Stockholm, Sweden
Thank you for your kind help, HarryB. As you anticipated, your solution solved more than some of the problem: It mended the broken structure!!! I will now see if I can fix the rest in the css. I must say, getting things right for IE is tricky!

Regards,

Chris


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Tue Jan 10, 2006 1:25 am 
I've been banned!
Offline

Joined: Thu Aug 18, 2005 12:37 am
Posts: 1139
Location: Melbourne, Australia
That's what you get with quirks mode..

Quirks  8)  ???


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Jan 18, 2006 8:21 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Sep 30, 2005 10:19 pm
Posts: 11
HarryB wrote:
Change this statement..

  echo ''
to...

// echo ''



:-* Thank you HarryB!  Adding these two little forward slashes just solved the text resizing problem I've been wrestling with all day!

~Mag


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Thu Dec 07, 2006 9:21 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Dec 07, 2006 8:56 pm
Posts: 1
Thank you... :)

_________________
linkssearch


Last edited by sitearsiv on Thu Dec 07, 2006 9:23 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Wed Dec 13, 2006 7:45 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 29, 2006 5:13 pm
Posts: 22
Hmmm.  My page is still messed up even with commenting out that one line in the rhuk solarflare ii template.  I'm seeing that modules are not displaying in their correct locations.  Like the frontpage content is displaying under the left main menu rather then next to it.  demo.rolwheels.com.  Any help would be great.  thx.


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Thu Dec 14, 2006 6:37 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Oct 08, 2005 3:25 pm
Posts: 361
Location: Australia
Is this still an issue with IE7?

_________________
http://www.persianari.com


Top
 Profile  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Thu Dec 14, 2006 12:49 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 29, 2006 5:13 pm
Posts: 22
IE6.  What I have learned is that I am using the scrolling news module in the "top" location.  The width parameter was set just a hair too long and caused the whole template to bump over a location (just in IE6).  The scrolling news module doesn't seem to scroll on IE6 or IE7 so I may just replace it all together.  Other than that, my main menus are not displaying correctly (just in IE6) so I may have to adjust the height in the .CSS or something. 

Rumor has it that there is another version of this solarflare template that is not a fixed width.  Anyone have a pointer to that?
Thx.


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Mon Dec 18, 2006 11:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Nov 20, 2006 12:17 pm
Posts: 43
I found this because many of my visitors tell me that things don't look right with IE6.

I did testing and everything looks just fine with IE7 (yes they seemed to have fixed the issues in IE7! :D )

However the majority of my visitors are still using IE6.

So I'm trying to fix some templates so that they will work with BOTH IE6 and IE7.

From what I've been reading, by changing the order of the !doctype and the XML prolog statement you can force IE6 into quirks mode ore not. See here:
http://www.quirksmode.org/css/quirksmode.html

Quote:
Explorer Windows special: the xml prolog
In Explorer 6 Windows, Microsoft implemented one extra rule: if a doctype that triggers strict mode is preceded by an xml prolog, the page shows in quirks mode. This was done to allow web developers to achieve valid pages (which require a doctype) but nonetheless stay in quirks mode.

Note that this behaviour has been removed from Explorer 7.


I don't think the code above that just tests for MSIE will work as it seems to not check for versions below IE 7.

Just saying IE sucks doesn't help much as the majority of visitors to my web sites are using IE (like it or not).

Does anyone have a suggested change to templates which will work for IE 6 and below as well as IE 7 (and above)?


Last edited by imrich on Mon Dec 18, 2006 11:37 pm, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the Statement?
PostPosted: Thu Dec 20, 2007 8:05 am 
I've been banned!
Offline

Joined: Wed Dec 19, 2007 10:36 pm
Posts: 20
thats strange, i use w3o to validate my html and i dont seem to be having this issue? weird!

_________________
smile


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the <!DOCTYPE> State
PostPosted: Mon Mar 31, 2008 2:41 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Tue Mar 04, 2008 3:24 pm
Posts: 2
I have the exact same problem with my joomla site when viewing it in IE6. I have tried all the steps listed here and cannot find a fix. my site is http://www.peoriatroop333.org.


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the <!DOCTYPE> State
PostPosted: Wed May 14, 2008 1:11 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed May 14, 2008 12:54 am
Posts: 2
I had luck.Works in IE6 and IE7 with this fix...i was really careful at reading.This is very important because i have 76.95%
from IE.

_________________
Signature Rules: viewtopic.php?f=8&t=65


Top
 Profile E-mail  
 
 Post subject: Re: FAQ: Why does Internet Explorer ignore the <!DOCTYPE> State
PostPosted: Sat Jun 28, 2008 11:49 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Jun 28, 2008 11:43 pm
Posts: 3
yup it work in IE 7

_________________
Signature Rules: viewtopic.php?f=8&t=65


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ] 


All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group