Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
Random logo! Details »»
Random logo!
Version: 1.00, by MarkFoster MarkFoster is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.2 Rating:
Released: 04-05-2009 Last Update: Never Installs: 12
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

This mod I created with a friend for a small project on my site, it's a remake of This mod but we created it ourselves.
It works with vBulletin 3.5 up to 3.8.2 from what I know, it probably works with older versions as well.
This allows you to have random logo's anywhere on your site.

First you place this code anywhere in your header (Top is a good place):
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] = 'url'
theImages[1] = 'url'
 
 
 
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
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="$vboptions[bbtitle]" /></a></div>');
}
 
// End -->
</script>
You edit the urls to what images you want.
Now if you have large images (The reason we created this mod) then use this code:
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
<!-- Edit the url images to match yours
theImages[0] = 'URL'
theImages[1] = 'URL'
theImages[2] = 'URL'
theImages[3] = 'URL'
theImages[4] = 'URL'
theImages[5] = 'URL'
theImages[6] = 'URL'
theImages[7] = 'URL'
 
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-5));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a><img src="'+theImages[whichImage+4]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
 
// End -->
</script>
In the url part 0-3 is for the image that will go on the left side and 4-7 is for the image that will go right, they will both be centered thought.

Then wherever you want the images to display add this:
Code:
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
Then you can additionally add new links to the codes by adding a new line with the same information, you only have to change the number name.

Show Your Support

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

Comments
  #2  
Old 04-06-2009, 11:27 AM
ahmed-samara ahmed-samara is offline
 
Join Date: Dec 2004
Location: egypt
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first one

great work man installed
Reply With Quote
  #3  
Old 04-06-2009, 01:06 PM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work, thank you!

Installed
Reply With Quote
  #4  
Old 04-28-2009, 11:22 AM
John Henry John Henry is offline
 
Join Date: Apr 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

plz, plz... make something like that but in php... there are addons for browsers that block js and so the images won't change...
Reply With Quote
  #5  
Old 10-02-2009, 11:05 PM
simurgs simurgs is offline
 
Join Date: Mar 2009
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Nice work, how can i add links to the images ?
Reply With Quote
  #6  
Old 11-19-2009, 12:03 AM
ZEHH's Avatar
ZEHH ZEHH is offline
 
Join Date: Oct 2009
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

simurgs,

Acho que se deve adicionar a url de suas imagens aqui:

Code:
theImages [0] = 'URL'
theImages [1] = 'URL'
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 10:23 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.03944 seconds
  • Memory Usage 2,261KB
  • Queries Executed 20 (?)
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
  • (4)bbcode_code
  • (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_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