Quote:
Originally Posted by Kirk Y
Okay, let me see if I can explain it better:
Add a New Plugin using Hook Location "global_start".
Code:
$random_number = rand(1, 5);
$random_banner[1] = '<a href="http://www.link1.com/"><img src="path/to/banner1.gif" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.link2.com/"><img src="path/to/banner2.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://www.link3.com/"><img src="path/to/banner3.gif" alt="" border="0" /></a>';
$random_banner[4] = '<a href="http://www.link4.com/"><img src="path/to/banner4.gif" alt="" border="0" /></a>';
$random_banner[5] = '<a href="http://www.link5.com/"><img src="path/to/banner5.gif" alt="" border="0" /></a>';
Remember to change all the Image Paths to the location of the banners you want to display.
Then edit whatever template you'd like to display the random banner in and stick this code wherever you'd like it to show:
Code:
$random_banner[$random_number]
|
What if I would want to have just 2 banner options but not show them randomly, instead if its forum home, then show one ad if its something else show another?