Is it possible for the pilot to automatically sign upto the forums when they sign up for the va?
cheers,
roboa
Is it possible for the pilot to automatically sign upto the forums when they sign up for the va?
cheers,
roboa
Search the forum and you will find codes to insert.
What forum system are you using?
SMF forums.
Search the forum and you will find codes to insert.
Ok, i’ll take a look.
thanks,
roboa
Ok, I found the code for the smf forum. Where do I put this? Also I was testing the registration form and it just keeps on going back to the registration form and not processing anything. Any suggetsions?
cheers,
roboa
Is there coding avalible for phpBB forums?
Roboa,
These are the steps I posted in a different thread (possibly the one you found the code in) and it all worked fine for my SMF integration (assuming you are using the same database for the forum and PHPVMS)
* Step 1: Create a new folder in /core/modules called ForumRegister
* Step 2: In that folder create a new php file called ForumRegister.php
* Step 3: Copy and paste in the following code
Code: [select]
<?php
class ForumRegister extends CodonModule
{
public function __construct()
{
CodonEvent::addListener(‘ForumRegister’);
}
public function EventListener($eventinfo)
{
if($eventinfo[0] == ‘registration_complete’)
{
$userinfo = $eventinfo[2];
$fname = $userinfo[‘firstname’];
$lname = $userinfo[‘lastname’];
$pass = $userinfo[‘password1’];
$email = $userinfo[‘email’];
$code = $userinfo[‘code’];
$get_uinfo = mysql_query(“SELECT * FROM phpvms_pilots WHERE firstname='”.$fname.“’ AND lastname='”.$lname.“’ AND email='”.$email.“'”);
$uinfo = mysql_fetch_array( $get_uinfo );
$str = $uinfo[‘pilotid’];
$pilot_id = str_pad ($str,4,“0”,STR_PAD_LEFT);
$pilot_id = $code.$pilot_id;
$pilot_name = mysql_escape_string ($fname. ’ ’ .$lname);
$passsha1 = mysql_escape_string (sha1(strtolower($email) . $pass));
$passsalt = substr(md5(mt_rand()), 0, 4);
$email = mysql_escape_string($email);
$tm = time();
mysql_query(“INSERT INTO smf_members (member_name, real_name, passwd, email_address, hide_email, id_group, time_offset, location, lngfile, validation_code, id_theme, is_activated, id_msg_last_visit, date_registered, password_salt) VALUES ('”.$email.“', '”.$pilot_name.“', '”.$passsha1.“', '”.$email.“', ‘1’, ‘4’, ‘’, ‘’, ‘’, ‘’, ‘0’, ‘1’, ‘1’, '”.$tm.“', '”.$passsalt.“')”);
$member_id = mysql_insert_id();
mysql_query(“update smf_settings set value = ‘$pilot_name’ where variable=‘latestRealName’”);
mysql_query(“update smf_settings set value = ‘$member_id’ where variable=‘latestMember’”);
}
}
}
?>
Regarding the registration issue, are you using the latest build which contains the captcha ?
I was having a similar issue until I realised I was still using an older version without the captcha
The captcha shouldn’t matter, since you’re bypassing a form and going straight to a database
The registration form was fixed with the help of Roger a while ago, but thanks all the same!
roboa
Is it possible to do with phpBB
A quick search pulled up this: http://phpvms.net/forum/index.php?topic=272.0
roboa
This doesn’t work, stop telling people it does.
It’s probalby missing some queries. I would advise looking at the bridge scripts for smf and find ‘clues’ in there as to the proper sequence
Guys, just to clarify, the integration code does work fine with SMF (at least with the version of SMF that I’m using anyway, which is SMF 2.0 RC1 Public Released on February 04, 2009), but not sure about PHPBB integration as I don’t use that. Having said that, all I did was take the original PHPBB code posted by Mark and change the variables to those used by SMF, then tweaked it for creating a password salt and running the latest member query etc and it works a treat.
Surely, someone using PHPBB must also have got this to work by now ?
I am using SMF 1.1.8 and it doesn’t work. It shows in the newest member field but never actually creates the user in the database.
I personally can’t stand PHPBB.
Hi Roger,
It’s possible that there’s a version conflict in that case then.
Oh btw, that last reply is much better than your original, as detailed info is preferable to simply saying it doesn’t work and asking me to stop telling people it does, when it’s clearly working 100% for me
Working together is the way to get things achieved, so we need to find out what the differences are between various setups.
OK, first things first, are the tables in your version of SMF named exactly as those in the query ?
Secondly, what field type is member_name (assuming it’s called that in your version) ?
Mine is set to varchar(80)
Everything appears to check out. Mine is also varchar 80. Tables check out
Okey doke, in which case I’ll download and install 1.18 over the weekend and see if I can figure out what the difference is.
I have been trying a script in a different topic and it was made for phpBB which I am using. But I am having trouble making it work. So I contacted somebody who I know and he has been helping me alot with my site, but he updated the registration in the phpVMS thing and I tried to put it in and my sites down. I am going to tell him that it didn’t work and see what happens from there. But I am not a good person at programming at all.
To add, I have now sorted two problems which were there but there is another one which the person couldn’t help me with. Its this message:
Parse error: syntax error, unexpected ‘/’ in /home/goldenair/domains/goldenairways.co.uk/public_html/core/modules/ForumRegister/ForumRegister.php on line 44
Please could somebody help me with it as I have no idea how to do it. Thanks.
Could you post the code for line 44?