blackhawk_996
10-28-2005, 08:59 PM
I got into this topic on the main subdreamer site and abcohen sent me this way. I've been working with subdreamer off and on for quite a while as a site builder/optimizer/designer/etc... lol and have seen the shift of more people trying to code their sites in xhtml. I have even started using subdreamer light personally on my own site for testing. And thus why I first looked into this mainly. One of the biggest problems with xhtml is that it's suggested that XHTML delivered as text/html is broken and XHTML delivered as text/xml is very risky. Authors who wish to use XHTML should deliver their markup as application/xhtml+xml. But the way subdreamer is initially coded this isn't possible no matter how well written your skin may be. All because of the information tied to this section of the index.
// ################### SET LOCALE TIME AND HEADER INFORMATION ##################
Again this only applies if trying to use xhtml. Thanks to the use of a few if, elseif statements all you need to do is find this piece of code written in the index page.
header("Content-Type: text/html; charset=$languageinfo[2]");
And replace it with this.
if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validato r")) {
header("Content-type: application/xhtml+xml; charset=$languageinfo[2]");
}
elseif ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml; charset=$languageinfo[2]");
}
else {
header("Content-type: text/html; charset=$languageinfo[2]");
}
Doing this still allows your code to validate with the correct mime type, but also degrades down to text/html to still allow IE users to view your site. Before I post to much more though I would like someone to chime in with exactly how much code can be posted here. I don't want to upset anyone by putting out to much of the source.
// ################### SET LOCALE TIME AND HEADER INFORMATION ##################
Again this only applies if trying to use xhtml. Thanks to the use of a few if, elseif statements all you need to do is find this piece of code written in the index page.
header("Content-Type: text/html; charset=$languageinfo[2]");
And replace it with this.
if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validato r")) {
header("Content-type: application/xhtml+xml; charset=$languageinfo[2]");
}
elseif ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml; charset=$languageinfo[2]");
}
else {
header("Content-type: text/html; charset=$languageinfo[2]");
}
Doing this still allows your code to validate with the correct mime type, but also degrades down to text/html to still allow IE users to view your site. Before I post to much more though I would like someone to chime in with exactly how much code can be posted here. I don't want to upset anyone by putting out to much of the source.