MyBB Forum Software Code Modification

mihir

VIP Member
This is my college's website - http://www.coep.org.in/
And you will see a tab named MyCOEP on the right hand side tab menu bottom.
Everyone in our college has email ids like lastnamefirstmiddlenameinitialsyearofjoining.deptarment@coep.ac.in

So suppose your name is Steve Bill Page and you joined our college in 2009 and your department is computers then your id is pagesb[email protected]
So you get the general idea right.

We use microsoft email service.
So here is the link to my forum http://www.coep.org.in/forum
I am trying to implement a single sign on the website.

So suppose if I login using the myCOEP link and then I want to access the forum I should be pre-logged in the forum.
I will be using session variables. So if you are visiting for the first time then you will be directed to the registration page where your username would be pagesb09.comp and you won't be asked for a password.
I am using the 16bit unique id as password.Which the user will never have to enter.So if he clicks on login on the forum he will be redirected to the myCOEP login page.
And if you have already registered and logged in MYCOEP then once you visit the forum you should be automatically logged in so once they have logged in I will use their email's substring as their userid which is the form I am saving them in the database and will also be passing their unique 16bit key as their password. And once I have internally logged them in the mybb forum(the login process will be invisible) I will redirect them to the forum home page.


I hope I you got all of that.


So my problem is which all phpscripts would I have to edit to make all of the above changes.
I have tried member.php but which script would I have to edit so that instead of a text field in the registration action it shows me the username which is a substring of the email.
Like I have made edits in the member.php so that it save the email substring as username only, but I want it to display that to the user too, so which file do I edit for the modifying that display thing.
And same goes for login and etc.


Please help Please I have no idea which files would have the code which would let me make these changes.

BTW the forum is only for my University Students.
 

sshaggy

Member
I don't know what CMS your website is using, but MyBB is using, most probably a different MySQL database than the one used by your current website.
To solve the problem, you need to bridge the users table of both the databases. It will be something sort of an authentication on the forum, based on the logged-in status of the website. This problem is little complex. If you give me more access to the files (preferable cPanel, or hosting server access) of the website, I might be able to help you.
 

mihir

VIP Member
Did not have time when I posted this.
Here is how I did it.
I created another php script test.php which takes in the session variables and then sends a query to the database to check whether there is an entry in the database or not.
If not there, it automatically fills in the registration form, had to do a lot of modifications in the file member.php . Had to set the action to do_register. And Then redirects them to index.php and then signs them in.

And if the entry exists in the database it signs them and then redirects them to index.php . :D
Any doubts feel free to ask. :D
 
Top