Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome, Guest. Please login or register.
Did you miss your activation email?

January 27, 2023, 12:31:19 AM

Login with username, password and session length
  • Total Members: 3856
  • Latest: Bixby
  • Total Posts: 193807
  • Total Topics: 21124
  • Online today: 18
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 35
Total: 35

Author Topic: View last post from News board.  (Read 5968 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
View last post from News board.
« on: March 03, 2006, 07:19:29 AM »
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 (http://dev.phoenixgamesclub.org.uk/), 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???


  • Guest
Re: View last post from News board.
« Reply #1 on: March 03, 2006, 07:40:04 AM »
Okay ... scratch this ... I just found out how to do it.

Set up a Frontpage phpbox block.

Type the following code:
Code: [Select]
ssi_boardNews(n,1);where n is the boardID for your news.