Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: hadesflames on March 09, 2007, 05:03:51 PM

Title: Add Favicon (favories/bookmark icon)
Post by: hadesflames on March 09, 2007, 05:03:51 PM
Link to Modification (http://custom.simplemachines.org/mods/index.php?mod=702)


Package Information

Latest Version: 1.3
Original Developer: ccbtimewiz (http://www.simplemachines.org/community/index.php?action=profile;u=111571)
Current Developer: hadesflames (http://www.simplemachines.org/community/index.php?action=profile;u=109619)
Built for: SMF 1.1.x - SMF 2.0 RC3
Package: Favicon


What is a favicon?  (http://www.simplemachines.org/favicon.ico)

(http://i37.tinypic.com/2823z0m.png)

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? (http://docs.simplemachines.org/index.php?topic=480)) and make the following edits. Then reupload through the same method.

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


Add after:
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:
<title>', $context['page_title_html_safe'], '</title>';

add after:
// Favicon Edits
global $context;
$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 SMF 2.0 RC1.2 - SMF 2.0 RC2
[!] 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 (http://www.simplemachines.org/community/index.php?topic=236748.0)
Title: Re: Favicon Mod
Post by: RoarinRow on March 09, 2007, 05:50:54 PM
glad there's a mod for this.  I'm been manually updating my index.template.php files for all my available themes.  this will make it easier for everyone else.
Title: Re: Favicon Mod
Post by: WhatsUp on March 09, 2007, 06:46:47 PM
As I have to mod the file for things like Google Webmaster and Google Analytics, I do favicon at the same time, so there is no point in this mod for me.
Title: Re: Favicon Mod
Post by: DOOM666 on March 10, 2007, 08:45:10 PM
i add this to my them like its says to and it wont give me the option to but my icon in anywere

im use the helios the with 1.1.2
Title: Re: Favicon Mod
Post by: choloman05 on March 10, 2007, 10:45:18 PM
Didn't work for me. ??
Title: Re: Favicon Mod
Post by: qd-race on March 11, 2007, 12:26:04 PM
I'm still using 1.1 RC3 with SMF 1.0.9 and 1.1 RC3-1 Security Patch and don't work for me either. It saids:

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Do I need to mod manually? Please help.
Title: Re: Favicon Mod
Post by: qd-race on March 12, 2007, 02:30:30 AM
I already manually moded but the icon don't show eventhough pointed correctly in Admin->Current Theme Setting
Title: Re: Favicon Mod
Post by: nitins60 on March 12, 2007, 05:36:02 AM
Working for me 1.1.2 thanx
Title: Re: Favicon Mod
Post by: Pegasys on March 12, 2007, 08:31:27 AM
I installed this mod, couldn't get it to work even though the code looks like it should... and finally uninstalled it. I don't think the average user is going to be changing their favicon very often, so I don't see this as a "must-have" mod anyway. Sorry...

In fairness, I suspect that the issue(s) I and many others here were having were related to the file path. Absolute paths (ie the full http://yourdomain.com/forum/whatever...) don't seem to work. And with a relative path, you need to know what it's relative to. (ie.. /forum/icon.ico or /images/icon.ico or...??)


In another topic, Kirby suggested the following line of code:

<link rel="shortcut icon" href="', $settings['images_url'] ,'/favicon.ico" />

... to be added to the header section of the index.template.php file for each of your themes. Then, copy your favicon.ico file into the images folder for each theme.

This DOES work quite well. The addition of the " $settings['images_url']  " takes the mystery out of the relative path by setting it to image folder of whatever theme is in use.

** For me, simply copying (or replacing) your favicon.ico file to your domain root folder is all that was required to have the icon show up in the address window/bar and Favorites/Bookmarks of both  IE 6 & Firefox 2. But the code line above was required to have your favicon used in the tabs of Firefox.


*** In theory, the above method would allow you to use a different favicon.ico for each theme. It would only show in the tabs, I believe... but could still be interesting   ;D
Title: Re: Favicon Mod
Post by: choloman05 on March 12, 2007, 11:04:00 AM
I think this is an excellent idea for a mod and something that many will enjoy.

@ _Pegasus:  That line of code to be added to the index.template.php does the same thing as this mod, but also eliminates the "relative path" issue?

Quote** For me, simply copying (or replacing) your favicon.ico file to your domain root folder is all that was required to have the icon show up in the address window/bar and Favorites/Bookmarks of both  IE 6 & Firefox 2. But the code line above was required to have your favicon used in the tabs of Firefox.

That last part has me confused. Do you mean that the line of code (above), in addition to this mod lets the favicons show up in the FF tabs?  Thanks!

Title: Re: Favicon Mod
Post by: NativePages on March 12, 2007, 06:52:51 PM
I installed it, and it installed ok. I did the code copy/paste into index.template. I even tried adding the link rel line. I put my favicon image up there in ico, gif, and png formats. I already had it in my root directory.  Someone had told me (when it was only in my root directory) they could see it when they pulled up my site.

I can't. And now it fails on every file on the uninstall test. How do I get rid of it, because now I'm getting this:

First line is subs-package.php 1901, last line is 1909, repeated error (see next code box) on 1901, 1905 and 1908 on

$fp = fopen($filename, 'r+');
if (!$fp && !$trash)
{
// We should have package_chmod()'d them before, no?!
trigger_error('package_flush_cache(): some files are still not writable', E_USER_WARNING);
return;
}
fclose($fp);
}


Error log entries relevant to above:

http://www.nativepages.com/tnindian/index.php?action=packages;sa=uninstall;package=favicon_v1.0.zip 
2: fclose(): supplied argument is not a valid stream resource
File: /home/nativep/public_html/tnindian/Sources/Subs-Package.php
Line: 1908

http://www.nativepages.com/tnindian/index.php?action=packages;sa=uninstall;package=favicon_v1.0.zip 
2: fopen(/home/nativep/public_html/tnindian/Themes/default/../babylon/index.template.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: /home/nativep/public_html/tnindian/Sources/Subs-Package.php
Line: 1901

http://www.nativepages.com/tnindian/index.php?action=packages;sa=install2;package=favicon_v1.0.zip 
512: package_flush_cache(): some files are still not writable
File: /home/nativep/public_html/tnindian/Sources/Subs-Package.php
Line: 1905


Title: Re: Favicon Mod
Post by: Pegasys on March 13, 2007, 10:23:23 AM
Quote from: choloman05 on March 12, 2007, 11:04:00 AM
@ _Pegasus:  That line of code to be added to the index.template.php does the same thing as this mod, but also eliminates the "relative path" issue?

Yes. Just adding that one line of code... and also replacing the default favicon.ico in the domain's root folder, does everything that this mod is supposed to do. Except, of course, allow you to set or change the name & type of the favicon in your admin panel. However, if you are going to change your favicon, you will have to upload/FTP the new file to your site anyway. And as long as the new favicon file has the same name, etc, it will be used automatically without and need to change code or settings in your admin panel. So I don't really see the use for this mod.

I supose it might be helpful to those who only use the default theme and are not comfortable manually editing the index.template.php file to add that single line of code. But its also one more setting in the database that has to be continually read-in... and who needs that minor bit of overhead if not neccessary?


Quote
That last part has me confused. Do you mean that the line of code (above), in addition to this mod lets the favicons show up in the FF tabs?  Thanks!

No, I couldn't get this mod to work so I uninstalled it. Just that single code line added to the index.temeplate.php should get the icon to show in the FF2 tabs. At least, that's what it took for me to finally get the FF tabs to show the icon.

Its quite possible that different solutions are required for different hosts as all hosts do things differently. Its also possible that this mod was tested and works fine on all hosts that are set up similarly to the mod author's host. That would explain why it apparently does not work for so many others.


* We do know that IE 6 defaults to looking for a favicon.ico in the root folder of the domain. It uses this favicon to display in the Favorites and the address box/bar.

* Firefox 2 also seems to use the root folder favicon for its address bar and Bookmarks. But not the tabs.

* On my host, a default favicon.ico file of the host's logo was already installed in the domian root folder. Yet, even when I replaced it with a custom icon for my website, FF2 still displayed the host's default icon on the tabs. I'm not sure where FF2 was getting it from. But adding that single line of code apparently over-rode whatever default FF2 was using and my site icon finally displayed in the FF2 tabs.

Title: Re: Favicon Mod
Post by: choloman05 on March 13, 2007, 10:36:54 AM
I see now. Thanks very much for all the useful info _Pegasus. 

Title: Re: Favicon Mod
Post by: Pegasys on March 13, 2007, 11:04:35 AM
Quote from: NativePages on March 12, 2007, 06:52:51 PM
I installed it, and it installed ok. I did the code copy/paste into index.template. I even tried adding the link rel line. I put my favicon image up there in ico, gif, and png formats. I already had it in my root directory.  Someone had told me (when it was only in my root directory) they could see it when they pulled up my site.

I can't. And now it fails on every file on the uninstall test. How do I get rid of it, because now I'm getting this:


I'm glad to see that your site is functioning fine now... so I assume you either got the mod working or uninstalled it successfully.

For me, when I visit your site now:

1. There is no favicon at all in IE 6... either in the address window or when the page is added to the Favorites.
* IE 6 can only use icons (.ico). Make sure there is a favicon.ico in your domain's root folder. If there already is, then I don't know why it doesn't show in IE 6.

2. Your custom favicon works perfectly in Firefox 2. It appears on the tab & in the address window... and also shows in the Bookmarks when the page is book marked.

Title: Re: Favicon Mod
Post by: manudevil on March 13, 2007, 07:20:07 PM
Install is OK. I can add the favicon URL in the admin. It adds the code lines in the templates. But nothing appears on the generated HTML code, and I cannot see any favicon.
I added the correct line code manually after uninstalling this mod. Sorry.
Title: Re: Favicon Mod
Post by: NativePages on March 13, 2007, 09:30:18 PM
Quote from: Pegasys on March 13, 2007, 11:04:35 AM
I'm glad to see that your site is functioning fine now... so I assume you either got the mod working or uninstalled it successfully.

For me, when I visit your site now:

1. There is no favicon at all in IE 6... either in the address window or when the page is added to the Favorites.
* IE 6 can only use icons (.ico). Make sure there is a favicon.ico in your domain's root folder. If there already is, then I don't know why it doesn't show in IE 6.
2. Your custom favicon works perfectly in Firefox 2. It appears on the tab & in the address window... and also shows in the Bookmarks when the page is book marked.

I didn't do anything to it. Didn't try to go ahead with the uninstall because of the test failures on the files. It's just sitting there. Evidently when it installed, it did not install the place on my admin panel to add a favicon url or anything. 

I'm not sure why the icon is appearing for some folks and not others, but it's up there in each directory three times as .ico, .png, and .gif.

Weird.  
Title: Re: Favicon Mod
Post by: Pegasys on March 14, 2007, 11:47:51 AM
Quote from: NativePages on March 13, 2007, 09:30:18 PM
I didn't do anything to it. Didn't try to go ahead with the uninstall because of the test failures on the files. It's just sitting there. Evidently when it installed, it did not install the place on my admin panel to add a favicon url or anything. 

I'm not sure why the icon is appearing for some folks and not others, but it's up there in each directory three times as .ico, .png, and .gif.

Weird. 

Does your site allow members to choose between two or more themes?  Like almost all mods, this mod only installs to the default theme. (and the Babylon theme, I believe) After installing, if you are not using the default theme, you will not see the extra data fields in your admin panel. This also might explain why some members can see it while others can not.

That being said, when I visited your site, the theme was definately not the default. And as I mentioned before, the favicon worked perfectly for me using FF2... but not at all using IE 6. So that sorta blows away any theory being suggested in the first paragraph, dudn't it?   :D


* I'd be a bit concerned about having the mod installed and not having it pass the tests, or being functional. You might want to think about backing up the files it installs to, then trying the uninstall feature. Either that, or manually edit out the mod. 
Title: Re: Favicon Mod
Post by: karlbenson on March 15, 2007, 04:58:04 AM
If you use a gif or a png icon it will not work in iE6.  IE6 only supports ico icons.

Yes, this mod installs on Default, Classic and Babylon themes.

For any other theme you need to manually install it.
Title: Re: Favicon Mod
Post by: khoking on March 15, 2007, 05:04:34 AM
I just create a favicon and upload it to my public html folder via ftp, then the favicon AUTOMATICALLY appear on my browser URL and bookmark.

Why do we need a mod for favicon?
Title: Re: Favicon Mod
Post by: karlbenson on March 18, 2007, 01:37:54 PM
For several reasons
its not always picked up on all servers.
You might not be allowed to upload to the base url.
Title: Re: Favicon Mod
Post by: shadow82x on June 27, 2007, 08:57:47 PM
Any updates for 1.1.3?
Title: Re: Favicon Mod
Post by: Gary on June 27, 2007, 09:00:21 PM
It should work for 1.1.3 as is.

-ALM
Title: Re: Favicon Mod
Post by: RiderRaghav on July 01, 2007, 07:19:51 PM
Quote from: ALM on June 27, 2007, 09:00:21 PM
It should work for 1.1.3 as is.

-ALM

I just tried it but it dint work .....
I'll try it manually later .....
Title: Re: Favicon Mod
Post by: shadow82x on July 01, 2007, 07:36:19 PM
It works if you edit the pack_info.xml and change install/uninstall for version 1.1.3
Title: Re: Favicon Mod
Post by: RiderRaghav on July 02, 2007, 08:12:18 PM
Quote from: shadow82x on July 01, 2007, 07:36:19 PM
It works if you edit the pack_info.xml and change install/uninstall for version 1.1.3

I changed the info you told me and it worked ....

Thanks allot mate ;)
Title: Re: Favicon Mod
Post by: shadow82x on July 02, 2007, 09:20:37 PM
Your Welcome. Thanks for using smf.. :P
Title: Re: Favicon Mod
Post by: MeRcChRiS on July 06, 2007, 05:25:09 PM
What do I do with the package_info.xml and stuff? how do I edit that?
Title: Re: Favicon Mod
Post by: shadow82x on July 06, 2007, 05:38:58 PM
You can download something called Crimson Editor (http://www.crimsoneditor.com/) and you put the package_info.xml on the desktop or save it somewhere. You open up Crimson Editor (http://www.crimsoneditor.com/) and you will fine something like <install for="1.1.0, 1.1, 1.1.2">

and

<uninstall for="1.0, 1.1, 1.1.2">

You can delete all the past versions so it just says <install for="1.1.3"> and you do the same thing for uninstall
Title: Re: Favicon Mod
Post by: MeRcChRiS on July 07, 2007, 12:17:30 AM
well I did do that because im using 1.1.3 and it installed etc. THen it says to edit the index.template.php for custom themes, so I did. After i edited it, I got an Error on my forum.

<title>', $context['page_title'], '</title>';

what do I add after that then?
Title: Re: Favicon Mod
Post by: shadow82x on July 07, 2007, 12:21:15 AM
Where does it show that error?
Title: Re: Favicon Mod
Post by: MeRcChRiS on July 07, 2007, 12:23:02 AM
Well the the code in my last post isnt the error, im just saying what do i add after that code like it asks for my custom theme.

The error is showing because the code im adding after the code in my last post is wrong.
Title: Re: Favicon Mod
Post by: Chantal Matar on August 03, 2007, 05:58:11 PM
Works perfectly.  Excellent mod.  Wouldn't have a clue how to do this otherwise.  Thank you!  :-*
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 02:48:12 PM
took me long enough to find where to set it up
but its SO AWESOME now that i figured it out lol

thanks!!

EDIT: it doesnt work in IE...can i fix that?
Title: Re: Favicon Mod
Post by: karlbenson on September 21, 2007, 03:43:41 PM
it would depend on what version of IE you are using?
And what type of icon you are are using.

IE6 and below can't show icons properly and won't show some at all.
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 07:31:02 PM
me and my friend are using IE7
its a .gif image
and it doesnt work for either of us lol
Title: Re: Favicon Mod
Post by: karlbenson on September 21, 2007, 07:40:32 PM
whats the forum url?
whats the url to the image?
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 07:53:11 PM
www.jades-world.com/forums (http://www.jades-world.com/forums)

(http://i18.photobucket.com/albums/b108/yuk75/flavicon.gif)
Title: Re: Favicon Mod
Post by: karlbenson on September 21, 2007, 08:01:47 PM
I can't see why its not working.

Please can you try with another image?
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 08:27:53 PM
sure
heres what the new one should look like:

(http://i18.photobucket.com/albums/b108/yuk75/favicon2.gif)  <its so lame....i like it lmao
Title: Re: Favicon Mod
Post by: karlbenson on September 21, 2007, 08:47:00 PM
Although it works in firefox/opera, it appears that the file MUST be named favicon.{filetype} to work in ie

eg

favicon.jpg
favicon.gif
favicon.ico

I think you called the first one flavicon.gif
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 08:49:58 PM
Quote from: karlbenson on September 21, 2007, 08:47:00 PM
Although it works in firefox/opera, it appears that the file MUST be named favicon.{filetype} to work in ie

eg

favicon.jpg
favicon.gif
favicon.ico

I think you called the first one flavicon.gif

it was favicon.gif ....why wouldnt it work?

EDIT:
OH lol
lemme fix that :S
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 21, 2007, 09:00:23 PM
okay its fixed
still wouldnt show up in IE

so i tried hosting it on my actual site
http://www.jades-world.com/favicon.gif

same results...is there a certain folder or place it has to be to work with IE?
Title: Re: Favicon Mod
Post by: karlbenson on September 22, 2007, 05:31:32 PM
Alundra, I've been through this again today and I can't figure out why it won't work.
I'm wondering whether its a bug with my icon code or whether its an IE bug.
I've very sorry, but This is one I'll have to look at in the future and do a bit more research.

Although it won't show for the majority of users, its not technically causing any errors.  Feel free to uninstall the mod if you so wish.
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 22, 2007, 07:05:22 PM
naw im cool

all the cool users use firefox anyways ;)

as long as i can see it, (which i can cause i use firefox) then im good. it has the effect i aim for ;)
Title: Re: Favicon Mod
Post by: lawnmowertech on September 22, 2007, 09:26:29 PM
Quote from: khoking on March 15, 2007, 05:04:34 AM
I just create a favicon and upload it to my public html folder via ftp, then the favicon AUTOMATICALLY appear on my browser URL and bookmark.

Why do we need a mod for favicon?
question   you said  public html folder  do you  load it to that folder itself  only   ?  or  inside that folder theres  other folders ? or do you upload it to  the root public html  folder  and not the sub folders
Title: Re: Favicon Mod
Post by: jamietje on September 22, 2007, 09:42:18 PM
good deal working for 1.1.3?
Title: Re: Favicon Mod
Post by: Jade Elizabeth on September 22, 2007, 10:30:58 PM
yeah it works perfectly
just not on IE....though if it works on IE for you let us know!! lol
Title: Re: Favicon Mod
Post by: karlbenson on September 22, 2007, 11:45:31 PM
I must have had it working in IE in the past, because I use IE as my preferred browser (although I test for firefox/opera)

As I said, as far as I'm aware it should work.  And I believe it has worked.
Title: Re: Favicon Mod
Post by: Brenda on October 02, 2007, 12:48:33 PM
Ok, just tried installing this mod. I am using 1.1.4 and now....I have this error and cannot access my forum!

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------


Parse error: parse error, unexpected '}' in .../Themes/default/index.template.php on line 365

356:
357:
358:    // Show the menu here, according to the menu sub template.
359:    template_menu();
360:
361:
362:    // The main content should go here.
363:    echo '
364:    <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
365: }366:
367: function template_main_below()
368: {
369:    global $context, $settings, $options, $scripturl, $txt;
Title: Re: Favicon Mod
Post by: shumar on October 14, 2007, 05:53:11 PM
I have other problem.
I can't find
<title>', $context['page_title'], '</title>';

I can put my index.template.php so someone can point me where to put code.

I use 1.1.4

Execute Modification  ./Themes/default/index.template.php  Test failed
Title: Re: Favicon Mod
Post by: karlbenson on October 14, 2007, 06:24:32 PM
please attach your index.template.php and I'll have a look at it.
Title: Re: Favicon Mod
Post by: shumar on October 14, 2007, 06:47:35 PM
Here we go. :)
Title: Re: Favicon Mod
Post by: karlbenson on October 14, 2007, 07:08:47 PM
instead of

<title>', $context['page_title'], '</title>';

you have
<title>', create_title(), '</title>';

So you will need to manually add this mod
Title: Re: Favicon Mod
Post by: shumar on October 14, 2007, 08:18:07 PM
Thank you.
Title: Re: Favicon Mod
Post by: Herman's Mixen on October 14, 2007, 08:31:37 PM
Quote from: karlbenson on September 22, 2007, 11:45:31 PM
I must have had it working in IE in the past, because I use IE as my preferred browser (although I test for firefox/opera)

As I said, as far as I'm aware it should work.  And I believe it has worked.

coz IE is not compatible with the current W3C standards.... so i don't bother to don't use it... in matter affect we have to wait what the new CSS 3 standard are going to bring us.... maybe it will solve some problems for both IE and FF,Safari,Opera... etc.....

there are alternate css standards that work in IE !
Title: Re: Favicon Mod
Post by: Jade Elizabeth on October 14, 2007, 09:02:43 PM
Quote from: The Burglar! on October 14, 2007, 08:31:37 PM
there are alternate css standards that work in IE !

but do they work with other browsers?
Title: Re: Favicon Mod
Post by: Herman's Mixen on October 15, 2007, 03:59:25 AM
you can try to validate http://www.html-kit.com/favicon/validator/

you can try to insert these two lines


<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
Title: Re: Favicon Mod
Post by: cru on October 15, 2007, 08:37:14 AM
nice! i installed it easily on my 1.1.4 default theme.  (test site)

1. how do i put the image?
2. where do i upload it?
3. do i have to insert any code? coz i don't see the icon. Im using Firefox
Title: Re: Favicon Mod
Post by: karlbenson on October 15, 2007, 11:35:51 AM
you upload the image to your server via ftp
or host it externally.

Then get the url and enter it in the box
Edit the url for your icon in the Current Theme panel of your Admin Area.

And it should then appear in the browser when browsing your site.
Title: Re: Favicon Mod
Post by: cru on October 15, 2007, 09:14:05 PM
thanks karl! u got great mods! u are a real smf hero!
Title: Re: Favicon Mod
Post by: Jade Elizabeth on October 15, 2007, 09:37:14 PM
I second that ;)
Title: Re: Favicon Mod
Post by: qd-race on October 23, 2007, 06:05:46 AM
Quote from: The Burglar! on October 15, 2007, 03:59:25 AM
you can try to validate http://www.html-kit.com/favicon/validator/

you can try to insert these two lines


<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />


I copied the favicon.icon file to Theme->default/babylon/classic ->Images
Add above 2 lines code in Theme->default/babylon/classic ->index.template.php

Result: no icon been showed. You can refer here: http://www.replica2u.com/news/index.php

I did add these codes. Same result.
Title: Re: Favicon Mod
Post by: sparky33 on November 01, 2007, 10:39:13 AM
I've installed this some time ago, just decided to use it and the FavIcon doesn't show?

SMF 1.1.4 and TP 0.9.8 and Default theme
Title: Re: Favicon Mod
Post by: qd-race on November 01, 2007, 11:18:54 AM
I also don't know why. I have tried several ways but still no good result.

Anyway, how SMF Admin mod for this forum?
Title: Re: Favicon Mod
Post by: Jade Elizabeth on November 01, 2007, 07:20:00 PM
it works brilliant for me

put the favicon in its place, then go to the current theme and link it up :D
Title: Re: Favicon Mod
Post by: sparky33 on November 02, 2007, 09:36:18 AM
I did, placed the FavIcon on my server, then added the link to the mod, but nothing appears.

My logo appears fine using the same process.
Title: Re: Favicon Mod
Post by: qd-race on November 02, 2007, 10:06:41 AM
I upload several folders and put the pink. Still nothing. ::)
Title: Re: Favicon Mod
Post by: MinasC on November 02, 2007, 10:55:28 AM
doesn't work for me either ! smf 1.1.3
Title: Re: Favicon Mod
Post by: qd-race on November 02, 2007, 11:12:23 AM
I'm using for 4 websites: 1.1.2, 1.1.3 and 1.1.4, all cannot.
Title: Re: Favicon Mod
Post by: Herman's Mixen on November 02, 2007, 11:22:33 AM
If ya are using Internet Explorer in a lot of cases it won't work whatever you do

In firefox it works like a charm (example at my own site on all pages)
Title: Re: Favicon Mod
Post by: qd-race on November 02, 2007, 11:32:05 AM
Then how this SMF (the current we are browsing) is working in IE. I'm using IE7. I can see SMF icon working!
Title: Re: Favicon Mod
Post by: Herman's Mixen on November 02, 2007, 11:44:34 AM
well check with an validator tool like this http://www.html-kit.com/favicon/validator/
and you see i have done it manually with out use of this mods ;)
Title: Re: Favicon Mod
Post by: sparky33 on November 02, 2007, 12:06:02 PM
The point of this isn't to do it manually though, so you aren't answering the question, and I am using IE7 and I see FavIcons all the time.
Title: Re: Favicon Mod
Post by: sparky33 on November 02, 2007, 12:08:15 PM
Quotehttp://www.coupe-club.org.uk was checked, and found to have a valid favicon and a link tag.

Notes:
This page has a valid favicon and a favicon link tag. However, it is using the more recent version of the link tag (<link rel="icon" ...>). Older versions of browsers, including Internet Explorer 5 and 6, may not be able to understand it. For best results, consider adding the older version of the link tag as well (<link rel="shortcut icon" ...>).

It appears that none of the favicons are 16*16 pixels in size. In most cases, favicons are displayed at 16*16 pixels. Although browsers can resize favicons as necessary, the resized version may not look as good as the original favicon. For best results, include a 16*16 version as well in favicon.ico if possible. The favicon generated by FavIcon from Pics already includes both 16*16 and 32*32 versions.
Details:
Found the web page at:
http://www.coupe-club.org.uk (32.72 KB)

Found <link rel="icon" ...> tag that specify a favicon:
<link rel="icon" type="image/gif" href="http://coupe-club.org.uk/images/wheel.gif"/>

Found favicon at:
http://coupe-club.org.uk/images/wheel.gif (0.35 KB) 

   (23*26 pixels, 29 colors used, GIF image file format)


The FavIcon actually shows in the result


It says I'm not using a 16x16 FavIcon, which I'm not, but I have tried both.
Title: Re: Favicon Mod
Post by: qd-race on November 02, 2007, 12:17:59 PM
I'm using same FavIcon in my CubeCart ecommerce software. The icon appear with no problem.

I also did create new FavIcon from http://www.html-kit.com/favicon/gallery/ and upload to the server. Then validated it, "seem was checked but could not find a valid favicon". The system can't validate icon produce by them.


Title: Re: Favicon Mod
Post by: SheWolff on November 06, 2007, 09:20:55 PM
Brenda, did you ever get back into your site?  I have the same problem with mine and the exact same errors!   
Title: Re: Favicon Mod
Post by: Jade Elizabeth on November 06, 2007, 09:56:37 PM
why not pm them, they may not return to this topic
Title: Re: Favicon Mod
Post by: SheWolff on November 06, 2007, 10:14:01 PM
I can do that.  Maybe someone might shed some insight into this as well just in case she doesn't reply.  Been like that since 10 this morning, and I also notice this copyright must be in the template thing on the bottom of the page.  I don't recall ever even seeing that in the index template when i tried modifying it for the favicon. :o
Title: Re: Favicon Mod
Post by: karlbenson on November 07, 2007, 10:25:29 AM
Apologies for not responding.

Please see my signature.

Thanks
Title: Re: Favicon Mod
Post by: MinasC on November 07, 2007, 12:13:39 PM
oh man , i've been there and took me 2 months to fix it , i hope it doesn't take that much for you too !!!
Title: Re: Favicon Mod
Post by: SheWolff on November 07, 2007, 04:49:39 PM
What did you end up having to do, Minas?  Reupload the whole theme and start from scratch?
Title: Re: Favicon Mod
Post by: MinasC on November 07, 2007, 07:31:29 PM
nothing like that , still can't make it work myself yet ...
Title: Re: Favicon Mod
Post by: qd-race on November 07, 2007, 11:30:58 PM
If got way to do, just inform us.
Title: Re: Favicon Mod
Post by: MinasC on November 08, 2007, 11:26:50 AM
will do !  ;D
Title: Re: Favicon Mod
Post by: MinasC on November 22, 2007, 02:43:03 PM
nop , doesn't work , favicon not showing (smf 1.1.3) ! help ...
Title: Re: Favicon Mod
Post by: karlbenson on November 22, 2007, 02:54:49 PM
Indeed the mod doesnt appear to always work at the moment.

It is on my list of mods to completely re-write.

But because I have 40+ mods.  Its taking time to go through them all (especially with my recent inet issues)
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 08:27:04 AM
1.1.4 tp .98, mod installed perfectly, no errors, all looks ok, everthing in its place but alas no icon appearing. And I'm using Firefox
Title: Re: Favicon Mod
Post by: MinasC on November 26, 2007, 09:02:44 AM
Quote from: Rafferty on November 26, 2007, 08:27:04 AM
1.1.4 tp .98, mod installed perfectly, no errors, all looks ok, everthing in its place but alas no icon appearing. And I'm using Firefox

welcome to the club !  :P :D
we are all waiting for karlbenson to fix it !  ;)
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 05:53:51 PM
Ahh my settings work with 1.1.4, tp .98 with firefox if i use a .gif and not the .ico as long as the gif is in the root directory
Title: Re: Favicon Mod
Post by: MinasC on November 26, 2007, 06:25:16 PM
it shows the gif ? strange ! does IE support gif avatars ?
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 07:13:42 PM
I thought i saw a post here saying IE need .ico

I would recommend Firefox to those who dont have it however, it seems much easier to work with and much much faster
Title: Re: Favicon Mod
Post by: MinasC on November 26, 2007, 07:20:14 PM
i do prefer it but i don't want favicon to work just for me but for my members mostly and i don't know if they also prefer firefox !  :P
(just kidding)

i guess we will have to wait for karlbenson after all , right ?
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 07:30:37 PM
once you have it up it does show on members IE, I tested it

Im trying to convert all my members to FF lol
Title: Re: Favicon Mod
Post by: MinasC on November 26, 2007, 08:10:00 PM
lol , i tested it too and it works ! also works with pngs !
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 08:12:32 PM
Cool
Title: Re: Favicon Mod
Post by: karlbenson on November 26, 2007, 09:22:27 PM
Sorry guys, this mod needs re-writing from scratch.
I'm going through all of my mods (slowly) and bug fixing/support.  But with so many mods its taking a while.

However at the moment I'm busy with non-smf.

I'm always getting into arguments with Firefox nutjobs. So I better not start discussing it.
Title: Re: Favicon Mod
Post by: Rafferty on November 26, 2007, 09:25:21 PM
Doesn't seem to be much of a problem with FF, It's IE their having the problems
Title: Re: Favicon Mod
Post by: karlbenson on November 26, 2007, 10:28:03 PM
I've said before, its strange because I develop in IE.
So its strange its not working in IE.

I've not set a date when a re-write will be completed by.
Title: Re: Favicon Mod v1.1
Post by: karlbenson on November 30, 2007, 09:24:31 PM
I've spent an hour or so re-writing this mod. However after some internet reading I discovered that this mod did in fact work.

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

If you want to create a favicon or find one. Try http://www.favicon.cc/

For SMF 1.1.x versions ONLY

1.1 - 1st December 2007
o Re-wrote mod from scratch
Title: Re: Favicon Mod v1.1
Post by: Ol' Wombat on November 30, 2007, 09:51:11 PM
Quote from: karlbenson on November 30, 2007, 09:24:31 PM
....
IE6 only supports favicons on bookmarks.

..

Working here on IE7 just fine!

Title: Re: Favicon Mod v1.1
Post by: karlbenson on November 30, 2007, 10:27:03 PM
simplemachines uses an .ico
Title: Re: Favicon Mod v1.1
Post by: Ol' Wombat on December 01, 2007, 12:41:13 AM
Quote from: karlbenson on November 30, 2007, 10:27:03 PM
simplemachines uses an .ico

I always used .ico and never had any issues with favicons in IE or any Mozilla clone - not sure where it is coming from that it should work with other formats?
Title: Re: Favicon Mod v1.1
Post by: Cladestino on December 31, 2007, 12:11:48 PM
For Portuguese PT:

Quote<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation>
   <search position="end" />
<add><![CDATA[
$txt['header_favicon_url'] = 'URL da Imagem Favicon:';
$txt['header_favicon_url_desc'] = 'Deve ser uma imagem/ficheiro .png, .gif ou .ico com 16x16
   <br />Use uma imagem/ficheiro .ico para melhor compatibilidade (ex: IE7)
   <br />Deixar em branco para desactivar
   <br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Ajuda</a>)';
]]></add>
</operation>
</file>

Quote<file name="$languagedir/Modifications.portuguese-utf8.php" error="skip">
<operation>
   <search position="end" />
<add><![CDATA[
$txt['header_favicon_url'] = 'URL da Imagem Favicon:';
$txt['header_favicon_url_desc'] = 'Deve ser uma imagem/ficheiro .png, .gif ou .ico com 16x16
   <br />Use uma imagem/ficheiro .ico para melhor compatibilidade (ex: IE7)
   <br />Deixar em branco para desactivar
   <br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Ajuda</a>)';
]]></add>
</operation>
</file>
Title: Re: Favicon Mod v1.1
Post by: jurdim on January 16, 2008, 04:21:09 AM
Just installed it and works fine great mod
I use IE7 and it showed imidiately after installation

Gr Jurgen
Title: Re: Favicon Mod v1.1
Post by: karlbenson on January 18, 2008, 11:39:13 PM
I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.
Title: Re: Favicon Mod v1.1
Post by: Mrs.Rattitude on February 03, 2008, 03:26:59 PM
Hi,

I just downloaded this and tried to upload the package and it comes back with an error message of "The package you tried to upload either is not a valid package or has become corrupted."

Any suggestions?

Title: Re: Favicon Mod v1.1
Post by: No.Body on February 13, 2008, 03:07:55 AM
This is a great mod but i don't know what is the problem  with mine coz wont work.  Anyways, found another option though by editing the index.template.php and adding the code there.
Title: Re: Favicon Mod v1.1
Post by: mike123acc on February 16, 2008, 12:18:57 PM
Hi all

I wonder if someone could help me. As some others here, this mod doesn;t work for me. I'm using 1.1.4.

I installed it through SMF (maybe that is the problem?).

Anyway, a couple of people here have mentioned they inserted the code in the index.template.php. Could someone tell me where it goes in that file, and what code I should use for a standard favicon.ico. I'm only using 1 template, and the users have no option to switch so I pressume this is an easy job.

Just not that good with php......

thanks in advance
Title: Re: Favicon Mod v1.1
Post by: weightman on February 16, 2008, 12:41:57 PM
I didn't edit any code at all or install any mods to add my favicon. I just uploaded the favicon titled favicon.ico to the my SMF root directory, SMF/images and my theme images directory (SMF/Themes/YourthemeHere/images (only one should be necessary but I did all three anyway just to make sure) and the favicon appeared automatically. Make sure you clean your browser cache before you assume it didn't work.

Cheers
Title: Re: Favicon Mod v1.1
Post by: mike123acc on February 16, 2008, 12:48:25 PM
OK, thanks for that.

Will give that a go.
Title: Re: Favicon Mod v1.1
Post by: Pip2andahalf on February 19, 2008, 06:09:44 PM
Hi there... I had favicon 1.1 installed on my forum and working perfectly, and I just moved it to a new host, and for some reason it is not functioning now. I went to uninstall it so as to reinstall, but the uninstallation tests failed, so I'm a bit lost...

My default theme is babylon, here is the error list:

1.     Execute Modification     ./Themes/default/Settings.template.php                             Test failed
2.    Execute Modification    ./Themes/default/../babylon/Settings.template.php                  Test failed
3.    Execute Modification    ./index.php                                                                       Test failed
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php                Test failed
5.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php     Skipping file
6.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
7.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Skipping file

Title: Re: Favicon Mod v1.1
Post by: @rturo on February 26, 2008, 11:39:10 AM
Here you have the Spanish_es Translation for this MOD

Quote
<file name="$languagedir/Modifications.spanish_es.php" error="skip">
<operation>
   <search position="end" />
<add><![CDATA[
$txt['header_favicon_url'] = 'URL de la Imagen Favicon:';
$txt['header_favicon_url_desc'] = 'Debe ser una imagen png/gif/ico de 16x16
   <br />Use .ico para mayor compatibilidad (ej IE7)
   <br />Dejar en blanco para deshabilitar
   <br />(<a href="http://es.wikipedia.org/wiki/Favicon" target="_blank">Ayuda</a>)';
]]></add>
</operation>
</file>
Title: Re: Favicon Mod v1.1
Post by: fecu2008 on February 26, 2008, 06:44:45 PM
Installation no problem, put the url in and no problems in firefox.  Its an ico too, but will not show up on ie :(   was a solution found? oh, great mod :)
Title: Re: Favicon Mod v1.1
Post by: sparky33 on March 25, 2008, 10:54:57 AM
still doesn't work for me
Title: Re: Favicon Mod v1.1
Post by: 58tbird on March 31, 2008, 04:48:46 PM
Just wanted to say thank you Karl!  You've made lots of good mods (not sure how many of yours I'm using), and this one really helps to put a professional touch on my forum.  I appreciate all your hard work, and I always take a moment to look at mods with your name attached.
Title: Re: Favicon Mod v1.1
Post by: raelpsf on April 05, 2008, 11:25:55 AM
To use don't insert "www". eg. www.yousite.com (not use).. this correct is: http://yousite.com
Title: Re: Favicon Mod v1.1
Post by: Darkness_ on April 11, 2008, 11:34:03 AM
Works fine for my
In FF and IE.

Only one thing to say to the ones who have a problem with IE
I think IE takes favicon.ico automaticly.
Because I uploaded a favicon.ico
this one worked for FF and IE
When I canged it to a .gif picture, FF took the new pictute, but IE took the favicon.ico
Title: Re: Favicon Mod v1.1
Post by: karlbenson on April 11, 2008, 11:40:34 AM
ie7 only supports .ico files.
That is why.
Title: Re: Favicon Mod v1.1
Post by: Darkness_ on April 13, 2008, 03:29:40 PM
I understand that but I'm now using the link for the .gif, but IE automaticly takes the .ico
that's a bit strange
Title: Re: Favicon Mod v1.1
Post by: karlbenson on April 13, 2008, 04:38:57 PM
1. It can get stored in your cache/temporary internet files. So you may need to clear it to get a change to appear.
2. Browsers can attempt to find it automatically. Since IE7 only works with .ico files, it will automatically try to find a favicon.ico in your base domain.
Title: Re: Favicon Mod v1.1
Post by: [кѕ]ваηε-σ on April 14, 2008, 01:48:45 AM
maybe a little off topic, but here's a link to a download page that has the .ico plugin for photoshop. It will allow you to save images in the .ico format.

http://www.telegraphics.com.au/sw/#icoformat
Title: Re: Favicon Mod v1.1
Post by: Marcus Forsberg on April 28, 2008, 02:25:25 PM
Swedish translation

$txt['header_favicon_url'] = 'Favicon Url:';
$txt['header_favicon_url_desc'] = 'M&aring;ste vara en 16x16 png/gif/ico bild
   <br />Anv&auml;nd .ico f&ouml;r b&auml;sta resultat (ex IE7)
   <br />L&auml;mna tomt fouml;r att inaktivera
   <br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Hj&auml;lp</a>)';
Title: Re: Favicon Mod v1.1
Post by: scottps6 on May 03, 2008, 03:52:57 PM
this doesn't work for me, are there any other modifications required for 1.1.5?  I have a custom themes settings but have added the code and get the section to fill in on the settings page but it does not seem to work.

Great mod if I can get it working though!
Title: Re: Favicon Mod v1.1
Post by: scottps6 on May 03, 2008, 03:54:46 PM
cancel that! it does work, just don't put "www." in the url
Title: Re: Favicon Mod
Post by: b33z on July 06, 2008, 02:48:11 AM
Quote from: Pegasys on March 13, 2007, 10:23:23 AM
Yes. Just adding that one line of code... and also replacing the default favicon.ico in the domain's root folder, does everything that this mod is supposed to do. Except, of course, allow you to set or change the name & type of the favicon in your admin panel. However, if you are going to change your favicon, you will have to upload/FTP the new file to your site anyway. And as long as the new favicon file has the same name, etc, it will be used automatically without and need to change code or settings in your admin panel. So I don't really see the use for this mod.

I supose it might be helpful to those who only use the default theme and are not comfortable manually editing the index.template.php file to add that single line of code. But its also one more setting in the database that has to be continually read-in... and who needs that minor bit of overhead if not neccessary?
i completely agree.

Quote from: Pegasys on March 13, 2007, 10:23:23 AM
No, I couldn't get this mod to work so I uninstalled it. Just that single code line added to the index.temeplate.php should get the icon to show in the FF2 tabs. At least, that's what it took for me to finally get the FF tabs to show the icon.
same* as me

Quote from: Pegasys on March 13, 2007, 10:23:23 AM
Its quite possible that different solutions are required for different hosts as all hosts do things differently. Its also possible that this mod was tested and works fine on all hosts that are set up similarly to the mod author's host. That would explain why it apparently does not work for so many others.


* We do know that IE 6 defaults to looking for a favicon.ico in the root folder of the domain. It uses this favicon to display in the Favorites and the address box/bar.

* Firefox 2 also seems to use the root folder favicon for its address bar and Bookmarks. But not the tabs.

* On my host, a default favicon.ico file of the host's logo was already installed in the domian root folder. Yet, even when I replaced it with a custom icon for my website, FF2 still displayed the host's default icon on the tabs. I'm not sure where FF2 was getting it from. But adding that single line of code apparently over-rode whatever default FF2 was using and my site icon finally displayed in the FF2 tabs.
again, the same* situation i was in.

*= I use FF 3

in the end, i too just used the "link rel" method. worked perfect. gonna keep it that way.
thanks to all.
Title: Re: Favicon Mod v1.1
Post by: DirtRider on July 27, 2008, 01:55:05 PM
Quote from: scottps6 on May 03, 2008, 03:52:57 PM
this doesn't work for me, are there any other modifications required for 1.1.5?  I have a custom themes settings but have added the code and get the section to fill in on the settings page but it does not seem to work.

Great mod if I can get it working though!

Same here  :( not working
Title: Re: Favicon Mod v1.1
Post by: citizenerased on August 20, 2008, 02:26:53 PM
very good a mod. thanks :)
Title: Re: Favicon Mod v1.1
Post by: Deal on August 20, 2008, 02:33:58 PM
Quote from: [кѕ]ваηε-σ on April 14, 2008, 01:48:45 AM
maybe a little off topic, but here's a link to a download page that has the .ico plugin for photoshop. It will allow you to save images in the .ico format.

http://www.telegraphics.com.au/sw/#icoformat

A great open source alternative is XnView: see feature list here:

http://pagesperso-orange.fr/pierre.g/xnview/enfeatures.html
Title: Re: Favicon Mod v1.1
Post by: Dariano on August 25, 2008, 06:00:20 AM
I'm using another theme, not the Babylon one. But when I install and apply the mod there is one big chunk of error message on the top of the forum. Anybody knows how to fix this and let the Favicon appear?

Thanks in advance.
Title: Re: Favicon Mod v1.1
Post by: cqinzx on September 19, 2008, 09:15:33 PM
Thank you for this mod.  I really appreciate it. Now my site looks more like my theme. 7hanks

BTW: this mod also works on 1.1.6
Title: Re: Favicon Mod v1.1
Post by: Neo_TE on October 01, 2008, 02:08:29 PM
Yes.

This MOD works with 1.1.6 and also with dilbermc theme.

Thank You Very Much.

:D
Title: Re: Favicon Mod v1.1
Post by: ccbtimewiz on October 01, 2008, 08:38:57 PM
That's because I took control of the mod and released a small fix for the entire 1.1.x series. :P

I plan on updating it further for SMF 2.0. Along with my other mods. :)
Title: Re: Favicon Mod v1.1
Post by: karlbenson on October 01, 2008, 08:40:11 PM
Thanks for taking over this mod ccbtimewiz
Title: Re: Add Favicon (favories/bookmark icon)
Post by: ccbtimewiz on October 01, 2008, 08:42:48 PM
Anytime Karl. Thanks for letting me take it over. :)
Title: Re: Add Favicon (favories/bookmark icon)
Post by: mr703himself on October 01, 2008, 09:34:29 PM
i got the mod to work but i have this above my banner

$txt['header_favicon_url'] = 'Favicon Image URL:'; $txt['header_favicon_url_desc'] = 'Must be a 16x16 png/gif/ico image
Use .ico for best compatibility (eg IE7)
Leave blank to disable
(Help)';

how do i remove this?

www.allbeatz.com is my site and ull see what i mean
Title: Re: Add Favicon (favories/bookmark icon)
Post by: ccbtimewiz on October 01, 2008, 09:39:30 PM
Open ./Themes/default/languages/modifications.english.php

Move the ?> tag to the end of the file with nothing after it.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: mr703himself on October 01, 2008, 09:50:23 PM
Quote from: ccbtimewiz on October 01, 2008, 09:39:30 PM
Open ./Themes/default/languages/modifications.english.php

Move the ?> tag to the end of the file with nothing after it.

i did that and nothing happend

the file looks like this

Quote
$txt['header_favicon_url'] = 'Favicon Image URL:';
$txt['header_favicon_url_desc'] = 'Must be a 16x16 png/gif/ico image
   <br />Use .ico for best compatibility (eg IE7)
   <br />Leave blank to disable.
   <br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Help</a>)';
?>

did i do it right?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: ccbtimewiz on October 01, 2008, 09:51:11 PM
Do the same for modifications.english-utf8.php
Title: Re: Add Favicon (favories/bookmark icon)
Post by: mr703himself on October 01, 2008, 10:46:08 PM
ok thanx, i fixed it
Title: Re: Add Favicon (favories/bookmark icon)
Post by: justjim on November 10, 2008, 11:43:58 AM
I tried to install this mod through the Package Manager and received an error

Type Action Description
1. Execute Modification ./Themes/default/Settings.template.php Test successful
2. Execute Modification ./Themes/default/../babylon/Settings.template.php Skipping file
3. Execute Modification ./index.php Test failed
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
7. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file

Do you have any suggestions?

Thanks in advance

Edit: Forgot to mention I already have Add Favicon.ico Support 1.0 
Installed, should I remove it first then install the Favicon 1.2   package?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: ccbtimewiz on November 10, 2008, 02:21:08 PM
Could you attach your index.php file?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: DirtRider on November 11, 2008, 12:27:12 AM
Why do you need a mod to do this. All I do is place the favicon.ico in my root of my forum and it just works straight off.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: ccbtimewiz on November 11, 2008, 05:16:55 PM
Quote from: DirtRider on November 11, 2008, 12:27:12 AM
Why do you need a mod to do this. All I do is place the favicon.ico in my root of my forum and it just works straight off.

I'm tired of answering this exact question over and over again.

READ THIS: http://www.simplemachines.org/community/index.php?topic=236748.0
Title: Re: Add Favicon (favories/bookmark icon)
Post by: justjim on November 12, 2008, 10:00:43 PM
ccbtimewiz

Thank you for your help. I've attached the requested file  :)
Title: Danish translation
Post by: gnowak on November 14, 2008, 10:32:52 AM
Hi. I have added a Danish translation for this mod.

Should I post it here or somewhere else?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: justjim on December 02, 2008, 08:53:03 AM
ccbtimewiz

Not to rush, but I uploaded the requested file. I was wondering when you might have a chance to look at it.

Thanks
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Gonzalo on January 04, 2009, 01:42:36 AM
Translation to Spanish

Author Traducción: GonZa-Design (http://www.foro-area51.com.ar/profile/?u=1) o Gonzalo (http://www.simplemachines.org/community/index.php?action=profile;u=171288)




Available languages: spanish, spanish-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8




Download (http://www.4shared.com/file/78793231/35de8f17/Favicon_v12__Spanish_by_GonZa-Design.html)




I hope it serves them.

Greetings! GonZa.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: DarN71 on March 05, 2009, 12:30:31 PM
Well, I couldn't get this to work at all. I found a way though.

In Sources/Load.php, find:
// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';

Add after:
// Favicon Edits
if (!empty($settings['header_favicon_url']))
{
if(preg_match('~http://(?:.*?)\.(png|ico|gif)(?:\?(?:.*?)|)~i', $settings['header_favicon_url'], $type))
{
// Append to html headers
$context['html_headers'] .= '
<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);
}
}

With this code in index.php, no header was ever added - don't know what's going on.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: robbie93 on March 26, 2009, 03:39:53 PM
Installed the mod but there is no option in current theme to apply the addy for the favicon?

Edit :   fixed :D
Title: Re: Add Favicon (favories/bookmark icon)
Post by: PHPLearner on March 30, 2009, 01:44:21 PM
Quote from: robbie93 on March 26, 2009, 03:39:53 PM
Installed the mod but there is no option in current theme to apply the addy for the favicon?

Edit :   fixed :D

What did you do to get it robbie? Tanks, Dave
Title: Re: Add Favicon (favories/bookmark icon)
Post by: robbie93 on March 30, 2009, 02:14:29 PM
Hi dave,   I just installed the mod manually using the parser from the mod page,  after I had finished editing all the files the option to enter the url in current theme appeared  :D

go to the mod page,  select you're version of smf from the drop down then follow the instructions for each file.   http://custom.simplemachines.org/mods/index.php?mod=702

Title: Re: Add Favicon (favories/bookmark icon)
Post by: PHPLearner on March 30, 2009, 02:24:40 PM
Thanks man , I really appreciate it,  :D
Title: Re: Add Favicon (favories/bookmark icon)
Post by: robbie93 on March 30, 2009, 02:39:27 PM
No prob  :D 
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Jez on May 04, 2009, 03:15:28 AM
Quote from: DarN71 on March 05, 2009, 12:30:31 PM


In Sources/Load.php, find:
// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';

Add after:
// Favicon Edits
if (!empty($settings['header_favicon_url']))
{
if(preg_match('~http://(?:.*?)\.(png|ico|gif)(?:\?(?:.*?)|)~i', $settings['header_favicon_url'], $type))
{
// Append to html headers
$context['html_headers'] .= '
<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);
}
}



Hi guys just to clarify the above instruction. Do I need to place the first code 'after' the second one? I thought I'd asked because I'm used to seeing 'replace with' rather than 'add after'.

???
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Lithriel on May 28, 2009, 04:44:05 PM
Thanks so much DarN71!  I am using SMF 2.0 and my load.php file was never altered either!  I even tried reinstalling it in the package manager and nothing happened.

Title: Re: Add Favicon (favories/bookmark icon)
Post by: Father Luke on June 02, 2009, 11:45:25 PM
@ Jez: Yes add after.

For anyone else not able to see this in their custom theme's admin remember to add:

$txt['header_favicon_url'] = 'Favicon Image URL:';
$txt['header_favicon_url_desc'] = 'Must be a 16x16 png/gif/ico image
<br />Use .ico for best compatibility (eg IE7)
<br />Leave blank to disable
<br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Help</a>)';


Before the

?>

in your custom theme's Modifications.english.php file


I love this mod.
Thanks!

(http://www.mysmiley.net/imgs/smile/sign/sign0092.gif)

- -
Okay,
Father Luke
Title: Re: Add Favicon (favories/bookmark icon)
Post by: sombra on June 17, 2009, 01:55:57 AM
i have 2.0 rc1-1 and i installed and everithing went nice but i cant see the favicon

i uploaded the favicon to the main folder and gave the url

www.todoilegal.net/favicon.ico

but no favicon :(

well i verified the Settings.template.php modification its not the problem even in default theme i cant see it
Title: Re: Add Favicon (favories/bookmark icon)
Post by: sombra on June 17, 2009, 10:42:21 PM
favicons today started working for them self xD so thanks for this great mod
Title: Re: Add Favicon (favories/bookmark icon)
Post by: BAMAVAMP on June 28, 2009, 12:22:34 AM
This thing works fine with IE--but I use FF and its not working in FF once I get into the forum/index.php and start browsing around.

Is there a way to fix this in FF? Yes I am using the favicon.ico in everywhere needed.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: TurtleKicker on July 08, 2009, 11:06:58 AM
Trying to use this mod on SMF 1.1.9 and it's only partially working. It installs fine. I created a 16x16 256 color favicon.ico file, set up everything, and it works fine in Opera and Chrome. But nothing shows in Firefox 3.5. I've tried clearing the cache but that doesn't help.

Any thoughts?

I see all sorts of suggestions about manual edits you can do, but if I'm going to start manually-editing files then that defeats the whole point of this mod (and potentially prevents other mods from installing or uninstalling).
Title: Re: Add Favicon (favories/bookmark icon)
Post by: FirefoxyChic on July 22, 2009, 03:15:19 PM
Hi all -
Just need some thought about a weird issue concerning favicon support.
I have added the following lines of code to my index.template.php file:
   if ( $enable_favicon  )
         {
      echo '<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />';
      echo '<link rel="icon" href="/favicon.ico" type="image/x-icon" />';
         }

Added it under this section of code in the header:
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";
// ]]></script>
<title>', $context['page_title'], '</title>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';


I have uploaded the favicon (.ico) file to the main directory as well as the theme directory (just in case), and the icon shows up file in all browsers EXCEPT Safari 4. Now I have done my research and followed the advice to clear Safari's cache, as well as even "resetting" it, and the icon still does NOT show up! And it is not just on my computer, also my client's - he is the one who brought it to my attention. Any thoughts?
It is a mysterious case I know, but there has to be an explanation!
thanks,
Emily G
Title: Re: Add Favicon (favories/bookmark icon)
Post by: CesarManara on July 28, 2009, 03:21:45 PM
Language portuguese_brazilian on SMF 1.1.10.

Original translate by: Joomlamz (http://www.simplemachines.org/community/index.php?action=profile;u=79248)

Modifications.portuguese_brazilian.php
Code (Find) Select
?>
Code (Add Before) Select
$txt['header_favicon_url'] = 'Favicon URL da imagem:';
$txt['header_favicon_url_desc'] = 'Deve estar em 16x16 png/gif/ico imagem
    <br />Utilizar .Ico para a melhor compatibilidade(eg IE7)
    <br />Deixar em branco para desabilitar
    <br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Ajuda</a>)';
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on November 18, 2009, 04:17:31 PM
Thanks for this translation! I have added it to the package =]
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Costa on November 25, 2009, 09:37:52 PM
Aldo, forget the previous portuguese translation from Joomlamz
If you want translations for your mods, please PM to me =)

portuguese_pt

$txt['header_favicon_url'] = 'URL da imagem Favicon:';
$txt['header_favicon_url_desc'] = 'Tem que ser uma imagem com 19x19 pixeis e no formato png/gif/ico
<br />Use o formato .ico para uma melhor compatibilidade (ex IE7)
<br />Deixe em branco para desabilitar
<br />(<a href="http://pt.wikipedia.org/wiki/Favicon" target="_blank">Ajuda</a>)';


portuguese_brazilian

$txt['header_favicon_url'] = 'URL da imagem Favicon:';
$txt['header_favicon_url_desc'] = 'Tem que ser uma imagem com 19x19 pixeis e no formato png/gif/ico
<br />Use o formato .ico para uma melhor compatibilidade (ex IE7)
<br />Deixe em branco para desabilitar
<br />(<a href="http://pt.wikipedia.org/wiki/Favicon" target="_blank">Ajuda</a>)';


No changes to UTF-8, and I change the Wikipedia page to the portuguese version =)
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on November 25, 2009, 09:46:47 PM
Thanks Costa ^^ Will add them soon =]

edit:

Added
Title: Re: Add Favicon (favories/bookmark icon)
Post by: MATTEK on November 25, 2009, 10:24:38 PM
This will not work with the curve color variation themes. Is this something known by the writers or something no one has come across yet? If it's a known issue please let me know how to make it work. Thank you.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on November 26, 2009, 07:31:08 PM
You need to apply manual edits to make this work with custom themes. I have explained how to do this in the download page. SMF 2.0 users need to do something more than 1.1 users.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: MATTEK on November 27, 2009, 02:34:32 PM
I'm having issues with IE8. Does not work. Chrome, Ie7 and below and Firefox all work fine.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on December 09, 2009, 12:05:03 AM
Have you tried putting IE8 in compatibility mode?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Nodaz on December 22, 2009, 03:24:58 PM
I used this mod and it worked like a charm...
BUT i used an animated ico, works in firefox but not in IE 8...
is that typical?
Is there a way yo have both?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: airric00 on December 26, 2009, 05:28:41 PM
I used this from the download section on 2.0 , now where do I put my icon and does this code need to be altered to allow it show?

QuoteCode: [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
   global $context;
   $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;
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on January 01, 2010, 06:30:44 PM
Quote from: UbinTook on December 22, 2009, 03:24:58 PM
I used this mod and it worked like a charm...
BUT i used an animated ico, works in firefox but not in IE 8...
is that typical?
Is there a way yo have both?


tbh, I'm surprised it even worked in FireFox, I thought favicons where supposed to be static images =/

@airric00 What exactly are you trying to do?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: airric00 on January 01, 2010, 09:33:23 PM
Quote from: hadesflames on January 01, 2010, 06:30:44 PM
Quote from: UbinTook on December 22, 2009, 03:24:58 PM
I used this mod and it worked like a charm...
BUT i used an animated ico, works in firefox but not in IE 8...
is that typical?
Is there a way yo have both?


tbh, I'm surprised it even worked in FireFox, I thought favicons where supposed to be static images =/

@airric00 What exactly are you trying to do?

got it to work thanks bro
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Bugo on January 12, 2010, 10:05:08 AM
Russian translation:

$txt['header_favicon_url'] = 'Адрес изображения для создания значка сайта:';
$txt['header_favicon_url_desc'] = 'Изображение должно быть размером 16x16 и иметь тип png/gif/ico
<br />Используйте формат .ico для лучшей совместимости (нп с IE7)
<br />Оставьте пустым, чтобы отключить.
<br />(<a href="http://ru.wikipedia.org/wiki/Favicon" target="_blank">Справка</a>)';
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on January 31, 2010, 03:16:00 PM
Thanks Bugo, I'll add the translation ASAP =]
Title: Re: Add Favicon (favories/bookmark icon)
Post by: mariusfv on February 01, 2010, 05:41:47 PM
I install this mod without errors but i don't have the menu because in that place is the menu with another mod "custom copyright" so i don't see the menu because is another menu in that place.
So can someone help me please ?
SMF 1.1.11

P.S Mod is installed without errors !
10x in advance !


Solved:
I didn't read at mod description that :
Find in Settings.template.php:
'description' => $txt['header_logo_url_desc'],
         'type' => 'text',
      ),


Add after:

array(
         'id' => 'header_favicon_url',
         'label' => $txt['header_favicon_url'],
         'description' => $txt['header_favicon_url_desc'],
         'type' => 'text',
      ),


OMG :))
Title: Re: Add Favicon (favories/bookmark icon)
Post by: mariusfv on February 02, 2010, 12:39:09 PM
Sorry for double post but why is this error ?

Undefined index: header_favicon_url
.....index.php?action=theme;sa=settings;th=1;sesc

Themes/default/Settings.template.php (settings sub template - eval?)
Line: 115

and

Themes/default/Settings.template.php (settings sub template - eval?)
Line: 116

Please help me to resolve this problem
10x

BTW your mod don't Parse from 1.1 to 1.1.11 and in description is avaible for 1.1.11 etc ....
Someone good coder can resolve me the problem with Undefined index: header_favicon_url pls
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on February 07, 2010, 12:10:44 PM
Hmm, I don't get any such error on a fresh 2.0. Can you turn off sub template eval and post what the error says after?

Admin > Configuration > Server Settings...
tick  Disable evaluation of templates  click save, then go back to your error log and post what it says.

As for the 1.1 it parses just fine for me on 1.1.11.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Vincent Volmer on February 19, 2010, 04:04:49 AM
Hello,

I think (not for sure) this mod causes a lot of errors in the log. All the errors are referring to line 200 in index.php ( $context['html_headers'] .= ' ) and this is all around line 200:

// Favicon Edits
global $context;
if (!empty($settings['header_favicon_url']))
{
if(preg_match('~http://(?:.*?)\.(png|ico|gif)(?:\?(?:.*?)|)~i', $settings['header_favicon_url'], $type))
{
//***This is line 199 ***// Append to html headers
$context['html_headers'] .= '
<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);
}

}


Thanks for any help on this. and... I'm running SMF2.0 RC2
Regards,
Vincent


Some of the errors:
URL http://digiscrap.nl/index.php?action=adpro;sa=v&amp;id=2&amp;l=5&amp;m=0&amp;t=1265555860
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?action=adpro;sa=v&amp;id=1&amp;l=8&amp;m=0&amp;t=1265555856
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?action=adpro;sa=v&amp;id=3&amp;l=5&amp;m=0&amp;t=1265555832
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?action=adpro;sa=v&amp;id=4&amp;l=7&amp;m=0&amp;t=1265555825
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?action=adpro;sa=v&amp;id=7&amp;l=1003&amp;m=0&amp;t=1265553176
8: Undefined index: html_headers
File: /shared/usr/wcen7085654/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

Some other errors:

URL http://digiscrap.nl/index.php?action=calendar;sa=post;month=02;year=2010;day=28
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?action=dlattach;attach=202;type=avatar
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200

URL http://digiscrap.nl/index.php?topic=1460.0
8: Undefined index: html_headers
File: /shared/usr/xxxx1234567/DOMAIN/www.digiscrap.nl/HTML/index.php
Line: 200
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Vincent Volmer on February 27, 2010, 04:15:42 PM
Anyone?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on March 05, 2010, 12:07:08 PM
Can you include your index.template.php file?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Vincent Volmer on March 05, 2010, 01:35:01 PM
Hello hadesflames
Thanks for your answer.

Hereby the 2 index.template.php

I didn't know which file you needed. So I posted the files from the default theme and the custom theme. Also the index.php

Regards,
Vincent Volmer
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on March 05, 2010, 09:42:51 PM
The favicon mod doesn't seem to be installed, as the index.template.php file for the default theme should at least have the edits. Try parsing the mod and installing it manually.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: MordyT on March 08, 2010, 09:06:09 PM
Is this good for SMF 2.0RC3?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Eclipse16V on March 14, 2010, 07:35:49 AM
Nice Mod

Thanks

German Lang
$txt['header_favicon_url'] = 'Favicon Bild URL:';
$txt['header_favicon_url_desc'] = 'Bild sollte 16x16 groß sein und als .png/.gif/.ico Format sein.
<br />Nutze .ico für beste compatibilit&auml;t (z.B. IE7)
<br />Leer lassen um kein Favicon zu nutzen.
<br />(<a href="http://de.wikipedia.org/wiki/Favicon" target="_blank">Hilfe</a>)';


German UTF8 Lang
$txt['header_favicon_url'] = 'Favicon Bild URL:';
$txt['header_favicon_url_desc'] = 'Bild sollte 16x16 groß sein und als .png/.gif/.ico Format sein.
<br />Nutze .ico für beste compatibilität (z.B. IE7)
<br />Leer lassen um kein Favicon zu nutzen.
<br />(<a href="http://de.wikipedia.org/wiki/Favicon" target="_blank">Hilfe</a>)';
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on March 15, 2010, 03:47:53 PM
Quote from: MordyT on March 08, 2010, 09:06:09 PM
Is this good for SMF 2.0RC3?

Yes, it works on RC3.

Quote from: Eclipse16V on March 14, 2010, 07:35:49 AM
Nice Mod

Thanks

German Lang
$txt['header_favicon_url'] = 'Favicon Bild URL:';
$txt['header_favicon_url_desc'] = 'Bild sollte 16x16 groß sein und als .png/.gif/.ico Format sein.
<br />Nutze .ico für beste compatibilit&auml;t (z.B. IE7)
<br />Leer lassen um kein Favicon zu nutzen.
<br />(<a href="http://de.wikipedia.org/wiki/Favicon" target="_blank">Hilfe</a>)';


German UTF8 Lang
$txt['header_favicon_url'] = 'Favicon Bild URL:';
$txt['header_favicon_url_desc'] = 'Bild sollte 16x16 groß sein und als .png/.gif/.ico Format sein.
<br />Nutze .ico für beste compatibilität (z.B. IE7)
<br />Leer lassen um kein Favicon zu nutzen.
<br />(<a href="http://de.wikipedia.org/wiki/Favicon" target="_blank">Hilfe</a>)';


Thanks a lot! Added =]
Title: Re: Add Favicon (favories/bookmark icon)
Post by: TheListener on March 16, 2010, 01:39:49 AM
Woohoo

Have a Darth Vader penguin favicon at www.parascifi.net

Have a cows head favicon at www.mkaware.co.uk
Title: Re: Add Favicon (favories/bookmark icon)
Post by: imrich on April 01, 2010, 05:33:09 PM
Thanks for this mod.

It seems to be working as it fixes an issue for me for RC3. I can't have my forum favicon.ico in my root / folder, it must be in my forum folder. This mod fixes that.

When I install it, there are errors in the log:

http://www.myurl.tld/forum/index.php?action=admin;area=packages;sa=install2;package=Faviconv1.3.zip;pid=08: Undefined index: theme
File: /public_html/forum/Sources/Packages.php
Line: 935

Otherwise it seems to be working. Perhaps a bug in "Packages.php"? It can't find the variable 'theme'.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: TheListener on April 01, 2010, 06:02:15 PM
What does the error line say?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: numus on April 05, 2010, 01:14:31 PM
 Details:
Found the web page at:
http://www.sdx-developers.com (44.18 KB)

Found the default favicon (favicon.ico)

Found favicon at:
http://www.sdx-developers.com/favicon.ico (2.49 KB) 

This favicon has 2 images/icons.

   (16*16 pixels, 16777216 max colors)
   (16*16 pixels, 256 max colors)

Could not find a <link ...> tag that specify a favicon.

It isn't showing up in IE 7 tho
Title: Re: Add Favicon (favories/bookmark icon)
Post by: fmofmpls on April 08, 2010, 07:40:41 AM
Hello. Just installed mod on smf 1.11 without any troubles. The add favicon field is there where it should be in current theme> settings. I added the url of my ico file and still no favicon showing? Did I miss something? Using Firefox as my browser.

Thanks!

* update - works now. Problem solved.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on April 19, 2010, 11:03:30 PM
Quote from: imrich on April 01, 2010, 05:33:09 PM
Thanks for this mod.

It seems to be working as it fixes an issue for me for RC3. I can't have my forum favicon.ico in my root / folder, it must be in my forum folder. This mod fixes that.

When I install it, there are errors in the log:

http://www.myurl.tld/forum/index.php?action=admin;area=packages;sa=install2;package=Faviconv1.3.zip;pid=08: Undefined index: theme
File: /public_html/forum/Sources/Packages.php
Line: 935

Otherwise it seems to be working. Perhaps a bug in "Packages.php"? It can't find the variable 'theme'.


I doubt it's my mod, as it does not edit Packages.php
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Arantor on April 20, 2010, 01:50:14 PM
No, that's an SMF RC2 + RC3 bug when you install on non default themes.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Nirose on June 17, 2010, 10:37:40 PM
It doesn't seem to work for me on 1.1.11 as it installed without problems but there isn't any options on the themes and layout page to add a favicon anywhere.

Title: Re: Add Favicon (favories/bookmark icon)
Post by: hadesflames on June 19, 2010, 02:15:49 PM
It's in Admin > Configuration > Current Theme
Title: Re: Add Favicon (favories/bookmark icon)
Post by: shed on June 25, 2010, 03:58:37 PM
Quote from: Arantor on April 20, 2010, 01:50:14 PM
No, that's an SMF RC2 + RC3 bug when you install on non default themes.

im having the same issues. is there a way to fix it?

thanks
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Ned.net on July 05, 2010, 04:13:24 AM
Hi,

thanks for that great mod :)

here's the french translation :


$txt['header_favicon_url'] = 'URL de la Favicon :';

$txt['header_favicon_url_desc'] = 'doit être une image 16x16 png/gif/ico

<br />Préferer .ico pour une compatibilité IE7

<br />Laisser vide pour désactiver

<br />(<a href="http://fr.wikipedia.org/wiki/Favicon" target="_blank">Help</a>)';


hth
Title: Re: Add Favicon (favories/bookmark icon)
Post by: unformatted_ on August 28, 2010, 06:27:18 AM
After successful install cant see where I can configure. Uploaded de ico no root folder, but still not visible. any help?
Title: Re: Add Favicon (favories/bookmark icon)
Post by: klra on November 13, 2010, 05:46:21 PM
This mod would not install as it came (for 1.1.11)

I modded the package-info file, adding 1.1.12

Worked great!

Here is the modded info -

<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Favicon</name>
<id>ccbtimewiz:favicon</id>
<type>modification</type>
<version>1.3</version>
<install for="1.0.15 - 1.99.99, 1.1.12">
<readme type="file" parsebbc="true">readme.txt</readme>
<modification>install.xml</modification>
<modification>languages.xml</modification>
</install>
<uninstall for="1.0.15 - 1.99.99, 1.1.12">
<modification reverse="true">install.xml</modification>
<modification reverse="true">languages.xml</modification>
</uninstall>
<install for=""2.0 - 2.0 RC3"">
<readme type="file" parsebbc="true">readme.txt</readme>
<modification>install2.xml</modification>
<modification>languages.xml</modification>
</install>
<uninstall for=""2.0 - 2.0 RC3"">
<modification reverse="true">install2.xml</modification>
<modification reverse="true">languages.xml</modification>
</uninstall>
</package-info>
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Vladi246 on January 01, 2011, 08:09:34 PM
Anything for RC4 ? How to add favicon ?
Because today i upgraded to RC4 and after that i didn't have  the options to add favicon ,and version not support RC4 !
Do you have info about this is work on RC4 ?
Tanks
Quote from: klra on November 13, 2010, 05:46:21 PM
This mod would not install as it came (for 1.1.11)

I modded the package-info file, adding 1.1.12

Worked great!

Here is the modded info -

<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Favicon</name>
<id>ccbtimewiz:favicon</id>
<type>modification</type>
<version>1.3</version>
<install for="1.0.15 - 1.99.99, 1.1.12">
<readme type="file" parsebbc="true">readme.txt</readme>
<modification>install.xml</modification>
<modification>languages.xml</modification>
</install>
<uninstall for="1.0.15 - 1.99.99, 1.1.12">
<modification reverse="true">install.xml</modification>
<modification reverse="true">languages.xml</modification>
</uninstall>
<install for=""2.0 - 2.0 RC3"">
<readme type="file" parsebbc="true">readme.txt</readme>
<modification>install2.xml</modification>
<modification>languages.xml</modification>
</install>
<uninstall for=""2.0 - 2.0 RC3"">
<modification reverse="true">install2.xml</modification>
<modification reverse="true">languages.xml</modification>
</uninstall>
</package-info>

Title: Re: Add Favicon (favories/bookmark icon)
Post by: Arantor on January 07, 2011, 07:49:42 PM
QuoteBecause today i upgraded to RC4 and after that i didn't have  the options to add favicon ,and version not support RC4 !
Do you have info about this is work on RC4 ?

RC4 comes with its OWN favicon.ico file and support which you should just replace. In other words this mod is no longer needed to be updated.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: imrich on January 14, 2011, 05:36:57 PM
Can you point me to the documentation or details on how RC4 implements favicon support?

I updated my forum from RC3 to RC4 using the large upgrade files, and I don't see any evidence of favicon support.

I previously (in RC3 and others) used this mod to get my favicon working (I can't place the favicon.ico in the wwwroot of my web sever, it must be in the same folder where SMF is installed.

Am I missing something?? Any help would be appreciated.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: imarcoreal on March 09, 2011, 03:53:26 PM
I just Add this package and made the changes, but i dont find any favicon support in the admin panel to change the image.

I use 2.0 rc5.

Regards
Title: Re: Add Favicon (favories/bookmark icon)
Post by: MordyT on March 29, 2011, 01:31:36 PM
Its under current theme settings.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: reap on November 01, 2011, 04:41:31 AM
Quote from: MordyT on March 29, 2011, 01:31:36 PM
Its under current theme settings.
Seems to be that this option is gone in SMF 2.0.1 :( Are there any other solutions to implement a favicon? If I put <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> in the theme's index.template.php or index.php the favicon is visible but the fontsize increased.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: Cereus on December 20, 2011, 10:21:57 AM
There's a edited version by me. Use by your count and risk.

Hugs.
Title: Re: Add Favicon (favories/bookmark icon)
Post by: GigaWatt on May 19, 2018, 01:17:59 PM
Yeah baby, got this working :D. Did the manual edits to my theme (CleanTek) as per the instructions of the author and used the last attachment in this thread ;).

Although, I have to add that it doesn't seem to like .ico files with 8 bit color depth ???. Maybe it's a server issue, who knows. Didn't try with any other color depth, so I just loaded a .png image and it worked :D... except for IE ::).