Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Random Logo in Header Details »»
Random Logo in Header
Version: 1.00, by Daniel Daniel is offline
Developer Last Online: Jul 2022 Show Printable Version Email this Page

Version: 3.6.8 Rating:
Released: 06-07-2006 Last Update: Never Installs: 113
Template Edits
Re-useable Code Translations  
No support by the author.

What it does...
Exactly what the title says. It's very similar to my 3.5 edit.

In the header template....
PLACE THIS AT THE VERY TOP OF THE HEADER TEMPLATE
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] = 'images/statusicon/forum_old.gif'
theImages[1] = 'images/statusicon/forum_new.gif'
 
 
 
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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
 
// End -->
</script>
Remember to edit the image paths under "<!-- Edit the url images to match yours"

Find:
Code:
	<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
Replace with:
Code:
<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
Like it? Use it?
Click Install

Show Your Support

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

Comments
  #12  
Old 10-04-2006, 06:02 PM
josiespencer josiespencer is offline
 
Join Date: Dec 2005
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, here is a variation. Can you tie this to userID or better yet, usergroup? Some get the random logo and some don't? Some people like change and some people don't?
Reply With Quote
  #13  
Old 10-25-2006, 10:53 PM
zan3y zan3y is offline
 
Join Date: Jun 2006
Location: Alabama
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is probably a dumb post but this works for 3.6.2 too (and I have vBadvanced installed).
Reply With Quote
  #14  
Old 11-02-2006, 08:37 AM
chiaa chiaa is offline
 
Join Date: Apr 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and followed the directions. I am only getting the image urls to show up on my index page (vbadvanced). Images are random there...

The rest of my site they do not show up. My site thekimchipot.com

Header currently has:

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] = 'forums/images/Users_logos/palacelogo.jpg'
theImages[1] = 'forums/images/Users_logos/newspaperlogo.png'
theImages[2] = 'forums/images/Users_logos/girlslogo.jpg'
theImages[3] = 'forums/images/Users_logos/chiaalogo.jpg'
 
 
 
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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
 
// End -->
</script>



<!-- logo -->
<a name="top"></a>
<table border="0" width=200 HEIGHT=30 cellpadding="0" cellspacing="0" align="center">
<tr>
	<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
	<td align="$stylevar[right]">
		&nbsp;
	</td>
</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output
Any help is appreciated.
Reply With Quote
  #15  
Old 11-02-2006, 02:03 PM
HeRmAn'S HeRmAn'S is offline
 
Join Date: Apr 2006
Location: ThE FaR EnD Of tHe wOrLd
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chiaa
The rest of my site they do not show up. My site thekimchipot.com
visit yours sites in ...follow - up screen caps ...web browser refresh ...ta taaaa ......good days
Reply With Quote
  #16  
Old 11-03-2006, 05:58 AM
chiaa chiaa is offline
 
Join Date: Apr 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Acutally it was always working where you took those screen shots (see my original post about it working on my vbadnaced page).

But.....

You actually in a subtle way led me to fix it. I had to put a copy of the banners in /forums/forums/images......


Quote:
Originally Posted by HeRmAn'S
visit yours sites in ...follow - up screen caps ...web browser refresh ...ta taaaa ......good days
Reply With Quote
  #17  
Old 03-22-2007, 12:02 AM
phonexpo phonexpo is offline
 
Join Date: Sep 2005
Location: Dublin
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working 100% on 3.6.5

Thanks
Reply With Quote
  #18  
Old 03-22-2007, 12:35 AM
2 FN LOW 2 FN LOW is offline
 
Join Date: Feb 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i cant get this code to work for some reason...i did everything it says to do too...My header template was originally modded before so i replaced the code to original to start fresh...I made a folder (banner/images) and put my banner images in there and then i did what the instructions say....My images do not show up, i just get a link to my main forum page

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] = 'banner/images/banner1.gif'
theImages[1] = 'banner/images/banner2.gif'
 
 
 
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('<td align="$stylevar[left]"><a href="index.php"><img src="'+theImages[whichImage]+'" border="0" alt="$vboptions[bbtitle]" /></a></div>');
}
 
// End -->
</script>
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
	<SCRIPT LANGUAGE="JavaScript">
showImage();
</script>
	<td align="$stylevar[right]">
		&nbsp;
	</td>
</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output
any help here?
Reply With Quote
  #19  
Old 04-12-2007, 03:48 AM
WebmasterSimds WebmasterSimds is offline
 
Join Date: Sep 2006
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thisis a wonderful addition to my site. makes it more fresh looking, Thanks for the mod
Reply With Quote
  #20  
Old 05-16-2007, 01:14 AM
Slyfox1 Slyfox1 is offline
 
Join Date: Jul 2006
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine as long as you specify the complete URL to the images.

'images/xxx.jpg' will work fine for one area but not another;

'http://yoursite.com/path/to/your/images.jpg' works.
Reply With Quote
  #21  
Old 05-24-2007, 03:35 PM
asasi asasi is offline
 
Join Date: Mar 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any hack that change logo in special dates. for example admin can set "chrismas_logo.gif" for chrismas day. and can set "valentine_logo.gif" for valentine day. It will be very cool
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:38 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.20578 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (2)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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