The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Usersync vBulletin -> phpNUKE & Who is Online external
Hi community,
I've succesfully ported my phpNUKE phpBB Forum to vBulletin with all users & content. I also was able to include "Latest forum posts" on my phpNUKE index page. There're two things where I need help... 1.) I want, that when a new user registers in the forum (vB), that this user is also put into the phpNUKE usertable (mySQL). I found an old code snipplet but unfortunately it's to old... it doesn't fit to my vBulletin Version (3.6.7-PL1). Code:
[Release] phpnuke reg integration hack -------------------------------------------------------------------------------- Before i post it i have to say 2 things 1) it is not my hack, it was made by those wonderful ppl from www.buffydownunder.com, I would like to give them all the credit and the thanks for hooking me up with this helpful hack 2) and this is the big one, the php-nuke and vbulletin databases have to be combined I dont know if you want it if you have to combine databases, unless you have not installed one of them yet hell maybe one of the great coders here could find a way for there to be 2 databases, i dunno here she is in the register.php file of vbulletin ------------------------------------------------------------- FIND: $DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield." parentemail,coppauser, homepage,icq,aim,yahoo,signature,adminemail,showem ail,invisible,usertitl e,joindate,cookieuser,daysprune,lastvisit,lastacti vity,usergroupid,timez oneoffset,emailnotification,receivepm,emailonpm,op tions,birthday,maxpost s,startofweek,ipaddress,pmpopup,referrerid,nosessi onhash) VALUES (NULL,'".addslashes(htmlspecialchars($username))." ','".addslashes($passw ord)."','".addslashes(htmlspecialchars($email))."' ,".$newstyleval."'".ad dslashes(htmlspecialchars($parentemail))."','$copp auser','".addslashes(h tmlspecialchars($homepage))."','".addslashes(htmls pecialchars($icq))."', '".addslashes(htmlspecialchars($aim))."','".addsla shes(htmlspecialchars( $yahoo))."','".addslashes($signature)."','$adminem ail','$showemail','$in visible','".addslashes($usertitle)."','".time()."' ,'$cookieuser','".adds lashes($prunedays)."','".time()."','".time()."','$ newusergroupid','".add slashes($timezoneoffset)."','$emailnotification',' $receivepm','$emailonp m','$options','".addslashes($birthday)."','".addsl ashes($umaxposts)."',' ".addslashes($startofweek)."','".addslashes($ipadd ress)."','$pmpopup','" .addslashes($testreferrerid['userid'])."','$nosessionhash')"); $userid=$DB_site->insert_id(); $user_regdate = date("M d, Y"); -------------------------------------------------------------- AFTER THAT PLACE: //PHP-Nuke Registration Addition - by Matt Lyons matt@buffydownunder.com $cryptpass=crypt($password); mysql_query("insert into nuke_users (uname, email, url, user_regdate, user_icq, user_aim, user_yim, user_viewemail, pass) values ('$username', '$email', '$homepage', '$user_regdate', '$icq', '$aim', '$yahoo', '$showemail', '$cryptpass')"); ------------------------------------------------------- If someone can tell me where to find the part in the vBulletin code (I think register.php is still correct, isn't it?) where the new user is put into the database (the code shown above I can't find in my register.php)... this would help me very much! 2.) Is there any chance to include/show the users which are online (into the forum) on a external page (my phpNUKE index page for example). Is there an option in vBulletin (which I have missed) which exports "Who is online" as a rss/xml/javascript feed? This would be okay/enough for me. I hope someone can help me... I'm really happy with vBulletin... if I only could fix these last two problems . |
#2
|
|||
|
|||
Hi again,
during the last days I figured out where to add the code to add a new vBulletin user also to a phpNUKE database. But I've one (maybe stupid) problem... All informations (username, eMail address,...) will be stored as they should BUT the user password is not working if you want to login into phpNUKE (logon into the forum is working well). If figured out, that my modfication just insert the MD5 value as plain text (not crypted)... I mean the numbers and letters. So, my questions is how to read and insert the password as real MD5 hash value so that the phpNUKE login is also working?!? I think I've to read the password as MD5 hash or something like that and not in the way I try it... I hope you know what I mean . Here's the code I use: In "class_dm_user.php" I made these changes: Code:
// INSERT NEW USER else { // fill in any registration defaults $this->set_registration_defaults(); // insert query if ($return = $this->db_insert(TABLE_PREFIX, 'user', $doquery)) { $this->set('userid', $return); $this->db_insert(TABLE_PREFIX, 'userfield', $doquery); $this->db_insert(TABLE_PREFIX, 'usertextfield', $doquery); // START - THIS IS MY NEW CODE $username = $this->fetch_field('username'); $password = $this->fetch_field('password'); $email = $this->fetch_field('email'); $joindate = $this->fetch_field('joindate'); mysql_query("insert into nuke_users (username, user_email, user_website, user_avatar, user_regdate, user_icq, user_aim, user_yim, user_viewemail, user_password) values ('$username', '$email', '', 'gallery/blank.gif', '$joindate', '', '', '', '', '$password')"); // END - THIS IS MY NEW CODE // Send welcome PM" string ..... ..... PS: I still need help with the "Whos is Online display on a extern page/website" problem but the problem above has prio 100% . |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|