getLastPosts

Description

Fetches and returns information about a particular number of most recent posts (that you can see).

Syntax

array getLastPosts (int $showlatestcount)



Parameter $showlatestcount

Expected type: Integer
Description: How many recent posts to fetch



Return value

Expected type: Array
Description: An array of arrays containing information about the recent posts. Each array contains the keys listed here.

Array Elements
Key Optional Expected type Description
board no Array An array of information about the board that this post is on. Keys are id (board ID), name (board name), href (URL to board) and link (HTML formatted link to the board)
href no String The URL to this post
link no String An HTML formatted link to the post
poster no Array An array of information about the poster. Keys are id (member ID; 0 if they're a guest), name (user/poster name), href (URL to their profile if not a guest) and link (HTML formatted link to their profile if not a guest)
preview no String A "preview" of the post - the first 128 characters (after bbcode, smileys and HTML are stripped) with "..." appended (or the entire text if the stripped-down version is less than 129 characters long)
short_subject no String A shortened subject - 24 characters with "..." appended (or the subject itself if it's less than 25 characters long)
subject no String The subject of the post
time no String The time the post was made, formatted according to settings and with respect to time offsets
timestamp no Integer The UNIX timestamp indicating when the post was made
topic no Integer The ID of the topic this post is in


Notes

  • Exactly like getLastPost except it fetches multiple posts
Advertisement: