Memberlist -- Custom Profile Field Sorting
This modification is in the archives.
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.. Download
This modification is archived, downloads are still allowed. Screenshots |