New RSS client block in 1.5 HEAD

New RSS client block in 1.5 HEAD

by Daryl Hawes -
Number of replies: 15
I've added a new rss reader block to the 1.5 development tree. If you are testing 1.5 dev please take a moment to look over this new block and provide any feedback you might have. This block takes full advantage (and in fact was really one of the major drivers behind) the new 1.5 block capabilities. There are global and instance configurations for managing behavior so toy around with all of the settings.
Average of ratings: -
In reply to Daryl Hawes

Re: New RSS client block in 1.5 HEAD

by Marc Dastous -

Am I missing something?  Is this a block that replaces the RSSFeeds block that worked in 1.4.2+, but doesn't work in 1.5?  If so, please see the attached.  There is no way to add feeds to this interface.

If not, is someone out there trying to get the RSSFeeds block to work again?  I get an error at the top of the page that indicates the block uses old code that must be edited by a programmer.

I almost had the random_quote block fixed, but I get a "Must specify glossary ID or course module ID" error.  Any ideas?  The block registers in the admin, but the information is not tied to a course id so that the glossary will load into the module.

Marc

Attachment rss.jpg
In reply to Marc Dastous

Re: New RSS client block in 1.5 HEAD

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Hi Marc,

each instance of the block can have it's own rss feeds - add the block to a page, and turn editing on, and a link will show inside the block, enabling you to add rss feeds.

smile

Dan

In reply to Dan Marsden

Re: New RSS client block in 1.5 HEAD

by Daryl Hawes -
Quick note: I missed a few files so some functionality will be missing. I will add them to cvs asap. If you would like just copy contrib:/blog/rss contents to your moodle/rss folder.

This block predates RSSFeeds and is intended to replace its funcionality.
In reply to Daryl Hawes

Re: New RSS client block in 1.5 HEAD

by Marc Dastous -

Thank you.  I grabbed the files you suggested from CVS and I almost have it working.  Please see the attached image.  I was able to add a couple of Feeds, but I could not Validate them using the validate link.  They are valid, however, because I copied and pasted them from the old RSSFeeds block.

I am able to select the Feeds below, but I am unable to see them in the block.  No errors appear, however.

The other aesthetic things that appears is a frame within a frame.  The image shows this perfectly.

Hope this helps.

Marc

Attachment rss_save.gif
In reply to Marc Dastous

Re: New RSS client block in 1.5 HEAD

by Daryl Hawes -
I have moved those files into moodle/rss now, sorry for the inconvenience.
I'm not sure what this screen shot is showing me.
What feed URL are you trying to validate? What is the full validation URL?
In reply to Daryl Hawes

Re: New RSS client block in 1.5 HEAD

by Marc Dastous -

The image shows the page where you can select which feed(s?) to place in the block.  When I add this feed http://feeds.feedburner.com/uis/edtech to the list I cannot validate it.  Hence, when I get to the page that I displayed above, select the appropriate feed, the feed is not visible in the block.

Also, it appears that this block will not have similar functionality to the RSSFeed Plus block I had been using; the user being able to select from a drop down menu of available feeds (http://webclassroom.gis4u.com)  sad

I hope this is a little more clear.

Marc

In reply to Daryl Hawes

Updates added to 1.5 HEAD

by Daryl Hawes -
I have updated the rss_client block.

* It will no longer stop loading a page if a failure occurs.

* It will fail back on an existing cached local file properly if the remote feed cannot be loaded for some reason (which it should have done in the first place : ).

* It will now display a message if there was a problem loading the remote rss feed at the time the feed is added to the system - even if debugging is off.

* You can now select multiple feeds per block instance. All selected feeds will be displayed inside the same block.
In reply to Daryl Hawes

Re: Updates added to 1.5 HEAD

by Csaba Vágvölgyi -
In reply to Csaba Vágvölgyi

Re: Updates added to 1.5 HEAD

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The feed encoding needs to match the course encoding ... is your course in Hungarian and using iso-8859-2 ?
In reply to Martin Dougiamas

Re: Updates added to 1.5 HEAD

by Csaba Vágvölgyi -

Hi Martin!

Yes, the course is Hungarian and the default charset in php.ini is iso-8859-2.
I have problems with special hungarian charaters only in the RSS feeds.

Ps.: Happy New Year and thank you for this fantastic Moodle smile

In reply to Csaba Vágvölgyi

Re: Updates added to 1.5 HEAD

by Csaba Vágvölgyi -

The hungarian charset problem is OK now.

After I started to translate (to hungarian) the block_rss_client.php the incorrecct characters changed well.
I don't know why but it's working. I'm happy.

Thank You!

In reply to Csaba Vágvölgyi

Re: Updates added to 1.5 HEAD

by Zhigang Sun -
I have some experience on using magpierss (this block use it to parse rss) and try to think about it. Wish what I'll say is useful.

magpie use UTF-8 as it internal encoding (for the reason of xml module in php). All the encoding except UTF-8, US-ASCII and ISO-8859-1 will be converted to UTF-8 by calling iconv() or mb_convert_encoding() , then parse. The output encoding is determinated by MAGPIE_OUTPUT_ENCODING. Before call fetch_rss(), use
0„20„20„2 define('MAGPIE_OUTPUT_ENCODING', get_string('thischarset'));
can make the output to be the site's default charset. But for the limit of xml parser provided by php, only three charsets mentioned above can work. I tested it in zh_cn_utf8.

If we want it to support more charsets, should do something inside magpierss.
In reply to Csaba Vágvölgyi

Re: Updates added to 1.5 HEAD

by Takahiro Kagoya -

HI. I have similar problems with Japanese in RSS client block.

I'm using Japanese EUC as character encoding  to display and to keep strings in MySQL database. But almost RSS feed of Japanese news sites are using UTF-8. 

I'm feeling that it is difficult to change the Moodle internal encoding. So it is necessary to change the character code when these strings  are displayed . Is this a peculiar problem to Japanese?

I am expecting this wonderful function to come to be able to be  used without problems.