Changeset 765 for trunk/Modules/Forum/Forum.php
- Timestamp:
- Jan 27, 2014, 10:01:33 PM (11 years ago)
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.