Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   MyBB intergration (http://www.mysidiaadoptables.com/forum/showthread.php?t=1144)

exdiogene 10-24-2009 12:53 PM

RE: MyBB intergration
 
hey Sea, you got any idea how to just bridge the tables? So passwords work? Then I'll have a look at sesisons.

Arianna 10-24-2009 12:55 PM

RE: MyBB intergration
 
Gosh, I fail at this. xP
I learned cookies over the summer (not an easy feat for a 13 year old) and that was hard enough. I better go through the lessons before that before I get up to that, right? Having basic PHP knowledge would be useful here. x3
As for the cookies - I think so. The only problem, is even with the salt, I don't think that the first password thing is the same. So are we changing a function in both login.php and register.php?

exdiogene 10-24-2009 01:03 PM

RE: MyBB intergration
 
Well I was planning on removing the Registation from Adoptable script and using MyBB's to make the process simpler. With the salt the password will be exactly the same.

Here is how it works:

PASSWORD + Salt = saltPASSWORD which is then coded into MD5

Basically the script just needs to take the pass the user has entered into the form, query the salt from the database then add that to the front. Then convert ot MD5 and check if it matches the password hash in the MyBB_users table.

Off Topic: BTW arianna, I'm 16 ;) doing A-level Computing a year early.

Arianna 10-24-2009 01:15 PM

RE: MyBB intergration
 
I think that that idea is smarter. :) I won't remove the registration, I'll just rename it or something.
Ah, I get it now. That's why it doesn't work like that.

Hmm, so how do we now get this to work with the adoptables?

exdiogene 10-24-2009 01:25 PM

RE: MyBB intergration
 
Well we need to make it take the username and pass from the Mybb_users tbale instead of Adopt_users table. We then need it to take the salt from the database where the UID = the one we want. Then it needs to add the salt to the password we enter, and encode it in MD5. Then it matches that to the Password string in the Mybb_users table :D

So, Im guessing in login.php:

This:
PHP Code:

$password md5($password); 


should become this:
PHP Code:

$salt "SELECT salt FROM mybb_users WHERE username = '$username'";
$password md5($salt.($password)); 


Arianna 10-24-2009 01:49 PM

RE: MyBB intergration
 
Shouldn't everything be in one table? That way, if a user changes her/his password, they can still log on, right?
As for the code, where are we getting the actual password from. From the mybb table, or from the adopts user table?

exdiogene 10-24-2009 01:53 PM

RE: MyBB intergration
 
we are getting the username and password from the MyBB tables and using the Adopts tables for the levels and adopts etc...

The adopts_users tbale could be dropped as it wouldnt be needed any more and the fields form the Adopts_users table could be added into the MyBB_users table.

Arianna 10-24-2009 02:24 PM

RE: MyBB intergration
 
That's good - maybe dropping the table is necessary - I haven't found out how to merge, so I'll do it manually.

exdiogene 10-24-2009 02:29 PM

RE: MyBB intergration
 
It shouldnt be nessiccary to drpo it, just the tbale wont be used anymore so there is no point really having it. I would make sure you can bridge the scripts before you do anything with the database. ;)

Arianna 10-24-2009 02:35 PM

RE: MyBB intergration
 
Okay, that's a good idea. I'm using a test database, so it doesn't matter.
I'll catch up on this later, I'm sort of busy right now. Have you worked out anything about the sessions?


All times are GMT -5. The time now is 09:05 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.