CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Integration with phpBB.

Print topic Send  topic

Author Message
qwerty

Posts: 6
Posted: 03/26/2004, 1:57 AM

Hi

I had recently required a need to integrate phpBB with custom application developed in CCS.

One of the method was as described.
http://ccs.ath.cx/~ccs/kb.php?s_keyword=phpbb&event_id=...3&language_id=7

However, there was an existing member database. Basically user profiles for the two had to be setup in two different tables but synchronised at all times.

The following SQL can be used to do this in signup.

Quote :
$newpassword = md5($member->password->GetValue());
$user_id = CCDLookup("max(user_id)","phpbb_users",'',$DBConnection1) + 1;
$suffix = ",'', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 0, 1, 1, 0, 1, 1, 0, 'D M d, Y g:i a', 'english', 1, 0, 1, 1, '')";
$sql = "INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (";
$sql = $sql."$user_id, '$nickname', ".time(). ", '$newpassword', '$email'".$suffix;
$user_id = CCDLookup("max(user_id)","phpbb_users",'',$DBConnection1);
$DBConnection1->query($sql);
$sql2 = "INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)";
$group_id = CCDLookup("max(group_id)","phpbb_groups",'',$DBConnection1);
$DBConnection1->query($sql2);
$sql3 = "INSERT INTO phpbb_user_group (user_id, group_id, user_pending) VALUES ($user_id, $group_id, 0)";
$DBConnection1->query($sql3);

The SQLs are derived right out of phpBB scripts.

This assumes basic phpBB setup. No fancy authentication and group policies.

Similar logic can be applied to change password, and forgot password logic if your site has one.

You need to modify two phpBB templates and point them to your forgot password, change password URL. This has acheived my objective. Hope it helps others too.

Will put up the names of the two templates shortly.
_________________
There is no place like 127.0.0.1
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.