Ive tried this with latest vbulletin pligg couldnt get this to work.
has anyone?


![]() |
| | Thread Tools | Display Modes |
| |||
|
Ive tried this with latest vbulletin pligg couldnt get this to work. has anyone? |
| |||
|
Pllug in another thread mentioned this: "I've tried Simon's files as well and they do work mostly. I can register an account on the forum and it passes the sql to the pligg database. But for whatever reason I am unable to login to any accounts including the god account via pligg. It appears that the user_pass sql field under pligg_users is not being populated. I'm going to try and study the code over the holidays but I'm not a pro or anything so don't expect much." I will take a look as well but maybe some php coder can fix this? cheers + merry christmas |
| |||
|
There are many problems with the script. The user loader needs work in admincp. And the login needs work as well from the front end. Anybody can work on this we can collaborate. |
| ||||
|
would love to see this work maybe 2008 can be a better year |
| |||
|
I have the integration about 95% complete except for one piece. If someone takes a look at this code below and helps me finish it I can show everyone how to make this work. The script lets someone create an account which creates the same login information for both Pligg and Vbulletin. Then you can login through Pligg which works well except the cookie to carry over to Vbulletin is missing something. If you look at the code below and see the part that says "$cookie_share = 0; // 0 = off | 1 = on" the "$cookie_share = 0" works perfect but when you enter "$cookie_share = 1" to turn on the cookie it seems as if I am missing something because the Pligg cookie works fine but the Vbulletin cookie does not turn on. This file is under ../libs/login.php: <?php // The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // affero.org: Affero General Public License version 1 (AGPLv1) // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". class UserAuth { var $user_id = 0; var $user_login = ""; var $md5_pass = ""; var $authenticated = FALSE; function UserAuth() { global $db; $cookie_share = 0; // 0 = off | 1 = on if($cookie_share == 1) { if(isset($_COOKIE['bbuserid']) && isset($_COOKIE['bbpassword']) && $_COOKIE['bbuserid'] !== '') { $dbuserid = $db->escape($_COOKIE['bbuserid']); $cookiepass = $db->escape($_COOKIE['bbpassword']); $dbuser=$db->get_row("SELECT user_id,user_id_vb,user_login,user_level,user_pass _vb,user_pass_salt FROM " . table_users . " WHERE user_id_vb=\"$dbuserid\""); if($dbuser->user_id > 0 && md5($dbuser->user_pass_vb.'VBULLETIN LICENSE ENTER HERE') == $cookiepass) { $this->user_id = $dbuser->user_id; $this->user_level = $dbuser->user_level; $this->user_login = $dbuser->user_login; $this->md5_pass = md5($dbuser->user_pass_vb); $this->authenticated = TRUE; } } else { if(isset($_COOKIE['bbsessionhash']) && $_COOKIE['bbsessionhash'] !== '') { $vb_connect = @mysql_connect("localhost", "DATABASE NAME ENTER HERE", "DATABASE PASSWORD ENTER HERE"); $vb_cookie = $db->escape($_COOKIE['bbsessionhash']); $vb_session_query = @mysql_query("SELECT userid FROM admin_forum.vb3_session WHERE sessionhash=\"$vb_cookie\"", $vb_connect); $vb_session = @mysql_fetch_array($vb_session_query); $dbuserid = $vb_session['userid']; $vb_close = @mysql_close($vb_connect); $pligg_connection = @mysql_connect(EZSQL_DB_HOST, EZSQL_DB_USER, EZSQL_DB_PASSWORD); $pligg_database = @mysql_select_db(EZSQL_DB_NAME, $pligg_connection); $dbuser=$db->get_row("SELECT user_id,user_id_vb,user_login,user_level,user_pass _vb,user_pass_salt FROM " . table_users . " WHERE user_id_vb=\"$dbuserid\""); if($dbuser->user_id > 0) { $this->user_id = $dbuser->user_id; $this->user_level = $dbuser->user_level; $this->user_login = $dbuser->user_login; $this->md5_pass = md5($dbuser->user_pass_vb); $this->authenticated = TRUE; } } } } else { if(isset($_COOKIE['mnm_user']) && isset($_COOKIE['mnm_key']) && $_COOKIE['mnm_user'] !== '') { $userInfo=explode(":", base64_decode($_REQUEST['mnm_key'])); if(crypt($userInfo[0], 22)===$userInfo[1] && $_COOKIE['mnm_user'] === $userInfo[0]) { $dbusername = $db->escape($_COOKIE['mnm_user']); $dbuser=$db->get_row("SELECT user_id, user_pass, user_pass_vb, user_pass_salt, user_level FROM " . table_users . " WHERE user_login = '$dbusername'"); if($dbuser->user_id > 0 && md5($dbuser->user_pass)==$userInfo[2]) { $this->user_id = $dbuser->user_id; $this->user_level = $dbuser->user_level; $this->user_login = $userInfo[0]; $this->md5_pass = $userInfo[2]; $this->authenticated = TRUE; } } } } } function SetIDCookie($what, $remember) { switch ($what) { case 0: setcookie ("mnm_user", "", time()-3600, "/"); setcookie ("mnm_key", "", time()-3600, "/"); break; case 1: $strCookie=base64_encode(join(':', array( $this->user_login, crypt($this->user_login, 22), $this->md5_pass) ) ); if($remember) $time = time() + 3600000; else $time = 0; setcookie("mnm_user", $this->user_login, $time, "/"); setcookie("mnm_key", $strCookie, $time, "/"); break; } } function Authenticate($username, $pass, $remember=false) { global $db; $dbusername=$db->escape($username); $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) { $this->user_login = $user->user_login; $this->user_id = $user->user_id; $this->authenticated = TRUE; $this->md5_pass = md5($user->user_pass); $this->SetIDCookie(1, $remember); $lastip=$_SERVER['REMOTE_ADDR']; mysql_query("UPDATE " . table_users . " SET user_lastip = '$lastip' WHERE user_id = {$user->user_id} LIMIT 1"); mysql_query("UPDATE " . table_users . " SET user_lastlogin = now() WHERE user_id = {$user->user_id} LIMIT 1"); return true; } return false; } function Logout($url='./') { $this->user_login = ""; $this->authenticated = FALSE; $this->SetIDCookie (0, ''); define('wheretoreturn', $url); check_actions('logout_success'); header("Cache-Control: no-cache, must-revalidate"); header("Location: $url"); header("Expires: " . gmdate("r", time()-3600)); header("ETag: \"logingout" . time(). "\""); die; } } $current_user = new UserAuth(); ?> |
| ||||
|
nice Bryan .. unfortunately I am not a coder but I certainly look forward to the end product
|
| |||
|
Hello, we are a development team that could be interested in developing this within a 21 days timeframe, or little more; we had a small chat with the developers of Pligg, and there might be a possibility of an agreement to release our product and sell it through the Pligg Pro section of the website - unless other products that fulfill your needs are released, of course! Anyhow, I see there are many products being developed at once, so I would like to ask you the status of these projects. We develop only high quality products, so you can be assured that the product will be absolutely safe, well-coded, and very efficient. These would be the features we planned: Integration Type - Remote integration: the integration script can be used to integrate remote setups, with vBulletin on one side and Pligg in another. Of course, even same server setups are supported by the script using the same mechanism, but allowing remote server setups will make moving your vBulletin to another server, when needed, as easy as 1-2-3, with possibly no need to touch the integration settings. Functionality - Login, logout functionality from either sides: you can login and logout from Pligg or vBulletin, and you will be logged in/out in both sites/apps. This will use cookie authentication, so your vBulletin and Pligg must be on the same domain for this to work. For example, vBulletin could be at forums.yourdomain.com and pligg at pligg.yourdomain.com or yourdomain.com. - Users registers through vBulletin and are immediately able to login also in Pligg. Installation - XML installation on vBulletin side, possibly with just one file upload involved (to store functions instead than saving them into the products database entries). - Possibility to cohoperate with Pligg developers to reduce as much as possible edits to their system. Settings and Maintenance - ACP settings on vBulletin side. - Synchronizer script on vBulletin side. This will let you import all your users to the Pligg website through a simple and efficient tool available in the Maintenance area of vBulletin. This tool is needed only upon installation or when you need to resynchronize your websites (for example, if one of the two had crashed). - User databases are always synchronized between the two scripts. No cheap cronjobs involved here. Any edit on vBulletin side - either performed through UserCP or Admin Control Panel - will be ported immediately to the Pligg - These fields are synchronized: username,password,email,ban status (if possible, we need to check Pligg code for this). If you need more fields that can be found in both sides, that would be great. Limits of such an integration would be that registrations and user maintenance would be mainly performed via vBulletin. Please let us know what you think, what you may want to change, and in general if this seems a good thing to you. Keep in mind that once we confirm we are developing this, the product will be developed and completed within the specified timeframe, with the quality standards we are always keep in our scripts. Unfortunately all these precautions are necessary for us - with the size of our team, we want to focus on as few products as possible in order to stay true to our quality standards. About Us If you want some information about us, you can find some information and some feedback in this thread vBulletin Integration - Live and working! - ScriptXperts Community Forums (ours is currently the only high quality integration between ClipShare and vBulletin), you can search for some feedbacks in the vBulletin.org forums by looking for the CarlitoBrigante name in the threads, see this (unfortunately, not updated) blog vBulletin Community Forum - DirtyHarry. We will soon launch a website to offer support to our clients at MagnetiCat.com. Our team is very small, but we deliver only quality products, as you can read from some of the feedbacks. Clients we are currently working with: Sports Card Forum - Sports Cards Community Sports Card Alliance - Power Feeder Website maintenance and optimization and script development (most of their recent scripts are developed by us, including the Card DB and the PowerFeeder, an exclusive script for them inspired by iDigg). GT40s.com Website maintenance and optimization. Pow Wow TV InfernalRC - Home Bodybuilding Forum - Supplement Review - Anabolicminds.com Some of the websites featuring our integration between vBulletin and CS. Please note we do not want to advertise ourselves, just introducing ourselvs and asking your feedback and the one of the Pligg developers - fortunately, once our MagnetiCat.com website will be ready, we will no longer need these lengthy introductions. If you decide to follow another route, please feel free to remove this post and all the links in it! Thanks! |
| |||
|
Bryan, I cannot look at your code in detail, but make sure that you set these cookies for vBulletin: userid username password More details can be found at vbulletin.org. Hope this helps, Harry |
| |||
|
Hey I know what you are missing as Magneticat says. there are 3 cookie settings. if you want, pm me your mod so far and i can take a look. Even better attach it here. more minds are better... cheers |
| ||||
| Quote:
That sounds very promising. And i like the approach, that all of the registrations and user maintenance would be mainly performed via vBulletin. Imo there should be a usergroup setting too, if members of the usergroup are allowed to pligg or not. |
![]() |
| 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 |