Navigation

Search

ssi_recentTopics

Description

Similar to recent posts. This one returns/outputs a list of the topics that have been posted in most recently.

Syntax

array ssi_recentTopics ([int $num_recent[, array $exclude_boards[, array $include_boards[, string $output_method]]]])



Parameter $num_recent

Expected type: Integer
Description: How many recent topics to display. Default is 8



Parameter $exclude_boards

Expected type: Array of Integers
Description: An array of board IDs. If specified, topics from the specified board(s) will be excluded from the list. Defaults to an empty array.



Parameter $include_boards

Expected type: Array of Integers
Description: An array of board IDs. If specified, only topics from the specified board(s) will be pulled.



Parameter $output_method

Expected type: String
Description: Standard output_method variable. Defaults to 'echo'. If anything else, the function will return the array of data. Otherwise it will return a pre-formatted list.



Return value

Expected type: Array
Description: Outputs the list if output_method is echo, otherwise returns an array of arrays with the following info (each array is a separate topic)

Array Elements
Key Optional Expected type Description
board no Array An array of information about this board - id (board ID), name (board name), href (URL to the board), link (HTML link to the board)
href no String URL to the topic
link no String HTML link to the topic
new no Boolean Whether or not this is a new post
newtime no Integer Not used by default, but can be used to determine what should be marked as read...
poster no Array An array of information about the poster - id (user ID or 0 if they were a guest), name (display name or the name the guest entered), href (URL to the poster's profile, if applicable), link (HTML link to the profile, or just the name if they're a guest)
short_subject no String The first 22 characters of the subject with "..." appended, or the entire subject if it's less than 26 characters long
subject no String The topic's subject
time no String The formatted date/time string indicating when the topic was started
timestamp no Integer The raw timestamp indicating when the topic was started
topic no Integer The topic ID


Notes

  • Returns only a list of topics and not specific posts
  • Since this is a list of topics and not posts, there won't be any duplicate results here even if the 10 most recent posts were made in the same topic...
View all versions of this function