News:

Wondering if this will always be free?  See why free is better.

Main Menu

Banner Rotation PHP to put into header template

Started by Cynthia Blue, February 09, 2006, 04:02:01 PM

Previous topic - Next topic

Cynthia Blue

I have found a really small little tiny php script that displays a random banner image on a page. No tracking, no nothing, exactly what I want.  The tutorial is here:

PHP Banner Script

But, the trick is how to get it to display in my index.template.php file. I know exactly where I want it to go.

I've tried using a php include(), but that doesn't want to work.  I tried a require.. nope.  I tried copying and pasting the whole of the php code into that template, doesn't like that either.

Anyone have any ideas of how I can get that to display?  I would love some help. :) Would I have to edit the code directly instead of trying to get it into the template through the forums?

drew

actually it should work like this:

1. Take the rotator.php file and put it in the folder where your images are stored. Make sure you edit the settings at the top of the rotator.php file especially the path. If you have it in the same folder as your images, it should be "."

2. In the template, call the file like so:
<img src="path/to/images/rotator.php" border="0">

if you are not adding the img src code into an existing echo statement, do something like this:
echo '<img src="path/to/images/rotator.php" border="0">';

hope this helps you out...
if you wake up breathing, it's a good day...

Advertisement: