Administrators simpilot Posted May 20, 2010 Administrators Report Posted May 20, 2010 SMFRegister 1.0 phpVMS module to automatically register a new pilot in your smf 1.1.11 forum. Developed by: simpilot www.simpilotgroup.com Developed on: phpVMS ver 934 smf ver 1.1.11 php 5.2.11 mysql 5.0.51 apache 2.2.11 Included files: readme.txt license.txt SMFRegister.php SMFRegisterData.class.php Install: -Download the attached package. -unzip the package and place the files as structured in your root phpVMS install. -your structure should be: root core common SMFRegisterData.class.php modules SMFRegister SMFRegister.php - Your smf database must reside in the same datbase as your phpVMS install and use the standard "smf_" prefix. - I have built this to work with smf forum version 1.1.11, it has not been tested with any other version. - The module will register a new user in the forum when a new pilot registers with the VA. the format for registration into the forum is: user: John Smith ABC1234 pass: same as they used to register on the main site. I am working on making it catch the hook for the "approve pilot" event, which Nabeel is building in, but it does not seem to catch it right yet. As of now it will register the pilot upon the initial registration. If you reject the pilot remember to go and ban or delete him from your forum. Although not required, a link back to www.simpilotgroup.com would be greatly appreciated! Have fun! SMF_Register_1.0.zip 5 Quote
Moderators joeri Posted May 20, 2010 Moderators Report Posted May 20, 2010 just tested and working like a charme.thanks for the help and this is working verry nice gr joeri Quote
Moderators servetas Posted May 29, 2010 Moderators Report Posted May 29, 2010 any new version for the SMF RC2? Thanks Quote
Moderators Kyle Posted May 29, 2010 Moderators Report Posted May 29, 2010 any new version for the SMF RC2? Thanks Why do we need to release a new version that the SMF is still being build. You'll have to wait till the SMF 2.0 is fully done then porbalry he will release a new one. Becasue he may not know what changed to the files in order for this add on to work. 1 Quote
Administrators simpilot Posted May 29, 2010 Author Administrators Report Posted May 29, 2010 any new version for the SMF RC2? Thanks Until they take the "RC" off of it I will wait on building anything. I have not been too impressed with 2.0 so far anyway. 1.1.11 is stable and addon's are not a big deal to be built. 2 Quote
BlackYet Posted August 12, 2010 Report Posted August 12, 2010 Hi, I'm new as writer in the forum but I'm an old-reader. I'm working with phpVMS to move my VA website from Joomla to phpVMS only, even if I was already full automated with FS Acars; but you know it is not the best around. So I discovered this fantastic add on but I was not happy at all with the user and displayed name that is imported in SMF and I decided to make this small change: the user name is now equal to "ABC1234" only while the displayed name is "FirstName Surname". Just in case you want the same the new code for the file SMFRegisterData.class.php is: class SMFRegisterData extends CodonData { public function forum_register($eventinfo) { $id = PilotData::getPilotByEmail($eventinfo[2]); $pid = PilotData::getPilotCode($eventinfo[2] , $id->pilotid); $username = $pid; $name = $eventinfo[2][firstname].' '.$eventinfo[2][lastname]; $password = $eventinfo[2][password1]; $email = $eventinfo[2][email]; $register_vars = array( 'memberName' => "'$username'", 'realName' => "'$name'", 'emailAddress' => "'" . addslashes($email) . "'", 'passwd' => "'" . sha1(strtolower($username) . $password) . "'", 'passwordSalt' => "'" . substr(md5(mt_rand()), 0, 4) . "'", 'posts' => '0', 'dateRegistered' => (string) time(), 'is_activated' => '1', 'personalText' => "''", 'pm_email_notify' => '1', 'ID_THEME' => '4', 'ID_POST_GROUP' => '4', 'lngfile' => "''", 'buddy_list' => "''", 'pm_ignore_list' => "''", 'messageLabels' => "''", 'websiteTitle' => "''", 'websiteUrl' => "''", 'location' => "''", 'ICQ' => "''", 'AIM' => "''", 'YIM' => "''", 'MSN' => "''", 'timeFormat' => "''", 'signature' => "''", 'avatar' => "''", 'usertitle' => "''", 'memberIP' => "''", 'memberIP2' => "''", 'secretQuestion' => "''", 'secretAnswer' => "''", 'validation_code' => "''", 'additionalGroups' => "''", 'smileySet' => "''", ); $query = "INSERT INTO smf_members (" . implode(', ', array_keys($register_vars)) . ") VALUES (" . implode(', ', $register_vars) . ")";instead of:class SMFRegisterData extends CodonData{ public function forum_register($eventinfo) { $id = PilotData::getPilotByEmail($eventinfo[2][email]); $pid = PilotData::getPilotCode($eventinfo[2][code], $id->pilotid); $username = $eventinfo[2][firstname].' '.$eventinfo[2][lastname].' '.$pid; $password = $eventinfo[2][password1]; $email = $eventinfo[2][email]; $register_vars = array( 'memberName' => "'$username'", 'realName' => "'$username'", 'emailAddress' => "'" . addslashes($email) . "'", 'passwd' => "'" . sha1(strtolower($username) . $password) . "'", 'passwordSalt' => "'" . substr(md5(mt_rand()), 0, 4) . "'", 'posts' => '0', 'dateRegistered' => (string) time(), 'is_activated' => '1', 'personalText' => "''", 'pm_email_notify' => '1', 'ID_THEME' => '4', 'ID_POST_GROUP' => '4', 'lngfile' => "''", 'buddy_list' => "''", 'pm_ignore_list' => "''", 'messageLabels' => "''", 'websiteTitle' => "''", 'websiteUrl' => "''", 'location' => "''", 'ICQ' => "''", 'AIM' => "''", 'YIM' => "''", 'MSN' => "''", 'timeFormat' => "''", 'signature' => "''", 'avatar' => "''", 'usertitle' => "''", 'memberIP' => "''", 'memberIP2' => "''", 'secretQuestion' => "''", 'secretAnswer' => "''", 'validation_code' => "''", 'additionalGroups' => "''", 'smileySet' => "''", ); $query = "INSERT INTO smf_members (" . implode(', ', array_keys($register_vars)) . ") VALUES (" . implode(', ', $register_vars) . ")";Regards! Quote
TAV1702 Posted August 13, 2010 Report Posted August 13, 2010 Hi BlackYet. Thanks for the contribution. Please do avoid posting that much code in a topic. Pastebin works real good. As well, you can zip the text file up and attach it. But yeah I was a wondering how to make it match the username in phpVMS. Thanks again. Quote
BlackYet Posted August 13, 2010 Report Posted August 13, 2010 Hi BlackYet. Thanks for the contribution. Please do avoid posting that much code in a topic. Pastebin works real good. As well, you can zip the text file up and attach it. But yeah I was a wondering how to make it match the username in phpVMS. Thanks again. OK, in case of other contribution I will follow your advise, many thanks and sorry for the mess!! In case you want the displayed name as ABC1234 FirstName Surname you have just to change the "$name" variable... Quote
TAV1702 Posted August 15, 2010 Report Posted August 15, 2010 OK, in case of other contribution I will follow your advise, many thanks and sorry for the mess!! In case you want the displayed name as ABC1234 FirstName Surname you have just to change the "$name" variable... Hey no probs. I am no authority figure, I was just saying is all. Kind advice. thanks for your understanding. It just makes the forum look much cleaner. And please do feel free to contribute any time. That's what this place is all about. Take Simpilot for example since we are in his threads here. And I am gonna try out your code snippet for the smf register and see if she works for me or not. I hope so. I really like your idea. Quote
Jon Posted December 31, 2010 Report Posted December 31, 2010 Is There Anyway Of Changing the database it writes them to? Happy New Year, Jon Quote
Moderators mark1million Posted December 31, 2010 Moderators Report Posted December 31, 2010 Is There Anyway Of Changing the database it writes them to? Happy New Year, Jon Hi Jon, Yes just call the mysql connection before the script, mysql_connect("localhost", "db_username", "db_pw") or die(mysql_error()); mysql_select_db("Your_database") or die(mysql_error()); Your code mysql_close(); Or to be more secure you could use a require, ie create a file, forum_config.php or anything you like and add it in to the page, <?php require("forum_config.php"); ?> Quote
Jon Posted December 31, 2010 Report Posted December 31, 2010 Hi Mark, Thanks For That, Happy New Year Jon Quote
Jason Posted February 26, 2011 Report Posted February 26, 2011 Can this also work that if they sign up at the forum, their account will also be registered on phpvms? Quote
Moderators Kyle Posted February 26, 2011 Moderators Report Posted February 26, 2011 No It won't work that way. It has to be done via VMS and the module will do it's work to the SMF database. Quote
Cor Posted March 2, 2011 Report Posted March 2, 2011 Hello all, Is there somebody with the solution to register the pilot into the forum when they are excepted. Now for example when somebody register to the VA he is assigned with the callsign VBV113, but because there is no VBV050 anymore I change the VBV113 to VBV050 before I accept the pilot but in the forum he is registerd as VBV113. Also we need something that if somebody changes his password on the site that automaticly also his forum password changes and the last thing what would be nice is that if you go from the site to the forum you automaticly been signed in. I have this at this moment with Joomla. Maybe somebody has some solutions Regards, Cor Quote
Administrators simpilot Posted March 3, 2011 Author Administrators Report Posted March 3, 2011 The module is not a bridge, it is only a system to auto register the pilot in the forum when they signup with the VA. I would love to see how you built the bridge for the phpVMS to Joomla link though, if you were willing to share I will see if I can adapt it to the smf forum. That has been the biggest hang I had was getting the two login systems to mesh together as they use different password hashes and session data. If I could see how you intergrated Joomla I am be able to adapt the concept to smf. Quote
Cor Posted March 3, 2011 Report Posted March 3, 2011 Hi Dave, Look at http://www.jfusion.org/. This I am using at this moment with Joomla. It provides 1 login for all systems Regards, Cor Quote
Administrators simpilot Posted April 22, 2011 Author Administrators Report Posted April 22, 2011 Hi. Is this working with 1.1.13? It should work without issue on the latest 1.x version of smf, it will not however work with the new 2.x versions Quote
STALKER Posted July 21, 2012 Report Posted July 21, 2012 Installed and working, thank you very much! Quote
TAV1702 Posted October 9, 2012 Report Posted October 9, 2012 I'm curious. Has anyone ever made this so when a pilot logs on to the website, it logs them in to the forum as well? So If I am browsing my VA website and click the forum link, it recognizes the cookie and I would be logged in. Was just curious if anyone every figured out a way to do that or not. I understand that this is not a bridge and it does in fact work great as Simpilot has coded it. Many kudos Simpilot! Quote
CPC900 Posted October 9, 2012 Report Posted October 9, 2012 I have not Have to login to both website AND forum separately. And when I jog into forum, it logs me out of website. But if I log into Forum first, then log into website, they both stay active. Quote
CrashGordon Posted October 22, 2012 Report Posted October 22, 2012 Has anyone tried this with SMF 2.0.2? Quote
TAV1702 Posted October 22, 2012 Report Posted October 22, 2012 I have not. Simpilot said it will not work with any 2.x version. Quote
CrashGordon Posted October 22, 2012 Report Posted October 22, 2012 Thanks. I missed that, but had a hunch. Quote
Administrators simpilot Posted November 3, 2012 Author Administrators Report Posted November 3, 2012 There is a version for SMF2.x HERE -> http://forum.phpvms.net/topic/5695-smfregister-20/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.