sniko Posted October 4, 2012 Posted October 4, 2012 How to integrate simple machine forums into any mccodes package Addons Import existing members (By KyleMassacre) (Code mucked up, or not showing? Click me) Update info center stats (By sniko) KyleMassacre's standardization (By KyleMassacre) Requirements Enough server space to host the software (Optional) Able to create another database, with a separate database user; keeping things separate + these.... Why use this? Install awesome packages Very easy to manage Hardly no programming required Probably ((don't quote me) much more secure than your current forums) No need for users to register twice, data is copied into SMF on signup What do I have to do? Really, nothing, apart from the following; If you chose to create another database, with a separate database user, do so. Download simple machine forums into (preferable) a different directory, perhaps /forum and run the installer. Run the installer; http://www.game.com/forum Fill in the form appropriately Create your admin account Complete Downfalls This method 'copies' the user details from register into the smf tables, so existing members won't be automatically signed up Preferably used on fresh installs Instructions Open up register.php, and find the section where is says "You've signed up, enjoy the game", then a query. Just before this, add; (Code mucked up, or not showing? Click me) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now, using SMF admin panel, remove the use of register ....and you're all set ;) When people sign up, they've been entered into SMF database, so they can just log in with their game details on SMF forum Notes.... I chose SMF as it's fairly easy to use, and install, as well as being very flexible - granted, I haven't explored other forum software - don't gun me down, trolls.
Cronus Posted October 4, 2012 Posted October 4, 2012 Very nice, will test sometime in the next few days and report back any problems.
KyleMassacre Posted October 4, 2012 Posted October 4, 2012 I like this idea, I was thinking of trying to do the same but wayyyy above my level of programing knowledge
rulerofzu Posted October 4, 2012 Posted October 4, 2012 Notes.... I chose SMF as it's fairly easy to use, and install, as well as being very flexible - granted, I haven't explored other forum software - don't gun me down, trolls. Well done ill go test...... Blam Blam Blam .... Ill be back :D
sniko Posted October 4, 2012 Author Posted October 4, 2012 Well done ill go test...... Blam Blam Blam .... Ill be back :D Assumes position at the end of the firing range.... :p @replies Thank you!
JohnGato Posted October 5, 2012 Posted October 5, 2012 now if i wanted to use the IPB forums, would it be basically the same setup and in this line of code : You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. or do you think its a whole different setup
sniko Posted October 5, 2012 Author Posted October 5, 2012 now if i wanted to use the IPB forums, would it be basically the same setup and in this line of code : You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. or do you think its a whole different setup It will be the same techniques; Opening a database connection Encrypting/hashing the passcode Inserting into dataase Close database connection You will have to find out how IPB forums encrypt/hash the passcodes, as it would have to be the same.
JohnGato Posted October 5, 2012 Posted October 5, 2012 It will be the same techniques; Opening a database connection Encrypting/hashing the passcode Inserting into dataase Close database connection You will have to find out how IPB forums encrypt/hash the passcodes, as it would have to be the same. Thanks Ill have to mess around with that
Danny696 Posted October 5, 2012 Posted October 5, 2012 What about if If my session is available for the game, making it available for the forums aswell, just an idea... Also, will this support all versions of SMF?
KyleMassacre Posted October 5, 2012 Posted October 5, 2012 (edited) i made a little cheesy script to take your current members get imported to the smf db. its ugly but works so dont hate appreciate lol, but im sure some one will think of a nicer way and possibly share the wealth You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Im currently trying to work out a way to take something like cronus' announcement mod and make a new thread there but im hitting a little snag on it creating a new thread instead of it adding to a current one Edited October 6, 2012 by KyleMassacre
KyleMassacre Posted October 6, 2012 Posted October 6, 2012 What about if If my session is available for the game, making it available for the forums aswell, just an idea... Also, will this support all versions of SMF? I stumbled upon thisSMF Online Manual so maybe this may help
sniko Posted October 6, 2012 Author Posted October 6, 2012 What about if If my session is available for the game, making it available for the forums aswell, just an idea... Also, will this support all versions of SMF? KyleMassacre and I were discussing this on Skype. Perhaps it's something I'll venture into someday, as for now, I have no spare time.
sniko Posted October 6, 2012 Author Posted October 6, 2012 i made a little cheesy script to take your current members get imported to the smf db. its ugly but works so dont hate appreciate lol, but im sure some one will think of a nicer way and possibly share the wealth You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Im currently trying to work out a way to take something like cronus' announcement mod and make a new thread there but im hitting a little snag on it creating a new thread instead of it adding to a current one Awesome. I've added a permalink into the original post.
sniko Posted October 22, 2012 Author Posted October 22, 2012 Will this work with VBulletin? You'd need to see what encryption method they use, as well as the table names. But, if you apply the same theory, yes.
sniko Posted May 2, 2013 Author Posted May 2, 2013 (edited) Sorry to update such an old thread, however, here's an addon to update the amount of players, and the latest members name (displayed in the statistics center, and info center) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then just call those functions as soon as someone signs up; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. :) Edited May 2, 2013 by sniko
spikereloaded Posted May 21, 2013 Posted May 21, 2013 hi great topic, really helped me get started on integrating a better forum to our site. One question I have though is how could I make it so if someone changes their password in the forums, it updates on the main site. I've had a look but cant seem to find anywhere that would allow me to enter a query. It appears pretty easy to do the other way around (change on main site, update forum password) just struggling to do it from the forum side. I know this isnt something that people would really do anyway but theres bound to be one person that does it then says their locked out because it didn't update their main password. thanks for any info you can give!
sniko Posted May 21, 2013 Author Posted May 21, 2013 hi great topic, really helped me get started on integrating a better forum to our site. One question I have though is how could I make it so if someone changes their password in the forums, it updates on the main site. I've had a look but cant seem to find anywhere that would allow me to enter a query. It appears pretty easy to do the other way around (change on main site, update forum password) just struggling to do it from the forum side. I know this isnt something that people would really do anyway but theres bound to be one person that does it then says their locked out because it didn't update their main password. thanks for any info you can give! I've not actually done this. However, you will have to edit the forums source - I've not got access to the forums source at the moment, but it will be the same workaround; Connect to your game database Encrypt the passcode with the same encryption method used in vanilla signup Update the passcode field in your game database close database connection :)
spikereloaded Posted May 22, 2013 Posted May 22, 2013 hmmm having a look through the SMF source.... very complex for my ability. have asked for some assistance in their forums though so hopefully will get it sorted!
KyleMassacre Posted May 22, 2013 Posted May 22, 2013 well just like sniko stated you can open your connection to your other db like in the instructions above in the page(s) where the user will change his forum info like username/password. You are basically going to do the reverse of what you did to integrate the forum. Now I'm not too sure if you can include your global funcs file in the smf page so you can keep your mysql class you currently use so its not different to run you commands, ex: $db->query() or just do mysqli if your not able to figure out the class structure smf uses to update the database, then you close your connection with your mc codes db
spikereloaded Posted May 22, 2013 Posted May 22, 2013 thanks guys, working on it now. I've had another issue aswell, because at the time of the new users being inserted into the smf tables, they dont have a userid defined yet, ive found that there's nothing solid linking the user details in the smf members table to the user details in the site users table. Is it just a case of starting with a fresh set of table so the ID's automatically match as people sign up. Sorry if I'm missing an obvious fix here.
sniko Posted May 22, 2013 Author Posted May 22, 2013 thanks guys, working on it now. I've had another issue aswell, because at the time of the new users being inserted into the smf tables, they dont have a userid defined yet, ive found that there's nothing solid linking the user details in the smf members table to the user details in the site users table. Is it just a case of starting with a fresh set of table so the ID's automatically match as people sign up. Sorry if I'm missing an obvious fix here. Have you used this? Using it (with a fresh install of SMF) will 'mirror' your games table to the SMF table. 1
spikereloaded Posted May 22, 2013 Posted May 22, 2013 Sorry to update such an old thread, however, here's an addon to update the amount of players, and the latest members name (displayed in the statistics center, and info center) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then just call those functions as soon as someone signs up; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. :) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It's possible to do it like this aswell? or is that bad practice?
KyleMassacre Posted May 22, 2013 Posted May 22, 2013 well I believe (with out looking at the table structure) the they have an id in the forum table that is set to AI, so what you can do is use my code I posted above and import all users information over then the user id from the game and from the forum should match 1
spikereloaded Posted May 22, 2013 Posted May 22, 2013 well the game isn't oficially being used yet, as we're still working on it so it will probably be through a fresh install. Just wanted to make sure I wasnt missing anything obvious
Recommended Posts