PDA

View Full Version : Custom favicon per forum


ForumDog
11 Oct 2006, 12:51
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 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.


<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
11 Oct 2006, 13:56
Great! installing...

Minha
11 Oct 2006, 23:14
ummmmm donīt works on FF, IE and 3.6.1 :(

Thanks at all.

ForumDog
12 Oct 2006, 09:35
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
12 Oct 2006, 13:18
where I must place exactly the favicon.ico to which image directory:ermm:

Minha
12 Oct 2006, 13:58
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
12 Oct 2006, 17:13
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
12 Oct 2006, 20:47
ummmmm donīt works on FF, IE and 3.6.1 :(

Thanks at all.

Works fine in FF and IE7.

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