I try to do this:
Quote:
Originally Posted by acidburn0520
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]
|
Except when I create the plug-in and insert $random_banner into one of the templates, all it displays is the word "Array" and not the rotating banners.
Little help please.