Nabeel
Thanks for the code for phpbb3 , after the change on phpvms forum system , I’m thinking about changing our forum
from phpbb to ip.board too , do you have the same integration code but for ip.board ?
Thanks
Nabeel
Thanks for the code for phpbb3 , after the change on phpvms forum system , I’m thinking about changing our forum
from phpbb to ip.board too , do you have the same integration code but for ip.board ?
Thanks
phpBB uses a special user_add() function and a different method of encryption to MD5, now.
At the moment, I am coding an automatic forum account module that uses the proper API calls from phpVMS and phpBB.
Will let everyone know when it is finished!
Thanks a lot Kieran! Look forward to that one!
Nabeel
Thanks for the code for phpbb3 , after the change on phpvms forum system , I’m thinking about changing our forum
from phpbb to ip.board too , do you have the same integration code but for ip.board ?
Thanks
IP.Board has an addin called “Converge” for single-sign in, so it will probably involve that. I don’t know any specifics though
phpBB uses a special user_add() function and a different method of encryption to MD5, now.
At the moment, I am coding an automatic forum account module that uses the proper API calls from phpVMS and phpBB.
Will let everyone know when it is finished!
Cool, this is what I was saying earlier in the thread, to use the phpBB functions for doing to, to ensure things don’t break going forward.
Is there an event for when a user is approved? I don’t want to create the forum account on registration if the user has to be approved first.
I’ve got everything working using phpBB’s functions, just need to do the phpVMS side of things now
A major problem I have is trying to include the phpBB files without codon/phpbb frameworks clashing.
Is there a way that phpVMS can find event listeners from external locations?
BTW Nabeel error with the forums I think, I’ve subscribed to this post and I get about 5 emails when somebody posts a message!
Is there an event for when a user is approved? I don’t want to create the forum account on registration if the user has to be approved first.
I’ve got everything working using phpBB’s functions, just need to do the phpVMS side of things now
A major problem I have is trying to include the phpBB files without codon/phpbb frameworks clashing.
Is there a way that phpVMS can find event listeners from external locations?
BTW Nabeel error with the forums I think, I’ve subscribed to this post and I get about 5 emails when somebody posts a message!
Check your subscriptions, maybe it’s something wrong with that?
Hopefully the frameworks won’t clash. From external locations, what do you mean? It’s within the module, so I’m not sure how off the top of my head. It will need some modifications for sure. And a user approved event, there isn’t since that’s on the admin side. I guess if you reject the pilot, then you’d have to delete it from the forum admin side.
Check your subscriptions, maybe it’s something wrong with that?
Hopefully the frameworks won’t clash. From external locations, what do you mean? It’s within the module, so I’m not sure how off the top of my head. It will need some modifications for sure. And a user approved event, there isn’t since that’s on the admin side. I guess if you reject the pilot, then you’d have to delete it from the forum admin side.
When trying to include the files required from, it doesn’t like the codon directory structure and shows an error message. I was thinking perhaps not registering the account automatically, but rather including a link in the ‘registration complete’ email that would create the account for them.
I got this working sweet as with SMF 1.1.11, thanks!
I also managed to skin SMF pretty much to how I wanted it, and have also given SMF some cool add-ons.
When trying to include the files required from, it doesn’t like the codon directory structure and shows an error message. I was thinking perhaps not registering the account automatically, but rather including a link in the ‘registration complete’ email that would create the account for them.
Yes you could do that, or automatically do a POST request to another page which does it. But clicking a link or having a form with hidden fields and passing it all to the next page with the submit button that says “continue” will work.
What’s the error it shows? If you include just /core/codon.config.php, does it give an error?
I’ve just done the worst imaginable thing and deleted the contents of my home directory accidentally - Ive got a backup from last tuesday but this script might be delayed until the weekend Sorry guys…
However, on the bright side, I will be coding two things once I’m back up and running:
-A link in an email message that registers a forum account for people.
-A form with hidden fields and submit link that would go in the pilot center, for example.
The phpBB/phpVMS clash isn’t really a problem anymore but decoding the Md5 passwords stored by phpVMS, and reencoding them using phpBBs new format will be a challenge.
I’ve just done the worst imaginable thing and deleted the contents of my home directory accidentally - Ive got a backup from last tuesday but this script might be delayed until the weekend Sorry guys…
However, on the bright side, I will be coding two things once I’m back up and running:
-A link in an email message that registers a forum account for people.
-A form with hidden fields and submit link that would go in the pilot center, for example.
The phpBB/phpVMS clash isn’t really a problem anymore but decoding the Md5 passwords stored by phpVMS, and reencoding them using phpBBs new format will be a challenge.
Hi, im no coder but what i do know is you can use the phpbb3 user add with a plain text password and that api will do all your work, also its possible to get the plaintext password out of the phpvms registration and feed that in to the user add function.
Hi, im no coder but what i do know is you can use the phpbb3 user add with a plain text password and that api will do all your work, also its possible to get the plaintext password out of the phpvms registration and feed that in to the user add function.
That’s the thing, see.
I have everything sorted with the phpBB API, but this won’t be an automatic forum account on registration script…
It will send a link via email to a script that will get the users info from the DB (using the phpvms api) and put it in accordingly.
I suppose one solution is to use a ‘Default password’ that the user can change themselves when they log in…
Will keep everyone posted, my host has just restored a backup from last tuesday, but I lost a lot of work.
BE CAREFUL WITH SSH AND DO REGULAR BACKUPS! Is what I learnt the hard way from this!
Onde eu ponho isso?
Thats what im using bb3, here is the code for phpbb3. as you are taking the data from a sanitised source all of the safe guards have been removed, valid email etc… This code takes the data from the existing redistration page and puts it directly in to bb3 db. I have not had chance to check fully but will be testing tonight.
<?php /** * Created on 22-nov-2008 17:10:39 * * Phpbb3 -- register_extern.php * @author  Ramon Fincken http://www.ramonfincken.com/permalink/topic82.html * @author  Mr Kirkland   http://www.mrkirkland.com/adding-a-user-to-phpbb3-from-an-external-script/ */ define('IN_PHPBB', true); $phpbb_root_path = ''; // Your path here $phpEx = substr(strrchr( __FILE__ , '.'), 1); include($phpbb_root_path . 'common.php'); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); require($phpbb_root_path .'includes/functions_user.php'); $username = ''; $password = ''; // Do NOT encrypt ! $email = ''; // Please validate this email yourself ! Phpbb will accept non-valid emails. // Do a check if username is allready there, same for email, otherwhise a nasty error will occur $user_row = array( 'username' => $username, 'user_password' => md5($password), 'user_email' => $email, 'group_id' => 2, #Registered users group 'user_timezone' => '1.00', 'user_dst' => 0, 'user_lang' => 'en', 'user_type' => '0', 'user_actkey' => '', 'user_dateformat' => 'd M Y H:i', 'user_style' => 1, 'user_regdate' => time(), ); $phpbb_user_id = user_add($user_row); echo "New user id = ".$phpbb_user_id; /code] ?\> Let me know if you get it working ;D hopefully find the time tonight fingers crossed.....
I realize this is a very old thread. I am wondering does anyone have any recent examples of integrations they have done with phpVMS and phpBB? Is the information that Nabeel provided in this thread still valid today? Is thre any type of security issue as it relates to the “connect statement” as mentioned in a couple of responses?
Regards,
Nat
I haven’t used this in a while (hence why I’m not sure if it will work)
But you could try using this
<?php
class PHPBBRegister extends CodonModule
{
public function __construct()
{
CodonEvent::addListener('PHPBBRegister');
}
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'];
$uinfo = PilotData::GetPilotByEmail($userinfo['email']);
$code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid);
$pilot_id = $fname.' '.$lname;
$pilot_id_klein = strtolower($pilot_id);
$passMD5 = md5($pass);
$tm = time();
$query = "INSERT INTO phpbb_users (
user_type,
group_id,
user_regdate,
username,
username_clean,
user_password,
user_passchg,
user_email,
user_posts,
user_lang,
user_dateformat,
user_style,
user_rank
)
VALUES (
'1',
'2',
'$tm',
'$pilot_id',
'$pilot_id_klein',
'$passMD5',
'0',
'$email',
'0',
'en',
'D M d, Y g:i a',
'1',
'0'
)";
DB::query($query);
}
}
}
Just put it in a folder called PHPBBRegister inside core/modules
so
core
modules
PHPBBRegister
PHPBBRegister.php (is the file above)
Otherwise you can check out Dave’s version for SMF here https://github.com/D…MS-SMF_Register and change a few table names
Which I guess is more up-to-date