Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
1.2k views
in Q2A Core by
Q2A version: 1.5

1 Answer

+7 votes
by
edited by
1. You need to upload your favicon.ico to the root folder of your Q2A script.
2. In your advanced theme add such a function:
function head_custom()
{
    $this->output('<link rel="shortcut icon" href="favicon.ico">');
}

I think it is a lack in Q2A system, that favicon is not defined by default.
Could you add this code and default favicon to the core, GidGreen ?
by
Thanks Krzysztof Kielce... :) It really solved my Problem
by
If the favicon.ico is in the root directory of your website, you shouldn't need to refer to it in any way from the HTML. Browsers look for it there automatically.
by
Not all. I use Ch 16, FF 3.6, IE 8. And only under Chrome favicon is detected when I don't put the above mentioned meta tag. Maybe it is a localhost issue - I didn't test it online. However it would be nice to be working in all possible environments, isn't it ?
by
Thanks Gidgreen... It would be great if you can answer my query posted on this link
http://www.question2answer.org/qa/12189/user-profile-page-with-image
by
I think it must be a localhost issue, since I see favicons for other sites in other browsers without the tag. Anyway, you can also do this without an advanced theme by using the admin setting "Custom HTML in <HEAD> section of every page".
by
Hi Gidgreen... I used this function

function head_custom()
{
    $this->output('<link rel="shortcut icon" href="favicon.ico">');
}

and it worked...
by
Gooda! You are right, Gidgreen, favicon works without metatag when online (at least on Ch 16, FF 3.6, IE 8).
by
I tried to use this technique but it didn't work.
I have installed question2answer 1.5 on an offline Wordpress blog. Since I'm using the default theme, I added a qa-theme.php file to the Default directory.
I then uploaded the favicon file inside the main folder of Question2Answer.
Finally I pasted in the php file only the following content:
<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function head_custom()
        {
            $this->output('<link rel="shortcut icon" href="logosquare.ico">');
        }   
       
    }

However, the favicon is not shown. What could it be the cause?
by
No idea why. Try changing logosquare.ico into favicon.ico.
by
Thank you, it worked, although strange.
...