HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome to TinyPortal. Please login or sign up.

December 05, 2023, 04:48:14 AM

Login with username, password and session length
  • Total Posts: 194,611
  • Total Topics: 21,189
  • Online today: 63
  • Online ever: 3,540
  • (September 03, 2022, 01:38:54 AM)
Users Online
Users: 1
Guests: 67
Total: 68

View last post from News board.

Started by pgc_boss, March 03, 2006, 02:19:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


We have the ability through TP, to show the posts from a particular board on the frontpage. SMF also provides ssi_boardNews() which I believe serves a similar purpose.

My suggestion (or request if you prefer) is as follows:

If you take a look at the frontpage of my site (, you'll see that I have a static HTML block with some introductory text, with a newsblock above it. (It's been done this way, using frontpage blocks only because we don't want the static block to show up whenever you click Forums or Articles.)

The newsblock is a pretty decent way of giving out the most recent announcements but it randomly selects a news item, not the most recent one. Thus I have to delete all previous items and I've got no history.

Is it possible to use a PHP block to extract the information from the news forum (as done by TP) but to only display the most recent item???


Okay ... scratch this ... I just found out how to do it.

Set up a Frontpage phpbox block.

Type the following code:
where n is the boardID for your news.