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)
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.
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.
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
Didn't work for me. ??
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.
I already manually moded but the icon don't show eventhough pointed correctly in Admin->Current Theme Setting
Working for me 1.1.2 thanx
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
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!
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
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.
I see now. Thanks very much for all the useful info _Pegasus.
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.
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.
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.
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.
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.
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?
For several reasons
its not always picked up on all servers.
You might not be allowed to upload to the base url.
Any updates for 1.1.3?
It should work for 1.1.3 as is.
-ALM
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 .....
It works if you edit the pack_info.xml and change install/uninstall for version 1.1.3
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 ;)
Your Welcome. Thanks for using smf.. :P
What do I do with the package_info.xml and stuff? how do I edit that?
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
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?
Where does it show that error?
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.
Works perfectly. Excellent mod. Wouldn't have a clue how to do this otherwise. Thank you! :-*
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?
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.
me and my friend are using IE7
its a .gif image
and it doesnt work for either of us lol
whats the forum url?
whats the url to the image?
www.jades-world.com/forums (http://www.jades-world.com/forums)
(http://i18.photobucket.com/albums/b108/yuk75/flavicon.gif)
I can't see why its not working.
Please can you try with another image?
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
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
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
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?
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.
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 ;)
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
good deal working for 1.1.3?
yeah it works perfectly
just not on IE....though if it works on IE for you let us know!! lol
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.
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;
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
please attach your index.template.php and I'll have a look at it.
Here we go. :)
instead of
<title>', $context['page_title'], '</title>';
you have
<title>', create_title(), '</title>';
So you will need to manually add this mod
Thank you.
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 !
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?
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" />
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
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.
thanks karl! u got great mods! u are a real smf hero!
I second that ;)
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.
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
I also don't know why. I have tried several ways but still no good result.
Anyway, how SMF Admin mod for this forum?
it works brilliant for me
put the favicon in its place, then go to the current theme and link it up :D
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.
I upload several folders and put the pink. Still nothing. ::)
doesn't work for me either ! smf 1.1.3
I'm using for 4 websites: 1.1.2, 1.1.3 and 1.1.4, all cannot.
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)
Then how this SMF (the current we are browsing) is working in IE. I'm using IE7. I can see SMF icon working!
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 ;)
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.
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.
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.
Brenda, did you ever get back into your site? I have the same problem with mine and the exact same errors!
why not pm them, they may not return to this topic
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
Apologies for not responding.
Please see my signature.
Thanks
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 !!!
What did you end up having to do, Minas? Reupload the whole theme and start from scratch?
nothing like that , still can't make it work myself yet ...
If got way to do, just inform us.
will do ! ;D
nop , doesn't work , favicon not showing (smf 1.1.3) ! help ...
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)
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
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 ! ;)
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
it shows the gif ? strange ! does IE support gif avatars ?
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
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 ?
once you have it up it does show on members IE, I tested it
Im trying to convert all my members to FF lol
lol , i tested it too and it works ! also works with pngs !
Cool
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.
Doesn't seem to be much of a problem with FF, It's IE their having the problems
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.
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
Quote from: karlbenson on November 30, 2007, 09:24:31 PM
....
IE6 only supports favicons on bookmarks.
..
Working here on IE7 just fine!
simplemachines uses an .ico
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?
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>
Just installed it and works fine great mod
I use IE7 and it showed imidiately after installation
Gr Jurgen
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.
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?
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.
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
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
OK, thanks for that.
Will give that a go.
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
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>
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 :)
still doesn't work for me
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.
To use don't insert "www". eg. www.yousite.com (not use).. this correct is: http://yousite.com
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
ie7 only supports .ico files.
That is why.
I understand that but I'm now using the link for the .gif, but IE automaticly takes the .ico
that's a bit strange
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.
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
Swedish translation
$txt['header_favicon_url'] = 'Favicon Url:';
$txt['header_favicon_url_desc'] = 'Måste vara en 16x16 png/gif/ico bild
<br />Använd .ico för bästa resultat (ex IE7)
<br />Lämna tomt fouml;r att inaktivera
<br />(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Hjälp</a>)';
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!
cancel that! it does work, just don't put "www." in the url
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.
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
very good a mod. thanks :)
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
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.
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
Yes.
This MOD works with 1.1.6 and also with dilbermc theme.
Thank You Very Much.
:D
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. :)
Thanks for taking over this mod ccbtimewiz
Anytime Karl. Thanks for letting me take it over. :)
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
Open ./Themes/default/languages/modifications.english.php
Move the ?> tag to the end of the file with nothing after it.
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?
Do the same for modifications.english-utf8.php
ok thanx, i fixed it
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?
Could you attach your index.php file?
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.
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
ccbtimewiz
Thank you for your help. I've attached the requested file :)
Hi. I have added a Danish translation for this mod.
Should I post it here or somewhere else?
ccbtimewiz
Not to rush, but I uploaded the requested file. I was wondering when you might have a chance to look at it.
Thanks
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.
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.
Installed the mod but there is no option in current theme to apply the addy for the favicon?
Edit : fixed :D
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
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
Thanks man , I really appreciate it, :D
No prob :D
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'.
???
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.
@ 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
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
favicons today started working for them self xD so thanks for this great mod
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.
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).
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
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
?>
$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>)';
Thanks for this translation! I have added it to the package =]
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 =)
Thanks Costa ^^ Will add them soon =]
edit:
Added
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.
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.
I'm having issues with IE8. Does not work. Chrome, Ie7 and below and Firefox all work fine.
Have you tried putting IE8 in compatibility mode?
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?
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;
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?
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
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>)';
Thanks Bugo, I'll add the translation ASAP =]
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 :))
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
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.
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&id=2&l=5&m=0&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&id=1&l=8&m=0&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&id=3&l=5&m=0&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&id=4&l=7&m=0&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&id=7&l=1003&m=0&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
Anyone?
Can you include your index.template.php file?
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
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.
Is this good for SMF 2.0RC3?
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ä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>)';
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ä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 =]
Woohoo
Have a Darth Vader penguin favicon at www.parascifi.net
Have a cows head favicon at www.mkaware.co.uk
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'.
What does the error line say?
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
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.
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
No, that's an SMF RC2 + RC3 bug when you install on non default themes.
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.
It's in Admin > Configuration > Current Theme
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
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
After successful install cant see where I can configure. Uploaded de ico no root folder, but still not visible. any help?
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>
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>
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.
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.
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
Its under current theme settings.
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.
There's a edited version by me. Use by your count and risk.
Hugs.
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 ::).