MOD download & history

You'll automatically gain access to this forum when you will post your first post in another forum. That way it will demonstrate how the Auto Group MOD works.
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 !

Postby Niels on Wed 09. Jul, 2003 12:48

in special cases the modcp.php would produce a SQL error.

I have correctd this in version 1.1.4.

here are how to upgrade

in file modcp.php
Code: Select all
[FIND]
$user_updated [] = "SELECT ug.user_id, g.group_id as g_id, g.group_name , u.user_posts, g.group_count FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u

[REPLACE WITH]
$user_updated [] = "SELECT ug.user_id, g.group_id as g_id, g.group_name , u.user_posts, g.group_count, ".$row['poster_id']." as u_id FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u

[FIND]
$user_already_added = (!empty($group_data['user_id']) || $user_id==ANONYMOUS) ? TRUE : FALSE;
$user_add = ($group_data['group_count'] == $group_data['user_posts'] && $user_id!=ANONYMOUS) ? TRUE : FALSE;
$user_remove = (($group_data['group_count'] > $group_data['user_posts'] || $group_data['group_count_max'] < $group_data['user_posts']) && $user_id!=ANONYMOUS) ? TRUE : FALSE;

[REPLACE WITH]
$user_already_added = (!empty($group_data['user_id']) || $group_data['u_id']==ANONYMOUS) ? TRUE : FALSE;
$user_add = ($group_data['group_count'] == $group_data['user_posts'] && $group_data['u_id']!=ANONYMOUS) ? TRUE : FALSE;
$user_remove = ($group_data['group_count'] > $group_data['user_posts'] && $group_data['u_id']!=ANONYMOUS) ? TRUE : FALSE;

[FIND]
VALUES (".$group_data['g_id'].", ".$group_data['user_id'].", 0)";

[REPLACE WITH]
VALUES (".$group_data['g_id'].", ".$group_data['u_id'].", 0)";

[FIND]
WHERE group_id=".$group_data['g_id']."
AND user_id=".$group_data['user_id'];

[REPLACE WITH]
WHERE group_id=".$group_data['g_id']."
AND user_id=".$group_data['u_id'];
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Mon 21. Jul, 2003 17:05

to prevent a SQL error I have updatd the how-to to version 1.1.5

in file groupcp.php
[FIND]
Code: Select all
".(($is_autogroup_enable)? 0 : 1)."


[REPALCE WITH]
Code: Select all
'".(($is_autogroup_enable)? 0 : 1)."'
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Mon 21. Jul, 2003 17:15

When including the MAX post count option, I did forgot some steps in the how-to witch lead to a bug
users posting could be "kicked out" of the autogroup

new version is 1.1.6.

to upgrade:
in file function_post.php
Code: Select all
[FIND]
$sql = "SELECT ug.user_id, g.group_id as g_id, g.group_name , u.user_posts, g.group_count FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u

[REPLACE WITH]
$sql = "SELECT ug.user_id, g.group_id as g_id, u.user_posts, g.group_count, g.group_count_max FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u

[FIND]
$user_already_added = (!empty($group_data['user_id']) || $user_id==ANONYMOUS) ? TRUE : FALSE;
$user_add = ($group_data['group_count'] == $group_data['user_posts'] && $user_id!=ANONYMOUS) ? TRUE : FALSE;
$user_remove = (($group_data['group_count'] > $group_data['user_posts'] || $group_data['group_count_max'] < $group_data['user_posts']) && $user_id!=ANONYMOUS) ? TRUE : FALSE;

[REPLACE WITH]
$user_already_added = (empty($group_data['user_id'])) ? FALSE : TRUE;
$user_add = ($group_data['group_count'] == $group_data['user_posts'] && $user_id!=ANONYMOUS) ? TRUE : FALSE;
$user_remove = ($group_data['group_count'] > $group_data['user_posts'] || $group_data['group_count_max'] < $group_data['user_posts']) ? TRUE : FALSE;
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Mon 21. Jul, 2003 17:22

more to 1.1.6.
new version is 1.1.7
in file modcp.php
Code: Select all
[FIND]
$user_updated [] = "SELECT ug.user_id, g.group_id as g_id, g.group_name , u.user_posts, g.group_count, ".$row['poster_id']." as u_id FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u

[REPLACE WITH]
$user_updated [] = "SELECT ug.user_id, g.group_id as g_id, u.user_posts, g.group_count, g.group_count_max, ".$row['poster_id']." as u_id FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u
Last edited by Niels on Wed 13. Aug, 2003 11:45, edited 1 time in total.
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 12. Aug, 2003 12:52

autogroup is updated to version 1.1.8.
in file admin_groups.php was missing the newly added max count
to upgrade
Code: Select all
[FIND]
'L_GROUP_COUNT' => $lang['group_count'],

[ADD, AFTER]
'L_GROUP_COUNT_MAX' => $lang['group_count_max'],
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 12. Aug, 2003 13:07

new version is now 1.1.9.
the last upgrade 1.1.3 did have some flaws, to upgrade
in file admin_groups.php
Code: Select all
[FIND]
sprintf($lang['group_count_update

[REPLACE WITH]
sprintf($lang['group_count_updated


the above code are to be found 2 places in the file !!!
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Sun 24. Aug, 2003 16:41

now EM ready
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Wed 10. Dec, 2003 13:58

Uploaded version 1.2.2.
no change in code
(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

Previous

Return to Auto group [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron