RSS Macro

    Displays the results of an RSS feed based on the feed's URL.

     

    What's Included

    What the Samples Do

    This sample is an  macro that displays results from an RSS feed. To test the macro:

    1. Create a wiki document.

    2. In the plain text editor, add the macro markup as follows.

    You can optionally use a "limit" attribute to specify the maximum number of results you want listed.

    {rss:limit=5}http://www.technologyreview.com/rss/rss.aspx{rss}
    

    3. Publish the document.

     

    Java Source

    • Link.java

    • RSSMacro.java

    • RSSMacroAction.java

     

    Resources

    • rss-output.ftl

     

    Building and Deploying the Code

    The Ant build.xml file at the root of the plugin includes a build.plugins target you can use to compile the code and package it into a JAR file. There's also a deploy.plugins target that copies the JAR into the <jiveHome>/plugins directory that accompanies your Clearspace distribution. Paths into your test Clearspace distribution assume that this plugin project is in the standalone Clearspace distribution at: <root>/plugins/plugins/helloworld. Be sure to update the targets if you're testing another way, such as with the Clearspace WAR distribution.

     

    Be sure to read the notes below about dependencies. The JAR files you'll need are included as part of Clearspace.

     

    If you'd rather deploy the plugin manually, you can do that in one of two ways:

    • Just copy the plugin JAR file into the <jiveHome>/plugins directory. Your running Clearspace instance will deploy it automatically.

    • Open the admin console and navigate to System > Plugins, then click Add Plugin and browse for your plugin JAR file.

     

    Dependencies

    In addition to requiring Java 1.5, this code requires a few of the libraries you'll find in the WEB-INF/lib directory of your Clearspace installation, listed below.

    • clearspace-<version>.jar

    • commons-httpclient.jar

    • freemarker.jar

    • jdom.jar

    • rife-continuations.jar

    • rome.jar

    • webwork.jar

    • xwork.jar

    • servlet-api.jar (included with your application server)

     

    Clearspace 2

    • Clearspace 2 supports embedding RSS content in a variety of ways by default (any user can choose "customize this" to add their own RSS feed as a widget or a system admin can make an RSS feed part of the default main page).

     

    Clearspace 1.X Plugin Files Attached Below