PDA

View Full Version : Custom Profile Fields -- How To Sort In Memberslist?


Masked Crusader
03-04-2008, 08:23 PM
Hey guys.

I have added several text-based Profile Fields and I would like my users to be able to sort them alphabetically via the Members List, just like the User Name does by default.

How would I go about doing this?

Thanks.

MoT3rror
03-05-2008, 01:08 AM
When you edit a profile field, you can change the order of the fields.

baderandsonsco
03-07-2008, 01:40 AM
I see this is an old thread. I figured I would search before starting a new one, however, this doesn't really answer the question.

I don't want to change the display order as they appear on the memberslist, I want the users to be able to click the Custom Category Field (as a link), and have it sort ASC, DESC - just like the username Category field.

Explaination
In the template:
memberlist
There is a line that sets the username as a sortable category.


<td class="thead" align="$stylevar[left]" nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=username&amp;pp=$perpage$userg rouplink">$vbphrase[username]</a> $sortarrow[username]</td>


Now since the memberlist_results_header handles the custom fields you find in the template:
memberlist_results_header
Default:
<td class="thead" nowrap="nowrap">$customfield</td>
Modified:

<td class="thead" nowrap="nowrap">
<a href="$sorturl&amp;order=ASC&amp;sort=$customfield&amp;pp=$perpage$u sergrouplink">$customfield</a>
$sortarrow[customfield]
</td>


Now that spits out a link looking like:

http://blah/blah/forums/memberlist.php?&order=ASC&sort=Location&pp=30


It obviously doesn't like the sort=Location (Location being the $customfield).

Is there anyway to do this easily without writing new code into the memberslist.php? and if not, a little help on the code would be great.

baderandsonsco
03-08-2008, 12:20 PM
shameful bump. Can anybody help with this?

baderandsonsco
03-10-2008, 03:27 PM
Another very shameful bump.

Any insight, even if not a solution would GREATLY help. Thank you to anybody who tries to tackle this problem.

pnd
03-11-2008, 08:25 PM
I'll bump this too - as I am trying to figure this out myself.

--------------- Added 1205270874 at 1205270874 ---------------

I found this a while ago - I tried to use this mod, but it made my member list page wider to the point it didn't look right. Maybe this will work for the rest of you.

https://vborg.vbsupport.ru/showthread.php?t=124580

baderandsonsco
03-16-2008, 11:34 PM
Very cool. Thank you very very much. :D