Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2009, 05:58 PM
beckyvan beckyvan is offline
 
Join Date: Nov 2007
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Special Logo

How can I edit (probably the header) to have a special logo in a certain forum, but not the others, without creating a new style? I don't want this special logo to effect the look of the main page, but for other reasons of my unique board, I don't want a new style.

Thanks!
Reply With Quote
  #2  
Old 01-11-2009, 11:06 PM
Vaupell's Avatar
Vaupell Vaupell is offline
 
Join Date: Apr 2008
Location: Esbjerg, Denmark
Posts: 1,036
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would say the "easy" which you DONT WANT.. is to copy your style download it under
another name, then reimport it with the changed logo.

then in adminCD > Forums & Moderators > Forum manager > Select specified forum >
under "Style options" Select your newly importet theme.

and then "Override Users' Style Choice " - Yes.


-------

A few tips,, when downloading and editing you just have to edit 1 folder
well 1 image. and then upload that ONE image with the rest of that folder
in style vars, you can set that folder usually "misc" to point at the new inportet
folder, while the rest still point at your old.

-----

tadaaa one forum have changed while none of the others have..

----------------------------------------------------------------

Its not impossible doing it by code, i just dont have a clue
Reply With Quote
  #3  
Old 01-11-2009, 11:44 PM
Bellardia Bellardia is offline
 
Join Date: Jul 2007
Location: Hamilton, Ontario
Posts: 378
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Go to your header template

Find
HTML Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
Replace
HTML Code:
<img src="$BannerImg" border="0" alt="$vboptions[bbtitle]" />
Create a Plugin
Hook : global_start
Change 1 to whichever forum ID you want, change Images too!
PHP Code:
if($vbulletin->GPC[forumid] == '1')
{
   
$BannerImg 'special.png';
}
else
{
   
$BannerImg 'default.png';

Reply With Quote
  #4  
Old 01-12-2009, 03:51 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use $foruminfo in the template as it is fetched automatically if the forum/thread/post ID exists in the URL query string.
Code:
<img src="<if condition="$foruminfo['forumid'] == 1">images/misc/someimage.png<else />$stylevar[titleimage]</if>" border="0" alt="$vboptions[bbtitle]" />
Reply With Quote
  #5  
Old 01-13-2009, 11:13 PM
beckyvan beckyvan is offline
 
Join Date: Nov 2007
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #6  
Old 01-17-2009, 10:53 AM
beckyvan beckyvan is offline
 
Join Date: Nov 2007
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bellardia View Post
Go to your header template

Find
HTML Code:
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
Replace
HTML Code:
<img src="$BannerImg" border="0" alt="$vboptions[bbtitle]" />
Create a Plugin
Hook : global_start
Change 1 to whichever forum ID you want, change Images too!
PHP Code:
if($vbulletin->GPC[forumid] == '1')
{
   
$BannerImg 'special.png';
}
else
{
   
$BannerImg 'default.png';

This worked in one forum, but when I go to add it to the 2nd (by just repeating the code), it's not working. I even tried to make a new plug in, calling it something else for the 2nd forum. It's not pulling up the special logo, it's still pulling the default. Any ideas?
Reply With Quote
  #7  
Old 01-17-2009, 11:46 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<img src="<if condition="$foruminfo['forumid'] == 1">images/misc/someimage.png<else /><if condition="$foruminfo['forumid'] == 2">images/misc/someimage2.png<else />$stylevar[titleimage]</if></if>" border="0" alt="$vboptions[bbtitle]" />
Reply With Quote
  #8  
Old 01-17-2009, 11:57 AM
beckyvan beckyvan is offline
 
Join Date: Nov 2007
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Code:
<img src="<if condition="$foruminfo['forumid'] == 1">images/misc/someimage.png<else /><if condition="$foruminfo['forumid'] == 2">images/misc/someimage2.png<else />$stylevar[titleimage]</if></if>" border="0" alt="$vboptions[bbtitle]" />
Is this what goes after the first plug in, or a new plug in? Or, another template? Sorry, I'm new at the editing templates and adding plugs ins.
Reply With Quote
  #9  
Old 01-17-2009, 12:30 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No plugins are needed, just follow Bellardia's instructions up to "Find". Then replace it with my code (make sure you have actually changed the forum IDs...).
Reply With Quote
  #10  
Old 01-17-2009, 12:36 PM
beckyvan beckyvan is offline
 
Join Date: Nov 2007
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, this is what I have. It's having the default Style vars logo on the main page, and the two forum with their id are working. So, I tired to copy the code to add two more forums but then I get duplicate title images. What would be the proper code to change, and where?

<img src="<if condition="$foruminfo['forumid'] == 128">images/spotlight/communitycorner1.gif<else /><if condition="$foruminfo['forumid'] == 129">images/spotlight/communitycorner1.gif<else />
$stylevar[titleimage]</if></if>" border="0" alt="$vboptions[bbtitle]" /></a></td>


--------------- Added [DATE]1232215901[/DATE] at [TIME]1232215901[/TIME] ---------------

I got it! Thank you everybody!
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 09:51 AM.


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.14252 seconds
  • Memory Usage 2,263KB
  • Queries Executed 13 (?)
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_code
  • (4)bbcode_html
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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