Niels, please, can you take a look?

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 !

Niels, please, can you take a look?

Postby jobbesat on Fri 10. May, 2002 23:43

In the previous message, the one below, i told you that my problems came from my isp; well, i talked with them and they told they don't have any kind of problems; so I try again to install this mod and everything screwed up again and now my site is down @all; I didn't miss any line of code; I have 30 mods installed in my site and neve had any problem, so i took a deeper look in the code and I just want to let you know this, maybe other people can have my same problems:

where you wrote:

#-----[ FIND ]------------------------------------------
#
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE ((ug.user_id = ".$userdata['user_id']. " ) OR (g.group_count<=\"u.user_posts\"))
#
#-----[ REPLACE WITH ]------------------------------------------
#
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug, ".GROUPS_TABLE." g, ".USERS_TABLE." u
WHERE ((ug.user_id = ".$userdata['user_id']. "
AND ug.user_pending = 0
AND a.group_id = ug.group_id
AND g.group_id = ug.group_id ) OR (g.group_count<=u.user_posts AND a.group_id = g.group_id AND u.user_id = ".$userdata['user_id']." AND g.group_type=".GROUP_POSTS."))

-------------------------------------------------------------------

I noticed that in my auth.php i have already:
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = ".$userdata['user_id']. "
AND ug.user_pending = 0
AND a.group_id = ug.group_id

as you can see 3rd and 4th lines are already there, so if I do exactly as you wrote I'll have 2 times 3rd and 4th line

Anyway I think the problem came from this:
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";

#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user, group_count)
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0', $group_count)";

Is this the part that go to modify something inside database, isn't it? If so, that's the part which screwed up everything for the 2nd time.

Let me know something when you have time.

Ciao.
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21

Postby Niels on Sat 11. May, 2002 13:46

You are rigth about the first one, I had put a "wrong" find line of code,

here are the correct one to find
FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
WHERE ug.user_id = ".$userdata['user_id']. "
AND ug.user_pending = 0
AND a.group_id = ug.group_id

I have updated the code now version 0.9.5

about your main problem, it can not be that line you are refering to, since it will only be executed, inside admin panel -> group management, so your problem have to be elsewhere
- proberly becouse you have NOT run the SQL command if you are not doing so, your site will proberbly be unreaceble until you do.

this is the SQL command you will have to RUN

ALTER TABLE groups ADD group_count INT (4) UNSIGNED DEFAULT '99999999'
do that form e.g. phpmyadmin or like
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Nop

Postby jobbesat on Sun 12. May, 2002 01:38

I ran that command; infact the table has been altered and that field has been added; really I don't have a clue where the error is; anyway, since the mod is working here, means that I miss something for sure and I don't want to bother you anymore with my problems :) Thanks a lot to reply.
jobbesat
Special supporter
 
Posts: 191
Joined: Tue 07. May, 2002 16:21


Return to Auto group [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron