More ScrewTurn tips (feed2js plugin)

ScrewTurn is used as a CMS for Along with the main website, we have also and that both provide RSS feeds. For a long time, I have been looking for a simple way to include RSS snippets directly in the web pages without any satisfying solution. You can have a look at the right sidebar of Lokad Products page to see what I mean by “Feed Snippet”.

Feed2js for RSS snippet inclusion

For one month, I have been using that provide a javascript based solution to include RSS snippets in your webpages. The Feed2js approach has one single major advantage: simplicity. Just cut-and-paste a sample javascript that call and you’re done. Unfortunately, this approach has two major drawbacks. First, it’s roughly double the latency to complete the webpage retrieval. With, the overhead delay was sufficient to be noticed even when a DSL connection. Second, it potentially expose your website to cross-scripting attack (I am only saying potentially because has proved to be very reliable in my experience).

Feed Snippet Plugin for ScrewTurn

For those reasons, I have settled myself for an improved (yet home-made) solution for ScrewTurn: a custom RSS feed snippet plugin. This piece of code relies on the ScrewTurn plugin framework. It retrieve the RSS feed on the server side and then use the ASP.Net caching mechanism to keep a copy for 1h before re-downloading the RSS feed. With this plugin, you can include a RSS feed snippet in your ScrewTurn page with a single line:


The attribute itemCount indicates the maximal number of RSS items to be displayed in the web page. The attribute dateFormat corresponds to the .NET DateTime formatting option to be used to display the post publication date.


Reader Comments (12)

Thanks a bunch. Your code really helped. I have just modified a little to suite my need. Do you think we can work together to create more plugins? Just a thought…! October 18, 2007 | Chetan

I have also modified the code since its initial release. One the thing that has been improved is a better handling of remote RSS downtime. I don’t have much time to contribute to ScrewTurn (see to see why), but if you open a sourceforge project and start to collect the various community plugins that might be a nice initiative. October 19, 2007 | joannes

[…] Latest Changes is a ScrewTurn plugin that will render a list of latest changes inline for a ScrewTurn wiki. I initially thought to use the RSS Snippets plugin found here. This however doesn’t work when the wiki is configured to prevent anonymous viewing. I decided to create one specifically for listing recent changes to the wiki. […] February 18, 2008 | ScrewTurn Latest Changes Plugi

Hey there, When i try to download the plugin, i get 404 error. Can you please update the download link or reupload the plugin? Thanks, // chall3ng3r // August 20, 2008 | chall3ng3r

Link is now fixed. Thanks for letting me know. August 20, 2008 | joannes

Got it. Thanks! // chall3ng3r // August 26, 2008 | chall3ng3r

Hello. I copied the cs file in \public\plugins of ScrewTurnWiki filesystem, but the don’t run properly. How can I configure the plugin? November 4, 2008 | Stefano Bonnini

Stefano, you need to embed the cs file into a library project, to produce a dll and finally to import the dll into ScrewTurn through the admin interface. November 4, 2008 | joannes

We ahve tried for v 3 but is not working can you help… July 4, 2009 | Sigi

ScrewTurn V3 breaks existing plugins. This plugin will be ported to ScrewTurn V3 when I migrate toward ScrewTurn V3. This is unlikely to happen before the end of 2009. So you can either wait or try to get the thing fixed on your end. Hope it helps. July 8, 2009 | joannes

Hey there, When i try to download the plugin, i get 404 error. Can you please update the download link or reupload the plugin? Thanks, Hiren February 23, 2010 | Hiren

Download link fixed. URL had been broken in my last blog migration. February 23, 2010 | Joannes Vermorel