WeatherHarvest and W3C validation

Tweaks to Weather Harvest
  
3 May '07 Thu May 03, 2007 18:47    
layingback
Site Admin  
  •  

Poster WeatherHarvest and W3C validation

Want to validate your site against the W3C validator but get the No document type declaration; will parse without validation error?

Well if you are using WeatherHarvest, it is because it is putting its javascript declaration right at the very top of the page, even before the !DOCTYPE declaration. Not good.

Fortunately the fix is fairly easy. In /modules/WeatherHarvest/wh_ini.php find around line 35:

PHP:
	echo "<script type=\"text/javascript\" src=\"modules/WeatherHarvest/utils/animateImages.js\"></script>";



and change it to:

PHP:
//	echo "<script type=\"text/javascript\" src=\"modules/WeatherHarvest/utils/animateImages.js\"></script>";



i.e. comment it out so it is ignored.

Now in /modules/WeatherHarvest/index.php find a blank line around line 18 and insert the line:

PHP:
$modheader .= "<script type=\"text/javascript\" src=\"modules/WeatherHarvest/utils/animateImages.js\"></script>";



Notice that this is not exactly the same line as you removed, you are replacing the echo with $modheader .= so that Dragonfly can output the script declaration at the appropriate time with the rest of the scripts, rather than immediately as before.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
Link  QR 
Share this Format imprimable  facebook   google+   linkedin   twitthis  
Show more ...



Contrôle des Permissions des Forums - Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum
You cannot attach files in this forum
You can download files in this forum