PDA

View Full Version : New version RSSReader plugin



HenkH
2005-03-22, 12:25 AM
I've released a new version of the RSSReader Plugin, with many enhancements over the previous one: http://www.bladerhq.com/pmwiki/pmwiki.php/Plugin/RssReader

The main features are:
* Support for RSS version 0.91, 1.0 and 2.0
* Support for image feeds (e.g. the Dilbert Comic feed)
* Images can be enlarged
* Easy navigation between the items in a feed
* Feeds can be configured from within the Config application
* One feed can be shown as a 'Ticker' on the main menu
* Screen layout can be completely changed in the skins.
* All HTML formatting is stripped from the feed.

Change history:
* Complete rewrite of the fetching/processing of the RSS feed
* Removed filters, use automatic character translation instead
* List of feeds in program is in same order as in newsfeeds.xml
* Support for 'image-feeds' (such as the Daily comics)
* Extended support for Arrows (and other navigation keys).
* Better use of skins (I hope)
* Zoom-function for images (like in the Comics2 plugin)
* Configuration-dialog for config application
* Panel interface, so it acts like a Ticker'
* Automatic reload of a complete feed

Some screenshots:
http://www.muon.nl/images/ticker.jpg

http://www.muon.nl/images/textdetails.jpg

http://www.muon.nl/images/imagedetails.jpg

http://www.muon.nl/images/imagezoom.jpg

bgowland
2005-03-22, 03:13 AM
Hi HenkH,

I tried the following feed...

http://rss.groups.yahoo.com/group/NetgearMP101Group/rss

I can see the subjects of the messages but when I open one to read it I only get the first line - it seems to be picking up about 80 characters (roughly) of text and then not showing the rest.

Any ideas?
Cheers,
Brian

HenkH
2005-03-22, 07:56 AM
The one line is all you get from this feed! The plugin downloads a XML file and basically shows whats in there. It doesn't follow links (except for simple image links).
For example the mentioned feed contains this information for one item:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#60;item&#62;
&#60;title&#62;Best method to play server streams on a PC?&#60;/title&#62;
&#60;pubDate&#62;Mon, 21 Mar 2005 20&#58;43&#58;35 GMT&#60;/pubDate&#62;
&#60;author&#62;jet_franson&#60;/author&#62;
&#60;link&#62;http&#58;//groups.yahoo.com/group/NetgearMP101Group/message/2486&#60;/link&#62;
&#60;guid isPermaLink=&#34;true&#34;&#62;http&#58;//groups.yahoo.com/group/NetgearMP101Group/message/2486&#60;/guid&#62;
&#60;description&#62;Hi, Just curious... I play my Twonky streams through Windows Media Player on my&#60;/description&#62;
&#60;/item&#62;[/QUOTE]

HenkH
2005-03-22, 11:57 PM
I&#39;ve updated the plugin for some small bug fixes:

3/23/2005 v.4.1 (HenkH)
* Menu button on MediaMVP remote now exits the plugin
* Fixed bug with PageDown key in short lists

bgowland
2005-03-23, 01:48 AM
Quote[/b] (HenkH @ Mar. 22 2005,02:56)]For example the mentioned feed contains this information for one item:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#60;item&#62;
&#60;title&#62;Best method to play server streams on a PC?&#60;/title&#62;
&#60;pubDate&#62;Mon, 21 Mar 2005 20&#58;43&#58;35 GMT&#60;/pubDate&#62;
&#60;author&#62;jet_franson&#60;/author&#62;
&#60;link&#62;http&#58;//groups.yahoo.com/group/NetgearMP101Group/message/2486&#60;/link&#62;
&#60;guid isPermaLink=&#34;true&#34;&#62;http&#58;//groups.yahoo.com/group/NetgearMP101Group/message/2486&#60;/guid&#62;
&#60;description&#62;Hi, Just curious... I play my Twonky streams through Windows Media Player on my&#60;/description&#62;
&#60;/item&#62;[/QUOTE]
OK - I get it now.

So in the case of the Yahoo Groups RSS feed, &lt;title&gt;&lt;/title&gt; obviously is the Subject of the post and &lt;description&gt;&lt;/description&gt; is the first line of the &#39;message body&#39; (a bit like auto-preview on some email clients) and it&#39;s the &lt;link&gt;&lt;/link&gt; section which points to the full message in the post.

Do you have any plans to extend the plugin to follow links?

Cheers,
Brian

bouchecl
2005-03-23, 05:29 AM
Kudos to you Henk.

I&#39;ve just installed the new plugin and it works much better than an older one I picked up a few days ago. BTW, have you done something with the support for accented characters? They used to be garbled and now they are just fine. Works great with the feeds from Le &#39;Monde&#39;, &#39;Libération&#39; and &#39;Radio-Canada&#39;.

Great plug-in. http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

HenkH
2005-03-23, 07:20 AM
Quote[/b] (bgowland @ Mar. 23 2005,02:48)]Do you have any plans to extend the plugin to follow links?
I have some ideas, but they are still in a prelimanary stage.

HenkH
2005-03-23, 07:24 AM
Quote[/b] (bouchecl @ Mar. 23 2005,06:29)]Kudos to you Henk.

I&#39;ve just installed the new plugin and it works much better than an older one I picked up a few days ago. BTW, have you done something with the support for accented characters? They used to be garbled and now they are just fine. Works great with the feeds from Le &#39;Monde&#39;, &#39;Libération&#39; and &#39;Radio-Canada&#39;.

Great plug-in. http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif
Thanks for your appreciation&#33;

I&#39;ve build in a translation table between the special/accented characters and their windows equivalent. I don&#39;t think it will work for non-western character sets (Chinese, Japanese, Russian, Greek etc.).

HenkH
2005-03-25, 12:18 AM
This RSS2 (http://forums.gbpvr.com/external.php?type=rss2) from the new forum didn't completely work with the plugin, so I updated it (again...):

3/25/2005 v.4.2
- Added support for the new GB-PVR forum feed
- Fixed crash on feed without items

reven
2005-03-25, 01:09 AM
with the new version the text still gets cut off. i have to keep editing the source and changing that value to 0 to fix it.


heres my news.xml panel file

<settings>
<!-- text style -->
<TextStyles>
<TextStyle name="FeedText" color="Black" typeFace="Tahoma" size="13" style="bold"/>
<TextStyle name="TitleText" color="White" typeFace="Tahoma" size="13" style="bold"/>
</TextStyles>
<!-- Composite Images -->
<CompositeImages>
<!-- News-->
<CompositeImage name="Background" size="852,40">
<DrawRoundedRect loc="5,5" size="852,30" radius="1" borderWidth="0" borderColor="Transparent" fillColor="Transparent"/>
</CompositeImage>
</CompositeImages>
<Custom>
<!-- Number of pixels ticker advances at each refresh -->
<CustomElement name="Speed" value="2"/>
<!-- Time in seconds between refresh -->
<CustomElement name="Interval" value="150"/>
<!-- Seperator between items in the ticker -->
<CustomElement name="Separator" value=" | "/>
</Custom>
<!-- special elements -->
<SpecialElements>
<SpecialElement name="NewsPanel" loc="0,0" size="852,40"/>
</SpecialElements>
</settings>

and heres the special element in the main menu skin.xml file

<SpecialElement name="Panel" panelName="News" visible="true" transparency="1" loc="0,427" size="852,40"/>

reven
2005-03-25, 03:19 AM
tipstir how did you fix it?

gblinckmann
2005-03-26, 12:55 AM
How do you get the RSS ticker to work? I've got an item checked for the ticker in the config panel, but it doesn't show up on the screen. The regular RSS feeds work great, though.

Heyt
2005-03-26, 10:01 AM
Hi, I've just tried the plugin and I've to say it works nearly perfect now.

But there are two skinning issues i had problems with:

1. The plugin uses a fixed resolution of 720x480. Would be nice if you could instead use the resolution of the background. That would make it possible for me to correctly adjust my widescreen PAL (1024x576) skin.

2. Would it be possible to have a composit image for the selection too? But that is only minor imporant to me.

HenkH
2005-03-26, 10:23 AM
How do you get the RSS ticker to work? I've got an item checked for the ticker in the config panel, but it doesn't show up on the screen. The regular RSS feeds work great, though.

You'll have to add a newspanel to the main menu skin. The readme.txt contains an example on how to this.

HenkH
2005-03-26, 11:41 AM
1. The plugin uses a fixed resolution of 720x480. Would be nice if you could instead use the resolution of the background. That would make it possible for me to correctly adjust my widescreen PAL (1024x576) skin.
The 720x480 was already in the plugin when I picked it up. I even thought this was a hardcoded dimension for all gb-pvr screens. Any way I will change the plugin so it will determine the screen size from the background image. I just hope I don't break up anybody elses skins.


2. Would it be possible to have a composit image for the selection too? But that is only minor imporant to me.
I will look into that one.

HenkH
2005-03-26, 02:05 PM
I've just updated the plugin at the Wiki site. Heyt's requests are added and I also looked into reven's problem with the panel.
The latter implies some changes to panels\news.xml. Please check the appearance of the panel if you've modified the supplied files, or if you made your own versions.

3/26/2005 v.4.3
* Plugin derives it's dimensions from the background image (instead of hardcoded 720x480)
* Appearence of Selected feeds/items can be defined in skins (see blue skin for examples)
* Fixed vertical positioning of text in news-panel

jorm
2005-03-26, 02:32 PM
henkh,

great work!

Heyt
2005-03-26, 07:31 PM
I've just tested the new version. And all the things you did seem to work perfectly.
But i've run into some new troubles:

1. Could you insert to more Composite Images for the selection. One for SelectedFeedNoFocus and one for SelectedItemNoFocus. At the moment the selection background just turns transparent and the text stays in the SelectedGeneralText-Color. As i use black text and my plugin-background is very dark you see nearly nothing. The new CompositeImages would be a great help there.

2. When you select an item and then show the full text the selection is reduced in height by one or two pixels for some reason. I hope you can fix that, it looks somehow strange to me. It also happens if you change focus between feed and item list. When an entry is changed from selected with focus to selected without focus the height is reduced.

gblinckmann
2005-03-26, 10:13 PM
That worked great! (I feel so ashamed for not reading the readme.txt file! It was very clear in your instructions.) :o


You'll have to add a newspanel to the main menu skin. The readme.txt contains an example on how to this.

HenkH
2005-03-26, 11:07 PM
1. Could you insert to more Composite Images for the selection. One for SelectedFeedNoFocus and one for SelectedItemNoFocus. At the moment the selection background just turns transparent and the text stays in the SelectedGeneralText-Color. As i use black text and my plugin-background is very dark you see nearly nothing. The new CompositeImages would be a great help there.
I'll look into that. But why don't you define SelectedGeneralText to something similar as GeneralText? You can define other colors for the composite images (i.e. you can define your own custom TextStyles and use them in the composite images).

2. When you select an item and then show the full text the selection is reduced in height by one or two pixels for some reason. I hope you can fix that, it looks somehow strange to me. It also happens if you change focus between feed and item list. When an entry is changed from selected with focus to selected without focus the height is reduced.
Just make your composite images a few pixels lower. The plugin stacks all entries in a list using their 'natural' heights. For the entries in GeneralText or SelectedGeneralText this is the font-height, for your composite images it is the size you've specified as the height of the composite image.

Heyt
2005-03-27, 09:51 AM
But why don't you define SelectedGeneralText to something similar as GeneralText? You can define other colors for the composite images
I want to keep the selection on the selected feed, even if the focus is on the items. By this you can see in which feed you are.
The thing with another textstyle is a nice work-around. Thanks for the idea, i will use it until there is another possibility.


Just make your composite images a few pixels lower. The plugin stacks all entries in a list using their 'natural' heights. For the entries in GeneralText or SelectedGeneralText this is the font-height, for your composite images it is the size you've specified as the height of the composite image.
OK! I found the proper height for the composite images. But then there is another problem. There are some free pixel over a text line but none under it. This looks OK when no selection is on it, but if i put one on it looks some how strange. At the moment i set the y position of the text in the selection to -1 but then the text hops up and down if i change the selected item. Do you see any chance to insert something like a spacing between the lines that could be defined in the skin?

pauly666
2005-03-28, 11:07 PM
I loaded the latest version last night, and when I try to connect to the Wiki to see the latest I get a pop-up window with a page error, i.e. it fails to connect.

I had the same issue with a number of the default feeds--anyone else? Some worked, some didn't. The Dilbert feed didn't work... nothing happened when selected. Works fine in my Comics plugin though.

I can attach the error messages tonight if need be, and I'm accessing via an MVP if that makes any difference.

Thanks!

HenkH
2005-03-28, 11:17 PM
If some of the feeds work your network connection seems to be fine (if you run the MVP-Server as a service it might run under the 'System' account which may have other internet credentials). Have you tried accessing the feeds with a Windows Based RSS-Reader (e.g. SharpReader (http://www.sharpreader.net))?
Maybe you're on a slow or busy internet connection. The request timeout (for getting the feed and all the textual data) is hardcoded to 20 seconds, which might be too small in your situation.

HenkH
2005-04-09, 11:16 PM
I've just updated the plugin at the Wiki (http://www.bladerhq.com/pmwiki/pmwiki.php/Plugin/RssReader):

Update History 4/09/2005 v.4.4

Better support for image feeds
Feeds can be marked as 'Image' in the config dialog
FUNC/Delete key switches between Text and Image details (see skin.xml for hint text)
When no skin is found the default (Blue) skin is used
Appearence of nonfocused Selected feeds/items can be defined in skins
Included example newsfeed_comics.xml with lots of Comics Feeds

HenkH
2005-04-10, 09:33 PM
4/10/2005 v.4.5 (HenkH?)
- Fixed a few nasty bugs introduced in the previous release