![]() |
Someone asked for this hack, it was a simple thing so I took 10 minutes and coded it.
This will show the number of users in each group in the User Groups and Permissions -> Modify #### Changes to "admin/usergroup.php" #### ~ Search for: while ($usergroup=$DB_site->fetch_array($usergroups)) { ~ Add after: //LEADZERO -- number of users per group hack //ADD BLOCK $q_id = $DB_site->query("SELECT username FROM user WHERE usergroupid=$usergroup[usergroupid]"); $mems = $DB_site->num_rows( $q_id ); //END ADD BLOCK ~ Replace: echo "<li>$usergroup[title]". ~ With: //CHANGE LINE //WAS - echo "<li>$usergroup[title]". echo "<li>$usergroup[title] - <i>$mems Members</i>". |
Nice one and valuable. Thanks for sharing it with us. I'll try it on my test board this evening. :)
|
May I suggest changing
Code:
//LEADZERO -- number of users per group hack Code:
//LEADZERO -- number of users per group hack |
Hmmm...
Are you sure thats right? I tried it and now it doesn't show the number... |
Looks right to my naked eye but if ya want you can replace your whole block of code in the modify section of usergroup.php with the following code. It is what will be in beta3/release (whichever it is)
Code:
$usergroups=$DB_site->query("SELECT usergroup.usergroupid, usergroup.title, COUNT(user.userid) as count |
I'm getting this error when I change it into that freddie:
: Using scalar variable $usergroup as an array or object in .. usergroup.php |
fixed it... I forgot something :D
|
All times are GMT. The time now is 07:08 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:
|