RBR - Random Banner Rotation v1.0

MobileHacks

New Member
DESCRIPTION:
This is a plugin for vBulletin that is very simplistic. It will allow you to have an unlimited amount of banner/header images that will rotate as your site users browse your pages. Every time your site is refreshed or a user clicks to visit a different location on your site, your header banner image will rotate in a random order. You can use any image format or flash. You can link to any off site file you wish. You can set the link of each individual banner to whatever location you choose.

UNIVERSAL COMPATIBILITY
Because this plugin is very simplistic it works on all versions of vBulletin 3.7x on down! It will even work if you have vBadvanced installed as your CMPS. It just works!

DEMO SITES:
Here are sites that you can see the RBR - Random Banner Rotation plugin in action:

Code:
http://bapetalk2.com


INSTALL TIME
:
(5 Minutes Max)
The install is very easy. Follow the simple instructions step by step to insure you edit your header template and the xml files correctly.

INSTALLATION INSTRUCTIONS
1. Create a folder on your server that you will use to store your banner files.
For example:
Code:
http://www.your.domain.com/banners
2. FTP upload your banner files to this location.

3. Edit the plugin file: banner.rotation.xml

4. Each individuale banner url code looks like this:

PHP:
$random_banner[1] = '<a href="http://www.your.domain.com/"><img src="http://www.your.domain.com/banners/banner1.gif" alt="" border="0" /></a>';


STAGE-1:
Create Your Banners and Edit the XML File

Before you can use this plugin you must have prepared various banner header images or flash you wish to use on your site. Once you have your banners created you must edit the plugin banner.rotation.xml file. You must place your links to each banner in this file as follows:

5. In the above code replace both of the urls to reflect your site. The first url will be the location you wish to link people to if they click that particular banner. It can be your homepage or any other location you wish. The second url in the line is for the banner file.

6. For each new banner you must change $random_banner[1] in sequential order.
Example:
$random_banner[1]
$random_banner[2]
$random_banner[3]

7. Once you have edited each banner line of code you must change the vale of: rand(1, 3) to whatever number you finished with in $random_banner. If you have 10 banners then enter rand(1, 10). The plugin xml file shows three banner lines of code as an example for you to follow.

8. Once you have edited the plugin xml file correctly move on to Stage-2 of the instructions.


STAGE-2: Import the Plugin and Edit Your Header Template

1. From within the vBulletin admin panel import the plugin file: banner.rotation.xml by going to: Plugins & Products > Download / Upload Plugins > Browse for the banner.rotation.xml file and click import.

2. Next you must edit your header template. From within the vBulletin admin panel go to: Styles & Templates > Style Manager > Edit Templates > and edit your header.

3. Find: <!-- logo --> and <!-- /logo -->

4. Replace all the code between them with the below code. You must do this for all of your styles that you use. (I am assuming here that you have not already altered your header code with some other hack.)

5. Click save and your done!

Code You Must Place in Your Header Template:

PHP:
<!-- logo -->
</a>
<center><table border="0" width="$stylevar[outertablewidth]" cellpadding="0"cellspacing="0"align="center">
<tr>
<td"align="$random_banner[align=center]">
$random_banner[$random_number]
</td>
</tr>
</table></center>
<!-- /logo -->
 

WascallyWabbit

New Member
I have a weird problem with this mod. It works perfectly for members, but the banner doesn't load for guests :S. Any recommendations?
Thanks


Nvm, problem solved.
 

kieuphongeg

New Member
Thanks
thank.gif
Good Mod, It work for me.
 
Top