newsFlash -- Formatted text string for displaying news in a Flash application.
($fleetID = 0, $dateformat = "m/d/y h:i A", $limit = 6, $order ="DESC", $type = 0, $searchField = "Title", $searchString = "")
This function returns a string of text containing Flash variables and values for use in a Flash application. The variables returned are:
Where X is an integer starting at 1 and incrementing for each article returned. There are no newlines in the text file--they are present here for clarity's sake.
Which articles are returned and how the values are formatted is described by the parameters:
$fleetID specifies the fleet for which articles are searched. RS-Wide articles are searched if this is set to 0.
$dateformat is a php date string that formats the returned dates as needed. See php.net for more information.
$limit is the maximum number of articles returned. For unlimited articles, set this to 0.
$order can be either "DESC" or "ASC". If "DESC", the newest $limit articles will be returned first. If "ASC", the oldest $limit articles will be returned first.
$type, if set, filters the type of news to that specific news type. This is the integral type. See getNewsType() for more information.
$searchField is optional and lists a certain field of the four to search with $searchString. You can search the fields "Title" or "Body" for any string. Any matches at all will be returned, provided the other criteria ($fleetID, $limit, $type) are satisfied as well.
This function returns an empty string on failure.
newsFlash (1, "M d, Y", 3, "DESC", 3, "Body", "Promotions") /* Searches the fleet with id 1's news for all Fleet NL's containing the word "Promotions" inside their body. The most recent three are returned. */