Changeset 750 for trunk/Modules
- Timestamp:
- Jan 12, 2014, 11:08:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Forum/Forum.php
r749 r750 17 17 { 18 18 $this->System->RegisterPage('forum', 'PageForum'); 19 $this->System->ModuleManager->Modules['News']->RegisterRSS(array( 20 'Title' => T('Forum'), 'Channel' => 'forum', 'Callback' => array('PageForum', 'ShowRSS'), 21 'Permission' => LICENCE_ANONYMOUS)); 19 22 $this->System->RegisterMenuItem(array( 20 23 'Title' => T('Forum'), … … 188 191 $TitleLength = 50; 189 192 mb_internal_encoding('utf-8'); 190 $DbResult = $this->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `UnixDate`, `User`, `UserName`, `Text` FROM `ForumText`ORDER BY `ID` DESC LIMIT 20');193 $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'); 191 194 while($DbRow = $DbResult->fetch_assoc()) 192 195 { … … 195 198 $Items[] = array 196 199 ( 197 'Title' => $DbRow['UserName'].': '.$Title,200 'Title' => $DbRow['Thread'].' - '.$DbRow['UserName'].': ', 198 201 'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'), 199 202 'Description' => $DbRow['Text'],
Note:
See TracChangeset
for help on using the changeset viewer.