PDA

View Full Version : Different logo per forum?


Doctor Who
09-26-2007, 03:05 PM
Is there any way in the latest version fo VB for me to add (on a per forum basis) different logos for each forum, whilst having a default that shows if no other image is specified?

lasto
09-26-2007, 03:41 PM
good idea that

WhaLberg
09-26-2007, 03:48 PM
Yes, by a plugin you can have different logos for different forums.

lasto
09-26-2007, 04:25 PM
u making one whalberg ?

WhaLberg
09-26-2007, 04:30 PM
For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

lasto
09-26-2007, 04:57 PM
cheers m8

Doctor Who
09-26-2007, 05:21 PM
For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

Thank you!! :D

dirtycrow
09-26-2007, 05:45 PM
Nice.

Doctor Who
09-27-2007, 07:11 PM
For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

I don't mean to rush you, but did you have a chance to look at this last night?

lasto
09-28-2007, 07:57 PM
any news on this as it does sound like a good idea so hope someone takes up the challenge

WhaLberg
09-28-2007, 08:12 PM
Be patient guys, there will be one more release with that. I am working on. :)

Kirk Y
09-28-2007, 10:45 PM
If you want a no frills version...

Create a new plugin using hook location "global_start" with the following:
if (in_array($GLOBALS['forumid'], array(2,5)))
{
$stylevar['titleimage'] = "/images/forum_".$GLOBALS['forumid'].".jpg";
}Then simply change the numbers in the array to the Forum IDs you'd like to have custom logos displayed; and move the custom logos to your "/images" directory, renaming each to the following: forum_X.jpg - where X is that logo's Forum ID.

Any Forum ID you don't specify in the array will use the default logo.

lasto
09-29-2007, 10:40 AM
works perfect :) cheers kirby

now all we need is this as a plugin where we can select in each forum in admincp what logo to use,just to make it easier :)

Kirk Y
09-29-2007, 03:53 PM
Well if you feel like experimenting with vBulletin and PHP: https://vborg.vbsupport.ru/showthread.php?t=93445 :)

lasto
09-29-2007, 05:49 PM
2 complicated for me which is why i hire coders :)

cheers Kirk Y anyway - still a good read

--------------- Added at 08:16 ---------------

this works perfect but is there a way for the main logo on forum index to be random.
Say i make 5 and put them on the ftp it then picks a random header to show ???

Dont want it random for the different sections - only forumhome

lasto
10-01-2007, 02:56 PM
if anyone readin this the code above works perfect for different sections

But i also wanted a seperate one for random images on forumhome so i done a search on here and found the code - now here is the problem - if i have random pics on forumhome it wipes off the pics for the forums which i specify does anyone know why ?

tiekie
10-01-2007, 03:17 PM
Is there a working demo?

Please pm details

lasto
10-01-2007, 03:29 PM
How u mean working demo

all i done was used the code on the page before for different headers inside forums which worked fine.

So i then added this code from this hack to do random images on forumhome

https://vborg.vbsupport.ru/showthread.php?t=89327&highlight=random+logos

but doing this just wipes the images i had set up for different sections

Kirk Y
10-01-2007, 09:36 PM
Try wrapping the random logo code with:
<if condition="THIS_SCRIPT == 'index'">
Random Logo Code Here
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>That way it'll only execute if the user is viewing the board's index, and leave my previous code to execute if they aren't.

lasto
10-02-2007, 04:46 PM
Try wrapping the random logo code with:
<if condition="THIS_SCRIPT == 'index'">
Random Logo Code Here
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>That way it'll only execute if the user is viewing the board's index, and leave my previous code to execute if they aren't.

works perfect thank you once again Kirk Y

mhackl
10-04-2007, 12:03 AM
I'd like to have a completely different style for specific forums.

Kirk Y
10-04-2007, 12:13 AM
Create a new plugin at hook location "style_fetch" with the following:
switch ($GLOBALS['forumid']){
case X:
$styleid = A;
$vbulletin->options['styleid'] = A;
break;
case Y:
$styleid = B;
$vbulletin->options['styleid'] = B;
break;
case Z:
$styleid = C;
$vbulletin->options['styleid'] = C;
break;
}
Replace X, Y, and Z with the Forum IDs of the forums you'd like to have specific styles; and replace A, B, and C with the Style ID of the Style you'd like assigned to each respective Forum ID.