Unknown76 Posted September 15, 2012 Share Posted September 15, 2012 This code will help with the connection between IP.Board forum platform and your MTA server. In fact, when a player registers on the MTA server, this script will automatically create a forum account with the same username and password. All you need is PHP SDK (for more info, there is a tutorial in this section about PHP SDK), a IP Board forum and a MTA server. First step: download PHP SDK from the wiki or from the tutorial provided in this section Second step: create a new folder at this path ipb-forum-root/admin/sources/base/ called sdk and extract everything from php sdk archive to it Third step: create a new PHP file called mtaforum.php in ipb-forum-root/admin/sources/base/ and add this piece of code to the file: <?php //By QuantumZ require( "../../../initdata.php"); //we need to include this because ipsRegistry requires it include( "sdk/mta_sdk.php" ); //the sdk is a must require( "ipsRegistry.php" ); //this will give us the functions to modify things in the forum platform ipsRegistry::init(); $input = mta::getInput(); // $input[0] is username, $input[1] is password, $input[2] is e-mail mta::doReturn($input[0]); //$passSalt = IPSMember::generatePasswordSalt(5); //$passCompiled = IPSMember::generateCompiledPasshash($passSalt, md5($input[1])); $user = IPSMember::create( array( 'core' => array( 'email' => $input[2], 'password' => $input[1], 'name' => $input[0], 'members_display_name' => $input[0] ) ) ); ?> Fourth step: Now we finshed with the web-based things let's go to our MTA server and add this in our Register function: callRemote("http://FORUM ADRESS/admin/sources/base/mtaforum.php", inReturn,username, password, mail) Fifth step: Add this in the same .lua as the callRemote to ouput in console whenever somebody will create a forum account: function inReturn(name) outputDebugString("[FORUM] " ..tostring(name).. " registered.") end Sixth step: Profit. 3 Link to comment
DakiLLa Posted September 15, 2012 Share Posted September 15, 2012 Hm, useful tut. Thx! Link to comment
iFoReX Posted September 16, 2012 Share Posted September 16, 2012 mm and SMF or phpBB , because IP.Board doesnt is free Link to comment
myonlake Posted October 14, 2012 Share Posted October 14, 2012 mm and SMF or phpBB , because IP.Board doesnt is free Well, it's quite easy. Connect your MTA server with the same database as SMF/phpBB and then make it so that the registration saves all the same details as your board system. Quite easy. Link to comment
Sergioks Posted May 30, 2014 Share Posted May 30, 2014 Thanks, but I want to know, so that when you create an account on the forum, you believe in the MTA server -- Sorry For Bad Enlish -- Link to comment
P.Wiśnia Posted September 1, 2019 Share Posted September 1, 2019 (edited) Is it currently possible to use this for IPS 4.1? Edited September 1, 2019 by P.Wiśnia Link to comment
Recommended Posts