Can anybody help me set up a header so it will rotate images when the page refreshes?
i have tried abunch of the mods/hacks on this site and i cant seem to get any of them to work. I have no idea where im going wrong..If somebody can take a walk through with me that would be great. Thanks
heres what i have done....My header is already modified to begin with, so i think thats where i keep messing up...
i am using these instructions..
Quote:
Random Header Image
by filburt1
1. Save all your header images in the format headerN.jpg, where N goes from 1 to the total number of header images.
2. Add the following to your phpinclude template, changing "customimages/headerimages/" to the location of your header image. Replacements will not likely work so you probably won't be able to use {imagesfolder}:
$totalheaderimages = 4; // change to the number of header images you have
$randomindex = rand(1, $totalheaderimages);
$headerimage = "customimages/toptitles/toptitle$randomindex.jpg";
3. In your header template, replace:
{titleimage}
with
$headerimage
Done.
|
so i create a folder on my server called forumbanners....I then go about adding the plugin...there are 7images im using so i change the plugin code to this
Quote:
$random_number = rand(1, 7);
$random_banner[1] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner1.gif" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner2.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://www.obsession2sped.com/forums"><img src="forumbanner/banner3.gif" alt="" border="0" /></a>';
$random_banner[4] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner4.gif" alt="" border="0" /></a>';
$random_banner[5] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner5.gif" alt="" border="0" /></a>';
$random_banner[6] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner6.gif" alt="" border="0" /></a>';
$random_banner[7] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner7.gif" alt="" border="0" /></a>';
|
now this is where i get lost...the instructions say
In your header template, replace:
{titleimage}
with
$headerimage
My header template looks like this...
Quote:
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
|
i changed what it says to change and no pictures come up at all...just a link that says the name of my forums...I dont understand where i am going wrong...By the way, i am using the newest version of VB and i installed the plugin for PHP in global_start.
anybody....?