diff --git a/images/favicon.ico b/images/favicon.ico new file mode 100644 index 0000000..8b9616a Binary files /dev/null and b/images/favicon.ico differ diff --git a/main.php b/main.php index 23f3f2d..0150d37 100644 --- a/main.php +++ b/main.php @@ -18,7 +18,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER <?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>] - + diff --git a/tpl_functions.php b/tpl_functions.php index 0dfee95..d258ed3 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -4,6 +4,8 @@ * * This file provides template specific custom functions that are * not provided by the DokuWiki core. + * It is common practice to start each function with an underscore + * to make sure it won't interfere with future core functions. */ // must be run from within DokuWiki @@ -64,3 +66,15 @@ function _tpl_userpage($userNS='user',$link=0,$wrapper=false) { if ($wrapper) echo ""; } + +/** + * Use favicon.ico from data/media root directory if it exists, otherwise use + * the one in the template's image directory. + * + * @author Anika Henke + */ +function _tpl_getFavicon() { + if (file_exists(mediaFN('favicon.ico'))) + return ml('favicon.ico'); + return DOKU_TPL.'images/favicon.ico'; +}