Dokuwiki Favicon (CloudMonk.io)

DokuWiki Favicons



Return to DokuWiki Customization, DokuWiki Configuration, DokuWiki Logo Customization, DokuWiki

There are a number of types of favicons - the //favicon.ico// which combines a number of different size images into a single file used in the browser tab and bookmarks, individual PNG images used for various purposes (e.g. apple-touch/Web Clip), and animated favicon GIF images.

Error: File not found: https://forum.dokuwiki.org/unb_lib/designs/modern/img/favicon.ico?nolink |Displayed at 48x48px The default //favicon.ico// used with DokuWiki contains 8-bit PNG images of the dimensions 16x16px, 32x32px, and 48x48px.

Error: File not found: https://scottferguson.com.au/uploads/files/opensearch_00_100px.png?nolink |Firefox example DokuWiki uses the //favicon.ico// from //$DokuWiki/lib/tpl/images// to generate the image used for Opensearch if a viewer wishes to add a custom search engine for a DokuWiki site.

Custom favicons



=Favicons for the browser tab

=

If you wish to replace the default DokuWiki //favicon.ico// with your own you can place it in any of these places:
* the web root (often ///var/www//)
* the root of the DokuWiki directory
* in //$DokuWiki/data/media//
* in //$DokuWiki/lib/tpl/dokuwiki/images// ((NOTES: only tested with the default DokuWiki theme/template; this location may be overwritten on upgrades))

By default DokuWiki has a //favicon.ico// file in //$DokuWiki/lib/tpl/dokuwiki/images//


The following rules apply:

* a //favicon.ico// in the web root will **only** be used if there are **no** //favicon.ico// files in the //$DokuWiki// directory.

* a //favicon.ico// in //$DokuWiki/data/media// will be used regardless of whether other //favicon.ico// files are beneath the web root directory.

* a //favicon.ico// in //$DokuWiki/lib/tpl/dokuwiki/images// will **only** be used if there is **no** //favicon.ico// in //$DokuWiki/data/media// ((NOTE: the same rules may not apply to the //favicon.ico// used to generate the image used for Opensearch)).

Here you can find a tutorial how to generate a multi-resolution favicon with GIMP: https://www.catalyst.net.nz/news/creating-multi-resolution-favicon-including-transparency-gimp|catalyst.net

Animated Favicons for the browser tab



If you'd like to display an animated gif Error: File not found: https://scottferguson.com.au/uploads/files/animated_favicon.gif|Not for everyone instead of a static icon in the browser tab **and** you are using the default dokuwiki template (theme)((NOTE: a similar process will probably work with other themes - I haven't tested)):-

* Edit doku.php and change ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/', $ID)) && to ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|animated_favicon\.gif|favicon\.ico|crossdomain\.xml)$/', $ID)) &&

* Edit inc/template.php and change * Returns tag for various icon types (favicon|mobile|generic) to * Returns tag for various icon types (favicon|mobile|generic|animated), and change * @param array $types - list of icon types to display (favicon|mobile|generic) to * @param array $types - list of icon types to display (favicon|mobile|generic|animated), and finally, change case 'generic':
// ideal world solution, which doesn't work in any browser yet
$look = array(':wiki:favicon.svg', ':favicon.svg', 'images/favicon.svg');
$return .= ' break;
to case 'generic':
// ideal world solution, which doesn't work in any browser yet
$look = array(':wiki:favicon.svg', ':favicon.svg', 'images/favicon.svg');
$return .= ' break;
case 'animated':
$look = array(':wiki:animated_favicon.gif', ':animated_favicon.gif', 'images/animated_$
$return .= ''.N$
break;

- Edit lib/tpl/dokuwiki/main.php and change to
- Edit lib/tpl/dokuwiki/mediamanager.php and change
- (Optional) Edit lib/tpl/dokuwiki/lang/en/style.txt and change will be automatically used. You can also upload a favicon.ico there. If you use a closed
wiki it is recommended to make the wiki (or root) namespace world readable in the ACL settings or your logo is not shown to not logged in users.
to will be automatically used. You can also upload a favicon.ico or an animated_favicon.gif there.
If you use a closed wiki it is recommended to make the wiki (or root) namespace world readable
in the ACL settings or your logo is not shown to not logged in users.

- Place your animated_favicon.gif in any of locations DokuWiki looks for favicons.ico files and refresh your browser.


----

If you'd like to help test how DokuWiki favicons are used for various things in different browsers you can download https://scottferguson.com.au/uploads/files/test_favicons.zip|this zip archive containing //favicon.ico// files with Red, Yellow, and Green backgrounds. Each //favicon.ico// has a 16x16, a 24x24, a 32x32, a 64x64, and a 128x128 pixel PNG images in it. All are 24-bit, and display a number corresponding to their dimensions so you can see which size is used by various browser themes.


https://www.dokuwiki.org/tips:favicons

DokuWiki: DokuWiki MediaWiki syntax MediaSyntax Plugin, DokuWiki Errors, DokuWiki Config, DokuWiki on IIS, DokuWiki on NGINX, DokuWiki Plugins, DokuWiki Redirection, See Also, DokuWiki Topics, DokuWiki Security, DokuWiki gitignore, DokuWiki Upgrades, DokuWiki Development, Cloud Monk Resume or Wiki or Collaborative Software, DokuWiki Changing the Logo, DokuWiki Favicon, Wiki Software, MediaWiki, Markdown-Based Wiki, and Wiki using Markdown Files Backend with Python Flask, GitHub DokuWiki, Awesome MediaWiki, Awesome Wiki, Awesome DokuWiki. (navbar_dokuwiki)



----



Cloud Monk is Retired (impermanence |for now). Buddha with you. Copyright | © Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers



SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.



----