News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

how to Change Favicon?

Started by snoweye, November 27, 2013, 12:04:15 PM

Previous topic - Next topic

snoweye

Ive honestly tried everything and I dont know why my favicon still wont change.

I added the <link rel="icon" type="image/x-icon" href="/favicon.ico" /> code everywhere and nothing happens
also my forums didnt come with a default favicon for some reason so I couldnt just replace it with a new one :/ maybe there is but under a different name!

some help would be appreciated thanks! :)

Don Jajo

Honestly, you don't need to add any code :)

Just replace your favicon.ico with the one in your SMF directory

Don Jajo

Quotemy forums didnt come with a default favicon for some reason

I don't get that, all SMF has SMF default favicon

kat

'course, for the new favicon to show, you might need to clear both your browser's cache and your forum cache (Forum Maintenance). :)

snoweye

I tried what you said with the cache but it didnt work :(

Sir Osis of Liver


- Remove the code you added 'everywhere'.

- Delete any .ico files in your forum root.

- Upload your new favicon .ico file to forum root.

- Admin -> Forum Maintenance -> Empty the file cache

- Clear your browser cache.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

snoweye

Tried that, still hasnt changed It didnt work :/

my sites www.codemagic.x10host.com if you wanna check out the favicon

Sir Osis of Liver


Don't know what you're doing/not doing, but try this -

In index.template.php:



// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<link rel="search" href="', $scripturl, '?action=search" />
<link rel="contents" href="', $scripturl, '" />
<link rel="shortcut icon" href="favicon-e.ico" />';



The .ico file must be in forum root, not theme directory.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Bigguy

It takes a bit of time for it to change but it will if you just wait for it.

Oldiesmann

Michael Eshom
Christian Metal Fans

uny2bld

Quote from: Oldiesmann on November 27, 2013, 10:23:04 PM
www.codemagic.x10host.com/favicon.ico returns a "404 not found" error for me...
I get the same message when I enter this at teh end of my forum name "/favicon.ico"

br360

If all else fails, there is always this mod that will easily add a favicon- http://custom.simplemachines.org/mods/index.php?mod=1510

Sir Osis of Liver


Either the file name is incorrect, or you put the file in the wrong place.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

uny2bld

^ Nice!  I'll try that on my forums when I get home :)

Oldiesmann

Quote from: br360 on November 27, 2013, 10:32:47 PM
If all else fails, there is always this mod that will easily add a favicon- http://custom.simplemachines.org/mods/index.php?mod=1510

That mod simply adds a setting for you to enter the URL to your favicon. If you put a favicon.ico file in the root of your forum directory, 99% of browsers will pick it up automatically with no extra code needed.
Michael Eshom
Christian Metal Fans

snoweye

Quote from: Oldiesmann on November 27, 2013, 10:40:03 PM
Quote from: br360 on November 27, 2013, 10:32:47 PM
If all else fails, there is always this mod that will easily add a favicon- http://custom.simplemachines.org/mods/index.php?mod=1510

That mod simply adds a setting for you to enter the URL to your favicon. If you put a favicon.ico file in the root of your forum directory, 99% of browsers will pick it up automatically with no extra code needed.
I already had that mod installed with the link to my favicon which is www.co.do.am/favicon1.ico

Quote from: Oldiesmann on November 27, 2013, 10:23:04 PM
www.codemagic.x10host.com/favicon.ico returns a "404 not found" error for me...

for some reason it was doing the same thing to me... it would make sense if i put www.codemagic.x10host.com/"a file that i have" would bring me to it but i always get that page so I had to get a different host to upload pictures so i made the site www.co.do.am to have short links for some of my stuff.


Arantor

Cross domain favicons usually don't work out.

The only real way to do this is to actually pay for hosting where you have proper control of such things.

snoweye

Quote from: Krash. on November 27, 2013, 09:49:16 PM

Don't know what you're doing/not doing, but try this -

In index.template.php:



// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<link rel="search" href="', $scripturl, '?action=search" />
<link rel="contents" href="', $scripturl, '" />
<link rel="shortcut icon" href="favicon-e.ico" />';



The .ico file must be in forum root, not theme directory.



Just tried that, I have the .ico file on the first page that I can possibly have if thats what you mean by forum root?
I searched for index.template but I could only find it in the default theme section are you saying that  im supposed to have one outside of the themes too or something?  ??? ???

Sir Osis of Liver


If you put the .ico file in the forum root (where agreement.txt is), browsers should pick it up without any code.  I use that code in index.template.php if I have theme specific favicons, so that each theme shows a matching favicon.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

So I actually went to the site to see what was going on and was confronted by an obnoxiously large background image that 95% of which can't be seen anyway.

But I don't see any code, which means we're back to putting favicon.ico on the site in the same folder where index.php and SSI.php are (and agreement.txt)

Advertisement: