Talk

Difference between revisions of "Changing the site favicon"

From Joomla! Documentation

 
(2 intermediate revisions by 2 users not shown)
Line 24: Line 24:
  
 
This is my experience. Hopefully this is not a fluke, but I don't see how it could be... I tested and re-tested (even with different types of image files uploaded to the favicon converters)... and the end result was still the same. Hope this helps anyone else with this issue & losing the three hours that I lost :) [[User:PalmBeachPulse|PalmBeachPulse]] 23:11, 21 August 2009 (UTC)
 
This is my experience. Hopefully this is not a fluke, but I don't see how it could be... I tested and re-tested (even with different types of image files uploaded to the favicon converters)... and the end result was still the same. Hope this helps anyone else with this issue & losing the three hours that I lost :) [[User:PalmBeachPulse|PalmBeachPulse]] 23:11, 21 August 2009 (UTC)
 +
 +
----
 +
 +
I've tried changing the favicon.ico in the template folders and inserting the code in index.php with this:
 +
 +
<link rel="shortcut icon" href="http://yoursite.com/templates/your_template/icon/favicon.ico" />
 +
 +
yet nothing has changed. Here's another way to change your favicon.ico. Go to
 +
 +
http://yoursite/plugins/system/jat3/base-themes/default/images/favicon.ico
 +
 +
and replace it. I found it working in Firefox, Chrome and Safari.
 +
 +
----
  
 
I found a wonderful way to have it automatically choose between .ico or .gif favicons.  Making the minor change shown, will display the favicon.ico FIRST if present else will display the favicon.gif if present else will fail and just show no favicon as normal.
 
I found a wonderful way to have it automatically choose between .ico or .gif favicons.  Making the minor change shown, will display the favicon.ico FIRST if present else will display the favicon.gif if present else will fail and just show no favicon as normal.
Line 90: Line 104:
 
   21.
 
   21.
 
                       return $contents;
 
                       return $contents;
 +
 +
== Confirm to follow "PalmBeachPulse" 's suggestion ==
 +
 +
I want to say thanks for''' PalmBeachPulse'''. His suggestion is great and correct.
 +
Everyone please follow his instruction.
 +
In brief,  http://converticon.com/, and http://www.favicongenerator.com/ doesn't work for IE. But it works for Chrome.
 +
Just try http://tools.dynamicdrive.com/favicon which work for both IE and chrome.
 +
 +
No matter how many time you delete cookies and cache in IE, it won't work if you don't follow this instruction!!!

Latest revision as of 01:14, 28 June 2012

This works okay for Firefox but doesn't change the favicon in ie7. It must be calling the favicon up from somewhere else in the site other than the template, or the site root, as I have replaced that with my own, and it still finds the Joomla favicon. Also there is no line like

<link rel="shortcut icon" href="http://yoursite.com/templates/your_template/icon/favicon.ico" />

in rhuk_milkyway, the standard Joomla 1.5 template's index.php

This advice is the same given in all documentaion I found on the subject and it isn't right. Surely other users are experiencing this?

This has been reported many times and on all occasions that I am aware of it is down to the browser caching the favicon.ico file. I will look at amending the documentation to include a warning to this effect. Chris Davenport 03:09, 23 September 2008 (EDT)

Ok, looks like this page already contains text describing the issue and what to do about it. Chris Davenport 03:11, 23 September 2008 (EDT)


I found out something that may help anyone with the above issue. I too could not get IE (8) to render the favicon, but Firefox had no problem. After hours of pulling my hair out with refreshing, trying different directories, etc. it occurred to me that my favicon WAS being pulled into the temp internet folder along with any other favicon IE browsed... but the icon picture was not rendering even in Windows (even just viewing the file in the directory through Windows Explorer)... and others were.

After further testing it seems that http://converticon.com/, and http://www.favicongenerator.com/ created favicons that were not recognizable by windows (and therefore IE). http://tools.dynamicdrive.com/favicon/ and http://www.favicon.cc/ do! I Could see the icon in Windows AND the IE favicon works fine now! I don't know if http://www.htmlkit.com/services/favicon/ works or not because their service was down when I tried.

Also, http://antifavicon.com/ works for IE also. You can create a favicon from scratch here if you don't have an image file to upload/convert, but the parameters are limited.

By the way, ALL of the favicons created by these services work in Firefox.

I also realize that this is probably a slightly different issue than the issue of IE still pulling the Joomla favicon when it's actually been replaced. That's a cache issue. If the cache/temp files were truly cleared on your PC, IE would seem to pull nothing if the issue was what happened to me. I have seen a lot of help forum threads out there that talk about the same problem that I had (with no resolution). In those cases I think this is the fix.

This is my experience. Hopefully this is not a fluke, but I don't see how it could be... I tested and re-tested (even with different types of image files uploaded to the favicon converters)... and the end result was still the same. Hope this helps anyone else with this issue & losing the three hours that I lost :) PalmBeachPulse 23:11, 21 August 2009 (UTC)


I've tried changing the favicon.ico in the template folders and inserting the code in index.php with this:

<link rel="shortcut icon" href="http://yoursite.com/templates/your_template/icon/favicon.ico" />

yet nothing has changed. Here's another way to change your favicon.ico. Go to

http://yoursite/plugins/system/jat3/base-themes/default/images/favicon.ico

and replace it. I found it working in Firefox, Chrome and Safari.


I found a wonderful way to have it automatically choose between .ico or .gif favicons. Making the minor change shown, will display the favicon.ico FIRST if present else will display the favicon.gif if present else will fail and just show no favicon as normal. add

                                               $icon =   $dir . 'favicon.gif';
                       if (file_exists( $icon ))
                       {
                               $path = str_replace( JPATH_BASE . DS, , $dir );
                               $path = str_replace( '\\', '/', $path );
                               $this->addFavicon( JURI::base(true).'/'.$path . 'favicon.gif' );
                               break;
                       }

in /public_html/libraries/joomla/document/html/html.php

so it looks like.

  1.
                     foreach ($dirs as $dir )
  2.
                     {
  3.
                             $icon =   $dir . 'favicon.ico';
  4.
                             if (file_exists( $icon ))
  5.
                             {
  6.
                                     $path = str_replace( JPATH_BASE . DS, , $dir );
  7.
                                     $path = str_replace( '\\', '/', $path );
  8.
                                     $this->addFavicon( JURI::base(true).'/'.$path . 'favicon.ico' );
  9.
                                     break;
 10.
                             }
 11.
                                                     $icon =   $dir . 'favicon.gif';
 12.
                             if (file_exists( $icon ))
 13.
                             {
 14.
                                     $path = str_replace( JPATH_BASE . DS, , $dir );
 15.
                                     $path = str_replace( '\\', '/', $path );
 16.
                                     $this->addFavicon( JURI::base(true).'/'.$path . 'favicon.gif' );
 17.
                                     break;
 18.
                             }
 19.
                     }
 20.
      
 21.
                     return $contents;

Confirm to follow "PalmBeachPulse" 's suggestion[edit]

I want to say thanks for PalmBeachPulse. His suggestion is great and correct. Everyone please follow his instruction. In brief, http://converticon.com/, and http://www.favicongenerator.com/ doesn't work for IE. But it works for Chrome. Just try http://tools.dynamicdrive.com/favicon which work for both IE and chrome.

No matter how many time you delete cookies and cache in IE, it won't work if you don't follow this instruction!!!