View Full Version : Users display
killerkraft
09-24-2009, 09:40 PM
Hello,
I tried to look everything in here and found no answer to this :
Is there a way to selectively change the result of the $activeusers array ?
i.e., on the whats going on box, i want it to appear sorted by name, position
AdminA, AdminB, ModA, Modb, UserA, UserB and so on...
Could this be done ?
Lynne
09-24-2009, 11:15 PM
The query to grab the users is around line 444 of index.php. You may be able to hook into the forumhome_loggedinuser_query location with a plugin and add a GROUP BY addition to the query. I haven't used that much in queries, so I'm not real familiar with it.
killerkraft
09-25-2009, 09:52 AM
I see it now, just before // memory saving.
Unfortunately i do not know how to do such a thing...
Could someone else give a hand?
Lynne
09-25-2009, 02:08 PM
Play with it on a test site. Like I said, you can probably use GROUP BY - MySQL Tutorial - Group By (http://www.tizag.com/mysqlTutorial/mysqlgroupby.php)
Something like:
$hook_query_where = 'GROUP BY whatever';
(Problem is going to be sorting them the way you want - admins, then mods, etc. That's going to actually require a bit more coding. There used to be a mod that did this, did you search?)
killerkraft
09-25-2009, 04:19 PM
I did search but found nothing.
In any case, i will try and make some changes myself then post the result here, ok ?
Just let me read and try.
KK
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.