PDA

View Full Version : How to make simple banner rotation?


FractalizeR
02-18-2010, 03:09 PM
In VBulletin3 I did something like this:

global_start plugin:
$fr_bannerId = mt_rand(1,6);
$fr_bannerURL = "http://www.gsmforum.ru/images/ownpictures/". $fr_bannerId .'.swf';


ad_header_logo template
<object width="500" height="90">
<param name="movie" value="$fr_bannerURL">
<embed src="$fr_bannerURL" width="500" height="90">
</embed>
</object>



But in VB4 it no longer works, of course. Moreover,

class_bootstrap.php, Line 289

// advertising location setup
$ad_location['ad_header_logo'] = vB_Template::create('ad_header_logo')->render();


It seems, now the contents of advertisement templates can't be dynamically generated because template is rendered automatically and there is no way to insert vB_Template::register() call.

Can someone suggest an easy way to have simple banner rotation inside advertisement templates like I did in VB3, but in VB4?

Videx
02-19-2010, 02:13 AM
If you really must code it yourself, then I don't know. But if you're willing to use a mod, this one works for me:
Rotating Banner System (https://vborg.vbsupport.ru/showthread.php?t=188328)

FractalizeR
02-19-2010, 03:27 AM
Thanks, I will look ;)