Looking to integrate...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
z00om
Registered User
Posts: 23
Joined: Wed Nov 28, 2001 7:04 am
Contact:

Looking to integrate...

Post by z00om » Thu Mar 14, 2002 10:07 pm

Hello,

I have been around phpBB since the start, and I do use the phpBB2. Anyway, I was thinking that since I am going to re-do my ENTIRE site and also make it "user" based, I should fully integrate my user db with the phpBB. Is there anything special I should know? I realise I'm going to have to find the password encryption algorithm and use that, but on top of all that what else should I know? I appreciate your help! :)

-Scott
z00om.com

Matthijs
Former Team Member
Posts: 1031
Joined: Sat Dec 08, 2001 4:27 pm
Location: The Netherlands
Contact:

Post by Matthijs » Fri Mar 15, 2002 1:17 am

Well... not sure what your users are able to do after being logged in, but you could just copy-paste the entire session/auth functions of phpBB 2.
That would be the easy way. Some people over at mods.phpbb.com are discussing this already I think.

Doing it all by yourself, you only need to look in the users table. user_id, username, password and user_status will probably be the only ones you'll use. The password is 'encrypted' using a MD5 hash. In PHP, just do a md5($clear_txt_password) and match it against the one in the database.

Good luck!
phpBB Converter Team Member
Developer of the vBulletin 2.x.x -> phpBB 2.0.x Converter
See Matthijs.net for more info

Hades
Registered User
Posts: 784
Joined: Thu Jan 10, 2002 3:31 pm
Location: The Underworld
Contact:

Post by Hades » Fri Mar 15, 2002 2:04 am

Or use the session management and auth functions that are already in phpBB ;)

This way it maintains the phpBB coding standards too...

Also it saves you a lot of needless code. Enjoy
Hades
Lord of the Underworld


Like roleplaying? Try BlastRPG Forums

z00om
Registered User
Posts: 23
Joined: Wed Nov 28, 2001 7:04 am
Contact:

Post by z00om » Fri Mar 15, 2002 5:06 am

my REAL problem is I need to ADD fields to the DB. That, or I am considering linking each user to a seperate table of information which would make it easier... But I want to add things like News posting rights, download rights, etc... thanks for the help! :)

Matthijs
Former Team Member
Posts: 1031
Joined: Sat Dec 08, 2001 4:27 pm
Location: The Netherlands
Contact:

Post by Matthijs » Fri Mar 15, 2002 9:34 am

You'll want to make a different table for that, linking the two by user_id.
phpBB Converter Team Member
Developer of the vBulletin 2.x.x -> phpBB 2.0.x Converter
See Matthijs.net for more info

z00om
Registered User
Posts: 23
Joined: Wed Nov 28, 2001 7:04 am
Contact:

Post by z00om » Sat Mar 16, 2002 12:52 am

I had just come to that conclusion, thanks for your help! :)

z00om
Registered User
Posts: 23
Joined: Wed Nov 28, 2001 7:04 am
Contact:

Post by z00om » Sat Mar 16, 2002 1:53 am

and heres what I came up with:

Code: Select all

					if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
					{
					/* =-=- BEGIN MY MODS -=-= */ 
		/*      ************      */
						$sql = "SELECT user_id FROM users ORDER BY user_id DESC LIMIT 1";
						$result = $db->sql_query($sql);
						$userid = mysql_fetch_row($result);
						$sql = "INSERT INTO users (id,user_id,newsrights,files) VALUES ('','$userid[0]','r','none')";
						mysql_select_db("z00om_site");
						$result = $db->sql_query($sql);
						mysql_select_db("z00om_phpbb");
		/*      ************      */
					/* =-=- END MY MODS -=-= */ 

Locked

Return to “2.0.x Support Forum”