PDA

View Full Version : Get Date NOt Parsing from Vbulletin HELP?


ggiersdorf
06-07-2006, 06:44 PM
Im using a script on my homepage that will rotate a header image each date and on my CMS it works fine. When I copied the exact code over to Vbulletin and put it in my header it acts weird like its not even parsing the command.


<img src="http://www.mysite.com/banners/<?php echo date("D"); ?>.jpg" />

is there a special adaption needed for Vbulletin files?

When I do this in vbulletin the image block show this

http://www.mysite.com/banners/%3C?php echo date(
and after the red box you get an additional jpg" />
text.

Can anyone please help me get this right

calorie
06-21-2006, 08:08 PM
You cannot place PHP code directly into vB templates. Instead, you'd need to set a variable via a plugin or file edit, and then for the template available after such code change, you'd use the variable you created in the template. Also, there is probably some cutsie JavaScript trick you could use to set a Mon through Sun date, whereby you'd only need to edit a vB template.