PDA

View Full Version : Custom favicon per forum


ForumDog
10-10-2006, 10:00 PM
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 :p 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

</head>


ADD ABOVE:

<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 https://vborg.vbsupport.ru/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.


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

s0b
10-11-2006, 12:56 PM
Great! installing...

Minha
10-11-2006, 10:14 PM
ummmmm don?t works on FF, IE and 3.6.1 :(

Thanks at all.

ForumDog
10-12-2006, 08:35 AM
ummmmm don?t works on FF, IE and 3.6.1 :(

Can you give me a few more details? What's the problem, got a link? There's not really anything that can go wrong with this template edit.

cunder
10-12-2006, 12:18 PM
where I must place exactly the favicon.ico to which image directory:ermm:

Minha
10-12-2006, 12:58 PM
Can you give me a few more details? What's the problem, got a link? There's not really anything that can go wrong with this template edit.
Only that i did it all of instructions and nothing happens. No images were shown.

I installed other hacks and works. Thanks at all for share ;)

ForumDog
10-12-2006, 04:13 PM
where I must place exactly the favicon.ico to which image directory:ermm:

To wherever the favicon link points. If you copied the code exactly from the instructions they must go in the images directory of your forum.

Only that i did it all of instructions and nothing happens. No images were shown.

I installed other hacks and works. Thanks at all for share ;)

Yes, if you give me a link to your forum I might be able to help you. :)

Kirk Y
10-12-2006, 07:47 PM
ummmmm don?t works on FF, IE and 3.6.1 :(

Thanks at all.

Works fine in FF and IE7.

MadKad
10-14-2006, 10:30 AM
it will work in mostly all browsers, but some browsers take longer to update the fav than others