favicon enhanced
Posted: Mon Apr 28, 2008 8:41 pm
Hi
There's the UDT provided by Christophe Lambrechts to display a favicon in the browser. See here for the details: http://wiki.cmsmadesimple.org/index.php/Share_your_tags_here#favicon.
If you search the forum for "favicon" you'll notice that there can be troubles with the location of the favicon. One solution to this issue is to provide the full URL to the favicon, i.e.http://mycms/myimages/favicon.ico
Here's the code snippet how I extended Christophe's UDT to prepend the icon name with the http-part:
In your template call the UDT like this:
whereby "myimages" is located below the root folder of your CMSMS installation. Make sure that Apache or any other web server can access the icon by manually entering the full URL in a browser for test:
http://mycms/myimages/favicon.ico
This should work for all browsers (don't know if there are any performance penalties, though).
There's the UDT provided by Christophe Lambrechts to display a favicon in the browser. See here for the details: http://wiki.cmsmadesimple.org/index.php/Share_your_tags_here#favicon.
If you search the forum for "favicon" you'll notice that there can be troubles with the location of the favicon. One solution to this issue is to provide the full URL to the favicon, i.e.http://mycms/myimages/favicon.ico
Here's the code snippet how I extended Christophe's UDT to prepend the icon name with the http-part:
Code: Select all
f(isset($params['static']))
global $gCms;
$favicon_path = $gCms->config['root_url'] . "/" . $params['static'];
echo '<link rel="shortcut icon" href="'.$favicon_path.'" type="image/x-icon" /link>'."\n";
...
Code: Select all
{favicon static="myimages/favicon.ico"}
http://mycms/myimages/favicon.ico
This should work for all browsers (don't know if there are any performance penalties, though).