Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Products & Extensions
Rotating Banners Details »»
Rotating Banners
Version: 1.00, by dxt-cobra dxt-cobra is offline
Developer Last Online: Jul 2016 Show Printable Version Email this Page

Category: Mini Mods - Version: 5.2.x Rating:
Released: 01-23-2016 Last Update: Never Installs: 4
Re-useable Code Translations  
No support by the author.

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.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>

<title>Rotating Banners</title>

<script language="Javascript" type="text/javascript">

adImages = new Array("images/pb.png", "images/wf.png" )

thisAd = 0
imgCt = adImages.length

function rotate(){
    if( document.images ){
	thisAd++
    if( thisAd == imgCt ){
	thisAd = 0
}
document.adBanner.src=adImages[thisAd]
setTimeout("rotate()", 2 * 5000)
}
}
</script>
</head>

<body onload="rotate()">

<center><img src="images/wf.png" name="adBanner" alt="Ad Banner" /></center>

</body>
</html>
when your done, upload it to your forum directory.

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

Code:
<iframe src="http://www.YOURSITE.com/forums/banners.html" width='99%' height='120'></iframe>
Be sure to edit the link and put your site domain. and save it.
thats it all done, your banners should display rotate.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-25-2016, 05:56 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This can work with all vBulletin versions, or any software actually.
Reply With Quote
  #3  
Old 01-25-2016, 07:22 AM
dxt-cobra dxt-cobra is offline
 
Join Date: Mar 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-04-2016, 05:12 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-10-2019, 01:08 PM
Dilldogs Dilldogs is offline
 
Join Date: May 2006
Location: Wilmington, IL
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-10-2019, 02:50 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dilldogs View Post
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.
Reply With Quote
Reply

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

Forum Jump


All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03918 seconds
  • Memory Usage 2,260KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete