I do not want to sort according to views.Sort by the number of votes should be.
You can look in the sourcecode where the query is executed. Find the place where the sorting is done and then change to another sorting, like you wish
I do not understand. Which will make changes to the php file?
Goto class.voting.plugin.php on line 458:
and change $DiscussionModel->SQL->OrderBy('d.CountViews', 'desc');