

![]() |
| | Thread Tools | Display Modes |
| ||||
|
is there anyone found the method,hope
|
| |||
| Quote:
Regards, Tobi |
| |||
|
So from what i see this hack should allow you to signup and go between the pligg system and VB seemlessly.... Will there be further integration? Would it be possible, for example to 'pligg' posts? and have the posts with the most 'pliggs' be displayed on the homepage? i would def be willing to pay for this hack as well.. |
| |||
|
I had started working on this. I got side tracked. Now, I'm back to working on it. It won't be free though. If you're willing to pay for this, PM me with a price and I will come up with an average price. |
| |||
|
Hi, how's going?! Tobi |
| |||
|
We haven't seen Paitken in around a month so I don't think he's working on this nor is he a Pligg dev anymore.
|
| |||
|
i am desperate for this integration. I'm crying as I type this |
| |||
|
One possible way to achieve integration would be to switch the current pligg password setup to the vBulletin double md5'd password and salt combo: (using latest plgg and vB 3.64 code) (1) Pligg database - in the pligg_users table, add 2 extra columns - 'user_pass_vb' and 'user_pass_salt'. (2) vBulletin - register.php FIND Code: // save the data
$vbulletin->userinfo['userid']
= $userid
= $userdata->save(); Code: /* Pligg Registration */
$pligg_username = htmlspecialchars_uni($vbulletin->GPC['username']);
$user_data_query = @mysql_query("SELECT email,password,salt FROM " . TABLE_PREFIX . "user WHERE username='$pligg_username'");
$user_data = @mysql_fetch_array($user_data_query);
$pligg_email = $user_data['email'];
$pligg_password = $user_data['password'];
$pligg_salt = $user_data['salt'];
$pligg_ip = $_SERVER['REMOTE_ADDR'];
$pligg_connect = @mysql_connect('HOSTNAME', 'USERNAME', 'PASSWORD');
$pligg_database = @mysql_select_db('DBNAME', $pligg_connect);
$pligg_update = @mysql_query("INSERT into pligg_users (user_login,user_level,user_date,user_pass_vb,user_pass_salt,user_email,user_ip) VALUES ('$pligg_username','normal',now(),'$pligg_password','$pligg_salt','$pligg_email','$pligg_ip')");
$pligg_close = @mysql_close($pligg_connect);
/* Pligg Registration */ (3) vBulletin - login.php FIND Code: // init user data manager
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('password', $newpassword);
$userdata->save(); Code: /* Pligg Password */
$pligg_id = $vbulletin->GPC['userid'];
$user_data_query = @mysql_query("SELECT username,password,salt FROM " . TABLE_PREFIX . "user WHERE userid='$pligg_id'");
$user_data = @mysql_fetch_array($user_data_query);
$pligg_username = $user_data['username'];
$pligg_password = $user_data['password'];
$pligg_salt = $user_data['salt'];
$pligg_connect = @mysql_connect('HOSTNAME', 'USERNAME', 'PASSWORD');
$pligg_database = @mysql_select_db('DBNAME', $pligg_connect);
$pligg_update = @mysql_query("UPDATE pligg_users SET user_pass_vb='$pligg_password',user_pass_salt='$pligg_salt' WHERE user_login='$pligg_username'");
$pligg_close = @mysql_close($pligg_connect);
/* Pligg Password */ (4) vBulletin - profile.php FIND Code: ($hook = vBulletinHook::fetch_hook('profile_updatepassword_complete')) ? eval($hook) : false;
// save the data
$userdata->save(); Code: /* Pligg Profile Update */
$pligg_username = unhtmlspecialchars($vbulletin->userinfo['username']);
$user_data_query = @mysql_query("SELECT email,password,salt FROM " . TABLE_PREFIX . "user WHERE username='$pligg_username'");
$user_data = @mysql_fetch_array($user_data_query);
$pligg_email = $user_data['email'];
$pligg_password = $user_data['password'];
$pligg_salt = $user_data['salt'];
$pligg_connect = @mysql_connect('HOSTNAME', 'USERNAME', 'PASSWORD');
$pligg_database = @mysql_select_db('DBNAME', $pligg_connect);
$pligg_update = @mysql_query("UPDATE pligg_users SET user_pass_vb='$pligg_password',user_pass_salt='$pligg_salt', user_email='$pligg_email' WHERE user_login='$pligg_username'");
$pligg_close = @mysql_close($pligg_connect);
/* Pligg Profile Update */ (5) Pligg - libs/login.php FIND Code: $user=$db->get_row("SELECT user_id, user_pass, user_login FROM " . table_users . " WHERE user_login = '$dbusername'");
$saltedpass = generateHash($pass, substr($user->user_pass, 0, SALT_LENGTH));
if ($user->user_id > 0 && $user->user_pass === $saltedpass) { Code: $user=$db->get_row("SELECT user_id, user_pass, user_pass_vb, user_pass_salt, user_login FROM " . table_users . " WHERE user_login = '$dbusername'");
$saltedpass = md5(md5($pass).$user->user_pass_salt);
if ($user->user_id > 0 && $user->user_pass_vb === $saltedpass) { Using this method, users would still need to login to the pligg portion of the site when logged into the forum, but the login details would be identical, and no separate signups required. There may well be many better ways to do it, and it is probably possible to use the hooks system to make this into a vBulletin plugin file, but i was just messing around with the source code and thought i'd share. Last edited by Simon; 01-21-2007 at 09:24 PM. Reason: added password syncing |
| |||
|
Added the above code (and a few extra options like cookie sharing) into a product file. EDIT: the latest version can now be found here PS. since there have been some requests, if you would like to make a small donation for this mod, my paypal address is: admin[at]oioplus[dot]com Last edited by Simon; 01-22-2007 at 03:42 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pligg Donation Drive 2009 | chuckroast | Questions and Comments | 0 | 03-23-2009 05:42 PM |
| Vbulletin user : Pligg ? | frack | Questions and Comments | 8 | 12-20-2007 03:16 AM |
| Vbulletin + Pligg bridge built in as option | pipin | Questions and Comments | 0 | 02-20-2007 03:28 AM |