Advertisement:

Author Topic: how to Change Favicon?  (Read 12359 times)

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
how to Change Favicon?
« on: November 27, 2013, 12:04:15 PM »
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! :)

Offline Don Jajo

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • PHP Coder! :D
    • donjajo on Facebook
    • 2netlodge - Technology Forum
Re: how to Change Favicon?
« Reply #1 on: November 27, 2013, 12:22:37 PM »
Honestly, you don't need to add any code :)

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

Offline Don Jajo

  • Jr. Member
  • **
  • Posts: 111
  • Gender: Male
  • PHP Coder! :D
    • donjajo on Facebook
    • 2netlodge - Technology Forum
Re: how to Change Favicon?
« Reply #2 on: November 27, 2013, 12:23:55 PM »
Quote
my forums didnt come with a default favicon for some reason

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

kat

  • Guest
Re: how to Change Favicon?
« Reply #3 on: November 27, 2013, 01:51:31 PM »
'course, for the new favicon to show, you might need to clear both your browser's cache and your forum cache (Forum Maintenance). :)

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #4 on: November 27, 2013, 07:08:09 PM »
I tried what you said with the cache but it didnt work :(

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,932
  • Too long in the wasteland
Re: how to Change Favicon?
« Reply #5 on: November 27, 2013, 07:28:25 PM »

 - 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.


Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #6 on: November 27, 2013, 07:47:27 PM »
Tried that, still hasnt changed It didnt work :/

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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,932
  • Too long in the wasteland
Re: how to Change Favicon?
« Reply #7 on: November 27, 2013, 09:49:16 PM »

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

In index.template.php:

Code: [Select]

// 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.


Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,307
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • SMF Helper
Re: how to Change Favicon?
« Reply #8 on: November 27, 2013, 10:14:09 PM »
It takes a bit of time for it to change but it will if you just wait for it.
Tell us....Whats Ur Beef

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: how to Change Favicon?
« Reply #9 on: November 27, 2013, 10:23:04 PM »
www.codemagic.x10host.com/favicon.ico returns a "404 not found" error for me...
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline uny2bld

  • Jr. Member
  • **
  • Posts: 119
Re: how to Change Favicon?
« Reply #10 on: November 27, 2013, 10:27:22 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"

Online br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 1,979
    • GenXcommunity
Re: how to Change Favicon?
« Reply #11 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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,932
  • Too long in the wasteland
Re: how to Change Favicon?
« Reply #12 on: November 27, 2013, 10:34:39 PM »

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


Offline uny2bld

  • Jr. Member
  • **
  • Posts: 119
Re: how to Change Favicon?
« Reply #13 on: November 27, 2013, 10:35:14 PM »
^ Nice!  I'll try that on my forums when I get home :)

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: how to Change Favicon?
« Reply #14 on: November 27, 2013, 10:40:03 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
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #15 on: November 27, 2013, 11:01:52 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

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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,910
    • Arantor on GitHub
Re: how to Change Favicon?
« Reply #16 on: November 27, 2013, 11:02:55 PM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #17 on: November 27, 2013, 11:10:09 PM »

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

In index.template.php:

Code: [Select]

// 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?  ??? ???

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,932
  • Too long in the wasteland
Re: how to Change Favicon?
« Reply #18 on: November 27, 2013, 11:14:31 PM »

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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,910
    • Arantor on GitHub
Re: how to Change Favicon?
« Reply #19 on: November 27, 2013, 11:18:41 PM »
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)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #20 on: November 27, 2013, 11:26:06 PM »
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)

can you show me a picture of this because I've tried my site on 3 different browsers and it all comes up fine :/


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.



just moved it where agreement.txt is and still no favicon, Im not joking like I used to have a different site the exact same 2 years ago and changing the favicon was the least of my problems. I figured it out by myself pretty quick I donno whats going on now

can one of you possibly connect with me on TeamViewer and check it out?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,932
  • Too long in the wasteland
Re: how to Change Favicon?
« Reply #21 on: November 27, 2013, 11:30:31 PM »

What is the url to the favicon file?


Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #22 on: November 27, 2013, 11:34:09 PM »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,910
    • Arantor on GitHub
Re: how to Change Favicon?
« Reply #23 on: November 27, 2013, 11:36:58 PM »
Which now exists and now works. It just might take time to show up.

As for the background picture, do you *really* need a 1.2MB picture in the background? I run a narrowish screen (about 1000px wide) and I don't even see the sides of the image lurking outside the forum frame.

1.2MB for an image is ridiculously oversized and for anyone going to your site it's going to take time to download and slow everything down.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,995
  • Gender: Male
    • Kindred-999 on GitHub
Re: how to Change Favicon?
« Reply #24 on: November 27, 2013, 11:38:43 PM »
wow....   no image used for a website should be larger than a few hundred KB at most....
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #25 on: November 27, 2013, 11:55:53 PM »
Which now exists and now works. It just might take time to show up.

As for the background picture, do you *really* need a 1.2MB picture in the background? I run a narrowish screen (about 1000px wide) and I don't even see the sides of the image lurking outside the forum frame.

1.2MB for an image is ridiculously oversized and for anyone going to your site it's going to take time to download and slow everything down.

lol my bad im fixing that right now. that came straight from photoshop so thats probably why lol

Offline snoweye

  • Semi-Newbie
  • *
  • Posts: 59
Re: how to Change Favicon?
« Reply #26 on: November 28, 2013, 01:26:49 PM »
The background is 400kb now ill probably be making it smaller

my favicon shows up now tho! thanks for the help :P!

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,226
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: how to Change Favicon?
« Reply #27 on: November 11, 2017, 01:46:18 AM »
thank you for the post.

Changed favicon on root folder and emptied the cache under maintanance menu , bottom

And new favicon loaded in few seconds.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline Irisado

  • Doc Coordinator
  • SMF Hero
  • *
  • Posts: 8,969
  • Soñando debajo del arco iris
Re: how to Change Favicon?
« Reply #28 on: November 11, 2017, 08:39:35 AM »
It's good to know that the information was useful for you, but this topic is four years old and marked as solved.  Please avoid reviving such old topics in future.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente