PDA

View Full Version : Change default memberlist order to top posters


boatdesign
02-10-2004, 04:50 PM
Currently when you visit memberlist.php you get an alphabetical display.

How difficult would it be to change memberlist.php so the default display (without passing parameters to it) would be by the number of posts (top posters)?

First I think this rewards those who are most active instead of those who simply begin with the letter A. Second it might help reduce the spam signups who sign up with a name like !!!-00-aa-spam in order to get to the top of the memberlist :(

Andreas
02-10-2004, 04:56 PM
In memberlist.php FIND

if ($sortfield == '')
{
$sortfield = 'username';
}


REPLACE that with


if ($sortfield == '')
{
$sortfield = 'posts';
}



Done.

boatdesign
02-10-2004, 08:05 PM
Thank you very much KirbyDE!

Roody
03-07-2004, 04:14 PM
In memberlist.php FIND

if ($sortfield == '')
{
$sortfield = 'username';
}


REPLACE that with


if ($sortfield == '')
{
$sortfield = 'posts';
}



Done.

How do you edit this so it shows the top poster and not the ones starting with Zero posts? Currently the above change lists zero posters first.

boatdesign
03-07-2004, 06:12 PM
if ($sortfield == '')
{
$sortfield = 'posts';
}
if ($sortorder == '')
{
$sortorder = 'desc';
}

Change 'asc' to 'desc'