Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by

1 Answer

0 votes
For this you need a custom plugin.

To make it smoothly working with q2a core point system, you can just give extra BONUS points to users when they answer unanswered questions. So, by answering questions they will simply get a certain points inline with q2a core point system. Plus, for answering unanswered questions they will get a certain extra bonus points with a custom plugin.
Can't we directly add points in this function itself?
Like if result==post id , add bonus points to user.
yes, you can do it. try this.

function is_unanswered ($postid,$userid) {
$result = qa_db_read_one_value(
        'SELECT postid
        FROM ^posts
        WHERE postid=$ AND acount = 0 AND type = 'Q',
        ), true);

$add_amount = 15; //how much bonus you want to award

if ($result == $postid) {
            add_bonus ($userid, $add_amount);
        } else {

function add_bonus ($userid, $add_amount) {
    $current_bonus = qa_db_query_sub(
        'SELECT bonus
        FROM ^userpoints
        WHERE userid=$,
$new_bonus = $current_bonus +$add_amount;

            "UPDATE ^userpoints
            SET bonus = $
            WHERE userid= #",
            $new_bonus ,$userid
Sure I will try this. Thank you

If acount = 0 add amount= 15
If acount = 1 add amount = 5 etc can also be done.
Am I right?
If you do the function, yes you can.