vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Special Logo (https://vborg.vbsupport.ru/showthread.php?t=201430)

beckyvan 01-11-2009 05:58 PM

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!

Vaupell 01-11-2009 11:06 PM

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 ;)

Bellardia 01-11-2009 11:44 PM

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';



Dismounted 01-12-2009 03:51 AM

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]" />

beckyvan 01-13-2009 11:13 PM

Thanks!

beckyvan 01-17-2009 10:53 AM

Quote:

Originally Posted by Bellardia (Post 1709129)
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?

Dismounted 01-17-2009 11:46 AM

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]" />

beckyvan 01-17-2009 11:57 AM

Quote:

Originally Posted by Dismounted (Post 1715636)
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.

Dismounted 01-17-2009 12:30 PM

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...).

beckyvan 01-17-2009 12:36 PM

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!


All times are GMT. The time now is 07:00 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.01096 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_html_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete