Code: Select all
<?php
/**
* MLEPP - ManiaLive Extending Plugin Pack
*
* -- MLEPP Core --
* @name Core
* @date 29-12-2010
* @version 2010
* @website mlepp.trackmania.nl
* @package MLEPP
*
* @author Max "TheM" Klaversma <maxklaversma@gmail.com>
* @copyright 2010 - 2011
*/
namespace ManiaLivePlugins\TheM\mlepp_Core;
use ManiaLive\Utilities\Console;
use ManiaLive\Utilities\String;
use ManiaLive\Database\Connection;
class mlepp_Core extends \ManiaLive\PluginHandler\Plugin {
static $dbtype = 'MySQL';
static $dbport = '3306';
static $dbhost = 'localhost';
static $dbuser = 'manialive';
static $dbpass = 'manialive';
static $dbname = 'manialive';
var $mlepp_sql;
function onInit() {
$version = 1.0;
$this->setVersion($version);
Console::println('['.date('H:i:s').'] [MLEPP] Starting MLEPP . . .');
$this->mlepp_sql = Connection::getConnection(self::dbhost, self::dbuser, self::dbpass, self::dbname, self::dbtype, self::dbport);
}
}
?>
Code: Select all
;------------------
[MLEPP - Database]
;------------------
; Database type, can be SQLite or MySQL
; Standard: MySQL
plugins.TheM\mlepp_Core.dbtype = 'MySQL'
; Database port
; Standard: 3306
plugins.TheM\mlepp_Core.dbport = '3306'
; Database host, mostly 'localhost'
plugins.TheM\mlepp_Core.dbhost = 'localhost'
; Database user
plugins.TheM\mlepp_Core.dbuser = 'manialive'
; Database password
plugins.TheM\mlepp_Core.dbpass = 'manialive'
; Database name
plugins.TheM\mlepp_Core.dbname = 'manialive'
This is what the console gives me:
Code: Select all
E:\Servers\ManiaLive>E:\xampp\php\php.exe bootstrapper.php
[CONFIG LOADER] Starting runtime load
[CONFIG LOADER] Pre-load completed
[CONFIG LOADER] E:\Servers\ManiaLive/config/config.ini parsed
[CONFIG LOADER] Warning: ManiaLive\Config\Config::$MLEPP - Database does not exists
[CONFIG LOADER] Load completed
[CONFIG LOADER] Runtime load completed in 13.88 milliseconds
[10:46:16] XML-RPC connection established
[10:46:16] Successfully authentified with XML-RPC server
Threading will be disabled, you need to enable the 'SQLite' extension on your system!
Attention: Threading disabled, trying to emulate - this will cause performance downgrades!
[10:46:16] [MLEPP] Starting MLEPP . . .
E:\Servers\ManiaLive>pause
Druk op een toets om door te gaan. . .