Back to vBulletin 3.6 Template Modifications

Custom favicon per forum
Mod Version: 1.00, by ForumDog

This modification is in the archives.
vB Version: 3.6.2 Rating: (0 vote - 0 average) Installs: 11
Released: 11 Oct 2006 Last Update: 11 Oct 2006 Downloads: 45
Not Supported Template Edits  

Quite simply it adds a custom favicon for each individual forum section in your forum. When you visit that section or a thread within that section, the appropriate icon will display in your browser address bar and browser tab and when you bookmark a section the bookmark will use that section's icon.

Rather frivolous but it's particularly handy for tabbing.

Demo: http://doghouse.forumdog.com/forumdisplay.php?f=25
Pick a forum, any forum.

Installation couldn't be simpler.

Open templates FORUMDISPLAY, SHOWTHREAD, NEWTHREAD, NEWREPLY:
FIND

Code:
</head>
ADD ABOVE:
Code:
<link rel="icon" href="images/$foruminfo[forumid]_favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/$foruminfo[forumid]_favicon.ico" type="image/x-icon" />
Then you just need to save a 16x16, 256-colour image as a .ico file using the forumid of the section you want the icon to apply to. You can find the forumid by looking at the URL for the section. For instance, for this section on vbulletin.org the URL is http://www.vbulletin.org/forum/forumdisplay.php?f=192 and so the forumid is 192. The favicon for this section would be 192_favicon.ico. Just copy the image to the image directory of your forum.

A note on compatibility
I'm told as of right now no version of IE still will not display any image type other than .ico files for favicons. Non-IE browsers can make use of at least .gif and .png files if not other types as well, the advantage to this being a) They may well look better and b) On my site at least a .gif favicon is 1/10th the filesize of a .ico favicon. If you want to do that instead then just change the .ico extension to your own image extension in the code above. Or if you're very determined and want to do both(!) then you can use this code instead.

Code:
<if condition="is_browser('ie')">
<link rel="icon" href="images/$foruminfo[forumid]_favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/$foruminfo[forumid]_favicon.ico" type="image/x-icon" /> 
<else />
<link rel="icon" href="images/$foruminfo[forumid]_favicon.gif" type="image/x-icon" />
<link rel="shortcut icon" href="images/$foruminfo[forumid]_favicon.gif" type="image/x-icon" />
</if>
IE is especially poor at making use of favicons, don't be surprised if it doesn't find one at all despite the above. Other browsers are considerably more reliable but still occasionally erratic.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s Custom favicon per forum.txt (2.5 KB, 97 downloads)


vblts.ru supports vBulletin®, 2022-2024