Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2002, 12:16 PM
Heffe2000 Heffe2000 is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change logo's by forum?

Does anyone have a hack that will allow you to specify a logo to be used in place of vbulletin_logo.gif on a forum by forum basis?

I have a few clan forums hosted on my site that I'd like to give custom logos to, and need something that I could enter a custom gif file on the edit forums panel, but if I don't enter anything there, have it default to the main vbulletin_logo.gif file.

Does this sound like a difficult hack, or anybody out there want to give me a hand??
Reply With Quote
  #2  
Old 10-07-2002, 01:31 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the header find the image and replace it as a variable like:

PHP Code:
<a href="index.php?s=$session[sessionhash]"><img src="$mylogoborder="0" alt="$bbtitle"></a
Now edit global.php, find:

PHP Code:
eval("\$header .= \"".gettemplate('header')."\";"); 
Before that add:

PHP Code:
if ($forumid==X
{
$mylogo='http://www.myboard/images/image1.gif';}
elseif (
$forumid==Y
{
$mylogo='http://www.myboard/images/image2.gif';}
elseif (
$forumid==z
{
$mylogo='http://www.myboard/images/image3.gif';}
else {
$mylogo='http://www.myboard/images/image4.gif';} 
This will work when visitor's clicked a forum name and browsing through it, but will not work when they visited a thread in that forum since when visiting a thread $forumid variable is not set by vbulletin..
Reply With Quote
  #3  
Old 10-07-2002, 07:32 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also see this hack by PPN: https://vborg.vbsupport.ru/showthrea...threadid=36093
Reply With Quote
  #4  
Old 10-07-2002, 11:06 PM
Pancreas Paul Pancreas Paul is offline
 
Join Date: Sep 2002
Location: OH
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

or if its like vBulletin.gif, make a new image called vBulletin.gif and upload it in replace.
Reply With Quote
  #5  
Old 10-08-2002, 01:56 AM
Heffe2000 Heffe2000 is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, I tried the first method, and it always came up as a red X, with no text in the $mylogo variable. What I did though was set up a specific style for the boards, and forced them to be the default on those specific forums that I wanted to change (the clan members wanted to change colors & other stuff too, just was easier). I'd still like to get something along the lines of the first mod above working though.
Reply With Quote
  #6  
Old 10-08-2002, 09:57 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Heffe2000
Actually, I tried the first method, and it always came up as a red X, with no text in the $mylogo variable.
The problem you encountered indicates that your image URL is not correct. Please do not forget to edit image URLs accordingly. One important reminder: they are case sensitive so if your image name is "a.jpg", these will be wrong: "A.jpg", "a.JPG" etc. Needless to say dont forget to edit x,y,z..
Reply With Quote
  #7  
Old 10-09-2002, 12:05 AM
Eander Eander is offline
 
Join Date: Mar 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or the variable may need to be declared as global. The forumdisplay.php file may not be able to get to it. I had this problem when doing the users browsing this forum hack on index.php
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 10:33 PM.


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.03885 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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