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

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 01:14:32 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 174
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 171
  • Total: 171

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.

pgc_boss

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

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

Set up a Frontpage phpbox block.

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