Author

I am Joannes Vermorel, founder at Lokad. I am also an engineer from the Corps des Mines who initially graduated from the ENS.

I have been passionate about computer science, software matters and data mining for almost two decades. (RSS - ATOM)

Meta
« Migrating to a DNS hosting provider | Main | Selling your mISV (the PeopleWords.com case) »
Thursday
Jul052007

More ScrewTurn tips (feed2js plugin)

ScrewTurn is used as a CMS for Lokad.com. Along with the main website www.lokad.com, we have also blog.lokad.com and forums.lokad.com 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 Feed2js.org 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 Feed2js.org and you're done. Unfortunately, this approach has two major drawbacks. First, it's roughly double the latency to complete the webpage retrieval. With Lokad.com, 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 Feed2js.org 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:

<feed itemCount="4" dateFormat="yyyy-MMM-dd">http://myfeedurl</feed>

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.

Download: FeedSnippetPlugin.cs.zip

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 | Unregistered CommenterChetan

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 Lokad.com 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 | Unregistered Commenterjoannes

[...] 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. [...]

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 | Unregistered Commenterchall3ng3r

Link is now fixed. Thanks for letting me know.

August 20, 2008 | Unregistered Commenterjoannes

Got it. Thanks!

// chall3ng3r //

August 26, 2008 | Unregistered Commenterchall3ng3r

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 | Unregistered CommenterStefano 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 | Unregistered Commenterjoannes

We ahve tried for v 3 but is not working can you help...

July 4, 2009 | Unregistered CommenterAmolkumar

ScrewTurn V3 breaks existing plugins. This plugin will be ported to ScrewTurn V3 when I migrate Lokad.com 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 | Unregistered Commenterjoannes

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 | Unregistered CommenterHiren

Download link fixed. URL had been broken in my last blog migration.

February 23, 2010 | Registered CommenterJoannes Vermorel

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.