Welcome, Registration, and other StartingPoints; Foswiki history & Wiki style; All the docs...
Edit | Attach | New | Raw | Delete | History | Print | Tools
You are here: System » HeadlinesPlugin

Headlines Plugin


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.

Syntax Rules


Parameter Explanation Default
"..." source of RSS feed; this can be an url (starting with http) or a web.topic location for internal feeds None; is required
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
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)
Global HEADER setting
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)
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.

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

  • $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 list, see above (dc:subject)
  • $description: ... (dc:description)
  • $publisher: the channel/article publisher (dc:publisher)
  • $contributor: ... (dc:contributor)
  • $date: ... (dc:date)
  • $type: ... (dc:type)
  • $format: ... (dc:format)
  • $identifier: ... (dc:identifier)
  • $source: ... (dc:source)
  • $language: ... (dc:language)
  • $relation: ... (dc:relation)
  • $coverage: ... (dc: coverage)
  • $rights: ... (dc: rights)

Rendering the image namespace

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

Rendering the content namespace

The variable $content is refering to the <content:encoding> content </content:encoding>.


Slashdot News


%HEADLINES{"http://slashdot.org/slashdot.rdf" header="---+!! [[$link][$title]]$n $description" format="$t* [[$link][$title]]"}%
to get the latest Slashdot news as a bullet list format:

Business Opportunities Weblog


%HEADLINES{"http://www.business-opportunities.biz/feed" limit="3"}%

to get the latest postings on the "Business Opportunities" weblog:

Thu, 23 Oct 2014 21:51:10 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Thu, 23 Oct 2014 19:51:58 +0000 Dane Carlson

Hi Dane, thanks for the great blog. The redesign looks great! I’m in the middle of deciding between two possible businesses to start, and I’m stuck. On paper, they both seem great. How do I unfreeze and make a decision?

Life is full of choices. Some are permanent, like who to marry. Others will impact you for a long time, like what business to start, or where to live. And others are so transient that it’s almost not worth fretting over, like what to have for lunch.

I long time ago, I read a book that included a letter from Benjamin Franklin to a young man in a similar situation. The young man had written to Franklin and asked his advice on how to decide between two fields of study.

Franklin, always the practical genius, offered his advice on deciding between two options. The system he described has come to be called the Benjamin Franklin close.

I will reprinted his original comment at bottom of this article, but for now, here’s how to make decisions like Benjamin Franklin.

The Process


  1. Setup your page. On a sheet of paper, or in a spreadsheet, down the left side list the factors that might go into your decision.

  2. Weight the factors. To the right of the factors, write a number between 1 and 10. This is the “weight” of this factor. If a factor is very important to you, give it a higher number. If it is less important, a lower one.

  3. Add your options. To the right of the weight, at the top of the page, write Option #1. Move over two columns to the right and write Option #2. If you have more than two options, skip another column and add Option #3 and so on.

  4. Score each of the options on the various factors. Now in the cell next to weight, and under Option #1, put a number between 1 and 10. This number represents the score that a particular factor has for that option. Do this also for Option #2 and so on.

  5. Compute. Multiply the weight factor by each of the options scores. Add up all of the results for each option and score. The option with the largest total wins.

I know this sounds complex. But it’s not. Here, I made you an Excel spreadsheet.

Franklin’s Original Letter

To Joseph Priestley
London, September 19, 1772
Dear Sir,

In the Affair of so much Importance to you, wherein you ask my Advice, I cannot for want of sufficient Premises, advise you what to determine, but if you please I will tell you how.

When these difficult Cases occur, they are difficult chiefly because while we have them under Consideration all the Reasons pro and con are not present to the Mind at the same time; but sometimes one Set present themselves, and at other times another, the first being out of Sight. Hence the various Purposes or Inclinations that alternately prevail, and the Uncertainty that perplexes us.

To get over this, my Way is, to divide half a Sheet of Paper by a Line into two Columns, writing over the one Pro, and over the other Con. Then during three or four Days Consideration I put down under the different Heads short Hints of the different Motives that at different Times occur to me for or against the Measure. When I have thus got them all together in one View, I endeavour to estimate their respective Weights; and where I find two, one on each side, that seem equal, I strike them both out: If I find a Reason pro equal to some two Reasons con, I strike out the three. If I judge some two Reasons con equal to some three Reasons pro, I strike out the five; and thus proceeding I find at length where the Ballance lies; and if after a Day or two of farther Consideration nothing new that is of Importance occurs on either side, I come to a Determination accordingly.

And tho’ the Weight of Reasons cannot be taken with the Precision of Algebraic Quantities, yet when each is thus considered separately and comparatively, and the whole lies before me, I think I can judge better, and am less likely to take a rash Step; and in fact I have found great Advantage from this kind of Equation, in what may be called Moral or Prudential Algebra.

Wishing sincerely that you may determine for the best, I am ever, my dear Friend,
Yours most affectionately
B. Franklin

Source: Mr. Franklin: A Selection from His Personal Letters. Contributors: Whitfield J. Bell Jr., editor, Franklin, author, Leonard W. Labaree, editor. Publisher: Yale University Press: New Haven, CT 1956.

Thu, 23 Oct 2014 16:03:00 +0000 Dane Carlson

The International Franchise Association’s Educational Foundation (IFAEF) is pleased to announce the launch of the Young Entrepreneurs In Franchising Global Competition, a contest targeting students and young entrepreneurs around the world. The contest will run from Oct. 22 through Dec. 1. It will be hosted on the newly launched NextGen In Franchising website, http://nextgenfranchising.org, and marketed to global youth organizations, business and entrepreneurship professors, and promoted in the media and all major social media platforms.

Participants will submit business and marketing concepts for new franchise businesses or existing franchise brands for the chance to win a trip to Las Vegas, NV to attend IFA’s Annual Convention, Feb. 15 - 18 at MGM Grand Hotel. Contest winners will have opportunities to engage directly with leading franchisor, franchisee and supplier members of IFA and with other young entrepreneurs and students. The convention will also feature a NextGen in Franchising Summit, a two-day educational and networking program for next generation entrepreneurs and students.

“I am so excited about NextGen In Franchising because these young people are the future of our industry and we need to reach out to them to get them involved now, in a meaningful way,” said Melanie Bergeron, chair of the board, Two Men & A Truck, and incoming IFA chairman.

With the average age of the world population being under 30, and with one billion young people entering the workforce, the IFAEF is launching a bold new initiative to introduce young entrepreneurs and students to the world of franchising. Through a comprehensive marketing and educational campaign called NextGen In Franchising, millions will be exposed to the franchise business model as they’ve never seen it before.

NextGen In Franchising will encourage young people to explore opportunities to WORK, BUY or BUILD; essentially, pursue employment in the franchising industry, consider ownership of a franchise business or use the franchise model to start a business or expand an existing one.

“There is a huge talent pool of young entrepreneurs out there that we need to tap into to bring new ideas for new businesses and new thinking into our industry,” said Aziz Hashim, CEO, NRD Holdings and incoming IFA vice chairman.

With global youth employment and entrepreneurship education being touted as one of the most critical challenges to solve on the world stage, IFAEF is stepping forward to present this $840 billion industry, overflowing with entrepreneurial opportunities and jobs at all levels, as a powerful network that can make a serious impact. The new initiative is being funded as part of the IFAEF’s $10 million fundraising campaign called, Shaping the Future of Franchising.

The NextGen program has attracted more than $1.5 million in donations from major corporations, foundations and individuals. Major donors include: The Stewart & Jane Bainum Fund; Stephen P. Joyce Fund; Choice Hotels Foundation; J. Willard and Alice S. Marriott Foundation; Tariq Farid, Edible Arrangements; Charlie Chase, FirstService Brands, Inc.; Aziz Hashim, NRD Holdings; Amit Kleinberger, Menchie’s Frozen Yogurt; Joe Bourdow, Valpak; Melanie Bergeron, Two Men & A Truck; Amit Pamecha, FranConnect; and Lawrence “Doc” Cohen, DOC & Associates.

To anchor the campaign, the new dedicated NextGen in Franchising website, http://nextgenfranchising.org, will tell the story of franchising in a fresh new way to attract the attention of young entrepreneurs and invite participation in the Young Entrepreneurs In Franchising Contest.

For information on the NextGen In Franchising campaign, please contact Gionne Jones at gjones@franchise.org or call 202-662-0772. For more information on the Young Entrepreneurs In Franchising Global Competition, please contact Jen Malone at jenm@ysn.com or call 310-822-0261 x703.

Thu, 23 Oct 2014 14:10:45 +0000 Dane Carlson

Business Ideas in the News is a daily summary of the most interesting business ideas in the news.


If a fast-food franchise can figure out how to get Americans to eat bugs, there are going to be a lot of new billionaires in Thailand.

Cheap supermarket whiskey is only typically aged for less than three years and uses colorings and flavors to give it a kick. Expensive whiskeys can be aged for 20 years or more, during which time it mellows and absorbs flavors from it’s wood storage cask. One Kickstarter proposes to speed up the entire process of making fine whiskey.


I’m waiting with bated breath for my $1500 propane bill, because unlike natural gas, which is plentiful and cheap, propane is still expensive. Maybe that’ll change now that scientists in the UK have created propane in a lab from bacteria.

As activists are pushing for higher minimum wages, McDonald’s is automating. Soon, we’ll order our Big Mac’s on touchscreens.


I can never remember. Is facial hair in, or out? Either way, venture capitalists see opportunity in facial stubble.

In Brazil (which was originally settled by the Portugese and not the Spanish, like the rest of Latin America) the siesta isn’t a thing. One entrepreneur wants to change that and has opened a line of “Cochilo” nap centers.

And Finally

A Michigan funeral home, in addition to horse drawn carriages, now offers a drive-thru viewing option to the dearly departed. There’s an ending for everyone.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %HEADLINESPLUGIN_SHORTDESCRIPTION%. Note: Don't modify the settings here; copy and customize the settings in SitePreferences. For example, to customize the USERAGENTNAME setting, create a HEADLINESPLUGIN_USERAGENTNAME setting in Main.SitePreferences.

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show headline news in Foswiki pages based on RSS and ATOM news feeds from external sites

  • Refresh rate in minutes for cached feeds. Disable caching: 0, default: 60
    • Set REFRESH = 60

  • Maximum number of items shown. Default: 100
    • Set LIMIT = 100

  • Use LWP::UserAgent, or fallback to Foswiki's internal getUrl() method. Default: yes

  • Timeout fetching a feed using the LWP::UserAgent. Default: 20

  • Name of user agent. Default: FoswikiHeadlinesPlugin/2.21.1
      * Set USERAGENTNAME = FoswikiHeadlinesPlugin/2.21.1

  • Default header: (variables are explained in the syntax rules)
      * Set HEADER = <div class="headlinesChannel"><div class="headlinesLogo"><img src="$imageurl" alt="$imagetitle" border="0" />%BR%</div><div class="headlinesTitle">$n---+!! <a href="$link">$title</a></div><div class="headlinesDate">$date</div><div class="headlinesDescription">$description</div><div class="headlinesRight">$rights</div></div>

  • Default format of one item: (variables are explained in the syntax rules)
      * Set FORMAT = <div class="headlinesArticle"><div class="headlinesTitle"><a href="$link">$title</a></div>$n<span class="headlinesDate">$date</span> <span class="headlinesCreator"> $creator</span> <span class="headlinesSubject"> $subject </span>$n<div class="headlinesText"> $description</div></div>

  • Values taken from configure: (only supported if CPAN:LWP is installed)
    • $Foswiki::cfg{PROXY}{HOST} - proxy host, such as "proxy.example.com";
    • $Foswiki::cfg{PROXY}{PORT} - proxy port, such as "8080";
    • $Foswiki::cfg{PROXY}{SkipProxyForDomains} - domains excluded from proxy, such as "intra.example.com, bugs.example.com";

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

  • headlinesRss: output of the HeadlinesPlugin (div)
    • headlinesChannel: channel header (div)
      • headlinesLogo: channel logo (div)
      • headlinesTitle: channel title (div)
      • headlinesDate: channel date (div)
      • headlinesDescription: channel description (div)
      • headlinesRight: channel copyright (div)
    • headlinesArticle: one news item (div)
      • headlinesTitle: article title (div)
      • headlinesDate: article date (span)
      • headlinesCreator: author of article (span)
      • headlinesSubject: subect category of the article (span)
      • headlinesText: article text (div)

Plugin Installation Instructions

  • Download the ZIP file
  • Unzip it in your foswiki installation directory. Content:
    File:Sorted ascending Description:
    data/System/HeadlinesPlugin.txt plugin topic
    lib/Foswiki/HeadlinesPlugin.pm plugin perl module
    lib/Foswiki/HeadlinesPlugin/Core.pm plugin core
    pub/System/HeadlinesPlugin/style.css default css
    Check if above examples show a news feed instead of variable.
  • Optionally, run HeadlinesPlugin_installer.pl to automatically check and install other Foswiki 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.
    Digest::MD5>=2.33Required. Download from CPAN:Digest::MD5
    LWP::UserAgent>=5.803Optional. Download from CPAN:LWP::UserAgent

Plugin Info

Plugin Author: TWiki:Main.PeterThoeny, Foswiki:Main.MichaelDaum (2005-2007)
Copyright: © 2002-2009, Peter Thoeny, TWIKI.NET; 2005-2007, Michael Daum http://wikiring.de
License: GPL (GNU General Public License)
Plugin Version: 2.21.1 (08 Mar 2009)
Change History:  
08 Mar 2009: Ported without changes to Foswiki namespace by Kenneth Lavrsen and put under "Feel Free To Modify" in Foswiki context.
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
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
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
02 Aug 2002: Implemented caching of feeds, thanks to TWiki:Main/RobDuarte
11 Jun 2002: Initial version (V1.000)
Perl Version: 5.008
Plugin Home: http://foswiki.org/Extensions/HeadlinesPlugin
Feedback: http://foswiki.org/Extensions/HeadlinesPluginDev
Copyright © 2014 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM