|
what is zFeeder
features
history
requirements
script files
how to install
how to
include it
online/offline
refreshing
(refresh key)
customization
wap
security
stuff
hot tips
|
|
what is zFeeder ?
zFeeder is a PHP script used to display RSS content.
It can be used to display other's content on your site, your intranet
or your desktop.
It is also known as an aggregator or feedreader and it parses RSS
(or RDF or backend) files (xml files) and shows content formatted.
It supports all versions of RSS (0.9, 0.9x, 1.0 and 2.0) and is template
driven.
It also outputs wml files to implement WAP sites (for mobile devices).
It is simple to use, implement and customize accordingly to your needs.
It is open source and GPL licensed.
features
- simple to include on any php page
- uses only flat-text-files, and works without SQL database
- simple to install and configure
- remote RSS files are cached for better performance and to prevent
IP banning
from certain sites which has protection for their RSS
files
- you can configure it to show what RSS remote file you want
- stores feed configuration in OPML file for easy exporting to other
aggregators
- supports importing subscriptions from other aggregators
- supports autodiscovery of feeds (thanks to Keith Devens)
- bookmarklet for browser to easy add a site to your page while you
browse the net
- administration panel for easy configure of subscriptions
- template driven so that you can make your own appearance of the
content
- supports CSS templates
- recognizing RSS versions 0.9, 0.9x, 1.0, 2.0 (does not validate
them though)
- online/offline refreshing of feeds via browser or cron
- multiple categories (subscriptions files)
- WAP (wml) output
history
- zFeeder 1.6 - fixed bug when deleting feeds from subscriptions panel,
added WAP (wml) support, added PHP sessions admin panel login, added
user agent, added support for content:encoded items
- zFeeder 1.5 – fixed a bug with rss link '&' character, added
a header to templates
- zFeeder 1.4 - multiple subscriptions lists (categories), templates
in one file, directories structure changed, several constant and variable
names changed
- zFeeder 1.3 - offline refreshing, separated functions to allow multiple
inclusions
- zFeeder 1.2 – small bug fixes
- zvonFeeds 1.0 renamed to zFeeder 1.0,
zvonFeeds 1.1.0 renamed to zFeeder 1.1
- zvonFeeds 1.1.0
- zvonFeeds 1.0
requirements
to install zFeeder you need that your webhost provides PHP (>=4.2.0)
support
and also has compiled the expat library (which is installed by default
in PHP)
It is compatible with most of the bowsers so that all users can view
your news.
It can run on Linux, Windows or any other OS that supports PHP.
Your host MUST allow outbound connections to other sites.
script files
- zfeeder.php - this is the zFeeder script
- zfuncs.php - zFeeder's
functions
- admin.php - the administration panel (along with files in includes dir)
- config.php - stores configuration
- index.php - dummy file
- wap.php - outputs wml for wap sites
- subscriptions list files (categories) in the categories subdirectory
- several templates for your use in the templates subdirectory
NOTE: zFeeder comes by default with several categories
and multiple subscriptions. They are there for demonstration purposes
and personal use only. If you want to display them on your site first
check the copyright, licenses and terms of use of that feeds (sites).
how to install
- upload newsfeeds directory to your webhost
- give "write" and "execute" attributes to subdirectory: cache
(either with your FTP client or with CHMOD 0777)
attributes of all files in cache dir should be 0766 or
0666
Note: 0666, 0766 and 0777 attributes are considered a
security risk
- give writeable attributes to config.php
and to files in subdirectory categories
- point your browser to http://your_domain/newsfeeds/admin.php
- configure values and save configuration
- if you set "use subscription file" to "no" then configuration of
feeds list will no
longer be available in the admin config panel, therefore
you must edit
zfeeder.php and set them manually
- include zfeeder.php on your pages
If you want to add new categories you must copy empty.opml with a
new category name, in categories directory, and then add subcriptions
to that category or import OPML files to it.
If you want to delete a category simply delete the category.opml file
from the categories directory.
zFeeder 1.6 implemented two mechanisms for login to admin panel. You
can use:
- server - HTTP Server Basic Auth (has limitations on several webservers
such as the ones that run PHP as CGI; sends user password base64 encoded;
when you logout you need to press cancel when the authentication box
appears)
- session - PHP sessions (depends on your webhost's php.ini configuration
and can use cookies; sends user password clear text)
- no panel - this disables the login to admin panel, so you can no
longer access it. to re-enable login you need to edit config.php and
change ZF_LOGINTYPE.
how to include
once the installation is succesfull you can include the feedsreader
on your php page
Example: <? include ('newsfeeds/zfeeder.php');
?>
You can also call the script with 4 parameters:
- zftemplate - a template name (filename in templates directory, without
the extension)
- zfposition - a list of comma separated values of rss numbers to
display (p1,p2,...)
- zfmore - gives all the news from the specified feed number (this
is implemented in 'more')
- zfcategory - category name (filename in categories subdirectory,
without the extension)
examples:
http://example.com/newsfeeds/zfeeder.php?zftemplate=logos - will show
with
the logos template
http://example.com/page_with_zfeeder.php?zftemplate=some&zfposition=p3,p5,p1
will show only the feeds 3, 5, 1 (that you defined in zfeeder) in
that order,
in a 'some' template.
If you want to have it on different pages, showing on each page different
feeds, you must include it like this:
<? $_GET['zfposition']="p1,p2"; include('newsfeeds/zfeeder.php');
?>
this will show on the page where is included only the feeds with position
1 and 2
<? $_GET['zfposition']="p3,p2"; $_GET['zftemplate']="logos";
include('newsfeeds/zfeeder.php'); ?>
this will show on the page where is included only the feeds with position
2 and 3 and
will be shown with a different template
You can also include it multiple times in the same page to organize
the feeds or to allow multiple templates on the same page.
NOTE: Check the demo pages to view useful examples.
online/offline refreshing
(the refresh key)
Until zFeeder
1.3 and by default in zFeeder 1.3 the feeds are refreshed online.
This means that the script checks each time it is executed if the
feeds expired and if so then it tries to refresh them. This may slow
the loading of the page and some times (if there are many feeds) the
script may even timeout.
The offline refreshing is now available, which means the script doesn't
try to refresh any feeds, unless it is told to do so. This means you
can add the feed refreshing as an automated task (cron) or only when
you call it with certain parameters from your browser.
There are 2 things that allow offline refreshing: the REFRESH_KEY
and the 'zfrefresh' parameter passed to the script.
Whenever the REFRESH_KEY is empty the mode of refreshing is: online
Whenever the REFRESH_KEY is not empty the mode of refreshing is: offline
You can put any value in REFRESH_KEY (a keyword) and when you want
the script to check and refresh feeds you call it: http://example.com/newsfeeds/zfeeder.php?zfrefresh=your_keyword
This will refresh the feeds in the default category. If you want to
refresh other category:
http://example.com/newsfeeds/zfeeder.php?zfcategory=other&zfrefresh=your_keyword
It is not recommended to call the script from your browser. Instead
it is better to make it an automated task with cron (and lynx or wget
or a php script).
You can view some good articles on cron and php here and here.
customization
You can customize the looks of the feeds reader by editing the templates
or create
new ones and by configuring values in the configuration section of
the script.
There are comments describing what each option means.
Customizing templates:
you can edit and customize (create templates) by changing html code
in the template files
The following values in them are coverted:
- {chanlogo} is replaced with the logo of the channel if available;
- {chanlink} is replaced with the channel link;
- {chandesc} is replaced with the channel description;
- {chantitle} is replaced with the channel title;
- {feedurl} is replaced with the rss feed url;
- {moreurl} is replaced with a link which displays all of the stored
news for that feed;
- {lasupdated} is replaced with a date when the feed was last read
from source
- {scripturl} is replaced with the url to your script
- {hideurl} is replaced with a values so that when clicked that feed
will not show
- {category} is replaced with the name of the category
- {link} is replaced with the news link;
- {pubdate} is replaced with the news publication date if available;
- {title} is replaced with the news title;
- {description} is replaced with the available news description;
- {id} is replaced with the number of the channel (feed) if it is
in the channel section, or with the number of the news item (if it
is in the news section and you use only one feed)
note: if you create nice templates you are welcomed
to share them with everybody.
you will be given credit on site.
security stuff
It is recommended that after you customize your configuration
and subscriptions
you set config.php and categories files attributes back
to readonly.
Whenever you want to change them afterwards you need to set them back
to write.
If you feel confident manually editing config.php and subscriptions,
you might as well delete admin.php and all files in includes directory
except zfuncs.php.
wap
You need to provide a link to wap.php from your wml pages. There is
a demo_wap.wml page to show your how it's done. You can edit and change
the templates the same as explained above. wml templates are located
in the templates directory, their names begin with "wap_" and their
extension is html, altough they are wml.
Limitations:
- by default only supports valid well-formed RSS sources, so feeds
which contains special characters like & may not work. To make
them work you need to look in "templates" directory and copy "wap_categ_CDATA.html"
to "wap_categ.html" and "wap_sources_CDATA.html" to "wap_sources.html".
- zFeeder does not check for the size of the content and mobile devices
supports only limited size pages, so it's your duty to include only
limited size feeds or set the number of displayed news in the admin
panel.
- some feeds may contain images and stuff that only a limited category
of mobiles support (images like gif, jpg; the rest supports only wbmp,
so the images will not be displayed).
hot
tips
-
find out more about newsfeeds or where to find them here
- if you put the bookmarklet to your browser then everytime you visit
a site and want
to add it's content to your site just click on it and if
a rss is detected by
autodiscovery then it will drive you to your site
admin panel to auto-subscribe to it.
what else you can show with zFeeder besides standard feeds:
- you can search for feeds containing a specific keyword
by entering this address in the
import feed list:
http://www.feedster.com/rss.php?q=someword&sort=date&type=opml&ie=UTF-8
this will search on Feedster any feeds
containing "someword" and return you all
that
feeds, which you can import to your subscriptions
- you can import weather for a city by entering the
following address in add new,
Feed URL: http://laughingmeme.org/weather-rss/country/city.rss
this will use Kellan
Elliott-McCrea's (experimental) RSS Weather
Service to display
the weather for country's city: city
You can also use rssweather.com
- you can import and show the sites near any location
by entering the address in
Feed URL: http://geourl.org/rss091/?lat=44.4946&lon=26.0594&dist=300
this will use GeoURL service to show
the sites at 300 miles nearby the location
given by the latitude: 44.4946 and longitude:
26.0594 .
To find your own coordinates you can use: Maporama
- for more information about what you can display through RSS you can
check Lockergnome's RSS
Resource or find feeds at Syndic8
|
|