Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
774 views
in Q2A Core by
how only admins and moderators see hide button
Q2A version: 1.5.1

1 Answer

0 votes
by
This is a simple setting in the 'Permissions' section of the admin panel.
by
I think Ambassador means stopping users from hiding their own posts. Is there a way to prevent that?
by
Oh. This would need a plugin which overrides qa_page_q_post_rules(...) by modifying the $rules['hideable'] field.
by
yes, this changes in qa-page-question-view.php works fine , thanks


$level=qa_get_logged_in_level();
if ($level>=QA_USER_LEVEL_ADMIN) {
  $rules['hideable']=(!$post['hidden']) && ($rules['isbyuser'] || !$rules['queued']) &&
            (!$permiterror_hide_show) && ($notclosedbyother || !qa_user_permit_error('permit_hide_show'));
}
by
Hello. I'd like too to prevent users to hide their own posts.
I can't get your code working, could you please tell me where did you put it exactly ? Thank you so much
...