Changeset 581 for trunk/Modules/Translation
- Timestamp:
- Sep 12, 2013, 9:14:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Translation.php
r561 r581 16 16 $this->License = 'GNU/GPL'; 17 17 $this->Description = 'Translation of text items and groups from original language to other languages.'; 18 $this->Dependencies = array( );18 $this->Dependencies = array('News'); 19 19 } 20 20 … … 25 25 $this->System->RegisterPage('save.php', 'PageTranslationSave'); 26 26 $this->System->RegisterPage('TranslationList.php', 'PageTranslationList'); 27 $this->System->RegisterRSS(array('Title' => 'Poslední překlady', 'Channel' => 'translation')); 27 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => 'Poslední překlady', 28 'Channel' => 'translation', 'Callback' => array($this, 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS)); 29 } 30 31 function ShowRSS() 32 { 33 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `Date`, `User`.`Name` AS `UserName`, `Text` FROM `Log` JOIN `User` ON `User`.`ID` = `Log`.`User` WHERE `Type` = 1 ORDER BY `Date` DESC LIMIT 100'); 34 while($DbRow = $DbResult->fetch_assoc()) 35 { 36 $Items[] = array 37 ( 38 'Title' => strip_tags($DbRow['Text'].' ('.$DbRow['UserName'].')'), 39 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 40 'Description' => $DbRow['Text'], 41 'Time' => $DbRow['Date'], 42 ); 43 } 44 $Output = GenerateRSS(array 45 ( 46 'Title' => 'WoW překlad - Poslední překlady', 47 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 48 'Description' => 'Překlad textů WoW', 49 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 50 'Items' => $Items, 51 )); 52 return($Output); 28 53 } 29 54 }
Note:
See TracChangeset
for help on using the changeset viewer.