Jump to content
MakeWebGames

Register.php create user on SMF Forum


CHAMAVELI

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest Anonymous

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.

Link to comment
Share on other sites

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 ^__^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...