Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
937 views
in Q2A Core by

https://github.com/felladrin/online-visitors-counter

This show how many users are online and also on which page users are.

But if you try it on your site there is little problem with https

Any solution for that?

BTW I already asked the problem to the owner ,,so I think maybe the problem is with Q2A

Q2A version: 1.8

1 Answer

0 votes
by
function head_script()
    {
        if ($this->template != 'admin') // check it's not an admin page
            $this->content['script'][]='<SCRIPT src="'.
            qa_html(QA_HTML_THEME_LAYER_URLTOROOT.'ovc/counter.js').
            '" TYPE="text/javascript"></SCRIPT>';

        qa_html_theme_base::head_script();
    }


is this right code and where to put this?
by
class qa_html_theme_layer extends qa_html_theme_base
{
    

    function head_script() // add a Javascript file from plugin directory
    {
        if ($this->template=='question') // check it's a question page
            $this->content['script'][]='<SCRIPT src="'.
            qa_html(QA_HTML_THEME_LAYER_URLTOROOT.'online/ovc/counter.js').
            '" TYPE="text/javascript"></SCRIPT>';

        qa_html_theme_base::head_script();
    }

    
}
...