|
> > | Headlines Plugin |
| <--
Contributions to this plugin are appreciated. Please update the plugin page
at http://twiki.org/cgi-bin/view/Plugins/HeadlinesPlugin or provide feedback
at http://twiki.org/cgi-bin/view/Plugins/HeadlinesPluginDev.
If you are a TWiki contributor please update the plugin in the SVN repository.
--> |
|
< < | Headlines Plugin |
|
Description
This plugin displays RSS and ATOM feeds from news sites. Use it to build news portals that show headline news. |
|
< < | Note: Syndic8.com ( http://www.syndic8.com/ ) is a good site listing many RSS feeds. |
> > | Note: Syndic8.com ( http://www.syndic8.com/ ) lists many RSS feeds. |
|
Syntax Rules |
|
href="..." |
(Alternative to above) |
N/A |
refresh="60" |
Refresh rate in minutes for caching feed; "0" for no caching |
Global REFRESH setting |
limit="12" |
Maximum number of items shown |
Global LIMIT setting |
|
|
> > |
touch="..." |
Touch (edit/save) topics if the feed has updates. Specify a comma-space delimited list of TopicNames or Web.TopicNames, such as "%TOPIC%, NewsLetter" . Useful to send out newsletter using MailerContrib, showing new feeds since last newsletter. To update feeds, visit topics with feeds in regular intervals (using cron with wget or the like). |
N/A |
|
| | header | Header. Can include these variables: - $channeltitle, $title: title of channel (channel.title) - $channellink, $link: link of channel (channel.link) |
| - $category: the article category (item.category) | Global FORMAT setting | |
|
< < | The 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. |
> > | The 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. |
|
Rendering the dc namespace |
|
< < | The following variables are extracting the 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> . |
> > | The following variables are extracting the 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> . |
|
- $title: channel/article title (dc:title)
- $creator: channel creator (dc:creator)
- $subject: subject text; this will also add an image according to the subject hash
|
| %HEADLINES{"http://slashdot.org/slashdot.rdf"
header="*$title :* $description"
format="$t* $title " |
|
> > | limit="4" |
| }%
to get the latest Slashdot news as a bullet list format: |
|
< < |
HeadlinesPlugin ERROR: 503 Service Unavailable
|
> > |
HeadlinesPlugin ERROR: 503 Service Unavailable
|
|
Business Opportunities Weblog
Write |
|
< < | |
> > | |
|
to get the latest postings on the "Business Opportunities" weblog: |
|
< < | |
> > | |
|
Plugin Settings |
|
-
-
$TWiki::cfg{PROXY}{PORT} - proxy port, such as "8080";
-
$TWiki::cfg{PROXY}{SkipProxyForDomains} - domains excluded from proxy, such as "intra.example.com, bugs.example.com";
|
|
> > | Style Sheets |
| |
|
< < | Style sheets
The default HEADER and FORMAT settings use the following styles. See the style.css file
defining the default CSS properties (indentation illustrates enclosure). |
> > | The default HEADER and FORMAT settings use the following styles. See the style.css file defining the default CSS properties (indentation illustrates enclosure). |
|
- headlinesRss: output of the HeadlinesPlugin (div)
- headlinesChannel: channel header (div)
|
|
Plugin Installation Instructions |
|
< < | |
> > | |
|
- Unzip it in your twiki installation directory. Content:
|
|
lib/TWiki/HeadlinesPlugin.pm |
plugin perl module |
lib/TWiki/HeadlinesPlugin/Core.pm |
plugin core |
Check if above examples show a news feed instead of variable. |
|
< < |
- Optionally, run
HeadlinesPlugin_installer.pl to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
- Alternatively, manually make sure the dependencies listed in the table below are resolved.
|
> > |
- Optionally, run
HeadlinesPlugin_installer.pl to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
- Alternatively, manually make sure the dependencies listed in the table below are resolved.
|
| Name | Version | Description |
---|
Digest::MD5 | >=2.33 | Required. Download from CPAN:Digest::MD5 | LWP::UserAgent | >=5.803 | Optional. Download from CPAN:LWP::UserAgent |
|
|
< < | |
| Plugin Info
|
|
|
|
< < |
Plugin Version: |
v2.21 - 12 Feb 2009 |
|
> > |
Plugin Version: |
v2.3 - 29 Aug 2009 |
|
|
Change History: |
<-- specify latest version first --> |
|
|
> > |
29 Aug 2009: |
added touch parameter -- Peter Thoeny |
|
|
12 Feb 2009: |
{PROXY}{HOST} supports domain with and without protocol -- Peter Thoeny |
06 Feb 2009: |
added {PROXY}{SkipProxyForDomains} configure setting, added USERAGENTNAME plugin setting -- Peter Thoeny |
11 Dec 2008: |
added {PROXY}{HOST} and {PROXY}{PORT} configure settings -- Peter Thoeny |
13 Sep 2007: |
fixed parsing of content:encoded |
23 Jul 2006: |
improved atom parser; if a posting has no title default to 'Untitled' |
26 Apr 2006: |
added lazy compilation |
|
|
< < |
10 Feb 2006: |
packaged using the TWiki:Plugins/BuildContrib; minor fixes |
03 Feb 2006: |
off-by-one: limit="n" returned n+1 articles; make FORMAT and HEADER format strings more robust |
|
> > |
10 Feb 2006: |
packaged using the TWiki:Plugins/BuildContrib; minor fixes |
03 Feb 2006: |
off-by-one: limit="n" returned n+1 articles; make FORMAT and HEADER format strings more robust |
|
|
23 Jan 2006: |
released v2.00 |
05 Dec 2005: |
internal feed urls must be absolute |
02 Dec 2005: |
added web.topic shorthand for internal feeds |
29 Nov 2005: |
fixed CDATA handling |
|
|
< < |
21 Nov 2005: |
added ATOM support; extended RSS support; added dublin core support; added content support; optionally using LWP to fetch feeds to follow redirections; corrected CPAN dependencies ; recoding special chars from html integer to entity encoding to increase browser compatibility; added css support; use getWorkArea() if available |
|
> > |
21 Nov 2005: |
added ATOM support; extended RSS support; added dublin core support; added content support; optionally using LWP to fetch feeds to follow redirections; corrected CPAN dependencies ; recoding special chars from html integer to entity encoding to increase browser compatibility; added css support; use getWorkArea() if available |
|
|
11 May 2005: |
TWiki:Main.WillNorris: added DevelopBranch compatability |
31 Oct 2004: |
Fixed taint issue by TWiki:Main.AdrianWeiler; small performance improvement |
29 Oct 2004: |
Fixed issue of external caching if mod_perl or SpeedyCGI is used |
|
|
|
|
< < | -- TWiki:Main.PeterThoeny - 12 Jan 2009
-- TWiki:Main.MichaelDaum - 13 Sep 2007 |
> > | -- TWiki:Main.PeterThoeny - 29 Aug 2009 |