Ignore:
Timestamp:
Jan 12, 2014, 11:08:32 PM (11 years ago)
Author:
maron
Message:
  • Added: RSS Forum
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Forum/Forum.php

    r749 r750  
    1717        {
    1818                $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));           
    1922                $this->System->RegisterMenuItem(array(
    2023      'Title' => T('Forum'),
     
    188191          $TitleLength = 50;
    189192          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');
    191194          while($DbRow = $DbResult->fetch_assoc())
    192195          {
     
    195198            $Items[] = array
    196199            (
    197                 'Title' => $DbRow['UserName'].': '.$Title,
     200                'Title' =>  $DbRow['Thread'].' - '.$DbRow['UserName'].': ',
    198201                'Link' =>  'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/'),
    199202                'Description' => $DbRow['Text'],
Note: See TracChangeset for help on using the changeset viewer.