Changeset 816 for trunk/Modules/Server
- Timestamp:
- Feb 22, 2015, 11:20:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Server/Server.php
r766 r816 3 3 class ModuleServer extends AppModule 4 4 { 5 6 7 8 9 10 11 12 13 14 5 function __construct($System) 6 { 7 parent::__construct($System); 8 $this->Name = 'Server'; 9 $this->Version = '1.0'; 10 $this->Creator = 'Chronos'; 11 $this->License = 'GNU/GPL'; 12 $this->Description = 'Show list of WoW servers which supports translated texts.'; 13 $this->Dependencies = array(); 14 } 15 15 16 17 18 19 16 function Start() 17 { 18 $this->System->RegisterPage('server', 'PageServerList'); 19 $this->System->RegisterMenuItem(array( 20 20 'Title' => T('Servers'), 21 21 'Hint' => 'Seznam serverů, kde je nasazena čeština v praxi', … … 24 24 'Icon' => '', 25 25 ), 5); 26 26 } 27 27 } 28 28 29 29 class PageServerList extends PageEdit 30 30 { 31 32 33 34 35 31 function __construct($System) 32 { 33 parent::__construct($System); 34 $this->Table = 'Server'; 35 $this->TableSQL = 'SELECT `Server`.`Id`, `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, `Description`, `CheckIP`, `CheckPort`, '. 36 36 '`ClientVersion`.`Version` AS `ClientVersion` FROM `Server` '. 37 37 'LEFT JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Server`.`ClientVersion`'; 38 39 40 'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true), 41 'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true), 38 $this->Definition = array( 39 'Name' => array('Type' => 'String', 'Title' => T('Name'), 'InList' => true), 40 'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true), 41 'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true), 42 42 'XPRate' => array('Type' => 'String', 'Title' => T('XP rate'), 'InList' => true), 43 43 'GameplayStyle' => array('Type' => 'String', 'Title' => T('Style'), 'InList' => true), 44 'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true), 44 'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true), 45 45 'Description' => array('Type' => 'Text', 'Title' => T('Description'), 'InList' => false), 46 46 'CheckIP' => array('Type' => 'Text', 'Title' => T('Online check IP'), 'InList' => false), 47 47 'CheckPort' => array('Type' => 'Text', 'Title' => T('Online check port'), 'InList' => false), 48 ); 49 50 51 52 53 48 ); 49 } 50 51 function ViewList() 52 { 53 $this->Title = T('Servers'); 54 54 $Output = '<p>'.T('There are servers listed which are in fact offering translated game. '. 55 55 'There is resoluted if translation is offered either on client side, on server side or both. '. 56 56 'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.').'.</p>'; 57 57 $Output .= '<h3>'.T('Translated server list').'</h3>'; 58 59 60 58 $Output .= parent::ViewList(); 59 return($Output); 60 } 61 61 }
Note:
See TracChangeset
for help on using the changeset viewer.