SMFRegister 2.0
phpVMS module to automatically register a new pilot in your smf 2.0 forum.
This is simply an auto registration feature for new pilots, not a bridge.
Released under the following license:
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Developed by:
simpilot
Developed on:
phpVMS ver 2.1.934-158
smf ver 2.0
php 5.3
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 2.0, 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.
Although not required, a link back to www.simpilotgroup.com would be greatly appreciated!
Have fun!
Code hosted on Github - Link In Signature.
Jeff
September 1, 2011, 1:53am
3
I just changed over from phpBB to SMF 2.0 and cannot get this to function. The folder (forum) is located in the same place as all of my other files (public_html/forum) It is also tied to smf_ in my database.
The database tables for phpvms and smf both need to be in the same database.
Jeff
September 1, 2011, 2:22am
5
Can I change them over without losing my registered members, or will I just have to redo it?
You can move your smf tables into the same database with your phpvms tables then change the config in your smf install to point at the right database. You should not lose anyone.
Jeff
September 1, 2011, 2:25am
7
I am not familiar in messing with databases, so a little (or a lot) of help might be needed. I am on fivedevâs server if that helps.
Using phpMyAdmin export the smf database to a file then import the file into the phpvms database.
Then edit the settings.php file in your smf install to refelect the change of database.
Jeff
September 1, 2011, 2:31am
9
Let me give it shot. Will return with the result.
Jeff
September 1, 2011, 2:38am
10
Error
SQL query:
â
â Database: virtualf_smf
â
CREATE DATABASE virtualf_smf DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said:
#1007 - Canât create database âvirtualf_smfâ; database exists
Can I PM you my information and see if you can get it to work? I really do not want to mess my database up.
If you run the installer again and choose your existing phpVMS database to install the tables, or you can do a dump of your existing and import in to the phpVMS database which would be easier as you would have populated data.
Then just change the config file with your new connection settings and database name.
If you want to pm me your loginâs I will switch it for you, and I would suggest doing it through Team-Viewer so you can see how it is done.
Jeff
September 1, 2011, 5:07pm
13
I got it working. Thanks Mark and SimPilot
Now if I can figure out why it doesnât send out an Activation E-Mail ( I have it disabled for now, and have Auto Activation enabled)
Jeff
September 6, 2011, 5:24pm
14
Is there something I can change for when a new member registers that it will register with the Pilot ID then the Username instead of how it is currently setup?
Instead of John Smith ABC1234
have it as ABC1234 John Smith
You can adjust how the username is registered in the SMFRegisterData.class.php file on line 18
Jeff
September 8, 2011, 3:15pm
16
Can you see if I did this correctly? I donât usually mess with the Data.class files.
Original code (Line 18)
$username = $eventinfo[2]['firstname'].' '.$eventinfo[2]['lastname'].' '.$pid;
Edited code (Line 18)
$username = $pid.' '.$eventinfo[2]['firstname'].' '.$eventinfo[2]['lastname'];
Result
$id = PilotData::getPilotByEmail($eventinfo[2]['email']);
$pid = PilotData::getPilotCode($eventinfo[2]['code'], $id->pilotid);
$username = $pid.' '.$eventinfo[2]['firstname'].' '.$eventinfo[2]['lastname'];
$password = sha1(strtolower($username . $eventinfo[2]['password1']));
$salt = substr(md5(mt_rand()), 0, 4);
$time = time();
$email = $eventinfo[2]['email'];
Looks like you have got it Jeff
Link is not work, please put a new link. Thanx!
[#10173 ] We could not find the attachment you were attempting to view
Tom
March 10, 2012, 6:25pm
20