Multi User insert MOD

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
TheWiz2k4
Registered User
Posts: 3
Joined: Sun Jan 18, 2004 11:35 am

Multi User insert MOD

Post by TheWiz2k4 »

Hello.

I'm creating a MOD that get a excel file with username,pass & email that been related to a group and insert in to phpBB.

I don't realy understand how the tables "groups","user_group" work's and what are the value that get in to fileds in "user_group".

So, i need some explanation how that wotk's.

I know that someone all ready did it but it is very basic and i cann't use it for my need.

Thank's,
TheWiz
Rapid Dr3am
Registered User
Posts: 198
Joined: Sun Jul 13, 2003 4:14 pm
Location: Incommunicado
Contact:

Post by Rapid Dr3am »

Can I reomend using comma delimited text files instead?

Teh reason is simple, not everyone has Excel, for one reason or another.

As for the tables what do you need to know?
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Moved to MOD-Authors Forum :wink:
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
Graham
Former Team Member
Posts: 8462
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK
Contact:

Post by Graham »

Were you aware that I've already written something to do this?

http://www.phpbb.com/phpBB/viewtopic.ph ... port+tools

If you want some extra functionality and don't understand how the tables work, it may be easier to extend that than try to write the code from scratch yourself.

As for the tables, for each user, you have an entry in the phpbb_users table (primary key user_id), an entry in the phpbb_groups table (key group_id) and an entry in the phpbb_user_group table consisting of both these keys.
"So Long, and Thanks for All the Fish"

phpBB Useful Links: Knowledge Base | Userguide | Forum Search | MOD Database | Styles Database
My Links: Blog!
TheWiz2k4
Registered User
Posts: 3
Joined: Sun Jan 18, 2004 11:35 am

Post by TheWiz2k4 »

Thank's for your quick answers. :)

Rapid Dr3am: I will use delimited text.

Graham: I saw you mod but i need to add an option that add all the import list in to a group. But i don't know if i need to consisting the personal group of the user or user id. Is the personal group of a user is use to connect him to other group like that?

User <-- Personal Group <--- Global Group ?

OR

User <-- Personal Group
User <-- Global Group

The real Q is for what we use "Personal Group"?

I already did it. 1 hour writing, not big problem. 8)

Thank's,

TheWiz.
Graham
Former Team Member
Posts: 8462
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK
Contact:

Post by Graham »

Basically, for each user there is a personal group. This is used to simplify the permissions system.

The USER_GROUP_TABLE is used to link a user to:
a) their personal group
b) any groups they are in
so should always have at least one entry linking to the personal group and one for each of the other groups they are in.
"So Long, and Thanks for All the Fish"

phpBB Useful Links: Knowledge Base | Userguide | Forum Search | MOD Database | Styles Database
My Links: Blog!
TheWiz2k4
Registered User
Posts: 3
Joined: Sun Jan 18, 2004 11:35 am

Post by TheWiz2k4 »

Ok.

So it is like
User <-- Personal Group
User <-- Global Group

?

TheWiz.
Post Reply

Return to “[2.0.x] MOD Writers Discussion”

cron