/** * Returns <link> tag for various icon types (favicon|mobile|generic) * * @param array $types - list of icon types to display (favicon|mobile|generic) * @author Anika Henke <*****@*****.**> */ function tpl_favicon($types = array('favicon')) { $return = ''; foreach ($types as $type) { switch ($type) { case 'favicon': $return .= '<link rel="shortcut icon" href="' . tpl_getFavicon() . '" />' . NL; break; case 'mobile': $return .= '<link rel="apple-touch-icon" href="' . tpl_getFavicon(false, 'apple-touch-icon.png') . '" />' . NL; break; case 'generic': // ideal world solution, which doesn't work in any browser yet $return .= '<link rel="icon" href="' . tpl_getFavicon(false, 'icon.svg') . '" type="image/svg+xml" />' . NL; break; } } return $return; }
<title> <?php tpl_pagetitle(); ?> [<?php echo strip_tags($conf['title']); ?> ] </title> <?php tpl_metaheaders(); ?> <link rel="shortcut icon" href="<?php echo tpl_getFavicon(); ?> " /> <?php /*old includehook*/ @(include dirname(__FILE__) . '/meta.html'); ?> </head> <body> <?php /*old includehook*/ @(include dirname(__FILE__) . '/topheader.html'); ?> <div class="dokuwiki">
echo "\n<link rel=\"shortcut icon\" href=\"" . DOKU_TPL . "user/favicon.ico\" />\n"; } elseif (file_exists(DOKU_TPLINC . "user/favicon.png")) { //note: I do NOT recommend PNG for favicons (cause it is not supported by //all browsers). echo "\n<link rel=\"shortcut icon\" href=\"" . DOKU_TPL . "user/favicon.png\" />\n"; } else { //default echo "\n<link rel=\"shortcut icon\" href=\"" . (function_exists("tpl_getFavicon") ? tpl_getFavicon() : DOKU_TPL . "images/favicon.ico") . "\" />\n"; } //include default or userdefined Apple Touch Icon (see <http://j.mp/sx3NMT> for //details) if (file_exists(DOKU_TPLINC . "user/apple-touch-icon.png")) { echo "<link rel=\"apple-touch-icon\" href=\"" . DOKU_TPL . "user/apple-touch-icon.png\" />\n"; } else { //default echo "<link rel=\"apple-touch-icon\" href=\"" . (function_exists("tpl_getFavicon") ? tpl_getFavicon(false, "apple-touch-icon.png") : DOKU_TPL . "images/apple-touch-icon.png") . "\" />\n"; } //load userdefined js? if (tpl_getConf("prsnl10_loaduserjs")) { echo "<script type=\"text/javascript\" charset=\"utf-8\" src=\"" . DOKU_TPL . "user/user.js\"></script>\n"; } ?> <!--[if lt IE 7]><style type="text/css">img { behavior: url(<?php echo DOKU_TPL; ?> js/iepngfix/iepngfix.htc); }</style><![endif]--> </head> <body> <div id="pagewrap"<?php if ($ACT !== "show" && ($ACT === "admin" || $ACT === "conflict" || $ACT === "diff" || $ACT === "draft" || $ACT === "edit" || $ACT === "media" || $ACT === "preview" || $ACT === "save")) {
header("X-CacheUsed: {$cache->cache}"); } print $cache->retrieveCache(); exit; } else { http_conditionalRequest(time()); } // create new feed $rss = new DokuWikiFeedCreator(); $rss->title = $conf['title'] . ($opt['namespace'] ? ' ' . $opt['namespace'] : ''); $rss->link = DOKU_URL; $rss->syndicationURL = DOKU_URL . 'feed.php'; $rss->cssStyleSheet = DOKU_URL . 'lib/exe/css.php?s=feed'; $image = new FeedImage(); $image->title = $conf['title']; $image->url = tpl_getFavicon(true); $image->link = DOKU_URL; $rss->image = $image; $data = null; $modes = array('list' => 'rssListNamespace', 'search' => 'rssSearch', 'recent' => 'rssRecentChanges'); if (isset($modes[$opt['feed_mode']])) { $data = $modes[$opt['feed_mode']]($opt); } else { $eventData = array('opt' => &$opt, 'data' => &$data); $event = new Doku_Event('FEED_MODE_UNKNOWN', $eventData); if ($event->advise_before(true)) { echo sprintf('<error>Unknown feed mode %s</error>', hsc($opt['feed_mode'])); exit; } $event->advise_after(); }