Posts: 3,934
Threads: 353
Joined: Jan 2010
Reputation:
0
Hello, I have been wanting to do this for sometime now and I want to learn it now really.
I would like to know how I can set up a Latest Server Member under the Latest Forum Member and some other things which will be listed below;
- Adding there server information in to the players profile.
Thanks, Luis.
Posts: 470
Threads: 10
Joined: Apr 2011
Reputation:
0
Learn the basics of PHP, that should help you understand more about SMF's code arc, and help you to edit to the postbit, as for the actual integration, Carlton released an include called CSMF some time ago now, it's not 100% stable but it does the job, if you get your knowledge up maybe you can edit it to your liking. As for actual implementation, the best way to do it would be using MySQL based game-mode, that way you could maybe use the same MySQL database for your SMF forum and your SA-MP server player accounts, etc.
Posts: 966
Threads: 5
Joined: Jul 2011
Reputation:
0
Since I assume I know where you're coming from, I can tell you a little about it!
The "Latest server member" is actually stored as a cached string (using Alternative PHP Cache) and displayed through Themes/THEME/BoardIndex.template.php. The cache is updated every time someone new registers in file newuser.php. The file newuser.php is called using HTTP() function which was introduced in 0.3b.
Player information can be displayed in one's profile by modifying Themes/THEME/Profile.template.php, but before some changes are necessary to be made in Sources/Load.php. Of course they key to all this is having an extra field in smf_members table which stores the player's server registration ID, and the server players table must have an extra field to store the player's member user ID.
Posts: 3,934
Threads: 353
Joined: Jan 2010
Reputation:
0
Ah, so I'd basically use HTTP(playerid, HTTP_POST, "www.url.com/forums/themes/THEME/newuser.php", "", "MyHttpResponse");, I have never worked with the HTTP function.
Posts: 966
Threads: 5
Joined: Jul 2011
Reputation:
0
The newuser.php is a custom made script which
1. updates cache with the new player's information
2. posts a welcome message on the new players board
3. sends the player a private message
4. you can't possibly have.
And it doesn't matter where it is located.
Posts: 1,426
Threads: 56
Joined: Dec 2010
Reputation:
0
You getting errors with the above script?