This is the ZebraFeeds documentation page.
ZebraFeeds is a web-based news (RSS/ATOM) aggregator, released under the GPL

Requirements

Installation



ZebraFeeds implements two mechanisms for login to admin panel. You can use:

Configuration

This sections lists the options available in the config.php file as well as through the administration interface.

General options

ZF_LOGINTYPE: server - server HTTP auth; session - PHP sessions auth
ZF_URL: URL to ZebraFeeds directory installation. Very important
ZF_ADMINNAME: admin username
ZF_ADMINPASS:  crypted (md5) admin password, default is "admin"

Subscription lists options

ZF_USEOPML: if yes the subscription file will be used, else use the manual feed configuration
ZF_HOMELIST: name of the feed list to be displayed by default (taken from the subscriptions directory which holds the subscriptions data)

General display options

ZF_TEMPLATE: the default templates used to display the news (file name from templates directory)
ZF_CHANLOCATION: top or bottom. If something else then channel (channel template) will not be loaded and displayed
ZF_DISPLAYERROR: if yes then when a feed cannot be read (or has errors) formatted error message shows in {description}

Localization options

ZF_ENCODING: character encoding for output. Example: UTF-8,  ISO-8859-1...
ZF_LOCALE: language to use for dates, system messages. Depends on yoyur PHP installation
ZF_PUBDATEFORMAT: format passed to strftime to convert dates got from feeds
ZF_DATEFORMAT: format passed to strftime to display the date of the day when displaying news sorted by date

Advanced options

ZF_OWNERNAME:  owner name which will appear in the OPML file (optional)
ZF_OWNEREMAIL: owner email which will appear in the OPML file (optional)
ZF_CHANONEBAR: if yes then only one channel bar is shown for all it's news (not for each news)
ZF_DYNAMICNEWSLENGTH: news longer than this (in characters) will be dynamically obtained using AJAX. 0 to disable. Requires compatible templates

Hidden options (not configurable in admin page

ZF_OPMLDIR: name of the directory where the subscriptions files are kept. leave default unless you know what you're doing
ZF_CACHEDIR: cache directory for feeds

Include on your page

once the installation is succesfull you can include the feedsreader on your php page. You must include the main script in the <body> section and the header script in the <head> section. The header script handles thre template's CSS and javascript, while the main script renders the aggregated feeds.

Example of a minimal page:
    <html>
     <head>
      <?php include ('newsfeeds/zebraheader.php'); ?>
     </head>
     <body>
      <?php include ('newsfeeds/zebrafeeds.php'); ?>
     </body>
    </html>

If you want to use the ZebraFeeds control bar, include
<?php include ('newsfeeds/zebrabar.php'); ?>
in the BODY section.

The ZebraFeeds control bar features useful controls to display/manage your feeds:

It should ideally be used if you plan to use ZebraFeeds as a personel feed reader, not if you just publish feeds on your site.

The bar just makes easy the use of the three parameters available when calling ZebraFeeds:
examples:
http://example.com/newsfeeds/zebrafeeds.php?zftemplate=logos - will show with the logos template http://example.com/page_with_zebrafeeds.php?zftemplate=some&zflist=linux will show only the feeds from the linux subscription list (that you defined in ZebraFeeds subscription lists admin panel) in a 'some' template.

Manual configuration

If you do not wish to use the OPML subscription lists, you have to manually configure the feeds that ZebraFeeds aggregates.
A couple of functions are available to do so. By default, ZebraFeeds renders the news sorted by channel using the template defined in the admin panel.
Additionally, these functions help to manipulate the way ZebraFeeds renders the aggregated feeds: See the demo_manual.php script for more details and examples.

Template reference

You can customize the look of the aggregated feeds by editing the templates or creating new ones. 
A template is a file that contains HTML/XHTML code with special tags, in sections to be interpreted by ZebraFeeds. Templates file names have must have the html extension to be recognised.
Sections should contain tags so that the parser can format the actual data into them.

Template sections

How sections are rendered

When sorted by feed, the output is generated this way:
For each feed
  • header
  • channel (if on top)
  • for each news item
    • news
  • channel (if at bottom)
  • footer
between
It's pretty much the same as when sorted by date:

For each day
  • header
  • newsDay
  • For each news item
    • newsByDate (or news if empty)
  • footer
between
The following tags are supported in the sections. Due to the linear way of processing templates, some tags will be relevant in certain contexts depending on the section they are included in:

Channel tags

News item tags

Special tags

Built-in styles

ZebraFeeds generates output which is not handled by the templates. This content is marked so that proper styling using CSS help a seamless integration on your site.
This sections lists all CSS elements that you can add to your style sheet

Special feature : dynamic browsing

To take advantage of AJAX to dynamically fetch news from your site as you want to read them, and not get all of them sent every time you load the page, you can use this kind of code in the "news" section of the template. 
 <span onClick="showItem('{feedurl}','{itemid}');">{title}</span>
See the infojunkie template for details and example.