Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
477 views
in Q2A Core by
How can I change some settings for favorite system? Or how can I disable it?
Q2A version: 1.8.4
by
I think all you can do is adjust your theme to hide favorites page elements.

2 Answers

0 votes
by

Ansgar is correct, there's technically no way to disable favoriting. But you can hide the button so that for all intents and purposes it is disabled. Try this CSS:

.qa-favorite-button, .qa-unfavorite-button {
    display: none;
}

+1 vote
by

Override public function page_title_error(), just comment out anything relate to "favorite".

     public function page_title_error()
    {
        if (isset($this->content['title'])) {
            $favorite = isset($this->content['favorite']) ? $this->content['favorite'] : null;

            if (isset($favorite))
                $this->output('<form ' . $favorite['form_tags'] . '>');


            $this->output('<div class="qa-main-heading">');
            $this->favorite();
            $this->output('<h1>');
            $this->title();
            $this->output('</h1>');
            $this->output('</div>');

            if (isset($favorite)) {
                $formhidden = isset($favorite['form_hidden']) ? $favorite['form_hidden'] : null;
                $this->form_hidden_elements($formhidden);
                $this->output('</form>');
            }

        }

        if (isset($this->content['success']))
            $this->success($this->content['success']);
        if (isset($this->content['error']))
            $this->error($this->content['error']);
    }

 

...