Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<7.1. RSS with Rippy the Aggregator        7.2. PHPWrapper>

Print / Download:
Available languages: english Last update: 2005-09-02 13:41:44

7.1.1. Using Rippy the Aggregator with Campsite

It's pretty straightforward to add simple RSS aggregation to your Campsite templates using Matthew Skala's Rippy the Aggregator PHP scripts (http://ansuz.sooke.bc.ca/software/rippy.php) and the Sebastian Goebel's PHPwrapper for Campsite.

Now that Campware is using the excellent Trac system for managing development, one of the nice features it has is an RSS feed for all development activity as represented in its Timeline view. In this example, I'll use that RSS feed and integrate it into a simple sidebar template.

While Rippy can aggregate multiple RSS sources into a single file, I decided to take only one RSS feed to make a very simple sidebar listing of the latest changes to Campsite.

The first thing is to install PHPwrapper.

Rippy doesn't require any database access; instead it uses a cache file to store its items, and is very simple to use.

To get familiar with Rippy, and for easier debugging, I put the scripts in a separate directory first, to make sure they worked there, and that the PHPwrapper or Campsite wasn't causing problems.

I also cut out a lot of the extraneous info from the standard example aggregator.php file, and renamed it to campsite_trac_aggregate.php. I then had to create two files with zero size, called campsite_trac_aggregate.dat and campsite_trac_timeline.xml, and did a chmod to 777 so they could be written to.

(We'll add other aggregators for the other Campsite projects as they get moved over to Trac, but the mechanism will be the same.)

Then, when I was sure they worked correctly, I copied them over to the templates directory.

On the Fastnews demo site, the templates take advantage of the files are in the /look/fastnews/ directory. I put the Rippy scripts straight out in the /look/ directory in case we decide to use them elsewhere.

When PHPwrapper is installed, Campsite can include the output of PHP scripts as it does with other templates. In this case, all it takes is an

<!** include ../campsite_trac_aggregate.php>

command in the template.

Out of the box, the Rippy scripts use a lot of HTML tables and try to insert images into the aggregation. While that might be interesting for you, in this case it wasn't because we have a limited amount of space. So I stripped all that, creating a single <div id="rss_headline"> directive for each item in the RSS feed.

I then added a corresponding item in the stylesheet called div.rss_headline, and then tweaked the appearance until it was to my liking.


add a note add a note User Contributed Notes
7.1.1. Using Rippy the Aggregator with Campsite
There are no user contributed notes for this page.

<7.1. RSS with Rippy the Aggregator 7.2. PHPWrapper>

  Last update: 2005-09-02 13:41:44
Website powered by Docmint Last update: 2005-09-02 13:41:44
Total page time: 0.672372817993