PDA

View Full Version : RBR - Random Banner Rotation v1.0



Empty2002
26-09-2008, 11:38 PM
RBR - Random Banner Rotation v1.0
Tweaked by Yotsume

You Must Click Install to Receive Support!


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. 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:
bapetalk2.com ([Only registered and activated users can see links])
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


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

Before you can use this plugin you must have prepared various banner header images 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:

1. Create a folder on your server that you will use to store your banner files.
For example: [Only registered and activated users can see links] ([Only registered and activated users can see links])

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:


$random_banner[1] = '<a href="[Only registered and activated users can see links]"><img src="[Only registered and activated users can see links]" alt="" border="0" /></a>';


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:


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

*******************************
Thanks to Smithersmac ([Only registered and activated users can see links]) for his work here.



[Only registered and activated users can see links]