Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
948 views
in Q2A Core by
edited by

This question has been edited (all altered portions are bold):

I'd like to only allow the question's author and the super moderator to select the 'best answer'.

 

I've read an old post, which I can't find at the moment, where it was pointed out that choosing the "Best Answer" can be limited, at best, to [Admins & Mods] + question's author (i.e. threadstarter).  I would simply like to limit it further to [Super Admins] + question's author.  Is there ANY possible way to do this short of modifying the core code? 

 

 

 

(This is a separate, but closely related question:  How can I cause selecting the "Best Answer" for any and all questions to be an irreversible process?)

 

 

 

Thanks in advance! smiley

 

Q2A version: 1.7.3

1 Answer

+2 votes
by
selected by
 
Best answer
One way to manually do this would be to look in the database in the qa_options table, for the option "permit_select_a". Then update that number to the corresponding value of the constants from qa-include/app/options.

So for super admins, that would be 0. Or for admins it's 20.

However, I'm not sure that would be very stable... the next time you save anything on the Admin>Permissions page is may overwrite that value.
by
Well, thank you for your suggestion/time Scott!  I will be the "Guinea pig", no offense to the Guineans, of course.  I see what you are saying, as the Q2A core has a predefined set of values on the Permissions page.  Perhaps in the future (in your copious free time, LOL!) you might consider changing all the permission selection drop-downs to multi-select dropdowns or rows/columns of checkboxes, to better customize the final product.  Just a general suggestion.

Thank you kindly, sir!
by
edited by
I set 'qa_options' >> 'permit_select_a'  to = 0 ( think it was 40 or 20 originally, as I had it set to [Mods & Admins] ).  I never revisited the permissions page in the admin panel, for the reason that you mentioned.  Still, Admins and Mods are free to select and deselect the best answer for any question.  So, I returned to the database to double-check what was going on, and 'permit_select_a' was still set to zero (0).  I don't believe that this issue falls under the instability problem that you previously (understandably) expected in your answer, but it defiantly seems strange.

I should also mention that, since I also do not want to implement comments whatsoever, I set the Admin>>Permissions>>"Adding comments" set to 'Registered users with enough points' and then set the newly added option that appears when that was selected, called: Users must have: [_____] points, to some number like "999999", IOW all but impossible to realistically reach!  But my admin, mod and S.Admin can still add comments as they please.  I was pointed to this dropdown option menu as a way of 'turning off' comments altogether, which I assumed, from the options presented, that I had effectively done, but I seem to be missing something...

EDIT: Just to be clear I changed the comments permissions as described in the second paragraph several days BEFORE I changed the database option 'permit_select_a' to zero (0) that you recommended for the best answer issue.  Like I said I've not went back to the permissions page since then (i.e. the paragraphs are not ordered chronologically in time!)
by
I've made a note to look at the Permissions page again. I think you are right, we should allow setting admins only for those permissions.

Regarding comments, if you don't want comments at all you can turn those off in Admin>Posting, the option "Allow comments on answers".
...