1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Favicon?

Discussion in 'XenForo Questions and Support' started by Travis, Oct 6, 2010.

  1. Travis

    Travis Active Member

    How do we install a Favicon? Does it have to go in a certain folder,because I put it in the Forum Root,but no luck.
     
  2. Peggy

    Peggy Well-Known Member

    It usually does go in the forum root, and takes a few hours to show up.
    Also try clearing your cache and cookies.
     
  3. Travis

    Travis Active Member

    ok,thank you! :)
     
  4. Caelum

    Caelum Well-Known Member

    Yeah, what peggy said. Also, if you want to make it show up faster for yourself, visit http://yourforumroot.com/favicon.ico (eg visit the file itself) and hit ctrl f5 a couple of times. Tends to do the trick ;)
     
    farmglitch and Peggy like this.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Browsers love to cache those images, so you might not see the new image in your browser if you have already bookmarked it.

    Also, I often have to add a reference to the page head:

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    Code:
    <!DOCTYPE html>
    <html id="XenForo" class="Public {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'}">
    <head>
        <meta charset="utf-8" />
        <xen:if is="{$requestPaths.fullBasePath}"><base href="{$requestPaths.fullBasePath}" /></xen:if>
        
        <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
        
        <link rel="stylesheet" type="text/css" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;d={$visitorStyle.last_modified_date}" />
        <!--XenForo_Require:CSS-->
    
        <xen:include template="google_analytics" />
        <xen:include template="page_container_js_head" />
        
        <xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
        <xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
        <LINK REL="SHORTCUT ICON" HREF="http://xenforo.com/favicon.ico">
    </head>
    <body>
    
    Change the HREF appropriately.
     
    RamzanHD, Dadparvar, maszd and 13 others like this.
  6. Peggy

    Peggy Well-Known Member

    I added your code, Jake, and changed the address of course, to mine. Right now it's showing only the XF favicon.
    I'm waiting for mine to show up.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  8. Peggy

    Peggy Well-Known Member

    Oh good. I don't see it yet, and have cleared my cache. As long as someone sees that it's working, I'm good. :)
    Thanks!
     
  9. Peggy

    Peggy Well-Known Member

    Yayyy my heart is showing now. [​IMG]
     
  10. Learner

    Learner Member

    Thanks, it helped me too.
     
  11. Shyuan

    Shyuan Well-Known Member

    Sorry to dig this a little old post. I just uploaded my favicon to forum root. It appears to be the favicon even I did not have this line in all my forum skins' PAGE_CONTAINER templates. May I know how does my site detects the favicon? Is there any settings for it to auto detect or something? Thanks.

     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Change the href to point to the image you uploaded.
     
  13. Shyuan

    Shyuan Well-Known Member

    Hi Jake,

    Thanks for your reply. But, I was wondering why my favicon is already shown? o_O (even without that line of code in my template)

    Thanks.
     
  14. MagnusB

    MagnusB Well-Known Member

    Most browsers autodetect the favicon in your root folder, that html is just there as a safeguard if somebody uses a browser that does not. Also, it is useful if you want to place your favicon outside of your root folder.

    Browsers tend to heavily cache the favicons though, which is why you need to do a hard refresh several times before it is updated. I have even seen that hard refreshing the direct link to your favicon does not always update it.
     
  15. Shyuan

    Shyuan Well-Known Member

    Heya MagnusB, thank you for your explanation! :D
     
  16. Gabby

    Gabby Well-Known Member

    Where is the control for adding a favicon in the acp?

    Thanks
     
  17. MagnusB

    MagnusB Well-Known Member

    There is none, AFAIK, you can do it by editing the PAGE_CONTAINER template as Jake suggested above or just overwriting the default one
     
    Gabby likes this.
  18. Gabby

    Gabby Well-Known Member

    argg... ok thanks.
     
  19. Amadeus

    Amadeus Member

    Does this adjustment work for the admin pages too?
     
  20. Jeremy

    Jeremy XenForo Moderator Staff Member

    No. The admin pages have their own PAGE_CONTAINER template.
     

Share This Page