b r a y d e n . o r g / TWiki

/ HeadlinesPlugin

This Web


WebHome  
Topic List  
Web Statistics 

All Webs


Books
Main
Random
Software
TWiki  

brayden.org


Home
Monthly Digest
Today's Links
Resumé
Reading List
Books RSS
Random RSS
Software RSS

Other


Dale's Blog

currently-reading
TextDrive

Headlines Plugin

This plugin displays RSS 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.

HeadlinesPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %HEADLINES_SHORTDESCRIPTION%

      * Set HEADER = ---++ [[$channellink][$channeltitle]] $n $channeldescription

      * Set FORMAT = ---+++ [[$link][$title]] $n $description

Syntax Rules

The %HEADLINES{...}% variable gets expanded to the content pulled from an RSS feed.

%HEADLINES% Parameter Explanation Default
href URL of RSS feed None; is required
refresh Refresh rate in minutes for caching feed; "0" for no caching Global REFRESH setting
limit Maximum number of items shown Global LIMIT setting
header Header. Can include these variables:
- $channeltitle: Title of channel
- $channellink: Link of channel
- $channeldescription: Description of channel
- $imagetitle: Title text for site
- $imagelink: Link for site
- $imageurl: URL of image
- $imagedescription: Description of image
Global HEADER setting
format Format of one item. Can include these variables:
- $title: News item title
- $link: News item link
- $description: News item description
Global FORMAT setting

Examples

Write %HEADLINES{ href="http://slashdot.org/slashdot.rdf" }% to get the latest Slashdot news in table format:

HEADLINES Plugin Error
HeadlinesPlugin: Can't read http://freshmeat.net/backend/fm.rdf (301 Moved Permanently)

Write %HEADLINES{ href="http://www.moreover.com/cgi-local/page?o=rss&c=Aerospace%20and%20defense%20industry%20news" header="   * [[$channellink][$channeltitle]]:" format="      * [[$link][$title]] ($description)" }% to get Aerospace and defense industry news rendered as a bullet list:

HEADLINES Plugin Error
HeadlinesPlugin: Can't read http://www.moreover.com/cgi-local/page?o=rss&c=Aerospace%20and%20defense%20industry%20news (404 Not Found)

Known issues

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

Plugin Info

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)
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

Related Topics: TWikiPreferences, TWikiPlugins

-- PeterThoeny? - 02 Aug 2002

 
 
Current Rev: r1.6 - 20 Jul 2003 - 05:27 GMT - DaleBrayden, Revision History:Diffs | r1.6 | > | r1.5 | > | r1.4
© 2003-2011 by the contributing authors.