Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Back on the Newsfeeds project – Beta 1 on CodePlex

Hello everyone,

After a long absence I have come back to the Newsfeeds project. I don’t have an excuse, only reasons (I have devoted a lot of effort to other parts of the DNN project). I'm very sorry I can't pick up on the forum posts. I’m not very good at this. I’m still on the lookout for someone to help out with iwonder who has been doing a fantastic job on this until now. I have kept an eye out on those forums though and decided that the module needed 2 important changes:

1. Feed preprocessing

Most error reports in the forums are because the feeds that are drawn in do not conform to strict standards. I've frankly been shocked at how some major news organizations can syndicate their site's content in non compliant feeds. Unfortunately v 4.x of the Newsfeeds module is very sensitive to this. The reason is that the RssToolkit code we're using to merge (aggregate) feeds is very sensitive to this. I believe that in the long run we're probably going to get rid of this code again as it brought us as much pain as joy. But for now I’m sticking with it.

The fix for the immediate issue (the sensitivity to feed standard compliance) was to allow the user to preprocess the incoming feed before it is being fed to the aggregator. So you can throw an xsl file at the incoming xml to make it exactly RSS 2 compliant. Below is the full edit screen for a feed now.


You’ll see the feed and cache time (individual feeds can be cached differently from the aggregate). Then you’re offered a choice of transformations. The default means the module works as before. Selecting one of the others forces the incoming XML to go through that XSL. Note that the current cache is shown in case you are wondering what is coming in.

But it doesn’t stop there. In fact I've taken it even a step further. You can also specify a type for the preprocessor which, when implementing the internal IPreProcessor interface, can work through the incoming XML as well to rework it. The Interface is trivial:

Namespace PreProcessing
 Public Interface IPreProcessor

  Function Process(ByVal xml As String) As String

 End Interface
End Namespace

The module will feed it raw XML and expects raw XML in return. What you do in between is up to you. You specify the transformation as an “Other transformation” and entering the type reference in the text box:


Included is a Twitter preprocessor (DotNetNuke.Modules.News.PreProcessing.TwitterPreProcessor, DotNetNuke.Modules.News) which will turn all urls into proper urls and create urls for people and hash tags. The resulting feed would look like this:


Note that this is aggregated! So bringing multiple Twitter feeds together is now a singe.


This solution should make it very flexible to handle incoming data. There is one snag: if you have a non-conformant feed, you'll need to determine the cause and write the XSL yourself. So if you have no clue about XML/XSL and the feed doesn't work, there's not much you can do. But actually, that used to be the case in previous versions of the module as well.

2. Background loading

In v 4.0 I introduced the Ajax post loading. The reasoning was that if the module would have to wait for a feed to be retrieved then the complete page load would stall until the feed was in. This was the case in previous versions and it could be very irritating to have to wait to see your web page if you had a couple of Newsfeeds modules on there. The Ajax solution was to let the page load and then call back to get the content after the page had already rendered. But not everyone is very happy with this. It can cause some adjustments of the page as the feeds come in. So the first step was to add a setting to switch this off again. The Module Settings now look like this:


So you can switch off the Ajax post load. As you can see you can now also select “background download”. The new version installs a scheduled task in DNN. What the switch does is to add this module’s feeds to the scheduled task for downloading at the given interval. Of course this is subject to what all things dependent in scheduled tasks rely on: that DNN is running. So if DNN goes into idle mode (i.e. it’s been shut down by IIS for lack of activity) then nothing happens. But every time the scheduled task runs it checks to see if any feeds need refreshing and attempts to refresh them.


The current code is checked in and has been packaged. You’ll find it here in CodePlex:

The forum is here:

Feel free to play around with it. Note that with beta releases there is no guarantee for a smooth upgrade (technically speaking: we keep the version nr the same, so any changes to the SQL script for that version would not be run if you upload a next version over the beta). So you’re advised not to use it in production unless you really know what you’re doing and what risks you’re taking. If you want to report any issues, make sure to mention it is Beta (1) so we all know the context. And if you can the DNN version as well in case we need to reproduce it. Note I am still strapped for time, so if I didn’t reply to your post, I’m sorry.


Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (22)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (270)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?