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

Recent

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

September 27, 2022, 11:56:01 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 193513
  • Total Topics: 21092
  • Online today: 72
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 40
Total: 40

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

0 Members and 1 Guest are viewing this topic.

pgc_boss

  • 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???

pgc_boss

  • 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.