Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Is textpattern visible with ie8b?
A browser that renders a blank page when it encounters a DOCTYPE is like a fire truck that melts when it encounters fire. I’m not sure why anyone would want to work around such problems today. There will likely be four or five betas of IE8, and each will have its own unique quirks. Trying to code your site for a bug in the first beta that will change in the next beta seems a waste of time.
TextPattern user since 04/04/04
Offline
Re: Is textpattern visible with ie8b?
colak wrote:
Except it returns the error “Parse error: syntax error, unexpected $end in /users/home/xxx/web/public/textpattern/publish/taghandlers.php(2804) : eval()’d code on line 8”
It’s because of the DTD echo – you’ve got unescaped quotation marks. If you use single quotes, you’ll be good: echo '<DTD>';
. Here’s an alternate version:
<txp:php>
if (strpos($HTTP_USER_AGENT,'iewin/8') === true)
{
// for IE8
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
}
else {
// return strict dtd for other browsers
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
}
</txp:php>
Offline
Re: Is textpattern visible with ie8b?
ruud wrote: Isn’t this why they call it a beta version?
reid wrote: A browser that renders a blank page when it encounters a DOCTYPE is like a fire truck that melts when it encounters fire.
Yes but what about the article linked by masa?
masa wrote: I have a feeling this might be caused by IE8’s “super-standards mode” as described here.
If indeed doctypes are in their way out and the acid2 test is what will count in the near future, then what happens to most of our sites?
@jm
I was thinking more in the lines of
<txp:php>
if (strpos($HTTP_USER_AGENT,'iewin/8') === true)
{
// for IE8 - echo nothing
echo 'null';
}
else {
// return strict dtd for other browsers
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
}
</txp:php>
But null
seems to be actually ‘printed’ on the page.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Is textpattern visible with ie8b?
colak wrote:
Yes but what about the article linked by masa?
I’ve seen articles considerably after that one that state the IE8 team has not yet made a final decision on this matter, since it caused such an uproar and debate.
Remember “SmartTags”? Microsoft said they were going to unleash those within a new browser version, and developers responded immediately by littering their heads with app specific meta tags.
And then MS never added SmartTags. They changed their mind in mid-development. The meta tags are still there, though, in milllions of pages.
Add in the fact my site stats show 21% of my visitors have yet to even jump from IE6 to IE7, and I’m going to wait for this to settle out.
TextPattern user since 04/04/04
Offline
Re: Is textpattern visible with ie8b?
colak wrote:
I was thinking more in the lines of […] But
null
seems to be actually ‘printed’ on the page.
Oh I see. You don’t need the else
, so let’s reverse the condition:
<txp:php>
// if not IE8
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0') === false)
{
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
}
</txp:php>
<html lang="en-us" xml:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Example</title>
</head>
<body>
<txp:php>
echo $_SERVER['HTTP_USER_AGENT'];
</txp:php>
</body>
</html>
Edit: Just tested Textpattern and NeMe – the content shows up:
Last edited by jm (2008-03-29 21:50:55)
Offline
Re: Is textpattern visible with ie8b?
reid, You are so right – the history of most software is littered with episodes like the one you described. Something similar happened with the architectural software I use – we all panicked but within a few months the new version was released which was fully compatible with most of the previous documents.
jm’s snippet is very helpful for now as we can at least check our sites on ie8. In my case at least, without it I get a blank screen. With it, I see possible inconsistencies which although I am not going to correct until the official version is released I will be ready for when it does.
jm – that works! thanks! – isn’t your screenshot on ie7 though?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Is textpattern visible with ie8b?
No problem. That’s IE8 – if you click “Emulate IE7” it’ll use IE7’s rendering engine. Plus IE7 doesn’t mess up the textpattern.com page :).
Offline