Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+8 votes
584 views
in Plugins by
edited by

Q2A can award points for accepting answers, but it does so indiscriminately, even if the accepted answer is from the user posting the question. For my own Q2A forum I wanted the person accepting an answer to be awarded points only if they accepted someone else's answer, so that users wouldn't game the system by posting lots of trivial questions and accepting their own answers (not that I'd have to worry about people doing that ATM, but anyway).

Initially I simply patched the respective query in qa-include/db/points.php, but that is suboptimal as the change doesn't survive software updates. So I wrote a plugin for this as finger practice while I'm learning PHP:

https://github.com/ansgarwiechers/q2a-no-self-accept-points

Enjoy.

The plugin overrides the function qa_db_points_calculations(). If there is a better way of doing this: feel free to suggest.

Update:

The plugin now also enforces the default behavior of not awarding "having your answer selected as the best" points for accepting self-answers.

Q2A version: 1.8.5
by
AFAIK that's the only way :)
by
i will try tonight. Does it block both points?
by
It blocks "selecting an answer for your question" points from being awarded for accepting self-answers. It does not block "having your answer selected as the best" points from being awarded (I believe Q2A already does that by default for self-answers).

Please log in or register to answer this question.

...