From ae53958b37b0e9b29f086af275f9ef994ba211fc Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 24 Feb 2014 11:08:15 +0100 Subject: [PATCH] link to auth sites --- application/plugins/Dedimania/Dedimania.php | 6 +++--- application/plugins/Karma.php | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index ea73edb1..d6750299 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -39,7 +39,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { const SETTING_WIDGET_WIDTH = 'Widget Width'; const SETTING_WIDGET_LINESCOUNT = 'Widget Displayed Lines Count'; const SETTING_WIDGET_LINEHEIGHT = 'Widget Line Height'; - const SETTING_DEDIMANIA_CODE = 'Dedimania Code for '; + const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for '; /** * Private Properties @@ -61,7 +61,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { public static function prepare(ManiaControl $maniaControl) { $servers = $maniaControl->server->getAllServers(); foreach($servers as $server) { - $maniaControl->settingManager->initSetting(get_class(), self::SETTING_DEDIMANIA_CODE . $server->login, ''); + $maniaControl->settingManager->initSetting(get_class(), self::SETTING_DEDIMANIA_CODE . $server->login . '$l', ''); } } @@ -101,7 +101,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { $serverVersion = $this->maniaControl->client->getVersion(); $packMask = substr($this->maniaControl->server->titleId, 2); - $dedimaniaCode = $this->maniaControl->settingManager->getSetting($this, self::SETTING_DEDIMANIA_CODE . $serverInfo->login); + $dedimaniaCode = $this->maniaControl->settingManager->getSetting($this, self::SETTING_DEDIMANIA_CODE . $serverInfo->login . '$l'); if ($dedimaniaCode == '') { throw new \Exception("No Dedimania Code Specified, check the settings!"); } diff --git a/application/plugins/Karma.php b/application/plugins/Karma.php index b5708175..09e1f27a 100644 --- a/application/plugins/Karma.php +++ b/application/plugins/Karma.php @@ -40,11 +40,11 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { * Constants MX Karma */ const SETTING_MX_KARMA_ACTIVATED = 'Aktivate MX-Karma'; - const MX_KARMA_SETTING_CODE = 'MX Karma Code for '; - const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/'; - const MX_KARMA_STARTSESSION = 'startSession'; - const MX_KARMA_ACTIVATESESSION = 'activateSession'; - const MX_KARMA_SAVEVOTES = 'saveVotes'; + //const MX_KARMA_SETTING_CODE = '$l[http://karma.mania-exchange.com/auth/getapikey?server={serverlogin}]MX Karma Code for '; + const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/'; + const MX_KARMA_STARTSESSION = 'startSession'; + const MX_KARMA_ACTIVATESESSION = 'activateSession'; + const MX_KARMA_SAVEVOTES = 'saveVotes'; /** * Private properties @@ -68,7 +68,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { $maniaControl->settingManager->initSetting(get_class(), self::SETTING_MX_KARMA_ACTIVATED, true); $servers = $maniaControl->server->getAllServers(); foreach($servers as $server) { - $maniaControl->settingManager->initSetting(get_class(), self::MX_KARMA_SETTING_CODE . $server->login, ''); + $maniaControl->settingManager->initSetting(get_class(), '$l[http://karma.mania-exchange.com/auth/getapikey?server=' . $server->login . ']MX Karma Code for ' . $server->login . '$l', ''); } } @@ -534,7 +534,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { $serverLogin = $this->maniaControl->server->login; - $mxKarmaCode = $this->maniaControl->settingManager->getSetting($this, self::MX_KARMA_SETTING_CODE . $serverLogin); + $mxKarmaCode = $this->maniaControl->settingManager->getSetting($this, '$l[http://karma.mania-exchange.com/auth/getapikey?server=' . $serverLogin . ']MX Karma Code for ' . $serverLogin . '$l'); if ($mxKarmaCode == '') { return; }