Changeset 765 for trunk/Modules
- Timestamp:
- Jan 27, 2014, 10:01:33 PM (11 years ago)
- Location:
- trunk/Modules
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Forum/Forum.php
r762 r765 130 130 $Output .= '</div>'.$PageList['Output']; 131 131 return($Output); 132 133 return($Output);134 132 } 135 133 … … 177 175 $Output .= $PageList['Output']; 178 176 $Output .= '<div class="shoutbox">'; 179 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '.$_GET['Thread'].' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']); 177 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '. 178 $_GET['Thread'].' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']); 180 179 while($Line = $DbResult->fetch_assoc()) { 181 180 if ($this->System->User->Id == $Line['User']) 182 181 $edit = '<a href="?Edit='.$Line['ID'].'">editovat</a>'; 183 182 else $edit = ''; 184 $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']).')</span><strong>'.$Line['UserName'].'</strong>: '.str_replace("\n", '<br />',$parser->qparse($Line['Text'])).' </div> '; 183 $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']). 184 ')</span><strong>'.$Line['UserName'].'</strong>: '.str_replace("\n", '<br />',$parser->qparse($Line['Text'])).' </div> '; 185 185 } 186 186 $Output .= '</div>'.$PageList['Output']; … … 269 269 function ShowRSS() 270 270 { 271 $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email'))); 272 273 $Items = array(); 271 274 $TitleLength = 50; 272 275 mb_internal_encoding('utf-8'); 273 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `UnixDate`, `User`, `UserName`, `Text`, ( SELECT `Text` FROM `ForumThread` WHERE `ID` = `ForumText`.`Thread`) as `Thread` FROM `ForumText` ORDER BY `ID` DESC LIMIT 20'); 276 $DbResult = $this->Database->query('SELECT `ID`, UNIX_TIMESTAMP(`Date`) AS `UnixDate`, '. 277 '`User`, `UserName`, `Text`, ( SELECT `Text` FROM `ForumThread` '. 278 'WHERE `ID` = `ForumText`.`Thread`) AS `Thread` FROM `ForumText` ORDER BY `ID` DESC LIMIT 20'); 274 279 while($DbRow = $DbResult->fetch_assoc()) 275 280 { … … 278 283 $Items[] = array 279 284 ( 280 281 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),282 'Description' => $DbRow['Text'],283 285 'Title' => $DbRow['Thread'].' - '.$DbRow['UserName'].': ', 286 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/forum/?Thread='.$DbRow['ID']), 287 'Description' => $parser->qparse($DbRow['Text']), 288 'Time' => $DbRow['UnixDate'], 284 289 ); 285 290 } 286 291 $Output = GenerateRSS(array 287 288 'Title' => 'WoW překlad - Fórum',289 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),290 'Description' => 'Překlad textů WoW',291 292 293 294 292 ( 293 'Title' => $this->System->Config['Web']['Title'].' - '.T('Forum'), 294 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/forum/'), 295 'Description' => $this->System->Config['Web']['Description'], 296 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 297 'Items' => $Items, 298 )); 299 return($Output); 295 300 } 296 301 } -
trunk/Modules/Log/Log.php
r636 r765 22 22 $this->System->RegisterPage('log.php', 'PageLog'); 23 23 $this->System->ModuleManager->Modules['Error']->OnError[] = array($this, 'DoAddItem'); 24 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => 'Záznamy',24 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Logs'), 25 25 'Channel' => 'log', 'Callback' => array('PageLog', 'ShowRSS'), 'Permission' => LICENCE_ADMIN)); 26 26 } … … 103 103 $Output .= GenerateRSS(array 104 104 ( 105 'Title' => $this->System->Config['Web']['Title'] ,105 'Title' => $this->System->Config['Web']['Title'].' - '.T('Logs'), 106 106 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 107 'Description' => $this->System->Config['Web'][' Title'],107 'Description' => $this->System->Config['Web']['Description'], 108 108 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 109 109 'Items' => $Items, -
trunk/Modules/News/News.php
r637 r765 22 22 $this->System->RegisterPage('news', 'PageNews'); 23 23 $this->System->RegisterPage('rss', 'PageRSS'); 24 $this->RegisterRSS(array('Title' => T(' System changes'), 'Channel' => 'news',24 $this->RegisterRSS(array('Title' => T('News'), 'Channel' => 'news', 25 25 'Callback' => array('PageNews', 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS)); 26 26 } … … 127 127 function ShowRSS() 128 128 { 129 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`News`.`Time`) AS `UnixTime`, '. 130 '`News`.`Title`, `News`.`Time`, `User`.`Name`, `News`.`Text` '. 131 'FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 132 while($DbRow = $DbResult->fetch_assoc()) 133 { 134 $Items[] = array 129 $Items = array(); 130 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`News`.`Time`) AS `UnixTime`, '. 131 '`News`.`Title`, `News`.`Time`, `User`.`Name`, `News`.`Text` '. 132 'FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 133 while($DbRow = $DbResult->fetch_assoc()) 134 { 135 $Items[] = array 136 ( 137 'Title' => $DbRow['Title'], 138 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/news/'), 139 'Description' => $DbRow['Text'].' ('.$DbRow['Name'].')', 140 'Time' => $DbRow['UnixTime'], 141 ); 142 } 143 $Output = GenerateRSS(array 135 144 ( 136 'Title' => $DbRow['Title'], 137 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 138 'Description' => $DbRow['Text'].' ('.$DbRow['Name'].')', 139 'Time' => $DbRow['UnixTime'], 140 ); 141 } 142 $Output = GenerateRSS(array 143 ( 144 'Title' => 'WoW překlad - '.T('System changes'), 145 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 146 'Description' => 'Překlad textů WoW', 147 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 148 'Items' => $Items, 149 )); 150 return($Output); 145 'Title' => $this->System->Config['Web']['Title'].' - '.T('System changes'), 146 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/news/'), 147 'Description' => $this->System->Config['Web']['Description'], 148 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 149 'Items' => $Items, 150 )); 151 return($Output); 151 152 } 152 153 } -
trunk/Modules/ShoutBox/ShoutBox.php
r637 r765 18 18 $this->System->RegisterPage('shoutbox', 'PageShoutBox'); 19 19 $this->System->ModuleManager->Modules['News']->RegisterRSS(array( 20 'Title' => 'Kecátko', 'Channel' => 'shoutbox', 'Callback' => array('PageShoutBox', 'ShowRSS'),20 'Title' => T('Shoutbox'), 'Channel' => 'shoutbox', 'Callback' => array('PageShoutBox', 'ShowRSS'), 21 21 'Permission' => LICENCE_ANONYMOUS)); 22 22 if(array_key_exists('Search', $this->System->ModuleManager->Modules)) … … 138 138 function ShowRSS() 139 139 { 140 $Items = array(); 140 141 $TitleLength = 50; 141 142 mb_internal_encoding('utf-8'); … … 148 149 ( 149 150 'Title' => $DbRow['UserName'].': '.$Title, 150 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/ '),151 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/shoutbox/'), 151 152 'Description' => $DbRow['Text'], 152 153 'Time' => $DbRow['UnixDate'], … … 154 155 } 155 156 $Output = GenerateRSS(array 156 157 'Title' => 'WoW překlad - Shoutbox',158 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),159 'Description' => 'Překlad textů WoW',160 161 162 163 157 ( 158 'Title' => $this->System->Config['Web']['Title'].' - '.T('Shoutbox'), 159 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/shoutbox/'), 160 'Description' => $this->System->Config['Web']['Description'], 161 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 162 'Items' => $Items, 163 )); 164 return($Output); 164 165 } 165 166 } -
trunk/Modules/Translation/Translation.php
r725 r765 29 29 $this->System->RegisterPage('progress', 'PageProgress'); 30 30 $this->System->RegisterPage('TranslationList.php', 'PageTranslationList'); 31 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => 'Poslední překlady',31 $this->System->ModuleManager->Modules['News']->RegisterRSS(array('Title' => T('Last translations'), 32 32 'Channel' => 'translation', 'Callback' => array($this, 'ShowRSS'), 'Permission' => LICENCE_ANONYMOUS)); 33 33 $this->System->RegisterMenuItem(array( … … 59 59 function ShowRSS() 60 60 { 61 $Items = array(); 61 62 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `Date`, `User`.`Name` AS `UserName`, `Text` FROM `Log` '. 62 63 'JOIN `User` ON `User`.`ID` = `Log`.`User` WHERE `Type` = 1 ORDER BY `Date` DESC LIMIT 100'); … … 65 66 $Items[] = array 66 67 ( 67 68 69 70 68 'Title' => strip_tags($DbRow['Text'].' ('.$DbRow['UserName'].')'), 69 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 70 'Description' => $DbRow['Text'], 71 'Time' => $DbRow['Date'], 71 72 ); 72 73 } 73 74 $Output = GenerateRSS(array 74 75 'Title' => 'WoW překlad - Poslední překlady',76 77 'Description' => 'Překlad textů WoW',78 79 80 75 ( 76 'Title' => $this->System->Config['Web']['Title'].' - '.T('Last translations'), 77 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 78 'Description' => $this->System->Config['Web']['Description'], 79 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 80 'Items' => $Items, 81 )); 81 82 return($Output); 82 83 } -
trunk/Modules/User/User.php
r725 r765 227 227 'User' => null, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 228 228 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 229 'ScriptName' => $_SERVER[' PHP_SELF']));229 'ScriptName' => $_SERVER['REQUEST_URI'])); 230 230 231 231 // Logged permanently?
Note:
See TracChangeset
for help on using the changeset viewer.