array fetch(
integer
$num, [integer
$ofs = 0])
|
|
Fetch recent news
Will fetch $num news from the most recent ones, ordered by date, descending. If $ofs is specified, news will be retrieved from position $ofs, starting from 0.
Tags:
Parameters:
string fetchRSS(
integer
$howMany, [integer
$offset = 0], [array
$tags = array()])
|
|
Fetch recent news as preformatted RSS items
Generate RSS items from the $howMany most recent news. Note that this method produces RSS items as enclosed by <item> and </item>. It is up to you to set up a complete feed by including these items into a RSS document (<rss>, <channel>, and so on).
If $offset is specified, news will be retrieved from position $offset, starting from 0.
RSS tags generation can be customized with the $tags argument. This is an array of the form : array('tagName' => 'content', etc...). Defaults are provided to generate the title, description, dc:creator and dc:date tags. You may at least want to customize the link tag as in:
1 $tags = array('link' => 'http://www.yourwebsite.com/single.php?id={id}');
2 $rssItems = $nova->fetchRSS (10, 0, $tags);
The {id} expression in the example above will be replaced by the corresponding news data ID value. You may use such expressions (as {subject}, {whatever}, etc...) to generate any kind of RSS tags.
Tags:
Parameters: