Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Banner Rotator Under Navbar Details »»
Banner Rotator Under Navbar
Version: 1.00, by mavigul mavigul is offline
Developer Last Online: Apr 2012 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.0.2 Rating:
Released: 03-10-2010 Last Update: Never Installs: 23
Template Edits
 
No support by the author.

Banner Rotater under Navbar


find in navbar:
PHP Code:
</div><!-- closing div for above_body --> 

add under:

PHP Code:
<SCRIPT LANGUAGE="JavaScript">
 
<!-- 
Begin Random Logo In Header Script
 
var theImages = new Array() // do not change this
 
<!-- Edit the url images to match yours
theImages
[0] = 'imageurl'
theImages[1] = 'imageurl'
theImages[2] = 'imageurl'
theImages[3] = 'imageurl'
theImages[4] = 'imageurl'
theImages[5] = 'imageurl'



 
var 0
var theImages.length;
var 
preBuffer = new Array()
for (
0pi++){
preBuffer[i] = new Image()
preBuffer[i].src theImages[i]
}
var 
whichImage Math.round(Math.random()*(p-1));
function 
showImage(){
document.write('<div align="center"><img src="'+theImages[whichImage]+'" border="0" alt="{vb:raw vboptions.bbtitle}" /></a></div>');

// End -->
</script>

<!-- 
logo -->
<
a name="top"></a
<
td align="$stylevar[left]"><a href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}"><SCRIPT LANGUAGE="JavaScript"
showImage(); 
</
script>
<!-- /
logo --> 

change imageurl in yours. Enjoy!

Screenshots

File Type: jpg ban_rot.JPG (58.3 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 03-11-2010, 02:32 PM
cagbaazee cagbaazee is offline
 
Join Date: Jul 2007
Posts: 179
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks .. will try it.
Reply With Quote
  #3  
Old 03-12-2010, 06:27 AM
Blain Blain is offline
 
Join Date: Mar 2010
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks very promising - Thanks for sharing.
Reply With Quote
  #4  
Old 03-14-2010, 11:06 PM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanxxx

installed
________
Half-Baked
Reply With Quote
  #5  
Old 03-15-2010, 03:25 AM
wickedstangs wickedstangs is offline
 
Join Date: Mar 2007
Location: San Diego
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod, how do you add more images? and link them?
Reply With Quote
  #6  
Old 03-15-2010, 07:58 AM
patrick91 patrick91 is offline
 
Join Date: Aug 2009
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey,

Is it possible to put the code in de default option in vB4 that advertising option and adsense!???
Reply With Quote
  #7  
Old 03-16-2010, 06:30 AM
mavigul mavigul is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wickedstangs View Post
nice mod, how do you add more images? and link them?
yes
theImages[0] = 'imageurl'
theImages[1] = 'imageurl'
theImages[2] = 'imageurl'
theImages[3] = 'imageurl'
theImages[4] = 'imageurl'
theImages[5] = 'imageurl'
theImages[6] = 'imageurl'
theImages[7] = 'imageurl'
theImages[8] = 'imageurl'
theImages[9] = 'imageurl'

for example

Quote:
Originally Posted by patrick91 View Post
Hey,

Is it possible to put the code in de default option in vB4 that advertising option and adsense!???
i don't know
Reply With Quote
  #8  
Old 03-16-2010, 08:48 AM
Johnny G Johnny G is offline
 
Join Date: Mar 2009
Location: Liverpool, England
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could something be done with this code that would allow it to be used in the AdminCP->Advertising->Add New Ad section?

I love the idea of the array working there to randomly select a banner.
Reply With Quote
  #9  
Old 03-16-2010, 05:10 PM
Johnny G Johnny G is offline
 
Join Date: Mar 2009
Location: Liverpool, England
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Johnny G View Post
Could something be done with this code that would allow it to be used in the AdminCP->Advertising->Add New Ad section?

I love the idea of the array working there to randomly select a banner.
I've pasted it in to the stock advertising setup. Appears to work in Firefox, but not in IE. Which is strange...
EDIT: Scrap that, turned out to be a malformed JPG.

Code works fine, currently rotating 9 banners.
Reply With Quote
  #10  
Old 03-21-2010, 02:30 PM
wickedstangs wickedstangs is offline
 
Join Date: Mar 2007
Location: San Diego
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mavigul View Post
yes
theImages[0] = 'imageurl'
theImages[1] = 'imageurl'
theImages[2] = 'imageurl'
theImages[3] = 'imageurl'
theImages[4] = 'imageurl'
theImages[5] = 'imageurl'
theImages[6] = 'imageurl'
theImages[7] = 'imageurl'
theImages[8] = 'imageurl'
theImages[9] = 'imageurl'

for example



i don't know
Thank You, I like to have them linked too
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:02 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.08851 seconds
  • Memory Usage 2,324KB
  • Queries Executed 24 (?)
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_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete