wiki:ShortcutIconPlugin

Version 10 (modified by martin_s, 6 years ago) (diff)

Changed headline.

ShortcutIconPlugin - Set any server file as shortcut icon, including handler for /favicon.ico.

Description

This small plug-in provides an request handler for the widely used shortcut icon URL path /favicon.ico. Especially MS Internet Explorer seems to need the shortcut icon located at this position. The plug-in is also able to insert (X)HTML link tags which point standard compatible browsers to this address.

Please be aware that this icons can also be configured over the Trac standard config file as described in the TracInterfaceCustomization wiki, but forcing the Trac server admin to put the icon in the document root of the host in order to be compatible with the MS IE.

Installation

Use can easy_install this plugin:

easy_install http://trac-hacks.org/svn/shortcuticonplugin/0.11

If you use Subversion 1.5.x you might get an error, then just try:

svn export http://trac-hacks.org/svn/shortcuticonplugin/0.11 shortcuticonplugin
easy_install shortcuticonplugin

Afterwards you can remove the shortcuticonplugin folder.

To enable this plug-in add the following into the config file (normally 'conf/trac.ini'):

[components]
tracshortcuticon.* = enabled

Bugs/Feature Requests

Existing bugs and feature requests for ShortcutIconPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out ShortcutIconPlugin from here using Subversion, or browse the source with Trac.

Usage

Put the following settings in the trac.ini config file under the section [shortcuticon]:

handler = true|false
Enables/disables request handler for /favicon.ico URL.
linkheader = true|false
Enables/disables insertion of link tags which point to the icon.
iconpath = /local/path/on/trac/server/icon.png
Local OS path (no URL) of the icon file on the Trac server. While some browser support PNG and GIF icons, some other only the MS ICO format. The icon should be 16x16 or 32x32 pixels in size.
mimetype = image/<extention>
Overrides auto-detection by file extension of the mime-type.

Example

[shortcuticon]
handler    = true
linkheader = true
iconpath   = /local/path/on/trac/server/icon.png
mimetype   = image/png

[project]
# Disable build-in handling of icons:
icon =

Recent Changes

[8553] by martin_s on 2010-08-30 23:57:58
Added encoding meta-comment and declared SVN keywords as unicode to avoid issues with non-english locales.
[8429] by martin_s on 2010-08-23 13:12:14
Removed outdated variable rev from setup file.
[8397] by martin_s on 2010-08-20 15:23:45
Removed import of source revisions to avoid installation issues.

Author/Contributors

Author: martin_s
Contributors: