list latest posts from configured forum only
i want to show the latest posts of a selected forum only, not from all forums. this should be quite easy to implement as it is just a typoscript configuration and extending the SQL for f.uid=x
#1 Updated by Simon Schaufelberger about 8 years ago
here an example patch:
//patch start $forum_id = (isset($this->conf['listLatest.']['forum_id'])) ? ' AND f.uid = '.intval($this->conf['listLatest.']['forum_id']).' ' : ''; //patch end $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 't.topic_last_post_id as post_id, t.uid as topic_id, t.*, f.uid as forum_id, f.forum_name as forum_name, c.forum_name as category_name, p.poster_id as author, p.post_time', 'tx_mmforum_posts p, tx_mmforum_forums f, tx_mmforum_forums c, tx_mmforum_topics t', 't.uid = p.topic_id AND p.uid = t.topic_last_post_id AND f.uid = p.forum_id AND c.uid = f.parentID AND p.deleted = 0 AND t.deleted = 0 AND f.deleted = 0 AND c.deleted = 0 AND p.hidden = 0 AND t.hidden = 0 AND f.hidden = 0 AND c.hidden = 0 '. //patch start $forum_id. //patch end $this->getMayRead_forum_query('f'). $this->getMayRead_forum_query('c'). $this->getCategoryLimit_query('c'), 'p.topic_id', 'p.post_time DESC', $limit );
but a comma separated list would even be better.