PDA

View Full Version : Change logo's by forum?


Heffe2000
10-07-2002, 12:16 PM
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??

Logician
10-07-2002, 01:31 PM
In the header find the image and replace it as a variable like:

<a href="index.php?s=$session[sessionhash]"><img src="$mylogo" border="0" alt="$bbtitle"></a>

Now edit global.php, find:

eval("\$header .= \"".gettemplate('header')."\";");

Before that add:


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

NTLDR
10-07-2002, 07:32 PM
Also see this hack by PPN: https://vborg.vbsupport.ru/showthread.php?s=&threadid=36093

Pancreas Paul
10-07-2002, 11:06 PM
or if its like vBulletin.gif, make a new image called vBulletin.gif and upload it in replace.

Heffe2000
10-08-2002, 01:56 AM
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.

Logician
10-08-2002, 09:57 AM
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..

Eander
10-09-2002, 12:05 AM
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