vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=321579

Rotating Banners
by dxt-cobra
24 Jan 2016 16:51

Here is a way to add multiple banners to your site with an html module.

first create a banners.html file on your pc, and add this code.
Be sure to set your images in the adImages = new Array ( image links here ) and also the image within the body to point to your image locations.

You can also change the speed in the setTimeout( 2 * 5000 ).
//setTimeout(function, milliseconds);

My banner sizes are normally 900 x 100, this size works well for my site.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

when your done, upload it to your forum directory.

then add a html module were you want it and add this line here.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Be sure to edit the link and put your site domain. and save it.
thats it all done, your banners should display rotate.

Alan_SP 25 Jan 2016 07:56

This can work with all vBulletin versions, or any software actually.

dxt-cobra 25 Jan 2016 09:22

yea other than the widget to place the banners with an iframe. I thought about creating a banner widget with install.xml to make this even easier for users to use.

Im still confused as why vb5 has an ad widget that lets you make more than one, but they do not rotate like this. I don't even know if the second banner ever shows. I messed with it some but didn't see any results like i wanted.

X-or 04 Apr 2016 20:12

Thank you for sharing this.

Do you know how to make the transition a bit smoother? Because it's kind of brutal for the eye.

Dilldogs 10 Aug 2019 16:08

Might be a stupid question but I want to put this under the navbar what template do I place this in?

the VB4 rotating banner addon it was placed in the forumhome template but with VB5.4 there is no forumhome template.

Dave 10 Aug 2019 17:50

Quote:

Originally Posted by Dilldogs (Post 2600192)
Might be a stupid question but I want to put this under the navbar what template do I place this in?

the VB4 rotating banner addon it was placed in the forumhome template but with VB5.4 there is no forumhome template.

On the homepage you click on the "Edit Page" button and then insert a new HTML module in the area where you want it to be displayed.


All times are GMT. The time now is 02:42.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.