by
Phil 'iwonder' Guerra-- (Mission, KS) - A question popped up on the forums the other day asking a simple question,
'Why would the 4.0.0 upgrade not preserve XSLs?'. My answer was to offer that the module was completely redesigned and the new design took a path that changed how news feeds were handled. The module takes an incoming news source file, converts it to a 'standard' RSS v2.0 feed. This processing is needed only for the aggregation of dissimilar feeds, but is forced in the case of a module setup for just single feeds, which is what most folks have with existing modules using the previous version of the Newsfeeds (RSS) module.
You can combine different feed formats into a module for presentation, but they all must ultimately be in the same format. The trouble with this design is that the underlying conversion of feeds has issues that you would never see without digging into the code. Mostly, when that type of issue happens, the feed will just throw an exception saying the feed could not be downloaded, or you get errors in feed validation. I've been working on testing the beta correction to the issues with the new module, but what I found last night was that many of these types of errors could probably be attributed to feed conversion issues rather than due to the validation of the final feed formatting. I'll take about that more in another entry, though.
My main point with this entry is that many folks are seeing a lot of extra work because they lost all of the formatting in their feeds if they used a custom xsl for presentation. The new module only allows 3 basic xsl choices. One of them really doesn't work well, the Horizontal Ticker. Now, you can write a custom xsl for your feeds that are converted to the RSS v2.0 DNN standard, but it has to be written for the DNN RSS v2.0 format, which is very limited in what it will include from a feed. Again, this is due to the need to have content that is similar, with a small subset of the RSS v2.0 elements. Basically, what you get is similar to the RSS v0.91 content.
Now, on the way to work I had a thought. Why not just add a Module 'Mode' option? You could allow a module to be setup that only is used for 'Single Feed' Mode, and an option for 'Aggregate' mode. The 'Single Feed' mode would allow the user to specify the URL, and the XSL for use in presentation, without worrying about having to conform to one standard presentation format. If the mode is 'Single Feed' you don't have to use the logic that converts the incoming format to the DNN RSS v2.0 format. You would just use a custom xsl for the feed type you are using. Sounds simple enough, right?
Well, that's the theory. Now, in practice, more is required. The beauty of one standard presentation layer is that users don't have to think about the type of feed format their chosen feed is in, the module takes care of it all. However, I think that with a little more effort, a feed can be analyzed, and then present the results to the user, or give a dropdown of available xsl choices to use for the feed type. Admittedly, that's more work, but it is a slicker, backward compatible design.
Now, with a site that is already using different types of news formatted feeds, and custom xsl files, the upgrade would simply default to 'Single Feed' mode, and use the existing settings for use in the new module setup. Thus, you preserve the existing feed setup, and the loss of functionality by merely upgrading is gone.
That's my thinking this morning, anyway. Instead of not seeing the 'tree' for the 'forest', you can actually see the 'tree' and if you want to see the 'forest', you can do that too!
Let me know what you think?