Name = 'Server'; $this->Version = '1.0'; $this->Creator = 'Chronos'; $this->License = 'GNU/GPL'; $this->Description = 'Show list of WoW servers which supports translated texts.'; $this->Dependencies = array(); } function DoStart(): void { $this->System->RegisterPage(['server'], 'PageServerList'); Core::Cast($this->System)->RegisterMenuItem(array( 'Title' => T('Servers'), 'Hint' => 'Seznam serverů, kde je nasazena čeština v praxi', 'Link' => $this->System->Link('/server/'), 'Permission' => LICENCE_ANONYMOUS, 'Icon' => '', ), 5); } } class PageServerList extends PageEdit { function __construct(System $System) { parent::__construct($System); $this->Table = 'Server'; $this->TableSQL = 'SELECT `Server`.`Id`, `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, `Description`, `CheckIP`, `CheckPort`, '. '`ClientVersion`.`Version` AS `ClientVersion` FROM `Server` '. 'LEFT JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Server`.`ClientVersion`'; $this->Definition = array( 'Name' => array('Type' => 'String', 'Title' => T('Name'), 'InList' => true), 'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true), 'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true), 'XPRate' => array('Type' => 'String', 'Title' => T('XP rate'), 'InList' => true), 'GameplayStyle' => array('Type' => 'String', 'Title' => T('Style'), 'InList' => true), 'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true), 'Description' => array('Type' => 'Text', 'Title' => T('Description'), 'InList' => false), 'CheckIP' => array('Type' => 'Text', 'Title' => T('Online check IP'), 'InList' => false), 'CheckPort' => array('Type' => 'Text', 'Title' => T('Online check port'), 'InList' => false), ); } function ViewList() { $this->Title = T('Servers'); $Output = '

'.T('There are servers listed which are in fact offering translated game. '. 'There is resoluted if translation is offered either on client side, on server side or both. '. 'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.').'.

'; $Output .= '

'.T('Translated server list').'

'; $Output .= parent::ViewList(); return $Output; } }