TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 582
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 314
  • Total: 314

Is their a way to get Recent Posts from specific boards?

Started by panesarv, January 03, 2008, 01:14:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

panesarv

Guys, I would to use the Recent Posts block to show posts only from specific boards. Is it possible to do so?

Zetan

You are probably better off creating a custom block.
I posted a snippet a while ago. I'll see if I can find the topic.

Zetan


falguni1

Quote from: ZTN on January 03, 2008, 01:22:46 AM
I posted a snippet a while ago. I'll see if I can find the topic.

I cant find snippet for post from particular board.
there are for post from all boards.


falguni1

it shows a link wot to do to directly show the topics.


panesarv

Ok I want this code [Latest Topics Created]

global $scripturl, $settings, $db_prefix, $user_info, $modSettings;

$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 4px 0 0;" />';

$list_count = 5;

$request = db_query("
SELECT
ms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname
FROM ({$db_prefix}messages AS ms, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
WHERE   t.ID_TOPIC = ms.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD " . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND ms.ID_MSG = t.ID_FIRST_MSG
AND " . $user_info['query_see_board'] . "
ORDER BY t.ID_FIRST_MSG DESC LIMIT " . $list_count, __FILE__, __LINE__);

echo '


I would like to take posts from these boards - 23.0, 24.0, 25.0

What kind of block do I use? (SSI, HTML+BBC, Script??? )


panesarv

ok.

I would like to take posts from these boards - 23.0, 24.0, 25.0

How do I do that?

This website is proudly hosted on Crocweb Cloud Website Hosting.