Navigation

Pligg Support

I am working on the logic and queries in the /libs/search.php and am almost done but I need some feedback to fine-tune the end result.

As it is now, the sort by Most Upvoted, Most Downvoted and Most Commented are not working well.

1- The stories of a private group are included in the result
2- The pagination is erroneous as it is based on the total of the stories and not on the total of the corresponding query result, thus we get empty pages in the pagination.
3- In the Most Commented, the story is displayed for the numbers of its comments, to a maximum of 5. (it should be grouped)
4- The Most Upvoted still displays some stories with votes equal zero

I need information on:

1- Are the 3 above mentioned Sort supposed to return the results based on the Page (I.e. filter to link_status = new if on the New page and link_status = published if on the index/published Page) or keep the filter as it is now: filter for both?
2- Does Most Upvoted mean: “all the stories that acquired votes, including the auto vote if set, or should we filter:
a. If auto_vote is set to true, then we filter for stories having votes > 1 to accurately reflect the stories that have been upvoted. And if auto_vote is set to false then > 0?
3- The Most Downvoted should display the stories with minus (-) votes and not discarded yet, and/or the stories with 0 votes and reports > 0

Please provide me with the information so that I finish fixing the code and submit the solution.

Thank you!