PDA

View Full Version : Making Amember Work With Phbb Board


aquasound
08-29-2003, 07:17 AM
Hello, I currently have the free version of Amember, which suits my needs just fine right now. But I also have PhBB board and I'm getting a lot of new members, who aren't signing up through my website.

How do I set up Amember (or the PhBB) so that when one signs up in Amember it automatically registers them in the board (and vice versa)?

Note: I have read the Amember guide, but because I'm using free version, there is no Admin/config/global panel for my browser. I feel comfortable enough editing the code if someone were to be kind enough to give me step by step instructions.

Please let me know if this is possible.

Thanks in advance

Guest
08-30-2003, 05:50 PM
The bulletin board plugins only work with full-versions of aMember. I think you can hack aMember freely for your own use to integrate with phpBB, but you'll want to check with cgi-central.net to make sure you can alter the underlining code (aMember is not GPL, so there are restriction on what you can do with the code).

What is your time worth? Unless you place no value on your time and you have nothing more productive to do for 30 hours, it's actually cheaper just buy a license and the phpBB plugin. You'll know it works out-of-the-box and you can spend your time doing something more productive for your business.

Just my 2 cents.

GWC
07-13-2004, 03:57 PM
The bulletin board plugins only work with full-versions of aMember.

We have the full version and my tech guy tells me we obtained the official plugin to integrate aMember with PHPbb. It works for new registrants but we have been unable to find a solution to our real need.

The plugin will add new aMember members to the PHPBB user file, but if you have to important members from a prexisting file, it will not add them. Specifically, our aMember file was populated from an existing user data file of some 70,000 users. None of those users was or seem able to be added to the BB user file.

I arrived at a second solution, in part from reading a PHPbb forum: I imported the aMember user file into Access via SQL driver; ran the aMember passwords through and MD5 encryptor to match PHPbb's requirement (doing it raw plain didn't work) and then populated the PHPbb user file with the results.

Every record appears exactly correct. The MD5 hashes are character for character matches. The records are fully and -- in the admin module -- completely created.

But try to log in one of those imported users and it will not recognize the password as valid. It rejects them exactly as it rejected the unecrypted passwords.

We have 70,000 plus existing users potentially accessing the forum if we ever deploy it. It is non-trivial to force all of them to re-register just to use one component of the site. So any help at all would be enormously appreciated.

email glenn dot caleval at producer dot com

obiwankenobi
07-17-2004, 04:53 AM
Hello,
I have created a script that create automatic phpbb membership from your database :

<?
require ("data.php");
$db = mysql_connect ( $serveur, $login, $pass);
mysql_select_db ($base, $db);

//read your members
$requete="SELECT * from `members`";
$result=mysql_query($requete,$db);

while ($row = mysql_fetch_array($result))
{
$alm_login=$row['alm_login'];
$alm_password=$row['alm_password'];
$alm_email=$row['alm_email'];
$alm_nom=$row['alm_nom'];
$alm_prenom=$row['alm_prenom'];

$sql_result =0;

// Affect the field of the phpbb website
$username=$alm_login;
$new_password=$alm_password;
$email=$alm_email;
$icq="";
$website="";
$occupation="";
$location="";
$interests="";
$signature="$alm_nom $alm_prenom, membre de $mysite";
$signature_bbcode_uid="";
$avatar_sql="";
$viewemail=0;
$aim="";
$yim="";
$msn="";
$attachsig=1;
$allowsmilies=1;
$allowhtml=1;
$allowbbcode=1;
$allowviewonline=1;
$notifyreply=0;
$notifypm=1;
$popup_pm=1;
$user_timezone="1.00";
$user_dateformat="D M d, Y g:i a";
$user_lang="french";
$user_style=3;
$avatar_sql="'',''";

$sql = "SELECT MAX(user_id) AS total FROM phpbb_users";
$result2=mysql_query($sql,$db);
$sql_result += mysql_errno();

//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();

$row = mysql_fetch_array($result2);

$user_id = $row['total'] + 1;

//
// Get current date
//
$new_password = md5($new_password);

$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 ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
$sql .= "1, '')";
$result2=mysql_query($sql,$db);
$sql_result += mysql_errno();
//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();

$sql = "INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator)
VALUES ('', 'Personal User', 1, 0)";
$result2=mysql_query($sql,$db);
$sql_result += mysql_errno();
//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();

$sql = "SELECT MAX(group_id) AS total FROM phpbb_user_group";
$result2=mysql_query($sql,$db);
$sql_result += mysql_errno();
//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();

$row = mysql_fetch_array($result2);
$group_id = $row['total'] + 1;

$sql = "INSERT INTO phpbb_user_group (user_id, group_id, user_pending)
VALUES ($user_id, $group_id, 0)";
$result2=mysql_query($sql,$db);
//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();
$sql_result += mysql_errno();

//***********************
//Affect user to a group
//***********************
$sql = "INSERT INTO phpbb_user_group (user_id, group_id, user_pending)
VALUES ($user_id, 3, 0)";
$result2=mysql_query($sql,$db);
$sql_result += mysql_errno();
//echo "<hr>\$sql=$sql ".mysql_errno().mysql_error();

if ($sql_result == 0)
{
echo "<font color=\"#00ff00\"> OK </font>";
echo "<br>";
?> <a href="http://www.mindklik.com/forum/login.php">Accéder au Forum</a>
<?
}
else
{
echo "<font color=\"#FF0000\"> ERREUR </font>";
}

} // while

?>

Any questions just visit http://www.surfkipeut.com

alex
07-20-2004, 12:26 PM
Thank you for the script!
However, if existing users have active subscription in aMember, it is enough to click aMember CP -> Rebuild Db to have members transferred to phpBB database.

loganeast
08-13-2007, 04:29 PM
We have been doing just that - clicking Rebuild DB to transfer the member to phpBB - but lately it hangs. I'll click Rebuild DB and the page will timeout. The DB's got about 11k members in it. Is that too large for this to work? It just seems like the MySql doesn't have a chance to finish before the DB's rebuilt.

Thanks.

Joe

jazzedge
03-12-2008, 07:39 AM
any update on this?

I have ~10k members and rebuild DB seems to just hang

skippybosco
03-12-2008, 05:39 PM
Hey Willie,

Does it hang and error out or just take a while to run?

Increasing the PHP timeout value may help with the errors by letting it run a bit longer.

Fixing the delay would most likely require purging old records or adding/modifying indexes on the tables (proceed with caution on this one). Here is a thread which may help:

http://www.amember.com/forum/showthread.php?t=5849&highlight=table+index

frank

sara_nylander
05-01-2008, 05:19 PM
Okay I bought the PHPBB plugin and it doesn't work with PHPBB3 which is the current release, wasted 2 hours to find out the plugin doesn't work!!!!!

The fields in the plugin are outdated and don't line up with PHPBB fields anymore

calisolllc
05-11-2008, 11:06 PM
Thats because phpbb3 is brand spanking new, probably 99% of all phpbb users are still using version 2.X

juniorm
05-29-2008, 10:52 AM
not necessarily... there is a new plugin for phpbb3 (you ahev to contact support)

although it still doesnt work 100% for me :confused: