2013-12-29 22:52:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use FML\Controls\Control;
|
|
|
|
use FML\Controls\Frame;
|
|
|
|
use FML\Controls\Labels\Label_Text;
|
|
|
|
use FML\Controls\Quad;
|
|
|
|
use FML\ManiaLink;
|
|
|
|
use FML\Script\Script;
|
|
|
|
use FML\Script\Tooltips;
|
|
|
|
use ManiaControl\Callbacks\CallbackListener;
|
|
|
|
use ManiaControl\ManiaControl;
|
2013-12-30 11:23:00 +01:00
|
|
|
use ManiaControl\Maps\Jukebox;
|
2013-12-29 22:52:07 +01:00
|
|
|
use ManiaControl\Players\PlayerManager;
|
|
|
|
use ManiaControl\Plugins\Plugin;
|
|
|
|
use ManiaControl\Callbacks\CallbackManager;
|
|
|
|
|
2013-12-30 13:10:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ManiaControl Widget Plugin
|
|
|
|
*
|
|
|
|
* @author kremsy
|
|
|
|
*/
|
2013-12-29 22:52:07 +01:00
|
|
|
class WidgetPlugin implements CallbackListener, Plugin {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
*/
|
|
|
|
const PLUGIN_ID = 8;
|
|
|
|
const PLUGIN_VERSION = 0.1;
|
|
|
|
const PLUGIN_NAME = 'WidgetPlugin';
|
|
|
|
const PLUGIN_AUTHOR = 'kremsy';
|
2013-12-30 11:23:00 +01:00
|
|
|
|
2013-12-29 22:52:07 +01:00
|
|
|
|
|
|
|
//MapWidget Properties
|
2013-12-30 11:23:00 +01:00
|
|
|
const MLID_MAPWIDGET = 'WidgetPlugin.MapWidget';
|
2013-12-29 23:39:30 +01:00
|
|
|
const SETTING_MAP_WIDGET_ACTIVATED = 'Map-Widget Activated';
|
2013-12-29 22:52:07 +01:00
|
|
|
const SETTING_MAP_WIDGET_POSX = 'Map-Widget-Position: X';
|
|
|
|
const SETTING_MAP_WIDGET_POSY = 'Map-Widget-Position: Y';
|
|
|
|
const SETTING_MAP_WIDGET_WIDTH = 'Map-Widget-Size: Width';
|
|
|
|
const SETTING_MAP_WIDGET_HEIGHT = 'Map-Widget-Size: Height';
|
2013-12-29 23:39:30 +01:00
|
|
|
|
|
|
|
//ClockWidget Properties
|
2013-12-30 11:23:00 +01:00
|
|
|
const MLID_CLOCKWIDGET = 'WidgetPlugin.ClockWidget';
|
2013-12-29 23:39:30 +01:00
|
|
|
const SETTING_CLOCK_WIDGET_ACTIVATED = 'Clock-Widget Activated';
|
|
|
|
const SETTING_CLOCK_WIDGET_POSX = 'Clock-Widget-Position: X';
|
|
|
|
const SETTING_CLOCK_WIDGET_POSY = 'Clock-Widget-Position: Y';
|
|
|
|
const SETTING_CLOCK_WIDGET_WIDTH = 'Clock-Widget-Size: Width';
|
|
|
|
const SETTING_CLOCK_WIDGET_HEIGHT = 'Clock-Widget-Size: Height';
|
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
//NextMapWidget Properties
|
|
|
|
const MLID_NEXTMAPWIDGET = 'WidgetPlugin.NextMapWidget';
|
|
|
|
const SETTING_NEXTMAP_WIDGET_ACTIVATED = 'Nextmap-Widget Activated';
|
|
|
|
const SETTING_NEXTMAP_WIDGET_POSX = 'Nextmap-Widget-Position: X';
|
|
|
|
const SETTING_NEXTMAP_WIDGET_POSY = 'Nextmap-Widget-Position: Y';
|
|
|
|
const SETTING_NEXTMAP_WIDGET_WIDTH = 'Nextmap-Widget-Size: Width';
|
|
|
|
const SETTING_NEXTMAP_WIDGET_HEIGHT = 'Nextmap-Widget-Size: Height';
|
|
|
|
|
|
|
|
|
2013-12-29 22:52:07 +01:00
|
|
|
/**
|
|
|
|
* Private properties
|
|
|
|
*/
|
|
|
|
private $maniaControl = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load the plugin
|
|
|
|
*
|
|
|
|
* @param \ManiaControl\ManiaControl $maniaControl
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function load(ManiaControl $maniaControl){
|
|
|
|
$this->maniaControl = $maniaControl;
|
|
|
|
|
|
|
|
// Register for callbacks
|
|
|
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ONINIT, $this, 'handleOnInit');
|
2013-12-30 11:23:00 +01:00
|
|
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_BEGINMAP, $this, 'handleOnBeginMap');
|
|
|
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ENDMAP, $this, 'handleOnEndMap');
|
2013-12-29 22:52:07 +01:00
|
|
|
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERJOINED, $this, 'handlePlayerConnect');
|
2013-12-29 23:39:30 +01:00
|
|
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_1_MINUTE, $this, 'handleEveryMinute');
|
2013-12-29 22:52:07 +01:00
|
|
|
|
2013-12-29 23:01:51 +01:00
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MAP_WIDGET_ACTIVATED, true);
|
2013-12-29 22:52:07 +01:00
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MAP_WIDGET_POSX, 160 - 20);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MAP_WIDGET_POSY, 90 - 4.5);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MAP_WIDGET_WIDTH, 40);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MAP_WIDGET_HEIGHT, 9.);
|
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_NEXTMAP_WIDGET_ACTIVATED, true);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_NEXTMAP_WIDGET_POSX, 160 - 20);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_NEXTMAP_WIDGET_POSY, 90 - 25.5);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_NEXTMAP_WIDGET_WIDTH, 40);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_NEXTMAP_WIDGET_HEIGHT, 12.);
|
|
|
|
|
2013-12-29 23:39:30 +01:00
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_CLOCK_WIDGET_ACTIVATED, true);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_CLOCK_WIDGET_POSX, 160 - 5);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_CLOCK_WIDGET_POSY, 90 - 11);
|
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_CLOCK_WIDGET_WIDTH, 10);
|
2013-12-29 23:42:50 +01:00
|
|
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_CLOCK_WIDGET_HEIGHT, 5.5);
|
2013-12-29 22:52:07 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unload the plugin and its resources
|
|
|
|
*/
|
|
|
|
public function unload(){
|
|
|
|
$this->maniaControl->callbackManager->unregisterCallbackListener($this);
|
|
|
|
unset($this->maniaControl);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-29 23:39:30 +01:00
|
|
|
public function displayClockWidget($login = false){
|
|
|
|
$pos_x = $this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_POSX);
|
|
|
|
$pos_y = $this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_POSY);
|
|
|
|
$width = $this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_WIDTH);
|
|
|
|
$height = $this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_HEIGHT);
|
|
|
|
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle();
|
|
|
|
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle();
|
|
|
|
|
|
|
|
$maniaLink = new ManiaLink(self::MLID_CLOCKWIDGET);
|
|
|
|
|
|
|
|
//mainframe
|
|
|
|
$frame = new Frame();
|
|
|
|
$maniaLink->add($frame);
|
|
|
|
$frame->setSize($width,$height);
|
|
|
|
$frame->setPosition($pos_x, $pos_y);
|
|
|
|
|
|
|
|
//Background Quad
|
|
|
|
$backgroundQuad = new Quad();
|
|
|
|
$frame->add($backgroundQuad);
|
|
|
|
$backgroundQuad->setSize($width,$height);
|
|
|
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
|
|
|
|
|
|
|
$localTime = date("H:i", time());
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setY(1.5);
|
|
|
|
$label->setX(0);
|
|
|
|
$label->setAlign(Control::CENTER,Control::TOP);
|
|
|
|
$label->setZ(0.2);
|
2013-12-29 23:42:50 +01:00
|
|
|
$label->setTextSize(1);
|
2013-12-29 23:39:30 +01:00
|
|
|
$label->setText($localTime);
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
|
|
|
|
//Send manialink
|
|
|
|
$manialinkText = $maniaLink->render()->saveXML();
|
|
|
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $login);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
/**
|
|
|
|
* Displays the Next Map (Only at the end of the Map)
|
|
|
|
* @param bool $login
|
|
|
|
*/
|
|
|
|
public function displayNextMapWidget($login = false){
|
|
|
|
$pos_x = $this->maniaControl->settingManager->getSetting($this, self::SETTING_NEXTMAP_WIDGET_POSX);
|
|
|
|
$pos_y = $this->maniaControl->settingManager->getSetting($this, self::SETTING_NEXTMAP_WIDGET_POSY);
|
|
|
|
$width = $this->maniaControl->settingManager->getSetting($this, self::SETTING_NEXTMAP_WIDGET_WIDTH);
|
|
|
|
$height = $this->maniaControl->settingManager->getSetting($this, self::SETTING_NEXTMAP_WIDGET_HEIGHT);
|
|
|
|
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle();
|
|
|
|
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle();
|
|
|
|
$labelStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle();
|
|
|
|
|
|
|
|
$maniaLink = new ManiaLink(self::MLID_NEXTMAPWIDGET);
|
|
|
|
|
|
|
|
//mainframe
|
|
|
|
$frame = new Frame();
|
|
|
|
$maniaLink->add($frame);
|
|
|
|
$frame->setSize($width,$height);
|
|
|
|
$frame->setPosition($pos_x, $pos_y);
|
|
|
|
|
|
|
|
//Background Quad
|
|
|
|
$backgroundQuad = new Quad();
|
|
|
|
$frame->add($backgroundQuad);
|
|
|
|
$backgroundQuad->setSize($width,$height);
|
|
|
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
|
|
|
|
|
|
|
//Check if the Next Map is a juked Map
|
|
|
|
$jukedMap = $this->maniaControl->mapManager->jukebox->getNextMap();
|
2013-12-30 11:26:45 +01:00
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
$requester = null;
|
|
|
|
//if the nextmap is not a juked map, get it from map info
|
|
|
|
if($jukedMap == null){
|
|
|
|
$this->maniaControl->client->query("GetNextMapInfo");
|
|
|
|
$map = $this->maniaControl->client->getResponse();
|
|
|
|
$name = $map['Name'];
|
|
|
|
$author = $map['Author'];
|
|
|
|
}else{
|
|
|
|
$requester = $jukedMap[0];
|
|
|
|
$map = $jukedMap[1];
|
|
|
|
$name = $map->name;
|
|
|
|
$author = $map->authorLogin;
|
|
|
|
}
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setY($height / 2 - 2.3);
|
|
|
|
$label->setX(0);
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1);
|
|
|
|
$label->setText("Next Map");
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
$label->setStyle($labelStyle);
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setY($height / 2 - 5.5);
|
|
|
|
$label->setX(0);
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1.3);
|
|
|
|
$label->setText($name);
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setX(0);
|
|
|
|
$label->setY(-$height/2 + 4);
|
|
|
|
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1);
|
|
|
|
$label->setScale(0.8);
|
|
|
|
$label->setText($author);
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
|
|
|
|
|
|
|
|
if($requester != null){
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setX(0);
|
|
|
|
$label->setY(-$height/2 + 2);
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1);
|
|
|
|
$label->setScale(0.7);
|
|
|
|
$label->setText($author);
|
|
|
|
$label->setTextColor("F80");
|
|
|
|
$label->setText("Requested by " . $requester->nickname);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Send manialink
|
|
|
|
$manialinkText = $maniaLink->render()->saveXML();
|
|
|
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $login);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2013-12-29 23:39:30 +01:00
|
|
|
|
2013-12-29 22:52:07 +01:00
|
|
|
/**
|
|
|
|
* Displays the Map Widget
|
|
|
|
* @param $login
|
|
|
|
*/
|
|
|
|
public function displayMapWidget($login = false){
|
|
|
|
|
|
|
|
$xml = "<manialinks><manialink id='0'><quad></quad></manialink>
|
|
|
|
<custom_ui>
|
|
|
|
<challenge_info visible='false'/>
|
|
|
|
</custom_ui>
|
|
|
|
</manialinks>";
|
|
|
|
|
|
|
|
$this->maniaControl->manialinkManager->sendManialink($xml);
|
|
|
|
|
|
|
|
|
|
|
|
$pos_x = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_POSX);
|
|
|
|
$pos_y = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_POSY);
|
|
|
|
$width = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_WIDTH);
|
|
|
|
$height = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_HEIGHT);
|
|
|
|
$quadStyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle();
|
|
|
|
$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle();
|
|
|
|
|
|
|
|
$maniaLink = new ManiaLink(self::MLID_MAPWIDGET);
|
|
|
|
|
|
|
|
//mainframe
|
|
|
|
$frame = new Frame();
|
|
|
|
$maniaLink->add($frame);
|
|
|
|
$frame->setSize($width,$height);
|
|
|
|
$frame->setPosition($pos_x, $pos_y);
|
|
|
|
|
|
|
|
//Background Quad
|
|
|
|
$backgroundQuad = new Quad();
|
|
|
|
$frame->add($backgroundQuad);
|
|
|
|
$backgroundQuad->setSize($width,$height);
|
|
|
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
|
|
|
|
|
|
|
$map = $this->maniaControl->mapManager->getCurrentMap();
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
2013-12-29 23:01:51 +01:00
|
|
|
$label->setY(1.5);
|
2013-12-29 22:52:07 +01:00
|
|
|
$label->setX(0);
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1.3);
|
|
|
|
$label->setText($map->name);
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
|
|
|
|
$label = new Label_Text();
|
|
|
|
$frame->add($label);
|
|
|
|
$label->setX(0);
|
2013-12-29 23:01:51 +01:00
|
|
|
$label->setY(-1.4);
|
2013-12-29 22:52:07 +01:00
|
|
|
|
|
|
|
$label->setAlign(Control::CENTER,Control::CENTER);
|
|
|
|
$label->setZ(0.2);
|
|
|
|
$label->setTextSize(1);
|
2013-12-29 23:01:51 +01:00
|
|
|
$label->setScale(0.8);
|
2013-12-29 22:52:07 +01:00
|
|
|
$label->setText($map->authorLogin);
|
|
|
|
$label->setTextColor("FFF");
|
|
|
|
|
|
|
|
|
|
|
|
//Send manialink
|
|
|
|
$manialinkText = $maniaLink->render()->saveXML();
|
|
|
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $login);
|
|
|
|
}
|
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
/**
|
|
|
|
* Closes a Widget
|
|
|
|
* @param $widgetId
|
|
|
|
*/
|
|
|
|
public function closeWidget($widgetId){
|
|
|
|
$emptyManialink = new ManiaLink($widgetId);
|
|
|
|
$manialinkText = $emptyManialink->render()->saveXML();
|
|
|
|
$this->maniaControl->manialinkManager->sendManialink($manialinkText);
|
|
|
|
}
|
2013-12-29 22:52:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle ManiaControl OnInit callback
|
|
|
|
*
|
|
|
|
* @param array $callback
|
|
|
|
*/
|
|
|
|
public function handleOnInit(array $callback) {
|
2013-12-29 23:01:51 +01:00
|
|
|
//Display Map Widget
|
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayMapWidget();
|
|
|
|
}
|
2013-12-29 23:39:30 +01:00
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayClockWidget();
|
|
|
|
}
|
2013-12-29 22:52:07 +01:00
|
|
|
}
|
|
|
|
|
2013-12-30 11:23:00 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle on Begin Map
|
|
|
|
*
|
|
|
|
* @param array $callback
|
|
|
|
*/
|
|
|
|
public function handleOnBeginMap(array $callback) {
|
|
|
|
//Display Map Widget
|
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayMapWidget();
|
|
|
|
}
|
|
|
|
$this->closeWidget(self::MLID_NEXTMAPWIDGET);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle on End Map
|
|
|
|
*
|
|
|
|
* @param array $callback
|
|
|
|
*/
|
|
|
|
public function handleOnEndMap(array $callback) {
|
|
|
|
//Display Map Widget
|
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_NEXTMAP_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayNextMapWidget();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-29 22:52:07 +01:00
|
|
|
/**
|
|
|
|
* Handle PlayerConnect callback
|
|
|
|
*
|
|
|
|
* @param array $callback
|
|
|
|
*/
|
|
|
|
public function handlePlayerConnect(array $callback) {
|
2013-12-29 23:01:51 +01:00
|
|
|
$player = $callback[1];
|
|
|
|
//Display Map Widget
|
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayMapWidget($player->login);
|
|
|
|
}
|
2013-12-29 23:39:30 +01:00
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayClockWidget();
|
|
|
|
}
|
2013-12-29 22:52:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-12-29 23:39:30 +01:00
|
|
|
/**
|
|
|
|
* Aktualize the clock widget every minute
|
|
|
|
* @param array $callback
|
|
|
|
*/
|
|
|
|
public function handleEveryMinute(array $callback) {
|
|
|
|
if($this->maniaControl->settingManager->getSetting($this, self::SETTING_CLOCK_WIDGET_ACTIVATED)){
|
|
|
|
$this->displayClockWidget();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-29 22:52:07 +01:00
|
|
|
/**
|
|
|
|
* Get plugin id
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public static function getId(){
|
|
|
|
return self::PLUGIN_ID;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get Plugin Name
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function getName(){
|
|
|
|
return self::PLUGIN_NAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get Plugin Version
|
|
|
|
*
|
|
|
|
* @return float,,
|
|
|
|
*/
|
|
|
|
public static function getVersion(){
|
|
|
|
return self::PLUGIN_VERSION;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get Plugin Author
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function getAuthor(){
|
|
|
|
return self::PLUGIN_AUTHOR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get Plugin Description
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function getDescription(){
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|