Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Flask & myBB
#1
I'm creating a website using Python Flask and will be using SQLite3 for the database. I want to integrate a forum into the site preferably using myBB but I want it so that users registering on my site will already have an account/logged in on the forum. How would I be able to do this?

The forum will be a brand new installation.
Reply
#2
The best way is to use the user datahandler which is in inc/datahandlers directory. You'll need to include the file and use the validate_user method first and then the insert_user method.
Reply
#3
(06-04-2017, 08:04 PM)dragonexpert Wrote: The best way is to use the user datahandler which is in inc/datahandlers directory. You'll need to include the file and use the validate_user method first and then the insert_user method.

Is there some sort of tutorial somewhere? Not too good with php unfortunately
Reply
#4
Can anyone point me in the right direction?
Reply
#5
Here's how MyBB does user registration: https://github.com/mybb/mybb/blob/featur...r.php#L153
Lines 153 - 203 are the actual insert into db with the UserDataHandler.

What you need to do is make some sort of API plugin that lets you send commands from your flask app to MyBB. Basically when a user registers on your flask site, the info needs to be copied over to MyBB and inserted properly with the UserDataHandler to register with MyBB. Your API will let you pass this data between the two apps [securely hopefully] and keep your MyBB registrations identical to your website registrations.
[My Plugins]

** Selling custom plugin that enables Bitcoin to be used as a payment system. PM for details if interested in purchasing! **
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)