AFemaleProdigy
08-24-2009, 05:31 PM
Hey everyone!
So I created a new custom profile field and I used some custom code in the memberlist and memberlistresultsbit templates that now displays that single custom field (not all custom fields) in the memberlist.
The field I created was for the user's two letter state of residence. It's "field7". I would like to put a sort arrow on the title "state" just like the one on "username" that will sort the members by state.
I have tried to figure it out on my own and look it up on the net, but no good. All I can find are plugins for older vB versions and I don't want to install them. I don't even know if it works with the new vB. So if anyone can help me out, I would appreciate it. I'm running 3.8.3.
I was able to copy the sort arrow from the username column, but of course no matter what I do... it still sorts the username instead of the state. :confused:
This is what I have in memberlist template...
<td class="thead" nowrap="nowrap"><a href="$sorturl<if condition="!$show['sorturlnoargs']">&</if>order=ASC&sort=state&pp=$perpage$usergrouplink">$vbphrase[state]</a> $sortarrow[state]</td>
This is what I have in memberslist_resultsbit template...
<td class="$bgclass">$userinfo[field2]</td>
--------------- Added 1251139871 at 1251139871 ---------------
nevermind... it's working now!
So I created a new custom profile field and I used some custom code in the memberlist and memberlistresultsbit templates that now displays that single custom field (not all custom fields) in the memberlist.
The field I created was for the user's two letter state of residence. It's "field7". I would like to put a sort arrow on the title "state" just like the one on "username" that will sort the members by state.
I have tried to figure it out on my own and look it up on the net, but no good. All I can find are plugins for older vB versions and I don't want to install them. I don't even know if it works with the new vB. So if anyone can help me out, I would appreciate it. I'm running 3.8.3.
I was able to copy the sort arrow from the username column, but of course no matter what I do... it still sorts the username instead of the state. :confused:
This is what I have in memberlist template...
<td class="thead" nowrap="nowrap"><a href="$sorturl<if condition="!$show['sorturlnoargs']">&</if>order=ASC&sort=state&pp=$perpage$usergrouplink">$vbphrase[state]</a> $sortarrow[state]</td>
This is what I have in memberslist_resultsbit template...
<td class="$bgclass">$userinfo[field2]</td>
--------------- Added 1251139871 at 1251139871 ---------------
nevermind... it's working now!