Rss Plugin for JSPWiki

include feeds contents in your wiki page.

Author: Jean-Guy Avelin - IREMIA (avelin AT univ-reunion dot fr) JeanGuy

functionalities

This plugin support these types of syndication feeds:

feeds are cached in memory (and shared between wiki pages).
use conditional get before feed parsing.

example :

[{fr.univ.reunion.iremia.rss.RssViewer url='http://slashdot.org/index.rss' detail='1' ttl='120' date='1' maxitems='15'}]

syntax detail

Params must contain at least one entry with a key "url" associated with a String containing url of the feed.
optional parameters are :

  • detail -> 1 if you want the description of each news
  • date -> 1 if you want the date of last fetch in your wiki page
  • ttl -> value of ttl in minutes for the feed, default value is read on the feed itself otherwise = 1 day.
  • maxitems ->max number of items displayed for the feed

css

classes added :

  • rssfeed
  • rsshead
  • rsssubtitle
  • rssitemlist
  • rssitem

example:

.rssfeed{
  border-style: solid; 
  border-width: 1px; 
}
.rsshead{
padding: 0px 15px 5px 15px;
  font-size : 90%;
  text-align: right;
  font-weight: bold
}
.rsshead img {
  border-width: 0px;
  vertical-align: top;
}
.rsssubtitle{
  font-size : 60%;
  text-align: right;
background-color: #8899AA;
}
.rssitem {
    font-size : 70%;
}
.rssitemlist{
    color: #555555; 
}

screenshot :

RssViewerPlugin/example_channel.jpg

how to get it ?

attached binary version included. souce version with cvs:

cvs -z3 -d:pserver:anonymous@iremia.univ-reunion.fr:/jspwikiplugin login
cvs -z3 -d:pserver:anonymous@iremia.univ-reunion.fr:/jspwikiplugin co rssplugin
cvs  -d:pserver:anonymous@iremia.univ-reunion.fr:/jspwikiplugin logout

installation :

How to use this:
copy jar files in WEB-INF/lib folder. (rssviewer.jar, informa.jar, ...)

informa needs jakarta commons-logging jar http://jakarta.apache.org/commons/logging/ and jdom.jar http://www.jdom.org

Question: shall we add something to jspwiki.properties besides reloading the application? If so, what shall we had?

tried "fr.univ.reunion.iremia.rss.RssViewer" but didn't work
got: Plugin insertion failed: Could not find plugin fr.univ.reunion.iremia.rss.RssViewer

dependency:

the informa package http://informa.sourceforge.net:

at this date (06/12/2004), you have to use the CVS version of informa for the cache to work properly, to make conditionnal get and to use atom0.3feeds. the 0.5 informa binary has a little problem with these features.
informa 0.5.5 available since 29 Jun 2004, include these patches.
a working informa.jar is attached

history:

1.1: (08/30/2004) support RSS2.0 item guid permalink as used by jroller.org feed

Questions:

How do I specify a proxy server and port to use for the URL request?

A : Add some parameters to your JDK. For example, with resin, modify the args variable in httpd.sh to this value :

-J-DproxySet=true -J-Dhttp.proxyHost=myproxyhost.univ.run -J-Dhttp.proxyPort=6666


Please identify which CSS files need to be changed. In my wiki, the header and body of the news are centered. I would like to see them left-justified.

--JohnBParker, 28-Apr-2006


Hi,

When installing the jars and trying the example feed and my own feed, i both get the following error:

Error with the newsfeed :http://flitsservice.com/rss.xml!!

Connection refused: connect de.nava.informa.utils.FeedManagerException: Connection refused: connect at de.nava.informa.utils.FeedManagerEntry.retrieveFeed(FeedManagerEntry.java:191) at de.nava.informa.utils.FeedManagerEntry.(FeedManagerEntry.java:117) at de.nava.informa.utils.FeedManager.addFeed(FeedManager.java:293) at fr.univ.reunion.iremia.rss.RssViewer.execute(RssViewer.java:241) at com.ecyrd.jspwiki.plugin.PluginManager.execute(PluginManager.java:380) at com.ecyrd.jspwiki.parser.PluginContent.getText(PluginContent.java:88) at org.jdom.output.XMLOutputter.printTextRange(XMLOutputter.java:1054) at org.jdom.output.XMLOutputter.printElement(XMLOutputter.java:934) at org.jdom.output.XMLOutputter.printContentRange(XMLOutputter.java:1007) at org.jdom.output.XMLOutputter.outputElementContent(XMLOutputter.java:445) at com.ecyrd.jspwiki.render.XHTMLRenderer.getString(XHTMLRenderer.java:61) at com.ecyrd.jspwiki.render.RenderingManager.getHTML(RenderingManager.java:254) at com.ecyrd.jspwiki.render.RenderingManager.getHTML(RenderingManager.java:295) at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java:1373) at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1319) at com.ecyrd.jspwiki.tags.InsertPageTag.doWikiStartTag(InsertPageTag.java:117) at com.ecyrd.jspwiki.tags.WikiTagBase.doStartTag(WikiTagBase.java:85) at

--HHendriks, 08-Mar-2007


Hi,

Is the source code for this plugin available? I have encountered the following stacktrace when trying to include an rss feed from google calendar:

java.lang.NullPointerException at de.nava.informa.parsers.FeedParser.parse(FeedParser.java:166)
 at de.nava.informa.parsers.FeedParser.parse(FeedParser.java:112) at de.nava.informa.parsers.FeedParser.parse(FeedParser.java:87) at 
de.nava.informa.utils.FeedManagerEntry.retrieveFeed(FeedManagerEntry.java:176) at 
de.nava.informa.utils.FeedManagerEntry.(FeedManagerEntry.java:117) at 
de.nava.informa.utils.FeedManager.addFeed(FeedManager.java:293) at 
fr.univ.reunion.iremia.rss.RssViewer.execute(RssViewer.java:241) at 

--AnonymousCoward, 15-Aug-2007

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jpg
example_channel.jpg 50.5 kB 1 29-Jun-2004 18:07 JeanGuy
jar
informa.jar 175.9 kB 3 29-Jun-2004 19:21 JeanGuy
jar
rssviewer.jar 5.1 kB 4 05-Sep-2005 10:12 JeanGuy
« This page (revision-35) was last changed on 26-Sep-2007 23:02 by JanneJalkanen [RSS]