Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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.

image

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:

image

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:

image

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:

image

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.

BETA

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

http://dnnnewsfeeds.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=39208

The forum is here:

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/48/scope/threads/Default.aspx

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.

Comments

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Daniels (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
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 (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (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)
Steven Fisher (1)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out