Sort user list by name

18 years 4 months ago #1110 by rick
benjamin,

Thanks for the post. It was not the answer to my problem but it got me to thinking and looking around in the files.

To fix this problem in myPMS enhansed and probably the other varients of myPMS open open.php in the Components/com_pms directory. At around line 254 find the line

if($cb_use=='1') $query="SELECT t1.username,t1.name FROM #__users AS t1, #__comprofiler AS t2 WHERE t1.block!='1' AND t2.approved='1' AND t2.confirmed='1' AND t1.username!='$my->username' AND t1.id=t2.user_id ORDER BY username";

and change it to

if($cb_use=='1') $query="SELECT t1.username,t1.name FROM #__users AS t1, #__comprofiler AS t2 WHERE t1.block!='1' AND t2.approved='1' AND t2.confirmed='1' AND t1.username!='$my->username' AND t1.id=t2.user_id ORDER BY name";

then find at line 255

else $query="SELECT username,name FROM #__users WHERE block!='1' AND username!='$my->username' ORDER BY username";

and change it to

else $query="SELECT username,name FROM #__users WHERE block!='1' AND username!='$my->username' ORDER BY name";


Rick

Running:
Joomla! 1.0.7 Stable
Community Builder 1.0 rc2
SMF 1.1 RC2

Please Log in to join the conversation.

18 years 4 months ago #1141 by irgendwer
Replied by irgendwer on topic Re:PMS Enhanced: Re:Sort user list by name
hey rick
i sent an instant message to the "creator" of the pms enhanced component and in the moment i'm searching the Thread in the joomlaportal forum.
I am German so it might be easier to find something.
I hope the creator will write me back.

When i have found a solution i will post it here.

South Korea's got Seoul

Please Log in to join the conversation.

18 years 4 months ago #1143 by irgendwer
Replied by irgendwer on topic Re:PMS Enhanced: Re:Sort user list by name
I found something, but i don't know if it's the right thing. I'm not really used to coding.

In this Thread at post #38 he tells somebody how to change the list that behind the usernames the real names appear.
Maybe you just have to modify it like that.

from
[code:1]$users.=">$row1->username</option>"; [/code:1]

to
[code:1]$users.=">$row1->name</option>"; [/code:1]

he said that this should be in line 159.

I hope this was some help for you.

Post edited by: irgendwer, at: 2005/12/01 23:58

South Korea's got Seoul

Please Log in to join the conversation.

18 years 4 months ago #1145 by rick
Mey irgendwer,

Thanks for your assistance in this but I must not have made my post very clear. In the above post I gave the fix to show the user list alphabetically by name instead of by username. In other words it's fixed.

Now what would be really nice is if you have a dialog with the programmer is to have the ability to change this in the admin page instead of having to hack it. If you look at the config page the second item is "Format Userlist:" which allows you to change which way to display the user list. I would like to see another option under that labled "Sort Userlist:" with the option of Username or Real Name.

What do you think?

Rick

Running:
Joomla! 1.0.7 Stable
Community Builder 1.0 rc2
SMF 1.1 RC2

Please Log in to join the conversation.

18 years 4 months ago #1182 by irgendwer
Replied by irgendwer on topic Re:PMS Enhanced: Re:Sort user list by name
He said that there will be a the new version 1.3 in a view days.
He will think of the feature you want to have and maybe include it.
So just be patient. B)

South Korea's got Seoul

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.257 seconds

Facebook Twitter LinkedIn