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

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:

HeadlinesPlugin ERROR: 502 There was a problem retrieving the feed: Error getting URL: 202 - Accepted

Write

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

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

Thu, 08 Jan 2009 20:02:35 +0000
Opportunities, news, and links for small business entrepreneurs
Thu, 08 Jan 2009 20:02:35 +0000 Angela

SmartCompany:

India's business sector is reeling after revelations that the boss of outsourcing giant Satyam Computer Services has falsified the company's accounts and inflated its profit for several years.

Satyam's chairman Ramalinga Raju admitted the fraud in a four-page letter to the Bombay Stock Exchange. The company employs more than 50,000 people across 66 offices worldwide, including an Australian office.

The company has worked for NAB, Telstra, Qantas and Suncorp in Australia as well as global giants such as General Electric, General Motors, Nestle and the US Government.

Jens Butler, Principal Analyst at research firm Ovum, says how the scandal impacts on the company’s Australian clients remains unclear.

“The board has already set up a taskforce to assess the situation, but any contracts that are up for renewal in the near-term may be at risk of being handed to another provider.”

“Expect some instability, mixed messages and lots of governance talk to come out over the next few weeks, but it would be best to just sit tight and hope that key operational staff to not leave or get poached.”

Raju admitted yesterday that $1.4 billion in cash and bank loans the company listed as assets on its balance sheet last September did not actually exist.

Raju said in his letter that the fraud started off small but grew out of control.

''What started as a marginal gap between actual operating profit and the one reflected in the books of accounts continued to grow over the years. It has attained unmanageable proportions as the size of company operations grew,'' he wrote.

Image by kevinzhengli

Thu, 08 Jan 2009 19:45:56 +0000 Angela

InformationWeek:

Spending too much business time on the computer when you’re not at work? You’re not alone.

Small-business owners and managers, already tethered to their computers for long periods, are turning into “mouse potatoes,” increasingly eating and working while on their computers and while online, according to a survey released Tuesday by office supply retailer Staples.

After analyzing the results of its survey of 300-plus small-business managers, Staples coined the term “mouse potato” to characterize the phenomenon of increased computer usage by managers, and called the practice of eating breakfast while computing “deskfast.” The use of computers by business managers is accelerating as the economy continues its meltdown.
“Small businesses are obviously working harder to get through these tough economic times,” said John Giusti, Staples’ VP of small-business marketing, in a statement. Staples said that 62% of the survey respondents agreed they are becoming “mouse potatoes,” and 20% said they are “deskfasting” — eating breakfast while using their computers — in an attempt to maximize their time. Two-thirds of the respondents said they eat and work on their computers at the same time.

The online survey, conducted by Profile Marketing Research for Staples, indicated that small-business owners and business managers were working to adapt to the new challenges presented by the economic stress.

“Even though the current economic climate is challenging,” Staples said, “the majority of those surveyed are confident that they will weather the storm, with 84% stating that they will be in business next year in their current form and three-quarters still believing in the ‘American Dream.’ “

Photo by orangeacid

Thu, 08 Jan 2009 02:33:04 +0000 Angela


Starting a new business is hard but with the right information that business can get started off on the right foot. DM-Creative.com is dedicated to helping businesses get that help. Through pages of free information their website shares ideas on how other businesses may get started. For those that need a little more help, they also offer paid services, such as: web coaching, copywriting, ecommerce installations and online marketing.

I recently spoke with Alexandria Marx from Marketing Department about their website and found out a little more about the services that they offer.

What was the inspiration for launching DM-Creative.com?

Offline, our small company served clients such as Dallas Business Journal, Garland Community Hospital and Pilgrim's Pride. We wrote ads, designed brochures and conducted print production.

We were inspired to fill a void online, which at that time was an under-served niche of individual and small businesses who needed website development but didn't have large budgets.

Although you originally launched in 95, you mentioned that the website went through a hiatus and relaunched in 2000. How did the website change during that period of time?

After five years online, the Internet evolved and the site needed to reflect new technologies. The site changed from a static HTML site to include a mix of interactive features. For example, the addition of PHP programming powered by a mySQL database, allowed for the installation of a shopping cart. Visitors could bypass the time it takes to get an estimate and order services online instantly.

This one change shortened the process and made it easier for clients to benefit quickly from professional services, such as copywriting for an email campaign, sales letter or website page.

Most people are not familiar with how to specify a project, such as a website or brochure, in order to get an accurate quote. Of those who are, few people want to take time to go through the process of writing out specifications and waiting for an estimate. The projects listed in our shopping cart include the specifications.

The site navigation was also changed from a long list of static links to a fly-out system using Javascript. This change made is easier for visitors to locate information without clicking through a hierarchy of web pages.

What would you say is the most popular category on your website?

It's not surprising that copywriting is the most popular category on our website. On the Internet, copywriting can make or break a website. Good copy is like a pancake. One side has to attract web traffic and the flip side has to persuade visitors to take action.

Initially, 6 out of 10 requests were for website design and web hosting. Today, 6 out of 10 requests we get want a rewrite of existing copy. Requests for original copywriting for web pages and brochures are a close second.

Most agree that copywriting is even more important online than it is offline, although our experience in direct response and mail order copywriting might challenge that statement.

Historically, good design has always flowed from good copy, and good copy drives sales.

When the World Wide Web first opened to the public, people would launch a website and ask, ''How does it look?''

Now, business wants to know how the website performs. A website must answer the visitor's unspoken question, ''What does this site offer that can make my life better?'' Visitors find the answer in the web page copy.

What are some of the key areas you find most people needing the most help in when starting their business?

When it comes to starting a business online, most startups need help understanding how to make the Internet pay off for them. It's like a roadmap to Disneyland where good times await. But like any road trip, it's not free, shortcuts can be costly and there are plenty of potholes to avoid.

In the very beginning, a startup focuses on practical matters and later that focus changes to everyone's goal of making money.

For example, a startup might ask for help finding the best domain name. People new to the whole concept of the Internet ask for help setting up their email account. One of the biggest questions we get concerns the type of website and what should be on it.

After a website has been live for a few months or even a year, many new business people need help attracting more visitors or finding an affordable solution to the problem of no to low sales.

Every person who wants to start a business comes to the table with different knowledge and experiences. Everyone expects to make money.

How much do your services cost?

Our services focus on helping people achieve success online. We believe that the cost of professional services for an online business is an investment in that business' success.

Like most service providers, our fees are based on an hourly rate, but we go a step further:

a. Many of our services are pre-priced, because small business people generally have a tight budget and want to know their investment upfront.

b. We accept payments.

c. If someone is in need, we defer all or a portion of the payment due for most services.

d. If someone is really in need, we consider providing all or some services at no charge.

e. We also consider trades, partnerships and joint ventures.

Copywriting starts at $30/hr. Pre-priced websites start below $400. Ecommerce solutions start for less than $500 and the site we recommend for those who enroll in our free e-course for startups includes a 30% discount coupon.

In your opinion, what are some of the things about DM-Creative.com that you feel separates it from other websites like it?

We are dedicated to helping people succeed online. But we are not alone. Thankfully, there are other qualified service providers who also want to help people.

I think what sets us apart is our heart. We are not just a website. We are people helping other people. Our clients help us right back. Just the other day, we asked David Franklin, one of our new clients, if we could use him as a reference. He emailed back, ''Let's be a team and help each other.'' We appreciate that mindset. It really speaks to how we feel about our clients and how they feel about us.

As we have entered into a new year, do you have any goals for DM-Creative.com that you’d like fulfill in 2009?

Even though there are a few flickers of hope for the economy to spring back, it may take more time. The financial crisis is not over. People are out of work. Mortgage payments are still a burden. So this year, our thoughts and plans focus on helping people survive financial setbacks.

For those who want to start a business on the Internet, our goal focuses on finding these individuals and providing creative business solutions to meet their needs in the shortest timeframe, for the least investment or for a fee they can manage.

Although your website helps others get started in business, what has it taught you about business?

This is a good question. After more than ten years in business online, we notice that there are two kinds of people: People who want success, and people who say they want success. It's like going on a diet. Some people eat less and exercise more. For others, the extent of their action is to buy a weight-loss book or watch an exercise video.

If more people actually put in the time and effort, more people would find the success they want. Whether it's to supplement their income or become self-employed, the Internet offers people a golden opportunity. It puts a work-at-home mom on a level playing field with big business. Where else is this possible?

If you had to narrow down all of your advice into one sentence, what would you tell someone interested in launching their own business?

Believe in yourself, because anyone can start a business on the Internet and make money.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %HEADLINES_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Build news portals that show headline news based on RSS news feeds from news 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

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

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)
      • headlineText: 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-2006, Peter Thoeny; 2005-2007, Michael Daum http://wikiring.de
License: GPL (GNU General Public License)
Plugin Version: v2.12
Change History:  
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 - 11 May 2005
-- TWiki:Main.MichaelDaum - 13 Sep 2007

Topic revision: r0 - 27 May 2006 - 07:56:43 - 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