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

How to modify this code via plugin?

 

if (qa_opt('sort_answers_by')=='votes') {
foreach ($answers as $answerid => $answer)
$answers[$answerid]['sortvotes']=$answer['downvotes']-$answer['upvotes'];
 
qa_sort_by($answers, 'sortvotes', 'created');
 
} else
qa_sort_by($answers, 'created');
 
Also how to call more than one answer list with different sorting like by created and by votes to gether.

Please log in or register to answer this question.

...