View Full Version : Sort memberlist by location
dknelson
11-19-2014, 01:04 PM
Is there a mod out there that allows you to sort the memberlist by location or a custom field? I've created a dropdown menu for people to select their state or province but it is not sortable from the members list. There was a mod for 3.8 that called custom profile field sorting or something like that. I've looked at it but it doesn't appear that it would work for VB4.
If there's not a mod, does anybody know how you would manually edit the memberslist template to add it to a particular field?
ozzy47
11-19-2014, 01:51 PM
What's the link to the vB3 version?
nerbert
11-19-2014, 03:30 PM
Here's an experiment I tried:
hook location: "memberlist_fetch", in memberlist.php, line 596
if($_GET['sortbyloc'] == 'sort') {
$sqlsort = 'userfield.field10';
}
My location field is "field10"
so add "&sortbyloc=sort" to the memberlist URL and I think it'll work.
This is lousy programming but it gets you started
dknelson
11-19-2014, 04:10 PM
What's the link to the vB3 version?
This is the one I used for 3.8.
https://vborg.vbsupport.ru/showthread.php?t=124580
--------------- Added 1416420878 at 1416420878 ---------------
Here's an experiment I tried:
hook location: "memberlist_fetch", in memberlist.php, line 596
if($_GET['sortbyloc'] == 'sort') {
$sqlsort = 'userfield.field10';
}
My location field is "field10"
so add "&sortbyloc=sort" to the memberlist URL and I think it'll work.
This is lousy programming but it gets you started
I'm certainly not a coder. I don't completely understand what you are saying. Are you talking about two different edits? Thanks. You say that you experimented with it, did it work?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.