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:

Fri, 24 Oct 2014 04:11:06 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Fri, 24 Oct 2014 04:09:21 +0000 Dane Carlson

Why work from home in Raleigh, North Carolina ($5,139 per month) when you can work from home in Chiang Mai, Thailand ($641 per month) with the same internet speed?

NomadList has combined data on internet speed, the cost of rental housing and food, local weather conditions including air quality and other factors to come up with a useful list of the best cities in which to live and work remotely.

The only city in the United States in the top 10? San Juan, Puerto Rico.

Fri, 24 Oct 2014 00:22:51 +0000 Dane Carlson

Seva is a fast-casual beauty spa franchise with an unique strategy of locating their spas in places that maximize one-stop-shopping. I recently spoke with the founder and COO Vas Maniatis.

My questions are below in bold, and there’s a video of a Seva grand opening at the bottom of the this interview, so be sure to read to the end.

Where did the idea for Seva come from?

A trip to the Little India neighborhood on Chicago’s northside in 1999 to watch my girlfriend (now wife of 14 years) get her eyebrows threaded. I had never heard of threading nor for that matter noticed peoples’ eyebrows but she dragged me along anyway. Our original concept took the threading technique to the masses via Walmart under the name Simply Eyebrows but eventually expanded into Seva, which is the pioneer of the fast-casual spa.

How did you bring it to life?

Strategically and methodically coupled with some electrical diodes hooked up to my temples and a perfectly-timed bolt of lightning. Initially we opened corporate-owned locations and expanded successfully into multiple states. After proving the concept we began franchising across the USA in mid-2010.

Where do you see Seva in five years?

Bringing Beauty to the People (R) across the USA and internationally. I expect we will have at least 1001 studios in five years in all 51 States (Puerto Rico will be granted Statehood by then). Put it into your calendar to touch base with me 5yrs from today to check back in.

If you were to start again, what would you do differently?

Not a thing. Ok, I’d have more money to start with…

What does your typical day look like?

Up early. Read Wall St Journal & Tech Crunch. Work till noon. Exercise mid-day (alternate Run, Swim, Jiu-Jitsu). Go in to office and work some more. Go home and work some more. Sleep. Repeat.

What's your role?

My role at my company is Strategic Development as the COO and keeping the teams aligned on the initiatives and daily operations.


What is one trend that really excites you?

Backyard chickens.

What is the worst job you’ve ever had and what have you learned from it?

Washing dishes at my father’s restaurant after I got into an argument with the Dishwasher who then proceeded to walk out in the midst of a packed Sunday brunch. Ruined the only nice pair of clothes I’ve ever owned. 

As an entrepreneur, what is the one thing you do over and over and recommend everyone else do, too?

Protocol everything. Commoditize the commoditizable.

What is one failure you had as an entrepreneur, and how did you overcome it?

My 1st venture after college in the 900# business: 1-900-FOR-RENT AND 1-900-FOR-JOBS. Ameritech pulled the plug on the whole concept mid-stream and left me hanging. Just kept on keeping on.

What is one business idea that you are willing to give away to our readers?

Zambot ™- Picture a large Roomba to resurface the ice at an ice rink instead of the outdated Zamboni.

If you could change one thing in the world, what would it be and how would you go about it?

Put women in charge of everything. I’d start by voting for Hillary.

What are your three favorite online tools or resources and what do you love about them?

Dropbox, Skype, Spotify. The 1st two are transformational for business. The latter for my personal enjoyment of music.

What is one book that you recommend our community should read and why?

The 4-Hour Workweek by Timothy Ferris. Tells you how to take advantage of a flattened world and maximize your time, which at the end of the day is the only valuable commodity.

Three people we should follow on Twitter and why?

I don’t use Twitter. I’d suggest taking three selfies instead.

When was the last time you laughed out loud? What cause it?

After I answered the above question.

Who is your hero?

My dad. He was the greatest!

Do you (or did you ever) have a mentor?

Again I’d say my dad was.

Tell us a secret.

That is a trick question.

What are Seva’s website?

Consumer: http://sevabeauty.com

Franchise: http://www.sevabeautyfranchise.com

Where can people find Seva on social media?

Twitter: https://twitter.com/sevabeauty

Facebook: https://www.facebook.com/SevaBeauty

Thank you for taking the time to talk with us today! Here’s that video:

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.

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: Description:Sorted ascending
    pub/System/HeadlinesPlugin/style.css default css
    lib/Foswiki/HeadlinesPlugin/Core.pm plugin core
    lib/Foswiki/HeadlinesPlugin.pm plugin perl module
    data/System/HeadlinesPlugin.txt plugin topic
    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