The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
$randombanner - only showing random numbers instead of images
I used this code on a vb3 forum before but for some reason can't seem to get it to work now. Instead of displaying a random image, it is displaying a random number between 1 and 6. This is the code that I'm placing within the plugin area...hook location is parse_templates
Code:
$cud = rand(1, 6); $cudrandom[1] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; $cudrandom[2] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; $cudrandom[3] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; $cudrandom[4] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; $cudrandom[5] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; $cudrandom[6] = '<a href="http://www.XXXXXXXX.co.uk" target="_blank"><img src="http://www.XXXXXX.com/XXXXXX.gif" alt="" border="0" /></a>'; Then I'm calling it on the page using $cud Anyone have any idea what I'm doing wrong? Thanks, J |
#2
|
|||
|
|||
Quote:
PHP Code:
|
#3
|
|||
|
|||
Great, working now, thank you!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|