SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / SEO-Board / Comments and Suggestions / Forum inserts text before doctype
Posted:  10 Mar 2006 14:00
The forum code inserts a comment before the doctype when constructing the HTML page like so:
Code:

<!-- START: mainheader -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
(I have added the doctype in mainheader.htm) This comment really shouldn't be there.  To get round this, I have tweaked the get_template function in skinning.php so that it only inserts the comment if it's not the main header that it's dealing with. 
Code:

    if($template_name == "mainheader")
       
        return "return <<<TMP\r{$t}\r\n<!-- END: $template_name -->\r\nTMP;\r\n";
    Else
        return "return <<<TMP\r\n<!-- START: $template_name -->\r\n{$t}\r\n<!-- END: $template_name -->\r\nTMP;\r\n";


This seems to work, but perhaps there is a better way to do it?

Ian
Posted:  10 Mar 2006 15:51
The comments are there to help webmasters see which template they need to edit. You can remove the comments all together if you don't need them. I personally don't care about doctypes and other web standards and validations because:
1. 99% of the web pages don't follow them
2. Search engines know about 1. and don't use validation for ranking purposes
3. Search engines' pages don't validate themselves.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  15 Mar 2006 20:10
Even so, we should have the option to decide if we want to validate the forum or not.
Posted:  15 Mar 2006 20:48
Validation is overrated and useless, trust me. If you really want to do it, just edit the templates.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com