Community management insight at ManagingCommunities.com

Bookmark and Share

Fix The "Top Ten Posters" Memberlist Option

Fix The "Top Ten Posters" Memberlist Option

Postby drathbun » April 30th 2005, 3:16 pm

The "Top Ten Posters" option on memberlist.php has been "broken" since phpBB 2.0.4 was released. If you select the top ten, wouldn't you expect to see the members with the most posts? But since the default sort order is "Ascending", that doesn't happen unless you select "Descending". Way back in 2.0.3, it worked. But, in the 2.0.4 released, it was broken.

On the other hand, perhaps it is not considered "broken" but a feature instead. In any case, here is the fix if you want your "Top Ten Posters" option to always be the ten members with the most posts.

open memberlist.php
find
Code: Select all
        case 'topten':
                $order_by = "user_posts $sort_order LIMIT 10";

Replace with
Code: Select all
        case 'topten':
                $order_by = "user_posts DESC LIMIT 10";


So I'm not classifying this as a "bug" as some folks might not agree with me, but I thought I would post it as it just seems to make more sense.
<php echo $signature; ?>
User avatar
drathbun
Experienced User
 
Posts: 422
Joined: June 10th 2003, 4:31 am

Return to phpBB 2: Customizing Your phpBB

Who is online

Users browsing this forum: No registered users and 0 guests