CHAMAVELI Posted July 11, 2008 Share Posted July 11, 2008 Hey guys, I want to know is it possible if I had both MySQL tables of SMF and Mccodes V2 to run on the same Database, and then modify the register on both to correspond with eachother. Example: 1. A guy registers to Mccode V2 game and plays a bit. 2. He then needs help about the game so he goes to the forums. 3. He logs into the forum without registering because it's automatically done when he signed up for the Mccode game. Thanks. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted July 11, 2008 Share Posted July 11, 2008 Re: Register.php create user on SMF Forum It's possible but you'll need to know where to look. When they register, insert the same info into the smf database (being sure to alter it to comply with say their password hashing) That's about it. Also most forums allow you to add a table prefix, so if you prefix the forum tables with something like "smf_" you'll be able to recognize them in the same db Quote Link to comment Share on other sites More sharing options...
Floydian Posted July 11, 2008 Share Posted July 11, 2008 Re: Register.php create user on SMF Forum I'm by no means an expert on this, but I do believe mdshare has spoken about this before. If I recall what he said correctly, he recommends using the smf registration and login for registering new users and for logging into the game. Your users table would then be the smf users table. This of course would mean that any place in mccodes where the users table is used, you would have to edit in the appropriate table name. Possibly smf_users. And then you would have to edit in the appropriate column names. You may be able to put in column names that are the same names that mccodes uses. This approach would allow one login to login your users to both the game and the forums. If you have a seperate users table for both, and if you do not modify the login system, then your game and your forum will require seperate logins. I'm sure this isn't exhaustive information of the subject, but it should suffice to say that it requires a lot of work to make it seamless. Quote Link to comment Share on other sites More sharing options...
Dave Posted July 13, 2008 Share Posted July 13, 2008 Re: Register.php create user on SMF Forum The easiest thing to do would be when in register you register the user in the game's database you also register the same use information in the SMF database ive never tried this but you will need to find out the string for inserting a new user into the SMF users database Quote Link to comment Share on other sites More sharing options...
CHAMAVELI Posted July 14, 2008 Author Share Posted July 14, 2008 Re: Register.php create user on SMF Forum Thanks for the replies, i'll just try inserting the DB queries from the SMF register into the Mccodes one. Does anyone know what hashing SMF and Mccodes use? I think Mccodes is md5 encryption. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted July 14, 2008 Share Posted July 14, 2008 Re: Register.php create user on SMF Forum Well, i know mccodes md5 but not sure smf uses md5 or sh1 hash. Quote Link to comment Share on other sites More sharing options...
Klikoka Posted July 14, 2008 Share Posted July 14, 2008 Re: Register.php create user on SMF Forum I believe you can just change how the password is hashed when you execute it. Quote Link to comment Share on other sites More sharing options...
CHAMAVELI Posted July 14, 2008 Author Share Posted July 14, 2008 Re: Register.php create user on SMF Forum Well, i know mccodes md5 but not sure smf uses md5 or sh1 hash. I think SMF does use md5, but using md5_hmac. Can anyone confirm this? Quote Link to comment Share on other sites More sharing options...
Tonka Posted July 14, 2008 Share Posted July 14, 2008 Re: Register.php create user on SMF Forum smf uses md5 with a salt Quote Link to comment Share on other sites More sharing options...
mdshare Posted July 14, 2008 Share Posted July 14, 2008 Re: Register.php create user on SMF Forum most easy way: When someone signup at the game have the register process also to update the smf_user table as said you need the md5+salt you will not clutter your game user table then with the smf_user table Players will still need to login at the forum to use it. Unless you set the smf cookie also at game login. Best is still to start with a fresh game to have less issues, with a existing game , will be some work Quote Link to comment Share on other sites More sharing options...
CHAMAVELI Posted July 15, 2008 Author Share Posted July 15, 2008 Re: Register.php create user on SMF Forum My game is just a project and is not finished. Could someone help with the making of the register query to add into the SMF table using the md5+salt. It's only because i have no clue what I am doing witht the password encryption. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted July 15, 2008 Share Posted July 15, 2008 Re: Register.php create user on SMF Forum Use SMF's SSI layer -- that is what it is there for. If you start reading the SMF tables directly, what happens when SMF decides to change it's table definition? Stop trying to reinvent the wheel, and use the software *as supplied* that is designed specifically for this purpose. Quote Link to comment Share on other sites More sharing options...
Floydian Posted July 15, 2008 Share Posted July 15, 2008 Re: Register.php create user on SMF Forum I nominate the phrase "stop reinventing the wheel" to be scheduled for a "reinventing"... hehehe We've been using wheels for thousands of years. I think it's high time we came up with something better ^__^ Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted July 15, 2008 Share Posted July 15, 2008 Re: Register.php create user on SMF Forum balls Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.