![]() |
hacking memberlist file...Help please
i needed to move one of my custom profile fields (which was "company name") to be the first column in the member list instead of the username being first. i did it using this:
http://www.vbulletin.com/forum/showthread.php?t=112058 .......now i need to have it sort alphabetically by this field as well... can anyone help me do what Jake suggest and modify the memberlist.php file to sort by my "field 5" as well? I need this very badly for my site! thanks for your help |
In memberlist.php FIND
PHP Code:
PHP Code:
Set your Company Name field to NOT show up on members list In template memberlist FIND Code:
<td class="thead" align="$stylevar[left]" nowrap="nowrap"><a href="$sorturl&order=ASC&sort=username&pp=$perpage&ltr=$ ltr$usergrouplink">$vbphrase[username]</a> $sortarrow[username]</td> Code:
<td class="thead" nowrap="nowrap"><a href="$sorturl&order=ASC&sort=companyname&pp=$perpage&ltr=$ltr$usergrouplink">Company Name</a> $sortarrow[companyname]</td> Code:
<td class="alt1Active" align="$stylevar[left]" id="u$userinfo[userid]"> Code:
<td class="alt2Active"> |
ahhh perfect. i'll be glad when i've learned enough to accomplish things like that on my own. one more quick question. can i make it defualt to be sorted by that field when a user first visits the member list link? as it stands now, it is still sorted by username by default.
thanks so much for your help and quick response! |
Yes. In memberlist.php, just some lines below the place where you added the code there is
PHP Code:
PHP Code:
|
seems to have made no change :ermm: maybe something else?
|
Yeah, there is another default being set earlier in memberlist.php ;)
FIND PHP Code:
PHP Code:
|
Voila! :D all worky now! thanks so much for your persistent help....
|
Hey KirbyDE, can you help Warhorse and I get the alpha search at the top of the memberlist page to sort by the added userfield, in this case, "company name" instead of by the username? It'd be greatly appreciated!
|
anyone else care to help me with this?
|
also looking for help getting the alpha search at the top of the memberlist page to sort by the added userfield.
any suggestions would be welcome! |
I had a functionality requirement similiar to btappan's, but I needed the custom field to only be visible to those users who had permissions to view private custom fields.
To accomplish this, I modified KirbyDE's hack. I'm reposting Kirby's hack with my modifications (I hope this is proper procedure - this is the first time I've posted code) - thanks KirbyDE!! The following steps will set up your Member List to display the Company Name (user field 5 in this example) as the first column and sort by it if the user has permissions to see private custom fields (assuming that user field 5 is a private custom field of course ;) ), and display the default Member List if the user does not have permissions to see private custom fields. In memberlist.php FIND PHP Code:
PHP Code:
PHP Code:
PHP Code:
Set your Company Name field to NOT show up on members list In template memberlist FIND Code:
<td class="thead" align="$stylevar[left]" nowrap="nowrap"><a href="$sorturl&order=ASC&sort=username&pp=$perpage&ltr=$ ltr$usergrouplink">$vbphrase[username]</a> $sortarrow[username]</td> Code:
<if condition="$permissions['genericpermissions'] & CANSEEHIDDENCUSTOMFIELDS"> Code:
<td class="alt1Active" align="$stylevar[left]" id="u$userinfo[userid]"> Code:
<if condition="$permissions['genericpermissions'] & CANSEEHIDDENCUSTOMFIELDS"> The following will allow the alpha search at the top of the memberlist page to sort by the added userfield. In memberlist.php FIND PHP Code:
PHP Code:
|
I figured out how to get the alpha search at the top of the memberlist page to sort by the added userfield, check my previous post for the new code...
|
On these same lines I want to sort by additional profile fields in the membership list.
I have one field named Membership Number and one membership renewal date. Using phpMyAdmin I see 'vb3_profilefield' If I browse profileid id #5 is Membership Number and id#6 is Membership renewal. How would I apply Code:
switch ($sortfield) |
All times are GMT. The time now is 05:02 AM. |
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:
|