View Full Version : random image in header
sabret00the
02-08-2004, 06:44 PM
i'd like to have a random image in my forums header, i was wondeirng what would be the best way to go about it and thought template/php include based would be best but i lack the knowledge so i'm here for help :)
assassingod
02-08-2004, 07:25 PM
This is totally untested, but try add this to the phpinclude_start template:
$numimg = '4'; // number of images
$rimg = rand(1,$numimg);
$randomimage = $rimg;
Then putting
<img src="$vboptions[bburl]/$stylevar[imgdir]/$randomimg.gif" alt="Random Image">
In the header template. Make sure all the images have the same extensions, and each file is called 1,2,3 etc...
sabret00the
02-08-2004, 08:51 PM
so it's basically just do it as you would normally, thanks assassin
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.