MOD download & history

This mod is a fix for original phpbb2, it works when you look up a large usergroup, here on mods.db9.dk without this mod it takes +30 sek to look up the group "everyone" details. after this mod is applyed it takes approx 1 sek

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

useful

yes
17
89%
no
0
No votes
don't know
2
10%
 
Total votes : 19

MOD download & history

Postby Niels on Fri 05. Sep, 2003 01:03

Code: Select all
##############################################################
## MOD Title:          Large groups fix
## MOD Author:         Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Description:    This mod will solves preformance problems when
##                     looking up large groups. e.g. looking up group memebers
##             or changeing group permission
## MOD Version:        1.1.2
## MOD Compatibility:  2.0.6
##
## Installation Level: Easy
## Installation Time:  2 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:      4
##      groupcp.php
##   admin/admin_ug_auth.php
##   templates/subSilver/auth_ug_body.tpl
##   language/lang_english/lang_admin.php
##
## Included Files:     0
##
##############################################################

This mod have been requested by my self....

I have notised that, if a usergroup did have meny users, the details of the group took a very long time to get.
The reasoon why, is that original phpbb2 does fetch ALL users data, belonging to the group before showing the users.

usually only the first 15 or 30 usernames are showen, so there is really no reasoon to wait for this.

this MOD is rather a FIX more than a mod, it makes the groupcp.php fetch only those userdata witch are needed.

here on mods.db9.dk, I have a large usergroup (everyone) at pressent it holds +10.000 users, when looking up this usergroup it used to take +30 sek, now after this FIX it takes less than 1 sek.

This MOD is now upgraded to also fix some isues in ACP (group permission, on large usergroups)
Last edited by Niels on Fri 19. Mar, 2004 23:01, edited 5 times in total.
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Thu 18. Dec, 2003 21:48

-=ET=- have improved the how-to
new version is 1.0.1.

no code have changed so no upgrade info availble.
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 20. Jan, 2004 14:16

I have now upgraded this mod to version 1.1.0
at same time I have changed the MOD's name from "faster groupcp" into "Large groups fix" as this is more correct, now that it fixes several files.

I have now included a fix to ACP aswell.
here on mods.db9.dk, I wasen't able to lookup the group permission for the usergroup "everyone" since this group holds +10000 users, and my "small" server coundn't cope with it.

now after this FIX, it does it in a split second.

to upgrade: you will need to do the changes into these files, as described in the how-to:

lang_admin.php
admin_ug_auth.php
auth_ug_body.tpl

if you have large usergroups, you may now notice a speed preformance in ACP, if you look up this usergroups permissions
(in fact is also applys to user permission, but since it is very reare that a user is a member of meny usergroups (more than 100), this will not be something you will notice.)
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Mon 01. Mar, 2004 23:11

a user have reported a bug witch have been corrected.
there was a problem displaying pending users if the usergroup was empty.
version 1.1.1. solves this.

to upgrade:
in file groupcp.php
Code: Select all
[FIND]
// Start replacement - Faster groupcp MOD
$sql = "SELECT count(*) as total
   FROM " . USER_GROUP_TABLE . "
   WHERE group_id = $group_id AND user_id <> " . $group_moderator['user_id'] . "
      GROUP BY user_pending ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Error getting user count information', '', __LINE__, __FILE__, $sql);
}
$counting_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$members_count = $counting_list['0']['total'];
$modgroup_pending_count = $counting_list['1']['total'];
// End replacement - Faster groupcp MOD

[REPLACE WITH]
// Start replacement - Faster groupcp MOD
$sql = "SELECT SUM(user_pending=0) as members, SUM(user_pending=1) as pending
   FROM " . USER_GROUP_TABLE . "
   WHERE group_id = $group_id AND user_id <> " . $group_moderator['user_id'] . "
      GROUP BY user_pending ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Error getting user count information', '', __LINE__, __FILE__, $sql);
}
$counting_list = $db->sql_fetchrow($result);
$members_count = $counting_list['members'];
$modgroup_pending_count = $counting_list['pending'];
// End replacement - Faster groupcp MOD
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Fri 19. Mar, 2004 22:40

I have updated this mod to version 1.1.2. , there was a problem update pending members, after the lates release 1.1.1.

to upgrade:
in file groupcp.php
Code: Select all
[FIND]
AND ug.user_pending = 1
AND u.user_id = ug.user_id
ORDER BY u.username LIMIT $start, ".$board_config['topics_per_page'];

[REPLACE WITH]
AND ug.user_pending = 1
AND u.user_id = ug.user_id
ORDER BY u.username";

[FIND AND REMOVE]
. "
GROUP BY user_pending ASC"


please note, the last find and remove, does NOT include to remove the ; in the end of the line - if you do so, you may end up with a parse error
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Large groups fix [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron