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

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.

Syntax Rules

%HEADLINES{"..."}%

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

Examples

Slashdot News

Write

%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

Write

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

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

Fri, 04 Sep 2015 16:23:28 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Fri, 04 Sep 2015 16:23:28 +0000 Erin Eagan

Bliss Cupcake Café opened its doors to the public in November of 2009 to rave reviews. Now, with six locations in Arkansas, Bliss Cupcake Café is a boutique bakery franchise specializing in gourmet cupcakes for any time of day, birthdays, tailgating, weddings, and special occasions.

In a Q&A with Kerri Hughes, owner of Bliss Cupcake Café in Fort Smith, Ark., we learned what a typical day looks like for her, where she sees her franchise in five years and what advice she has for potential franchisees.


How long have you owned a Bliss Cupcake Café franchise?

Two years.

What were you doing before becoming a franchise owner?

Working in higher education development\fundraising.

RELATED: TOP RATED FRANCHISES TO OWN

Why did you choose your franchise?

The flexibility of owning my own business.

What does a typical day look like for you?

It could be any number of things: Some days I'm in the kitchen actually baking the products, other days I'm working on human resources, accounting, payroll or marketing items.

What were some of the challenges you faced when starting your franchise?

We were the first franchise for our company, so there were lots of growing pains\communication issues to overcome.

Where did you research or get advice about starting a franchise?

Everywhere I could find - U.S. Small Business Administration was a great resource.

What is your secret to success?

Refusing to fail!

What would you do differently if you had to do it all over?

Listened to my instincts and not other people's advice on some issues.

Where do you see your Bliss Cupcake Café business in five years?

Still successfully serving our market with delicious made-from-scratch treats!

What advice do you have for others looking to own a franchise?  

It's hard work to get started, but so worth it in the end!

Where can people get more information on Bliss Cupcake Café opportunities?

Visit the website here.

Where can people find Bliss Cupcake Café on social media?

RELATED: HOW TO BUY A FRANCHISE

Fri, 04 Sep 2015 14:35:56 +0000 Erin Eagan

If you're interested in getting into the restaurant business, it's a good idea to keep track of how dining habits and trends are changing. The hottest flavors and fads of last year are slowly being moved out of menus as newer and more exotic flavors are needed to get diners in the door. However, the restaurant industry is changing in many other ways besides flavors, ingredients and marinades, and you'll need to keep on top of all of these changes to make sure that you're selecting and operating your franchise correctly. These are some of the big changes in the industry for 2015.

More Technology at Restaurants

As the average diner is becoming more tech savvy, restaurants are being forced to keep pace. The average consumer now expects every transaction to be as simple and convenient as when he is buying something on the Internet, and this raises service expectations for everyone in the industry. Some companies are trying to compete by offering more digital and online customization.

RELATED: THE 6 TRENDIEST TYPES OF FRANCHISES IN 2015

For example, virtually all of the leading pizza franchises now have sophisticated online ordering systems that let customers choose from different crusts, level of doneness, toppings, and even how much of the toppings are placed on the pizza. They were the first type of restaurant to have to adapt this way, but they will not be the last. The franchises that are on the forefront of this technology integration will be the first to profit, too.

Fast Casual Gets Fancy

Every year, the fast casual industry continues to grow in America, and more and more consumers are choosing to get their lunch and dinners in places like Chipotle, Panera Bread, Five Guys and Shake Shack. Fast food restaurants are still very profitable in most places, but the industry is clearly moving elsewhere. Due to the great work and marketing of some of the leading franchises, fast casual restaurants are thought to offer fresher, healthier and better prepared food than fast food establishments. They continue to be great options for investment.

New Flavors This Year

Bacon and sriracha have been huge, but it seems like the public is already getting over these flavors. Where will the next big fads come from? It is hard to predict. Some people believe nduja and chili-infused honey will be the next big things, but no one knows for sure. Even trendy items like kale and frozen yogurt are declining in popularity as people are looking for something different and unique for their next dinner and dessert.

RELATED: THE 5 HOTTEST RESTAURANT FRANCHISE TRENDS 

If you're looking for a restaurant franchise, you should also take a look at how they update and expand their menus. Though there are some places that serve the classics that will never go away - think pizza, burgers and tacos. You may also be interested in the franchises that are constantly reinventing and incorporating the year's biggest and buzziest flavors. When a big franchise gets media coverage for its exciting new menu items and flavors, it means big business for franchisees across the country.

Thu, 03 Sep 2015 18:58:49 +0000 Erin Eagan

The concept of pop-ups has been around for awhile but really started gaining popularity just a few years back. Since then it’s reached all new heights, to the tune of $50 billion in annual sales, according to PopUp Republic, a social media marketing company focused on exclusively on pop-ups.

RELATED: MOBILE RETAIL IS AN INNOVATIVE INDUSTRY ON THE MOVE

Pop-ups are temporary places of business that can appear in any location, at any time and can be any size. They can be seasonal retail shops, selling Halloween costumes or Christmas trees; farmers markets; craft shops, food trucks&hellip just about anything. Point being, they're much cheaper solutions that don't require a year-round lease. They seemingly just “pop up” out of nowhere.

We've scoured the web for what we think are some of the most unique pop-ups around. Here are a few that caught our eye:

Wedtoberfest - Beer & Bubbly Wedding Show

Wedtoberfest is an exciting new alternative to the wedding planning process that combines a casual wedding show with all the fun of a beer festival. Beyond the beer, Wedtoberfest presents some of the best wedding vendors and artisans in Chicagoland. These hand-picked small businesses show off their products and services in a casual, no-pressure environment.

Naver App Square by Urbantainer

Urbantainer, a South Korean based architecture and design firm combined a stock metal container with sheets of raw corrugated cardboard resulting in a unique branded kiosk called the Naver App Square. The interior is fitted out with furniture and accessories all made of cardboard. Distinct areas for several popular Naver search categories like music and wine are realized in real life. The goal of the kiosk was to build awareness for the service and offer visitors a unique venue in which to experience the brand.

Japanese Seafood Tasting

Local caught, foraged and harvested dinner with Japanese sensibilities. Caught by the chef and accented with the best from the farmer’s market. This meal comes with a story of each item and where it's been. The menu changes and is based upon what the ocean provides.

TEDx

TEDx is a program of local, self-organized events that bring people together to share a TED-like experience. At a TEDx event, TEDTalks video and live speakers combine to spark deep discussion and connection in a small group. These local, self-organized events are branded TEDx, where x = independently organized TED event. The TED Conference provides general guidance for the TEDx program, but individual TEDx events are self-organized (subject to certain rules and regulations).

Outstanding in the Field

Outstanding in the Field is a roving culinary adventure - literally a restaurant without walls. Since 1999, they have set the long table at farms or gardens, on mountain tops or in sea caves, on islands or at ranches. Occasionally the table is set indoors: a beautiful refurbished barn, a cool greenhouse or a stately museum. Wherever the location, the consistent theme of each dinner is to honor the people whose good work brings nourishment to the table.

StorySlams by First Person Arts

A StorySlam is more than a storytelling competition. It's an invitation to share five minutes of your life in a room full of people who appreciate a well-told tale. Audience storytellers take to the stage with real life stories on the theme of the night. Winners get $100 prize and the chance to compete in the season finale Grand Slam. Got five minutes? Come and lend an ear, or share an experience.

Paint & Enjoy

Get together with friends and create a beautiful painting to display in your home. A talented instructor will lead you step-by-step through the process to creating a masterpiece you will be proud of.  All materials are provided including canvases, easels, paints, brushes and smocks.

RELATED: EMERGING TRENDS FOR ASPIRING ENTREPRENEURS TO EXPLORE

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
    • Set USELWPUSERAGENT = yes

  • Timeout fetching a feed using the LWP::UserAgent. Default: 20
    • Set USERAGENTTIMEOUT = 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:
    data/System/HeadlinesPlugin.txt plugin topic
    pub/System/HeadlinesPlugin/style.css default css
    lib/Foswiki/HeadlinesPlugin.pm plugin perl module
    lib/Foswiki/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 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.
    NameVersionDescription
    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
spacer
Copyright © 2015 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM