View Single Post
  #4  
Old 05-25-2009, 06:15 PM
robackja's Avatar
robackja Offline
pp veteran
 
Join Date: Sep 2008
Location: Tucson, Arizona
Posts: 50
Quote:
Originally Posted by Kristian View Post
You're right. I need a better understanding of all of this. I'm not trying to do the XHTML hack on index.php - I don't know what it is. Perhaps it's this?

// Fix proposed by tomyeah on the forum
if (!isset($_GET['x']) || $_GET['x'] != 'save_comment') {
header('Vary: Accept');
if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === FALSE) {
header('Content-Type: text/html; charset=utf-8');
} else {
header('Content-Type: application/xhtml+xml; charset=utf-8');
echo('<?xml version="1.0" encoding="UTF-8"?>'."\\n");
}
}
That is it. You can either remove it, replace it with the pixelpost default
PHP Code:
// Fix proposed by tomyeah on the forum
header('Content-Type: text/html; charset=utf-8'); 
or use what I use (which is for strict XHTML1.1 standards)

PHP Code:
if (empty($_GET['x']) || ($_GET['x'] != "save_comment" && $_GET['x'] != "rss" && $_GET['x'] != "atom")) {
        header('Vary: Accept');
        if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === false)
 {
                header('Content-Type: text/html; charset=utf-8');
        }
        else {
                header('Content-Type: application/xhtml+xml; charset=utf-8');
                echo('<?xml version="1.0" encoding="UTF-8"?>'."\n");
        }
}
The safest is to use the Pixelpost default, as the XHTML stuff might break other templates.
__________________
The World in 35mm | joeroback.com | roback.cc
Reply With Quote