List Site Contributors
[resolved] Sort by Number of Posts (5 posts)

  1. fredwier
    Posted 3 years ago #


    I really like this plug-in since I was looking for a way to display the guest writers listed on a page.

    I've managed to change most of it to what I really need.

    I've deleted the alpha sorting and searching on last name, which I don't need. Also made some changes to the css file so it looks better on my template.

    BUT, the thing I'm looking for is: How to sort the contributors on the amount of posts they have published.

    The idea behind it is quite simple, put the number one poster on top, etc. and it will create a kind of competition between the writers (publishers), so they will add more content to be on top of the list.

    Any suggestion ?

    Thanks, Fred


  2. mallsop
    Plugin Author

    Posted 3 years ago #

    Thanks and cool.

    Rough SQL example:
    SELECT users.*, count( posts.user_id ) AS posttotal
    FROM posts LEFT JOIN users ON users.id=posts.user_id
    GROUP BY posts.user_id
    ORDER BY posttotal desc

    Or see the replies here:

  3. fredwier
    Posted 3 years ago #


    I understand you're SQL example, now I've to see what is the best place to put it into your code.

    Any suggestion on that ?

  4. mallsop
    Plugin Author

    Posted 3 years ago #

    You should rewrite the SQL $query in the code around line 344 since you do not want $searchletter but just want all users sorted by top posts. Replace that query with yours.

  5. fredwier
    Posted 3 years ago #

    thanks, will give it a try

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List Site Contributors
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.