[How-to] Make Your vB Template XHTML Validate Correctly
by
13 Sep 2007
Have you tried validating your vBulletin-powered site with the http://validator.w3.org? A standard vB installation will fail the validation with one error-- it's missing the xmlns attribute for html tag at the very beginning. You can check this by http://validator.w3.org/check?uri=www.vbulletin.com%2Fforum. The <html> tag should look like <html xmlns="http://www.w3.org/1999/xhtml"> So until vB's default templates are changed to include the xmlns info, I needed a workaround, and I didn't want to manually edti dozens of templates. In comes a brilliant feature that is implemented in the ACP. Expand the Styles & Templates section and click on Replacement Variable Manager. Add a new Replacement Variable for each of your parent styles. Search for text: Code:
<html Code:
<html xmlns="http://www.w3.org/1999/xhtml" Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en"> Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> |