The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
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]"> <a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a> <if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if> </td> Code:
<td class="alt2Active"> $userinfo[field5] </td> |
#3
|
||||
|
||||
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! |
#4
|
||||
|
||||
Yes. In memberlist.php, just some lines below the place where you added the code there is
PHP Code:
PHP Code:
|
#5
|
||||
|
||||
seems to have made no change :ermm: maybe something else?
|
#6
|
||||
|
||||
Yeah, there is another default being set earlier in memberlist.php
FIND PHP Code:
PHP Code:
|
#7
|
||||
|
||||
Voila! all worky now! thanks so much for your persistent help....
|
#8
|
||||
|
||||
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!
|
#9
|
||||
|
||||
anyone else care to help me with this?
|
#10
|
|||
|
|||
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! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|