From: Mike N. <mh...@us...> - 2004-04-03 18:31:41
|
Everyone, I'm not sure how useful you'll find this, but here it is anyway. This sets the doctype and server side charset. The <meta content-type set by layout is redundant with this setup. This solution should work with Mozilla and IE. Feedback is appreciated. Don, Thank you for helping me with the php code. :-) mod/layout/conf/config.php define("ALLOW_THEME_PHP_INSERTION", TRUE); theme.php <?php if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Ty pe: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; } else { header("Content-Type: text/html; charset=UTF-8"); $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN \" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; } ?> theme.tpl -- first line must be {DOCTYPE} Ref. HTML Declarations http://www.htmldog.com/guides/htmladvanced/declarations/ -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |