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]]:* $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:

Wed, 10 Feb 2016 17:12:35 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Wed, 10 Feb 2016 17:11:52 +0000 Dane Carlson

Do you have a particular set of skills that you would like to share with others? Do you have knowledge in a certain area and do you want to impart that knowledge? You don't have to become a teacher to do this. In fact, the Internet has helped to make it quite easy to create and sell online courses and tutorials in a number of different ways.

What Is Your Talent?

What type of talent or skill do you have that other people might like to know? You might be surprised at the amount of knowledge you've acquired in certain areas when you stop to think about it. No matter what it might be, there is a niche out there that is right for your courses and tutorials. Perhaps you understand how to use pieces of software such as Photoshop, Premiere, or After Effects. Creating in depth tutorials to teach others how to increase their knowledge and to make their own workflow easier will appeal to a large number of people.

The same can be true for nearly any topic. Just find what you know well and then start to develop a course outline. In fact, you may want to make several different courses depending on the type of subject you are covering. Some sites where you can sell courses include Lynda.com, Academy of Mine, and Digital Chalk.

Consider YouTube

While you can sell your courses online through one of the sites mentioned above, you do have another option for making money from your knowledge. If you are creating video tutorials, then you might want to consider putting them up on YouTube instead. The videos that you put on YouTube might not make a lot of money in ad revenue, but you are essentially using these videos as a marketing tool that you can then use to entice people to try out your full courses, whether you sell through one of the above sites or through your own site, as mentioned below.

Selling from Your Site

In addition, you could sell your videos right through your site if you choose. You do not have to put them on DVD in order to sell them either. You could sell people digital copies through your site, which they will have access to immediately. Combining this with YouTube, where you can put up smaller videos that serve as introductory lessons, could be a good winning combination.

How Does It Benefit You?

In addition to having sales from your videos, you are growing your brand and your reputation as an expert in the field. This can provide you with a number of other opportunities that you might never have considered. Maybe you want to write a companion book, or maybe you start to get jobs as a speaker or trainer. Creating and selling online courses is easier than ever thanks to the technology that is available today.

The only caveat is that you actually need to know the subject and field in which you are working and training. People want to take courses from someone who truly has expert knowledge and who can provide them with help and tips they can't find elsewhere.

Thu, 04 Feb 2016 17:34:01 +0000 Dane Carlson

Fitness is a billion-dollar industry. Everyone wants to get into better shape. They want to lose weight, tone, and build muscle. If you love fitness, you have the opportunity to turn that love into a lucrative business when you become a personal trainer.

Benefits of Being a Personal Trainer

First, there is the fact that you will be doing something that you actually enjoy, and that means that it will not actually seem like work. There are plenty of other benefits as well. When you are a freelance trainer, it means you get to pick and choose the clients that you want to work with. If you want to help people lose weight, then you can choose clients who have that goal. If you want to help people build muscle, then you can choose those types of clients.

Second, the career has the potential to help you make a substantial amount of money. Personal trainers can charge whatever they like. When you are creating your prices, you will want to think about the demographics of the clients that you want to work with, though.

You are also able to work on your own schedule, and you can work from the locations of your choosing. If you have a high quality home gym, you could train people there. You could train them in their own homes as well. Many personal trainers will also work with local fitness centers. The fitness center gets a percentage of the trainer's fee, but in exchange they have access to all of the equipment in the gym.

Finally, when you work in the fitness field, you are able to help people reach their goals. You get to see the look on their faces as they realize how much healthier and stronger they are. You can give them a better life.

Find More Ways to Monetize Your Knowledge

When you are a personal trainer, you can make money in more ways than one. While the bulk of your income might come from providing training to your clients, there are a number of other options for making money as well. For example, you can take your techniques and write a book about them. You could make money by monetizing a blog where you talk about fitness and nutrition. You could even make training videos that you sell or that you put up and monetize on YouTube. By thinking outside of the box, you should be able to find plenty of other ways to make money as a personal trainer.

Of course, you actually have to know what you are doing. You can get personal trainer certificates, which make it possible for you to work in your state. You can also get further training through college classes. You need to make sure that you are training your clients safely and appropriately.

If going to the gym each day sounds more appealing than sitting behind a desk in a cubicle, this could be one business opportunity that you will want to pursue.

Fri, 29 Jan 2016 19:17:07 +0000 Erin Eagan

Once again, things are looking up for the franchise industry. After five solid years, growth is once again on the horizon. The International Franchise Association (IFA) 2016 State of the Industry Report, done by forecasting firm IHS Economics, indicates a positive outlook for the franchise industry. More specifically, the franchise industry is set to grow by 1.7 percent in 2016, bringing the total number of US franchises to 795,932.

Speed Bumps That Could Get in the Way

Many in the industry, however, are a little less confident as hurdles like rising wages and the Affordable Care Act could stump that growth. In 2016, businesses with as few as 50 employees face fines for not offering workers adequate coverage.

And let's not forget, the upcoming federal ruling to the joint-employer rule. If corporations are going to be held accountable for what happens at individual chain locations, the industry could turn completely upside down.

The truth is, no one knows what will happen should the joint-employer rule be allowed to take effect. At the very least, franchisors need to up their insurance to protect them from potential mistakes franchisees could make. Worst-case scenario, franchisors need to almost micro-manage their franchisees, a situation not favored by anyone.

IFA Report Highlights

While that is all yet to be determined, what is concrete is the growth of the franchise industry in 2015 as highlighted in the IFA report:

- Franchise employment was up 3% in 2015

- Over 278,000 jobs were added due to the rise of franchises

Which means that projections for 2016:

- The IHS Economics forecast of output growth in nominal dollars for franchise businesses will increase this year by $52 billion, 5.8 percent, to $994 billion.

- For the past five years, the average annual job growth in the franchise sector was 2.6 percent, nearly 20 percent higher than all businesses economy-wide. Over the last five years the franchising sector has added nearly 1 million jobs to the economy.

Sectors Expected to See the Most Growth

Six out of the 10 industry sectors tracked by IHS are predicted to see the most growth:

Personal Services - The personal services business line, such as educational services, health care, entertainment and recreation, personal and laundry services, and select financial activities, was the leader in the growth of new franchise establishments in 2015 and is expected to rank first again in 2016 with a 1.9% increase in the number of establishments.

Lodging - Travel is expected to increase as the economy continues to improve. It is estimated that franchise employment in the lodging business grew 2.8% in 2015 and will show a similar increase in 2016. Output growth in the lodging business line is expected to slow to 6.6% in 2016, but it will remain the fastest growing business line based on output.

Business Services - Business spending will accelerate in 2016, giving a boost to business services franchises, which are projected to rank first in growth of the number of establishments and tied for second in employment growth with a 3.3% gain.

Quick-Service Restaurants - As people are more rushed, a time crunch for eating occurs. It is estimated that the number of QSR establishments increased by 1.4% in 2015, and they expect a slight uptick in 2016 to 1.5% growth.

Retail Products & Services - As overall consumer spending maintains a 3% growth pace in 2016, the outlook for the retail products & services franchises will remain strong. The retail business line is projected to rank first in employment growth at 3.7% and second in output growth at 6.4%.

Commercial & Residential Services - Existing home sales grew an estimated 5.9% in 2015, but growth is expected to slow to 1.7% in 2016. Nominal spending on household services is expected to rise 4.4% in 2016 after increasing 4.7% in 2015.

There is no denying the strength of the franchise model. The numbers speak for themselves. And while we truly don't know what will happen in 2016, we can be confident that the industry is resilient enough to survive and continue to thrive for years to come.

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 Main.TWikiPreferences. For example, to customize the USERAGENTNAME setting, create a HEADLINESPLUGIN_USERAGENTNAME setting in Main.TWikiPreferences.

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show headline news in TWiki 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 TWiki'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: TWikiHeadlinesPlugin/2.21
      * Set USERAGENTNAME = TWikiHeadlinesPlugin/2.21

  • 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)
    • $TWiki::cfg{PROXY}{HOST} - proxy host, such as "proxy.example.com";
    • $TWiki::cfg{PROXY}{PORT} - proxy port, such as "8080";
    • $TWiki::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 twiki installation directory. Content:
    File: Description:
    data/TWiki/HeadlinesPlugin.txt plugin topic
    pub/TWiki/HeadlinesPlugin/style.css default css
    lib/TWiki/HeadlinesPlugin.pm plugin perl module
    lib/TWiki/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 TWiki 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, TWiki:Main.MichaelDaum
Copyright: © 2002-2009, Peter Thoeny, TWIKI.NET; 2005-2007, Michael Daum http://wikiring.de
License: GPL (GNU General Public License)
Plugin Version: v2.21 - 12 Feb 2009
Change History:  
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.8
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 99.5%, HeadlinesPlugin 94%
Plugin Home: TWiki:Plugins/HeadlinesPlugin
Feedback: TWiki:Plugins/HeadlinesPluginDev
Appraisal: TWiki:Plugins/HeadlinesPluginAppraisal

-- TWiki:Main.PeterThoeny - 12 Jan 2009
-- TWiki:Main.MichaelDaum - 13 Sep 2007

Topic revision: r1 - 2009-02-13 - 03:55:45 - TWikiContributor
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.HeadlinesPlugin