Administrators simpilot Posted May 20, 2010 Administrators Report Share 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 Link to comment Share on other sites More sharing options...
Moderators joeri Posted May 20, 2010 Moderators Report Share Posted May 20, 2010 just tested and working like a charme.thanks for the help and this is working verry nice gr joeri Quote Link to comment Share on other sites More sharing options...
faraz Posted May 20, 2010 Report Share Posted May 20, 2010 Thanks simpilot for this module Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted May 29, 2010 Moderators Report Share Posted May 29, 2010 any new version for the SMF RC2? Thanks Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 29, 2010 Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 29, 2010 Author Administrators Report Share 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 Link to comment Share on other sites More sharing options...
Artjom Posted May 31, 2010 Report Share Posted May 31, 2010 Â Thanks for SMFRegister ! Â 1 Quote Link to comment Share on other sites More sharing options...
BlackYet Posted August 12, 2010 Report Share 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 Link to comment Share on other sites More sharing options...
TAV1702 Posted August 13, 2010 Report Share 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 Link to comment Share on other sites More sharing options...
BlackYet Posted August 13, 2010 Report Share 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 Link to comment Share on other sites More sharing options...
TAV1702 Posted August 15, 2010 Report Share 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 Link to comment Share on other sites More sharing options...
Jon Posted December 31, 2010 Report Share Posted December 31, 2010 Is There Anyway Of Changing the database it writes them to? Happy New Year, Jon Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted December 31, 2010 Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Jon Posted December 31, 2010 Report Share Posted December 31, 2010 Hi Mark, Thanks For That, Happy New Year Jon Quote Link to comment Share on other sites More sharing options...
Jason Posted February 26, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
Moderators Kyle Posted February 26, 2011 Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Cor Posted March 2, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
Administrators simpilot Posted March 3, 2011 Author Administrators Report Share 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 Link to comment Share on other sites More sharing options...
Cor Posted March 3, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
vazquezjm Posted April 22, 2011 Report Share Posted April 22, 2011 Hi. Is this working with 1.1.13? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted April 22, 2011 Author Administrators Report Share 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 Link to comment Share on other sites More sharing options...
STALKER Posted July 21, 2012 Report Share Posted July 21, 2012 Installed and working, thank you very much! Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 9, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
CPC900 Posted October 9, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
CrashGordon Posted October 22, 2012 Report Share Posted October 22, 2012 Has anyone tried this with SMF 2.0.2? Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 22, 2012 Report Share Posted October 22, 2012 I have not. Simpilot said it will not work with any 2.x version. Quote Link to comment Share on other sites More sharing options...
CrashGordon Posted October 22, 2012 Report Share Posted October 22, 2012 Thanks. I missed that, but had a hunch. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 3, 2012 Author Administrators Report Share Posted November 3, 2012 There is a version for SMF2.x HERE -> http://forum.phpvms.net/topic/5695-smfregister-20/ Quote Link to comment Share on other sites More sharing options...
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.