Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Random Logos Details »»
Random Logos
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-12-2004 Last Update: Never Installs: 10
 
No support by the author.

Display Random Logos on header
modded by tnguy3n @ http://www.all4actions.net

Template mod: 1
- header

This mod displays random logo on form header, like one at vb.org . ^_^

Open header template,

FIND:
HTML Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
REPLACE IT WITH:
HTML Code:
<script>
var logo=new Array()
logo[0]='<img src="$stylevar[imgdir_misc]/logo1.gif" border="0" alt="$vboptions[bbtitle]" />'
logo[1]='<img src="$stylevar[imgdir_misc]/logo2.gif" border="0" alt="$vboptions[bbtitle]" />'
logo[2]='<img src="$stylevar[imgdir_misc]/logo3.gif" border="0" alt="$vboptions[bbtitle]" />'
logo[3]='<img src="$stylevar[imgdir_misc]/logo4.gif" border="0" alt="$vboptions[bbtitle]" />'
var displaylogo=Math.floor(Math.random()*(logo.length))
document.write(logo[displaylogo])
</script>
If you have more than 4 logos, you can add more array to that script.
Upload logo1.gif , logo2.gif , logo3.gif , logo4, etc... to images/misc/ dir

Show Your Support

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

Comments
  #2  
Old 07-02-2004, 03:23 PM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, thank you so much! Works perfectly!!! Surprised this isnt more popular, to be honest with you!
Reply With Quote
  #3  
Old 07-03-2004, 05:52 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

maybe most of ppl just have a unique logo on their site. anyway, add this following tag to prevent logo from not display in browsers that have javascript disabled.
BELOW </script>, add:
HTML Code:
<noscript><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></noscript>
Reply With Quote
  #4  
Old 07-03-2004, 05:56 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could also use in the phpinclude

$rand = rand(1,X);

in the header change

<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />

to

<img src="/path/to/image$rand.ext" border="0" alt="$vboptions[bbtitle]" />

Then make sure you have logo1.ext logo2.ext, and so forth
Reply With Quote
  #5  
Old 07-22-2004, 05:11 PM
Jason McConnell Jason McConnell is offline
 
Join Date: Jun 2004
Location: Syracuse NY
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm no coder... at all. And this one took me a lil bit to get going, but it works beautifully Thanks!
Reply With Quote
  #6  
Old 10-07-2004, 03:50 PM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n

If you have more than 4 logos, you can add more array to that script.
Upload logo1.gif , logo2.gif , logo3.gif , logo4, etc... to images/misc/ dir
what if the logos are on another server?
Reply With Quote
  #7  
Old 10-07-2004, 04:02 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you would need to put the full url to them instead of the $stylevar one

eg http://www.yoursite.com/foo/bar/images/graphic.gif
Reply With Quote
  #8  
Old 10-07-2004, 08:51 PM
imported_Skinny imported_Skinny is offline
 
Join Date: Apr 2003
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow! Excellent. This is just what I was looking for. Works great too! Thankyou
Reply With Quote
  #9  
Old 07-26-2005, 07:22 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works for 3.5 I suppose?
Reply With Quote
  #10  
Old 05-26-2006, 10:46 PM
GreysAnatomy's Avatar
GreysAnatomy GreysAnatomy is offline
 
Join Date: May 2005
Location: Chocoland
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked like a charm, thanks!
Reply With Quote
Reply


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 03:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10729 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete