Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 08 May 2007, 15:22
soulplayer soulplayer is offline
Join Date: Mar 2004
Rotating Banners


I was wondering if it's possible to implement rotating banners in my forum? So that every time you load the index.php it will change the banner?

I'v found this script:

My forum:

My style:
Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

I hope you guys can help me?
Reply With Quote
Old 08 May 2007, 22:09
SoftDux SoftDux is offline
Join Date: May 2007
take a look @ openads (formerly known as phpAdsNew) on
Reply With Quote
Old 08 May 2007, 23:03
HMBeaty's Avatar
HMBeaty HMBeaty is offline
Join Date: Sep 2005
Real name: Brooks
Check my signature
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
Old 18 Dec 2007, 04:03
theOZer's Avatar
theOZer theOZer is offline
Join Date: Mar 2007
Real name: Dennis "theOZer" Osborne
Random Banners, How I Did It.

Random Banners, How I Did It.

Thanks to, Thread Thumbnails for the banner on/off user option spin-off, other similar threads on &

That I know of this hack works in 3.6.8 PL2 and 3.7.0 Beta 2.

I use the stock vBulletin templates.

For the header area I use a GIF size height of 88. I display 2 animated GIFs, a 710x88 GIF and a 88x88 GIF. This seems to comfortably fits in the header for screen resolutions of 1024x768 or greater. Simply don't display the 2nd banner if you have only one banner. You have around 800 for the width size.

This hack displays GIFs. Change .gif to .jpg (or, .png, .jpeg, .whatever) in the $YourPrefix_randombanner line if needed. FTP your GIFs to your your_vb_forumname/images/misc directory. [Note: $stylevar[imgdir_misc] points to that directory. (I found that in the vB manual.)]

You could call the 3 lines of plugin code $x, $y, $z. But, I suggest: To insure you don't bang heads with vB uniqueify your plugin code. Replace "YourPrefix_" with whatever you wish. For example, Using the prefix "OMAC_" helps me later find changes in my templates and elsewhere.

Because some forum members are still on dial-up I also give forum members the options to turn off the animated banner display. It cuts down on load times for them. If you don't add a User Profile Field just remove the <if condition="$bbuserinfo['fieldXX'] <> 'Off'"> if clause.

In the $YourPrefix_banners line add the names of your banner files. Using an array allows you an unlimited number of banners possible. My example has 4 randomized banners. Yes, you will need to edit/change the plugin if you want to add or remove banners. Smolly.

>>>Add the plugin:

ACP > Plugins & Products > Add New Plugin.

Hook: global_start

Title: Random Banners

Plugin PHP Code:
$YourPrefix_banners=array('thisbannername', 'thatbannername', 'anotherbannername', 'whatever');
$YourPrefix_randombanner="<img src=\"$stylevar[imgdir_misc]/$YourPrefix_shuffle.gif\" border=\"0\" alt=\"\">\n";

Plugin is Active:

>>>Make the following changes in each style you wish to add the banner to.

ACP > Styles & Templates > Style Manager, select a template, click on All Style Options GO, then under Common Templates, header.

---vB3.6.8 PL2:


<td align="$stylevar[right]">


<td align="$stylevar[right]">
<if condition="$bbuserinfo['field10'] <> 'Off'">
$YourPrefix_randombanner <!-- randomized banner -->
<img src="$stylevar[imgdir_misc]/Your_GIF_filename_Here.gif" border="0" /> <!-- the 2nd, non-randomized banner on OMAC-->
<else />

---vB3.7.0 Beta2:


<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>


<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]
<else />
<if condition="$bbuserinfo['fieldXX'] <> 'Off'"> <!-- Use Banner User Profile Field number, eg, field8 -->
$YourPrefix_randombanner <!-- randomized banner -->
<img src="$stylevar[imgdir_misc]/Your_GIF_filename_Here.gif" border="0" /> <!-- the 2nd, non-randomized banner on OMAC-->
<else />

>>>Add a user option to turn the banner On or Off.

ACP > User Profile Fields > Add New User Profile Field.

Select "single selection radio buttons"

Title: "Banners"

Description: "Turn the banner display On or Off."

In Options, enter "On" and "Off".

Skip down to Display Page and choose "Options: Other". This puts the option under Miscellaneous Options.
Note the field number assigned. Check for this field number in the if statement <if condition="$bbuserinfo['fieldXX'] <> 'Off'"> .

Last edited by theOZer; 18 Dec 2007 at 12:20.
Reply With Quote
Old 19 Dec 2007, 10:07
Cause4Chaos Cause4Chaos is offline
Join Date: Oct 2007
Real name: Don
I use this program and it is free, very easy to setup and use different codes on your site anywhere depending on your liking i.e: popup or static,,

you can set it up on the same database as your forums or set it up to another db, your choice,

I have 2 campaigns running at the moment, but you can have many:

"" Openads (phpAdsNew) is an open-source ad server, with an integrated banner management interface and tracking system for gathering statistics. With Openads you can easily rotate paid banners and your own in-house advertisements""

sample is working on my website and the Forums
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotating banners attroll vBulletin 3.5 Template Modifications 105 30 Jun 2008 05:45

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 13:04.

Layout Options | Width: Wide Color: