Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.1k views
in Q2A Core by
Hi,

I wish for only admins to be able to post questions to Q2A.

At the moment, I have just hidden the top-askbox in css with a "display: none;"

Of course, if I do this the box never appears for anyone, but how would I show it when an admin is logged in?

Thanks,

Dale.
by
Addition : If I change "Administration center - Permissions" for "Asking questions" to make it only for "Experts, Editors, Moderators, Admins" then this works, but the box always appears but fails with a permissions notice for non-admins etc.. I'd rather the box was just only shown for admins. Thanks.
by
Are you using widget? or custom form?
by
i am using the Orange Candy theme, so I guess my answer is custom form - I'm certainly not using the ask box widget. Thanks.

1 Answer

0 votes
by
selected by
 
Best answer

In Orange Candy theme/ qa-theme.php on line #155 find below code

if (($this->template != 'admin') AND ($this->template != 'ask')):

Replace with

if (($this->template != 'admin') AND ($this->template != 'ask') AND (qa_get_logged_in_level() > QA_USER_LEVEL_EXPERT )):

This will only allow admins

by
Excellent, thanks.
...