Hi all,

How to merge a forum into a pre-exisiting website? All what i mean is i took a forum(which has its own registration , sigin-in feature) and a preexisting website (which too have its registration and signin feature). Both are now hosted in the same domain and use different databases.

There are no registered users in forum yet but there are registered users in the website.

I want to remove the registration, log in features of the forum and merge it with the website registered data so that when users logs into the website they can access the forum too without signing in again in the forum.
I am trying with MyBB forum to merge it into website login details.

I have a vague idea that , i can insert user name and password into forum database manually and use cookies or sessions to remember the signin details when the forum is accessed from the website. But this again has some problems.

I would like to know your valuable suggestions and better ways in achieving a better solution for this problem.

Thank you:)

Recommended Answers

All 3 Replies

if you already have the users on the website i would just use that databse to auth the user and then use the other one you are setting up for the forum just for the data from the forum so when the user login he only has to login once unless you want to copy all the users from that databse and move it to the forum but then he would have to login twice which annoys alot of people

you will probley have to do some editing to the login form from the fourm or even get rid of it and use the one from the website

commented: thank you +1
Member Avatar for diafol

Duplicate the login form of the forum on your website and have it send details to the forum form handler. If the form handler doesn't send you back to the website page automatically, write in some code to do so (e.g. HTTP_REFERER). Your website probably uses a different method to keep session data alive? If so, cut and paste the 'keep session alive' bits from the forum pages (perhaps in a common.php or session.php include file) or simply include these files in your webpages. Is it possible to merge your DBs? If you use the forum auth for everything, your website DB may become unusable. There are a few ways around this, e.g. set up a new table with 3 fields: id(autoinc); forum_user_id; web_user_id and link them like this. I had a similar problem a few years ago with phpBB. I just used the phpBB system in the end and spent a week reconfiguring my old DB.

commented: thankyou +1

thank you HITMANOF44th , ardav.
I am working along those lines and shall post back the results.
thank you once again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.