newsMenu

(/rs/public/functions.news.php)

newsMenu -- String listing news articles for a fleet or the RS in general.

Description

string newsMenu ($fleetID = 0, $showauth = 1, $dateformat = "m/d/y h:i A", $limit = 6, $order = "DESC")

This function returns a string listing news articles for a fleet with id $fleetID, or RS-Wide articles if $fleetID is 0.

$showauth, if true or 1, will add a column containing the article's author (poster) to the table.

$dateformat is a php date format string. See php.net for more information.

$limit is the maximum number of articles to display. Setting this to 0 will remove the limit and show all matching articles.

$order can be either "DESC" or "ASC". If "DESC", newer articles will appear on top. If "ASC", older articles will appear on top.

This function returns a string containing an empty table on failure.

Examples

newsMenu () /* Shows links to the six most recent news articles for the RS in general, with authors. */

newsMenu (1, 0, "M d, Y", 0, "ASC") /* Shows all the news articles, oldest first, for fleet with id 1. No authors, date is "Jan 1, 1970" format. */

Related Functions

newsArticle, newsFlash

Dependencies

returnMember

Function Index