|
%HEADLINES{...}%
variable gets expanded to the content pulled from an RSS feed.
%HEADLINES% Parameter | Explanation |
---|---|
href |
URL of RSS feed |
refresh |
Refresh rate in minutes for caching feed; "0" for no caching |
limit |
Maximum number of items shown |
header |
Header. Can include these variables: - $channeltitle, $title: title of channel (channel.title) - $channellink, $link: link of channel (channel.link) - $channeldescription, $description: description (channel.description) - $channeldate, $date: publication date of the channel (channel.pubDate) - $rights: copyrights of the channel (channel.copyright) - $imagetitle: title text for site (image.title) - $imagelink: link for site (image.link) - $imageurl: URL of image (image.url) - $imagedescription: description of image (image.description) |
format |
Format of one item. Can include these variables: - $title: news item title (item.title) - $link: news item link (item.link) - $description: news item description (item.description) - $date: the publication date (item.pubDate, item.date) - $category: the article category (item.category) |
header
and format
parameters might also use variables rendering the dc
, image
and
content
namespace information. Note, that only bits of interest have been implemented
so far and those namespaces might not be implemented fully yet.
dc
namespace dc
namespace info,
that could be used in header
and format
. Nnote, that some of the variables are
already used above. This is done by purpose to use different feeds with the
same formating parameters. If there's a conflict the non-dc tags have higher precedence,
i.e. a <title> content </title> is prefered over
<dc:title> content </dc:title> . image
namespace image:item
is converted into an <img> tag using the following mappings: src
: image url (rdf:about attribute of the image.item tag)
alt
: image title (title)
width
: image width (image:width)
height
: image height image:height)
content
namespace %<plugin>_<setting>%
, for example, %HEADLINES_SHORTDESCRIPTION%
data/debug.txt
. Default: 0
0
, default: 30
100
* Set HEADER = <div class="headlinesChannel"><div class="headlinesLogo"><img src="$imageurl" alt="$imagetitle" border="0"/>%BR%<from><input type="button" style="color:blue" value="Refresh" onclick="window.location.href='%SCRIPTURL%/view/%WEB%/%TOPIC%?refresh=on';" /></form></div>$n<div class="headlinesTitle">$n<h1>[[$link][$title]]</a></h1>$n<div class="headlinesDate">%SERVERTIME{$yea-$mo-$day, $hour:$min:$sec}%</div>$n<div class="headlinesDescription">$description</div><div class="headlinesRight">$rights</div></div></div>
* Set FORMAT = <div class="headlinesArticle"><div class="headlinesTitle"><div class="headlinesSubject">$subject</div>[[$link][$title]]<span class="headlinesDate">$date</span> <span class="headlinesCreator"> $creator</span>$n</div>$n<hr/><div class="headlinesTeaser"> $description</div></div>
TWiki::Net::getUrl()
function. The plugin might break in a future TWiki release.
TWiki::Net::getUrl()
Plugin Author: | PeterThoeny |
Plugin Version: | 02 Aug 2002 (V1.001) |
Change History: | |
02 Aug 2002: | Implemented caching of feeds, thanks to TWiki:Main/RobDuarte |
11 Jun 2002: | Initial version (V1.000) |
11 Nov 2004: | big rewrite TWiki:Main/MichaelDaum |
CPAN Dependencies: | none |
Other Dependencies: | none |
Perl Version: | 5.004 |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/HeadlinesPlugin |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/HeadlinesPluginDev |