![]() |
Memberlist -- Custom Profile Field Sorting
Memberlist -- Custom Profile Field Sorting
For vBulletin 3.6.0 Description By default, vBulletin cannot show just a single custom field on the memberlist, nevermind make it sortable. It's all or nothing.. I wanted to display just the location field and make it sortable, because I use the CountryFlag modification. I searched vbulletin.org to see if this was possible, but all that I could find was unanswered questions similarly asking how to do it. So I took it on myself to get something usable and working. Instructions Upload the PLUGIN, and edit it via the Plugin Manager. Find: Code:
case 'urlname': Find: Code:
$sqlsort = 'userfield.fieldX'; Now you have 2 templates to edit. First, memberlist. Find: Code:
<if condition="$show['homepagecol']"><td class="thead" nowrap="nowrap">$vbphrase[home_page]</td></if> Code:
<td class="thead" nowrap="nowrap"><a href="$sorturl&order=DESC&sort=urlname&pp=$perpage$usergrouplink">Title</a> $sortarrow[urlname]</td> Now edit the memberlist_resultsbit template. Find: Code:
<if condition="$show['homepagecol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['homepagelink']"><a href="$userinfo[homepage]" target="_blank"><img src="$stylevar[imgdir_button]/home.gif" alt="home.gif" title="<phrase 1="$userinfo[username]">$vbphrase[visit_xs_homepage]</phrase>" border="0" /></a><else /> </if></td></if> Code:
<if condition="exec_switch_bg()"><td class="$bgclass"><if condition="$userinfo[fieldX]"><div class="smallfont">$userinfo[fieldX]</div></if></td></if> Final Comment It's not pretty, it's not clever but it works.. :p |
This is an extremely useful addition. Thanks for sharing, I will certainly use it!
|
This is a great mod! thanks so much. =)
|
Thanks a lot.
|
Good job dude !! Installed ;)
|
Am I missing something? In 3.6, if you go into User profile Field Manager and edit the custom profile field, there is an option to show that field (or not) on the Members List as well as make it searchable......
|
Quote:
I wasn't aware that you could have a single custom field on the memberlist as opposed to all of them by default though. Then again, I didn't really play around with it too much.. ;) |
This is a great hack and I have it installed. I would like to also add the ability though to sort by this custom field in "advanced search" though. In other words...you search on a field with an option to sort the results by the custom field that you added.
|
Is this mod compatible with 3.6.2? Also, I like dknelson's idea!
|
Does this work if I was to search multiple custom fields?
|
Does this work with vb 3.6.5
|
It works on my site.
|
Works on mine now too. Very sweet. Was able to delete additional databases due to this feature. Thank you.
|
Thank you very much!
|
On this part:
Quote:
And what do I do to add more than one custom field that is sortable? |
Bump..........................
|
Does anybody know how to change sort from DESC to ASC when clicking on the link in the forum?
Untill now I only can specify which order to sort at the first click. But it should go revers on click #2. Need some help. |
This works like a charm for v3.8.4
@ganima -- Not possible I guess. Mine will not resort either. Not critical for me though. |
Quote:
|
Does this work with vBulletin 4?
|
Has anyone found a way to get this working on 4.2?
|
Quote:
|
All times are GMT. The time now is 06:02 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|