Jump to content

PHPBB3 Bridge to WHMCS


herpherp

Recommended Posts

This is not fully complete I only have 1 more process to add, which is the change password function in whmcs to change the password in phpbb3 as well...

 

I make no guarantees on this code as it is still in raw state, probably needs refining and secured etc...

 

The instructions are included in the attachement...

 

Basically what you can accomplish with this in it's current state is...

 

Automatic registrations in phpbb3 once a customer registers in whmcs....

Customers Username will be Firstname+ClientID Password will be the same as whmcs and the email will also be pushed to phpbb...

 

Autologin button from whmcs to phpbb3

 

Next step change password integration then, it will be fully integrated!(will be completed in the next few days)

 

It's up to you how you handle phpbb I outlined some suggestions in the instructions but there are too many templates for me to try to give instructions.... For instance you may want to forward registration attempts from phpbb to whmcs... You may want to remove login options from phpbb etc....

 

Let me know if you find more efficient ways of doing this....

 

and no a simple database insert is not an option with phpbb unfortunately.

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Updated to include user detail change script....

 

Full files and instructions included in this file(no need to download the other)

 

 

If you are thinking about utilizing this keep in mind my goals and setup....

 

I will be restructuring my phpbb so that users can not register or login from the forum site but will have to register on my whmcs site in order to gain access to the forum...

 

I do not allow username changes, pw change or email changes for users on the forum they would have to do this in whmcs

 

I do not allow first/last Name changes in my whmcs (this may cause issues with the user details script as the first name is part of the identifier for the update)

 

 

I am sure that things could be changed in the script to work for other situations, but wanted to ensure that you understand the current setup....

 

Again this script may or may not need some security added or some code edited to make them more efficient but my goal here was to get it working...

 

Once I completely finish my phpbb editing I will probably look again at this script to see if I can make it more efficient and secure(It may not need editing I just haven't looked at those aspects yet).

 

Hopefully someone finds this useful....

 

Good luck and happy editing....

whmcs-phpbb-Bridge-files.zip

Link to comment
Share on other sites

  • 5 weeks later...
I utilize it without problems... If you want to elaborate on "it did not work" someone may be able to offer up some help as to why you can't get it to function...

 

Configuration files were edited, I then ran the WHMCS registration, the user was created in WHMCS, but the user was never created in phpbb3.

Link to comment
Share on other sites

I would personally ensure that your paths are correct in the the script...

 

when I created the script I was not able to use the normal /path I had to use direct paths such as /home/user_name/public_html .... It seems Mattg is utilizing a separate domain for forums(this may be the issue) I would try testing within the same domain.

gerzok

If using subdomains for your whmcs or phpbb3 you need to make sure that the paths are correct, these are going to be unique for everyone and seems the only possible issue that anyone could be running into(unless password/login to mysql is incorrect).

 

I am not positive that this script will work with phpbb3 and whmcs on different domains/subdomains but I do not see why it wouldn't if all the paths are correct, you need to keep in mind that when using document_root and include you're looking(telling the server the path) for the script on that specific domain etc...

Link to comment
Share on other sites

I follow the instructions step by step but I can't make it to work. I've phpbb 3.0.3 version, only to recive the e-mail with username and password correctly but it doesn't work. any idea? :?:

I would check error logs to start with, I would ensure that the email address that you are using is not already in use in phpbb. I would again check to ensure that the paths are functioning correctly....

 

If your includes(paths) were functioning correctly and it was a matter of not being able to connect to either whmcs or phpbb database than you should receive an error notice stating "could not connect to xxx database"

 

If you can still not get it functioning, you may want to post your site,forum,whmcs paths or attach the edited files I can take a look at them for you--------- Just ensure that you edit the passwords in the files so that they are not given out, just replace with PASSWORD(unless that is your actual password HA!)....

 

I am in the middle of setting up some servers, and have a 2 month workload right now, I don't have my original site with this script installed right now so I wouldn't be able to do much trouble shooting for you, but I can at least take a look at the files and see if I can notice anything...

Link to comment
Share on other sites

Thank you for this. Any idea on how can this be done for SMF?

 

I've never opened/installed smf but I have checked and the registration seems to be similar....

Try creating a page with the following code for example bridge.php

add to your root whmcs folder or anywhere else you want as long as paths are correct below...

Change /path/to/smf/SSI.php & WHMCS_DATABASE_NAME

<?php
function createUser(){

global $db_name, $db_prefix, $sourcedir, $boarddir;

require_once ("/path/to/smf/SSI.php");


$smfuserpassw = decrypt($vars[Password]);

 mysql_select_db($db_name);  

  $regOptions = array(
     'interface' => 'guest',
     'username' => $vars[FirstName].$vars[iD],
     'email' => $vars[Email],
     'password' => md5($smfuserpassw),
     'password_check' => md5($smfuserpassw),
     'check_reserved_name' => true,
     'check_password_strength' => true,
     'check_email_ban' => true,
     'send_welcome_email' => false,
     'require' => 'nothing',
     'extra_register_vars' => array(), \\NOT POSITIVE IF YOU NEED THIS LINE
     'theme_vars' => array(), \\NOT POSITIVE IF YOU NEED THIS LINE
  );
 \\NOT POSITIVE IF YOU NEED THIS NEXT SECTION  
  if (isset($_POST['default_options']))
     $_POST['options'] = isset($_POST['options']) ? $_POST['options'] + $_POST['default_options'] : $_POST['default_options'];
  $regOptions['theme_vars'] = isset($_POST['options']) && is_array($_POST['options']) ? $_POST['options'] : array();

  require_once($sourcedir . '/Subs-Members.php');
  $memberID = registerMember($regOptions);


  mysql_select_db($config["WHMCS_DATABASE_NAME"]);
?>

 

And in action hooks use an include under ClientSignup

Change /PATHTOWHMCS/bridge.php

function actionhook_ClientSignup($vars) {
include ($_SERVER['DOCUMENT_ROOT'] . '/PATHTOWHMCS/bridge.php'); 
}

You can alternatively add the code in actionhooks but I personally like to keep my code separate and just use includes... Hopefully this at least gets you in the right direction, let us know how it turns out

Link to comment
Share on other sites

  • 3 weeks later...
I would check error logs to start with, I would ensure that the email address that you are using is not already in use in phpbb. I would again check to ensure that the paths are functioning correctly....

 

If your includes(paths) were functioning correctly and it was a matter of not being able to connect to either whmcs or phpbb database than you should receive an error notice stating "could not connect to xxx database"

 

If you can still not get it functioning, you may want to post your site,forum,whmcs paths or attach the edited files I can take a look at them for you--------- Just ensure that you edit the passwords in the files so that they are not given out, just replace with PASSWORD(unless that is your actual password HA!)....

 

I am in the middle of setting up some servers, and have a 2 month workload right now, I don't have my original site with this script installed right now so I wouldn't be able to do much trouble shooting for you, but I can at least take a look at the files and see if I can notice anything...

 

Well, All it right with paths, etc. but when type in directly http://www.wevxs.com/orders/bridge.php I get an error:

 

Fatal error: Call to undefined function decrypt() in /home/vxsmx/public_html/orders/bridge.php on line 25

 

what's wrong??? I was watching this and I think maybe can help http://wiki.phpbb.com/Add_users

 

regards :)

Link to comment
Share on other sites

My whmcs version is 3.8.1... what can I do? :?

 

Well you can either figure it out, or sit around and wait for someone else to do it for you:roll::twisted: I am personally not going to be utilizing phpbb anymore so if someone else wants to take over the script and update as needed they can feel free. I am sure that someone can fill us all in on if decrypt is no longer used and if not what the current process is...

Link to comment
Share on other sites

  • 4 weeks later...

Since.. herpherp has released his code, I am furthering this project. I will be building this to more of a full integration with whmcs and phpBB3.. I decided it just was not as feasible to to build a forum that was part of whmcs since the encryption really prevents anyone from building it as it should be. phpBB3 is a very powerful board, and will work quite nicely.

 

I have already began on the Admin Module, and making good progress on it. whmcs client will be able to register for forum account in their panel. The admin module will have an enable and disable function as well as the whmcs Full Administrators will be automatically set as Forum Admin, and support and sales will be set as Moderators.. You will still have control of the Admin panel in phpBB 3 so you can change admin ranks and still do everything you need to do there.. I believe this will turn out to be the integration I originally started out to do, but just would not work with my original idea because of the encryption level of whmcs.. I will hopefully have a Beta v1 out sometime this week or next.

Link to comment
Share on other sites

Of course we have paypal, but $$ is not my objective, so I don't need any contribution. I am getting close (as I have been working a lot on the gaming side) but still need to input a few more features. like adding your admins and moderators from your whmcs admin panel. Being able to disable the boards from the admin panel...

 

I also have two options for the database, and need some feedback as to what y'all prefer. I know how I want it on my site, but for you I need to know.

1. The forums database is part of whmcs database.

2. the forums database is completely seperate.

 

Please give me some feedback, as to how you prefer this.

 

Thanks

Link to comment
Share on other sites

I prefer that the database to be completely separate for easy management. So do you have the SMF version ready as well?

 

One at a time bro. :) lol....

 

I want to get phpbb 3 working into at least a beta before I go into SMF... Most of the code will transfer anyways, just have to make a few modifications to set the SQL parameters SMF.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated