Return to Jive Software

Currently Being Moderated

RSS Macro

VERSION 9  Click to view document history

Created on: Nov 7, 2007 1:46 PM by Alok Singh - Last Modified:  Sep 4, 2008 5:32 PM by tim.neuwerth

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

Attachments:
Average User Rating
(0 ratings)
rrutan rrutan  says:

So we are looking for this above stated syntax in Clearspace Community 2.0.2, and I do not think it works.  For example, we'd like to create a single document and have it be dynamically populated with links from an RSS feed...not necessarily a widget to the side.

 

From what I can see this macro should be ported to 2.0.x for inline injection, unless I'm missing something.

 

rrutan rrutan  says in response to rrutan:

Alok Singh or Vinh, would either of you have any problems of us getting one of our developers/interns to port this code to 2.0.x?  My gut feel is that we shouldn't need to do much besides update the configs?  Jivers, any chance we can request this functionality get merged into the core functionality, similar to the Confluence functionality.  Thoughts?

Alok Singh Alok Singh  says in response to rrutan:

Took a quick look, and doesn't look like the code itself needs to change, only the plugin xml (the one that is in this zip file doesn't look right). And, it should be callable from a document, nothing in the code stops it from being invoked inline.

Download Plugin for

Plugin Info

Bookmarked By (0)

More Like This

  • Retrieving data ...