View Full Version : Quick and Dirty Way to have the portal have a different header icon from forums.
Morrus
07-12-2004, 01:49 PM
This isn't a question but an answer. At ENWorld we use a modified version of the forum banner hack that spits out a slightly different version of our logo for each forum, usually to include the forum's title as part of the logo. The conditional is set so that if there isn't a forum specified (or the specified forum has no specific banner) it will kick out default.gif
So I added the following to our phpinclude_end template
if (defined('VBA_PORTAL'))
{
$output = str_replace("default.gif", "ENNewsLogo.gif", $output);
}
Morrus
07-12-2004, 01:51 PM
Now, if I'm not mistaken, replacement variables in general work through the use of the str_replace function, so you can use this format to specify replacement variables that only get used in vbadvanced. The format of that function in brief is...
str_replace( $oldneedle, $newneedle, $haystack)
The output has to be sent to a new variable, but as seen in the function above nothing is stopping you from using the $haystack as both the searched string and the output string.
Oh well, it works well for us though around here it might be a solution in search of a problem. Figured I'd share, hope someone finds it useful.
(Sorry bout spreading this over 2 posts- I have a weird router problem which blocks large HTML sends to most sites).
Merjawy
07-12-2004, 05:23 PM
I have two logos on my site one for the forum and one for CMPS and the way I did it was by editing adv_portal template
your way seems much better but still don't get it though:)
I got the first post but the second one is a bit blurry to me
thnx
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.