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:

Tue, 30 Jun 2015 17:53:52 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Tue, 30 Jun 2015 17:53:52 +0000 Erin Eagan

Now is your chance to get in on the emerging cryptocurrency ATM market as a bitcoin ATM operator. As of March 2015, 119 bitcoin ATMs had been installed in the U.S., according to Coin ATM Radar. But by 2016, that number is expected to be in the thousands. As the market grows, your income can grow with it.

Bitcoin ATMs offer an efficient and secure way to buy and sell bitcoins. For those new to cryptocurrency, ATM Marketplace, an ATM industry resource, has released a 40-page guide on bitcoin ATMs that explores every aspect of the business opportunity. The report is titled, ''Bitcoin ATMs 101: Opportunities for the IAD.'' (IAD stands for independent ATM deployment.) The guide explains all you need to know about bitcoin ATMs, including: bitcoin basics, issues and types of bitcoin ATMs.

The guide also summarizes ATMs from eight of the largest bitcoin ATM manufacturers: BitAccess, BitXatm.com, Coin Outlet, General Bytes, Genesis Coin, LamassuRobocoin and Skyhook. It also summarizes the different ID verification processes.

For existing ATM operators, bitcoin offers an opportunity to generate additional revenue streams at their ATMs by simply installing bitcoin software, allowing them to provide bitcoin in addition to traditional currency.

RELATED: HOME BASED BUSINESSES YOU CAN START RIGHT NOW

The income potential for bitcoin ATMs is quite high. Bitcoin transaction fees for buying and selling at bitcoin ATMs is six percent. In addition to transaction fees, operators can make money on currency ''float,'' where bitcoin operators can sell bitcoin at a higher price than they paid for it.

According to the guide, prime bitcoin ATM locations are reporting monthly transaction volumes ranging from $70,000 to $300,000. Some operators have been covering the cost of their machines in three to nine months.

If you think bitcoin ATM operating sounds like the right business opportunity for you, download the guide for free here.

Tue, 30 Jun 2015 16:05:56 +0000 Erin Eagan

Gadgets Repair is an all-electronics service center, serving Central Florida. Since 2003, Gadgets Repair has done tens of thousands of repairs on cell phones, laptops, tablets, game consoles and much more.

Ahmed Mansour, CEO of Gadgets Repair, took a few minutes out of his busy schedule to chat with us about how in order to compete he had to adjust the business model and how that move has paid off. Mansour also discusses what he looks for in potential licensees and where he sees the business headed in the next five years.


What's special about your business?

Gadgets Repair is all Electronics Repair Services, not only one line of service.

What is the idea behind Gadgets Repair?

We started as a cell phone repair business, but after seven years, competition grew around us; we had to find other sources of income related to the same technology.

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

How does Gadgets Repair compare to its competition?

Super-efficient, with great sources of cheap and good quality repair parts and equipment, and honest advice. We will do market research in the target area before we sell any license.

What do you look for in a potential licensee?

Mainly dedication. Many franchisors will sell their module as an absentee module; however, it is not worth it, in order to maximize profits the licensee has to spend at least 20 hours a week between visiting the store and management.

Where do you see Gadgets Repair  in five years?

I see our stores will be in a 10-15 mile radius in neighborhoods; a new store can serve a population of 10,000 or more.

What's your background?

Business Administration mainly, but Retail Operations is super different and there are no real learning resources, neither in colleges, books, nor other media.

What motivates you to keep going?

I love my job; I love that I am the boss of myself and that is what I give back to my employees.

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

I wouldn't open up several stores until I had skill laborers.

Please tell us your secret to success&hellip

Being able to add new services and products, adopting new technologies and consistent honesty with customers.

What is the worst job you have ever had and what did you learn from it?

Choosing the wrong business partner, as it could turn into a nightmare. Make sure you set boundaries for partnership, either in the form of money or workmanship.

What is one thing that really excites you?

Technology because it moves faster than anyone thinks.

Any final words for aspiring entrepreneurs?

Study failure before success. Do not rely on how famous the franchise is that you are trying to buy, find out if they have any franchisees that left them or had to shut their doors. Since money never cries for you, make sure you choose the right franchisor who will give you the support that you will need.

Where can people find out more about Gadgets Repair?

Visit the website here.

Where can people find Gadgets Repair on social media?

RELATED: TOP NEW FRANCHISES TO INVEST IN

Tue, 30 Jun 2015 14:13:57 +0000 Erin Eagan

Buying a business is just like buying anything else. You want to get your business at the lowest price possible. Doing that is going to require negotiating, something that even the most skilled entrepreneurs can be uncomfortable with.

RELATED: HOW TO BUY A FRANCHISE

For this reason, we thought we'd share some quick and easy tips for improving your negotiating skills when buying a business. If you employ these tips, you'll find that you'll be able to get a better price for a business that you're considering purchasing than you otherwise might not have.

Understand the Seller

The seller has a reason that he or she is selling the business, and you need to make that reason your business. When you understand the reason that a seller is looking to get out from under his or her business, this is information that you can use to your advantage.

For example, consider a seller that has a high degree of urgency when selling. You learn that the reason they're selling is because they need an infusion of liquid capital and they need it now. This means you can strengthen your negotiating position by moving quickly yourself, and by making the cost of that quickness represent itself in the amount you're offering. From the seller's perspective, a bird in the hand is worth two in the bush.

Understand Yourself

Only you can answer questions about your current financial situation and what you are and are not capable of. When you're purchasing a business, you may be tempted to throw caution to the wind; this is a mistake.

Instead, before you even get out there, consult with an accountant to figure out exactly how much you can pay. While you might have the credit to secure all of the financing in the world, remember that paying back those loans is going to put a lot of pressure on you once the keys get handed over. Do you want that pressure?

RELATED: ARE YOU READY TO BUY A BUSINESS?

If you understand your own financial situation before you get going, then you'll know your limits. This makes it far easier when you're negotiating, because you can say, with confidence, when what the seller is asking for is out of your range. It's in these moments that the urgency that we were speaking about earlier can come into play.

Call in a Ringer

More likely than not, the business owner that you're dealing with hired a broker to handle the sale of his or her business. Why wouldn't you make the same move? This is especially important if you're not the greatest negotiator in the world, because you can bet that a business broker will be a skilled negotiator.

Some Parting Advice

Negotiating is tough work, especially for someone who considers him or herself a ''nice person.'' If you're going to be handling the negotiating, throw that ''niceness'' out the window. This is business, and business isn't personal.

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