News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Getting and using non-forum data to be used on forum.

Started by Yazar8, July 24, 2014, 08:59:50 AM

Previous topic - Next topic

Yazar8

I've a gaming server. It's a San Andreas Multiplayer mod which has many features. So at my server there are players and one of them suggested something for my forum.

They want their achievements obtained IG to be visible on their forum profiles. Just like member titles. For example there is an achievement "Make 100 Desert Eagle kills" and the title it gives is "Desert Eagle Veteran", when they post they want their title to be visible on their profile, just like a rank / title.

So anyway, you can already store data from the server in to a mysql db. And let's assume I've created a sub-table at my smf forum database like ingame_achievements_table which has basically three coloumns:

Profile ID number on forum - Amount - Achievement title as Varchar.

So when you're IG you'll input your profile number on forum, and it will send your achievement amount (integer) and title as varchar.

Now you go to your profile and you select "Select title" and It will find your profile ID number on forum  and get the data from ingame_achievements_table along with your amount and achievement title. After that point whenever you post a new topic your new title will appear under your name. Such as: Desert Eagle Veteran: 100 ( 100 is the amount)

So anyway, I'm able to do this ingame and I can create the sql tables aswell, but getting the data and storing at the user's profile is the part I don't know how to do. And ofcourse doing that "select title" part aswell. Also how to make the title appear everytime you post.

Any thoughts?  ;D

Advertisement: