View Full Version : Special Logo
beckyvan
01-11-2009, 05:58 PM
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
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
Replace
<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!
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.
<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
Go to your header template
Find
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
Replace
<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!
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
<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
<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 1232215901 at 1232215901 ---------------
I got it! Thank you everybody!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.