Advertisement:

Navigation

SMF Mod Site

This is an outdated mod that is no longer supported by its author. Use at your own risk
Mod Name:
Add Favicon (favorites/bookmark icon)
Created By:
hadesflames
Type:
Archived
First Created:
February 25, 2007, 12:11:32 PM
Last Modified:
July 24, 2010, 03:05:13 AM
Latest Version:
1.3
Compatible With:
1.1.2, 1.1.3, 1.1.4, 1.1.6, 1.1.7, 1.1.8, 1.1.10, 1.1.11, 2.0 Beta 4, 2.0 RC1, 2.0 RC2, 2.0 RC3
Total Downloads:
30691

Download this mod

Favicon v1.3.zip (4kB) [10520]
Manual Install Instructions for SMF


Below are some preview images of what the mod looks like when being used

Description:

Live Demo (Look at favicon)
Link to Modification


Package Information

Latest Version: 1.3
Original Developer: ccbtimewiz
Current Developer: hadesflames
Built for: SMF 1.1.x - SMF 2.0.x
Package: Favicon


What is a favicon? 



A favicon (short for favorites icon), also known as a website icon, or shortcut icon, is an icon associated with a particular website or webpage. A web designer can create such an icon and install it into a website (or webpage) by several means, and most graphical web browsers will then make use of it. Browsers that provide favicon support typically display a page's favicon in the browser's URL bar and next to the page's name in a list of bookmarks. Browsers that support a tabbed document interface typically show a page's favicon next to the page's title. The Microsoft Windows Shell uses favicons to represent "Internet shortcuts" to web pages. - Wikipedia


What does this mod do?

This mod allows you to add a favicon which appears in your address bar, bookmarks (and tabs also in some browsers) through your Current Theme settings.

Favicons are supported by most MODERN browsers. Note, however IE7 only seems to support .ico files. IE6 only supports favicons on bookmarks.

Note you need to create your own favicon for this to work.


For Custom Themes

This modification currently edits a template file called Settings.template.php. A good number of themes have their own Settings.template.php file in their folder, meaning that you won't see the settings for this mod unless you manually put them there.

First check Admin > Current Theme after installing this mod on your theme. If the options are missing, then you most likely have to the manual instructions for the Settings.template.php file.

To do such, open ./Themes/{your_theme}/Settings.template.php by downloading the file from your server using FTP (Refer to: How do I use FTP? / What is FTP?) and make the following edits. Then reupload through the same method.

Find:

Code: [Select]
'description' => $txt['header_logo_url_desc'],
         'type' => 'text',
      ),

Add after:
Code: [Select]
array(
         'id' => 'header_favicon_url',
         'label' => $txt['header_favicon_url'],
         'description' => $txt['header_favicon_url_desc'],
         'type' => 'text',
      ),

SMF 2.0 ONLY:
In SMF 2.0 you will also have to edit your index.template.php file of the same directory as above, search for:
Code: [Select]
<title>', $context['page_title_html_safe'], '</title>';
add after:
Code: [Select]
// Favicon Edits
   $link_rel = '';
   if (!empty($settings['header_favicon_url']))
   {
      if(preg_match('~http://(?:.*?)\.(png|ico|gif)(?:\?(?:.*?)|)~i', $settings['header_favicon_url'], $type))
      {
         // Append to html headers
         $link_rel .= '
            <link rel="'. (!empty($context['browser']['is_ie']) ? 'shortcut icon' : 'icon' ) .'" href="'. $settings['header_favicon_url'] . '" type="'. (($type[1] == 'ico') ? 'image/vnd.microsoft.icon' : 'image/'.$type[1] ) .'" />';
         unset($type);
      }
     
   }
   echo $link_rel;

and you should be good to go ;)

Alteration Log

Version 1.3

[!] Added Support for German
[!] Added Support for SMF 2.0 RC1.2 - SMF 2.0 RC3
[!] Added Support for Portuguese
[!] Added Support for Brazilian Portuguese
[!] Added Support for Spanish

Version 1.2

[!] Re-released on October 1, 2008 by ccbtimewiz
[!] Released on December 1, 2007 by karlbenson


Need Help?

If you need help with this modification, please don't hesitate to post in the support thread.

For more information, reference to the guide that ccbtimewiz made:

[HOW TO] Add a favicon (bookmark/favorite icon) to your forum