MyBB intergration

Forum
Last Post
Threads / Messages

exdiogene

Member
Member
Joined
Oct 1, 2009
Messages
84
Points
0
Mysidian Dollar
4,900
I would love Adoptables Script to be intergrated into MyBB! Would be great. It would mean users would only have one login and password. Any ideas/tutorial on how it would be done?

Thanks :D
 
Brandon has said that he might make a tutorial on this at some point. You best bet would be to research on the MyBB forums for support on intergration. You can intergrate MyBB with Joomla using JFusion & it is also possible to combine PHPAdoptables with Joomla using JFusion.

Sea
 
I'm still very interested in this, as I'm working with people to possibly convert a forum with 100,000+ posts and integrate it with the adoptables system. Though this isn't an exact plan, I'd love to see this project go further.
 
Im learning PHP at the moment but have never worked with a script this complex before... I have a smaller forum that I want to intergrate before i get lots of members.
 
I think that we would be doing similar things, then. :D
I'm not good at PHP. I haven't bothered to take a tutorial or anything and I've just dived into editing all of the PHP files for this script. However, I will have no idea what to do for a bridge.
From my knowledge (which isn't much) it would take merging two tables, changing all of the prefixes, adding rows to the user table, changing 2 register pages, and... that's all, I think. I know there's more, but I don't know PHP. Any ideas?
 
Well I think we would need to, like you say, edit the script so it takes users from MyBB_users. I was going to use the MyBB forum to register users.

Could we not just change (in login.php):

PHP:
$query = "SELECT * FROM ".$prefix."users WHERE username = '$username'";

to

PHP:
$query = "SELECT * FROM "mybb_"users WHERE username = '$username'";
 
That's a good idea, if they're in the same table. But how do we go about on stuff like passwords (don't they have different encryption?) and stuff.
I'm going to go compare tables for a minute, I'll be right back. :)

The fact that there are about 50 columns in the mybb user table makes me shudder. Thank goodness there are only 13 for myadopts.
How do we merge them, though? I have a feeling that all I'll do is mess everything up. xP
 
tommyk1210 said:
Well I think we would need to, like you say, edit the script so it takes users from MyBB_users. I was going to use the MyBB forum to register users.

Could we not just change (in login.php):

PHP:
$query = "SELECT * FROM ".$prefix."users WHERE username = '$username'";

to

PHP:
$query = "SELECT * FROM "mybb_"users WHERE username = '$username'";

That won't work alone because it wont set the cookies for the Adoptables script so therefore the script wont see them as being logged in.

Sea
 
I've tried to edit the member.php file for mybb, but it's so unbearably complicated I can't even tell what the actual 'register' action is. :p
Is it possible to remove some fields without damaging the complete forum structure, do you think? (I'm using a test part of the site, so it doesn't really matter that much, though. xP)
 
I would think that it would be easier to edit the Adoptables script as MyBB has a lot more files depending on the integrety of the member.php
 
Yes, you do have a point. :)
However, it does set default values on stuff like that, I think. And another thing - banning might be a problem. xP
And yet another thing - I looked at the passwords on both things, and they are encoded differently. xP

Another thing, though - I think registering on the forum is more important for my needs. xP
 
Maybe one is different. If I use a test password - 'password' the MD5 is '5f4dcc3b5aa765d61d8327deb882cf99' right? I'll edit and see what happens. :)
By the way, do you know what 'salt' is in the mybb table?

This is what I have, straight from phpmyadmin. This is the password encoding.
adopts_users: 5f4dcc3b5aa765d61d8327deb882cf99
mybb_users: 7370faafe822e685d2fe3e535f6fe78e

Certainly not the same...

The second one (mybb) doesn't fit, look.
Password | | | password
Crypt Hash | | | 1$s7aoXaH7NEs
MD5 Hash | | | 5f4dcc3b5aa765d61d8327deb882cf99
SHA Hash | | | 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
MD5 Salted Hash | | | 0fh3vXJhFAOnI
 
i tihnk MyBB uses salt and hash, i have asked how to intergrate on the MyBB forum and nobody has replied.

It seems that (when you change the table it gets the name and pass from) it only has trouble decoding the pass. Any ideas anyone? Sea? Brandon?

MyBB Salt is the way it encodes the pass to make it more secure, anyone know how to use salts in the adoptables script?
 
I asked too - I hope they answer.
I don't know how to use salts in the adoptables script, sadly. It uses another column in the table - that's about all i know.
 
well salts are just used ot make the bruteforcing of passwords a longer process, it simply takes the pass and adds the salt on the end, then converts it to MD5 (i think)

For example:

You have a password = "password" which has a MD5 hash of "5f4dcc3b5aa765d61d8327deb882cf99"
but if you add a salt = "eth7"
the string becomes = "passwordeth7"
which makes the MD5 = "804462e52e923941708106a10c6fb416"
So, unless the hacker has the correct salt in their dicitonary after the password then the time taken to crack is considerably longer.

I think it should be something like this, i know its not the right way round but...:

PHP:
$password = md5($password,$salt);

$query = "SELECT * FROM mybb_users WHERE username = '$username'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);

//Loop out code
$i=0;
while ($i < 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password,");
$lsalt=@mysql_result($result,$i,"salt,");

$i++;
}

if($username == $luser and $password == $lpass, $lsalt){
$article_title = "Login Successful!";
 
I saw that it was something like
(md5(salt[$.password]))
Or the like. The problem is, it won't log in on both, I think.
 
(md5(salt[$.password]))

On MyBB?

And yes sessions could be an issue. We could probably get it so the logins work on both.

So: in login.php
PHP:
$password = md5($password);

should beocme:
PHP:
$password= md5(salt[$password]));
Then the salt and pass need to be extracted form the database and matched to the string. Correct?
 
Session cookies are the hardest part to set up. They are quite confusing as well. Your bridge has to incorporate a simple cookis session for Adopts & a complicated one for the forum & even the simple one gets complicated. http://www.w3schools.com/PHP/php_sessions.asp gives you some background but it takes time to actually figure it all out.

Sea
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top