Member
Member
splitsch   2008-12-30, 12:40
#1
Hello !
I manage to show random image on an external page.
See: http://www.groupedestilleuls.be on the bottom-right.
My concern is that it's not W3C valid:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.groupedestilleuls.be%2F&charset=(detect+automatically)&doctype=Inline&group=0&accept=text%2Fhtml%2Capplication%2Fxhtml%2Bxml%2Capplication%2Fxml%3Bq%3D0.9%2C*%2F*%3Bq%3D0.8&accept-language=fr%2Cfr-fr%3Bq%3D0.8%2Cen-us%3Bq%3D0.5%2Cen%3Bq%3D0.3&accept-charset=UTF-8%2C*&user-agent=W3C_Validator%2F1.606

The problème is linked to "&" and "&" in the "scr" parameter of the picture shown.

I checked the templates-function.php and change all the & with & where it was needed, but I can't see wich function biuld the link.
Here is the code I use to show the image:
echo 'getTitle() . '">' .

'<img src="' . getMainSiteURL() . $randomImage->getSizedImage('80'). '" alt="'.$randomImage->getTitle().'"';
I must change somathin in $randomImage->getSizedImage('80') I think.

Could you please help me ?

Thank you,

Yan
Administrator
Administrator
acrylian   2008-12-30, 13:08
#2
Why don't you just use `printRandomImages()`? The nightly build version has parameters for image size now, too. But if you can't uses `htmlspecialchars()` around the url. No need to hack anything.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.