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{"..."}%

ParameterSorted ascending 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
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
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
href="..." (Alternative to above) N/A
limit="12" Maximum number of items shown Global LIMIT setting
refresh="60" Refresh rate in minutes for caching feed; "0" for no caching Global REFRESH 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:

Tue, 07 Jul 2015 18:47:47 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Tue, 07 Jul 2015 18:47:47 +0000 Erin Eagan

Tub, tile and counter refinishing is a hot home business opportunity. In fact, some entrepreneurs are making over $100 an hour.

RELATED: TOP HOME BASED FRANCHISES

Refinishing, or resurfacing, is the process of restoring a fixture to a like-new state by stripping off old coatings and applying a new one. Refinishing, or resurfacing, is the process of restoring a fixture to a like-new state by stripping off old coatings and applying a new one. Because bathtub renovation can be expensive (often between $6,000-$13,500), homeowners choose refinishing, which costs between $350 and $1,500 - a huge savings.

NAPCO Ltd. is a 36-year-old company providing equipment, training and business support that makes refinishing a very viable home-based business. NAPCO refinishers are able to earn a good living, either as a part-time job to supplement their earnings or full-time - and be their own boss.

RELATED: 10 LOW COST, HOME-BASED BUSINESS OPPORTUNITIES

NAPCO has put together a package that makes a refinishing home business within reach of many Americans. The key elements of the package include:

  • Complete skills training
  • Business 101 training
  • Specially designed material and equipment packages
  • Help with web site
  • Online portal with marketing materials (4th Q 2015)
  • Tech support from industry experts

For more information on NAPCO Ltd., click here.

 

Tue, 07 Jul 2015 17:19:04 +0000 Erin Eagan

Founded in 1992, CruiseOne has become a leading travel retailer in the country. Although CruiseOne’s franchisees come from many different social and professional backgrounds, they all have one thing in common - a passion for travel and a commitment to succeed.

A perfect example is Trapper Martin, owner of a CruiseOne franchise with partner Shane Smartt based in Rockville, Maryland. By his own admission, Martin’s franchise is having by far its best year - in fact, he’s up over 80 percent. In our Q&A with Martin, not only do we find out his secret to success, but he also shares helpful advice to potential franchisees.


How long have you owned your CruiseOne franchise?

Almost four years.

What were you doing before becoming a franchise owner?

I was and still am a district manager for restaurant chain. Prior to working in the corporate world, I owned two restaurants in a small town in Colorado. I am at the point now where I am busy enough to do this full-time if needed or in need to continue to bring on associates to handle the extra business.

RELATED: TOP LOW COST FRANCHISES 2015

Why did you choose the CruiseOne franchise?

I had actually joined a private tour on a cruise ship with another CruiseOne agent that I had met on the ship and picked her brain probably to the point of annoyance. Once back stateside, I started to research various franchises and CruiseOne by far had very positive owner reviews about support and systems, etc.

What does a typical day look like for you?

I work full-time Monday through Friday, but my job does allow for some flexibility to be able to handle client calls during the day during emergencies etc. I generally keep later ''office hours'' of 3-10 p.m., six days a week. Let's face it, it can be a seven-day a week job, but I love it so that makes it enjoyable.

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

Really just making the decision in my head if this was something I wanted to take on at the time.

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

Reviews found via Google, but I also talked to four franchisees as well.

What is your secret to success?

You have got to love what you do first and foremost. But knowledge is the key to success in this business. It gives you confidence to answer any of your client's questions. Always be willing and eager to keep learning and doing as much research as you can. I have been up double digits each year of business but am having by far the best year so far this year. I am up over 80 percent.

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

Hmm, I honestly am not sure if I have any regrets. I guess I would work on getting all my financial information to my bookkeeper much faster. I am sure she would appreciate that.

Where do you see your business in five years?

I hope to be operating my franchise full-time and continue to be successful by still focusing on higher-end vacation packages as the years progress. Additionally, I would like to see our franchise have 10 associates up from the four we currently have.

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

Do your research and make sure that whatever franchise you select, you are doing it because it is something you love and could see yourself successful in, even if you don't have experience in that field. Don't choose a franchise based on cost alone.

Would you recommend others be franchisees? Why?

As related to CruiseOne, yes. It is a great organization that continues to move forward and evolve the tools that we are using. The support staff, if needed, is great and very responsive. Being part of World Travel Holdings provides lots of pricing advantages and influence with our travel partners.

Anything else you'd like to share?

I have lots of loyal clients that either were already friends or have become friends that love to travel often. Our working relationship is so close that four of them often just text me the ship and sail date to book in one sentence and it is done. It has become a running joke that has actually spread that practice onto others doing it as well.

Where can people find out more about your CruiseOne franchise?

Visit the website here.

Where can people find CruiseOne on social media?

RELATED: 20 CHEAP FRANCHISES TO START UNDER $20,000

Tue, 07 Jul 2015 13:58:16 +0000 Erin Eagan

Many people would leap at the opportunity to be their own boss. The benefits seem too good to be true. However, those of us who have actually gone down this path can tell you that these dreams are mostly misconceptions. In reality, being your own boss can actually be a lot harder than having one you don't like. After all, you no longer have a disciplinarian keeping you on task. Instead, it's up to you to make sure everything gets done.

Know Your Field

Some obstacles related to being your own boss will crop up no matter what industry you're in. For example, whether you're a freelance writer or a gardener, it's up to you to bill your clients and keep accurate records.

RELATED: TOP HOME BASED FRANCHISES

That being said, a gardener is obviously going to face some unique challenges that could derail their day. What if it rains? A writer can keep working. A gardener will have to make up those billable hours at another time.

Every field is going to have its own challenges. Before going into one, research what they are so you can anticipate them as best as possible.

Keep a Schedule

This one should be fairly obvious. You need to create a schedule of when you'll be working. It should go without saying that this schedule will need to take into consideration your market and customers.

However, you also need to keep track of how well you actually follow this schedule. If you're leaving early for lunch, taking extended breaks or checking out early, make note of this. Sometimes, you can adjust your schedule to better fit your personality. Other times, you'll need to have an honest conversation with yourself about your behavior.

Set Exciting Goals

Most business owners have goals. Ideally, these goals should help keep those business owners on track. You might have a hard time staying on task, but if you know that you could have your biggest month so far if you do, that will become much easier.

The important thing is to make sure your goals are exciting. If you regularly make $3,000 a month with your business, it's not going to be very inspiring to keep focusing on that number. On the other hand, if you aim for something unrealistic, like $30,000, you'll quickly give up. Find a goal that gets you out of bed every morning ready to take on the world.

Don't Be Afraid to Brag

When you do pull in a record month, let people know. When a customer gives you a glowing testimonial, advertise it. Show your work or the results of your services on your website and social media.

RELATED: HOME BASED BUSINESSES YOU CAN START RIGHT NOW

You don't need to be full of yourself, but be proud of your work. That sense of pride can help drive you forward and make it easier to stay on task when distractions are everywhere.

Staying on task when you're the boss is never easy. However, when you understand how important this trait is for your overall success, using this advice to get better at it should help.

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