PDA

View Full Version : rotating header help


iulianh
01-17-2008, 04:27 PM
Ok , i have tryed the tutorials i have found here on how to make my header rotate but they didn`t work . On my website i have an php script that rotates my headers, i have 6 .

The code is :


<?php
$total = "6";
$file_type = ".jpg";
$image_folder = "images/headers";
$start = "1";
$random = mt_rand($start, $total);
$image_name = $random . $file_type;
echo "<td background=\"$image_folder/$image_name\" /></td>";
?>


and my header code is :


<TABLE bgcolor="#eeeeee" width="702" height="228" align="center" cellpadding="0" cellspacing="0" style="border-left: 3px #707070 solid; border-right: 3px #707070 solid;">
<TR>
<?php include('random-header.php'); ?>
</TR>
</TABLE>


How can i add my script to the forums ? Need some quick help please . Go to www.tiestofans.com to see what i am talking about .

Thanks in advance ,
Iulian

SEOvB
01-17-2008, 07:09 PM
You can't put php in the templates, You'll need to add your code to a plugin, and then call it from there.

Here is a easy way to do it, http://www.vbulletin.com/forum/showthread.php?t=170826

iulianh
01-17-2008, 08:10 PM
uhm, yeah i have tryed that but still not showing the images :(

Xipher
01-18-2008, 09:20 AM
Try using an iframe that calls for the php file. I did that for my banner rotator on my site, and it works fine. You can use php in vb, just have to be tricky about how you do it =)