Your Moodle version

Blocks: RSS Plus

Maintained by Picture of Shaun Daubney Shaun Daubney
A slightly more visually appealing RSS News Feed block for Moodle 2.0+
Moodle 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9

More visually appealing RSS News Feed block for Moodle. Currently works best with BBC News feeds as it displays the pictures, but will work with any RSS.

Need help to get it to pull through other media content and images from other feed providers. If interested in helping me with this project, please get in touch.


Screenshot #0


Picture of Shaun Daubney
Shaun Daubney (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Darren Sutton
    Thu, Apr 26, 2012, 10:29 AM
    Is it possible to change the title of this block and if so how would I go about doing it?
  • Picture of George Prout
    Thu, Aug 2, 2012, 9:46 PM
    Darren, I had the same question and here is my solution - a little late but I only discovered this block a couple of days ago smile
    Feedback + suggestions are welcome.

    This will let you edit the title for each RSS Plus block independently. Three files need to be edited, make backups first!

    * Add the following line to the language file, if your language is not en then change accordingly.

    $string['blocktitle'] = 'RSS feed title';

    * Replace the specialization function to use a feed title if one has been defined, otherwise use the default

    ---- Original code ----
    function specialization() {

    $this->title = get_string('remotenewsfeed', 'block_rss_plus');


    ---- Modified code ----
    function specialization() {
    if (!empty($this->config->title)) {
    $this->title = $this->config->title;
    } else {
    $this->title = get_string('remotenewsfeed', 'block_rss_plus');

    * Add three lines of code so that a title can be added for each RSS plus block
    * This is a snippet of the code so that you put the lines in the correct place

    ---- Original code ----
    class block_rss_plus_edit_form extends block_edit_form {
    protected function specific_definition($mform) {
    global $CFG, $DB, $USER;

    // Fields for editing block contents.
    $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
    ***** put the new code here *****
    $mform->addElement('text', 'config_shownumentries', get_string('shownumentrieslabel', 'block_rss_plus'), array('size' => 5));

    ---- Afterwards your code should look like this ----
    class block_rss_plus_edit_form extends block_edit_form {
    protected function specific_definition($mform) {
    global $CFG, $DB, $USER;

    // Fields for editing block contents.
    $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));

    $mform->addElement('text', 'config_title', get_string('blocktitle', 'block_rss_plus'));
    $mform->setDefault('config_title', 'Remote RSS feed');
    $mform->setType('config_title', PARAM_MULTILANG);

    $mform->addElement('text', 'config_shownumentries', get_string('shownumentrieslabel', 'block_rss_plus'), array('size' => 5));

    Obviously backup the original files first and try it on a dev server. You may need to purge the cache, but now you can customise the title to your hearts content smile

    Shaun - this is a fantastic block, thanks very much for contributing it :D

  • Mt. Fuji
    Sun, Mar 31, 2013, 8:01 PM
    Thanks a million for this! I can edit the titles now so this rss block surpasses the default in terms of appearance.

    For some reason though, I cannot get it to pull images from RSS feeds outside of BBC feeds...I've even tried image feeds that provide small images but nothing.... Do you have any idea why it would only be successfully showing images for BBC feeds?
  • Picture of Shaun Daubney
    Fri, Aug 2, 2013, 5:37 PM
    At the moment it pulls through the thumbnails associated with the RSS feed which is only really supported by BBC feeds. I don't know how to make it pull through images from content.
  • Picture of Mark Callagher
    Sun, Dec 22, 2013, 5:31 PM
    Hi Shaun,
    I have been looking for something like this as our new site is using your base theme. I have had a close look at the RSS code on the Stuff (Dominion Post Wellington NZ) site and they have thumbnail images within each RSS post. Will your RSS Plus block work with this? Here is the link:
  • Picture of Shaun Daubney
    Wed, Jan 8, 2014, 1:46 AM
    Hi Mark, I've just replied by email but here's a summary for everyone else too.

    Hi Mark,

    It doesn't work with it (with images) straight off the shelf, although it works without the images. It WILL work with changing just 1 line in the code though.

    Line 249 of block_rss_plus.php

    foreach ((array) $enclosure->get_thumbnail(1) as $thumbnail)

    foreach ((array) $enclosure->get_link() as $thumbnail)

    Then it works.
  • Picture of Brendan Anderson
    Fri, May 29, 2015, 5:18 AM

    Can you please change line 307 of block_rss_plus.php from this:


    To this:


    php_time_limit::raise will not alter the time limit or max execution time if in CLI mode (which cron always is). As it is now, RSS Plus' cron method leaves my php_max_execution time at 60 for all other jobs.


  • Picture of Shaun Daubney
    Mon, Jun 1, 2015, 4:58 PM
    Hi Brendan,

    Just done this and uploading it now. Hope it works smile

  • Picture of Brendan Anderson
    Mon, Jun 1, 2015, 8:51 PM
    Thanks Shaun. But I made a typo. The class name is core_php_time_limit not php_time_limit. By bad.
  • Picture of Shaun Daubney
    Mon, Jun 1, 2015, 8:56 PM
  • Picture of Brendan Anderson
    Tue, Jun 2, 2015, 12:40 AM

    Works great, thanks a lot.

    I have a hack to this plugin that I would be happy to convert into a feature if you are interested. It adds a "Read more" link to the bottom of each entry in the feed. I guess the way to go would be to add a configuration option for people to show the link or not.

    Is that something you would consider committing if I submitted a patch?

  • Picture of Brendan Anderson
    Wed, Jun 3, 2015, 8:08 PM
    I'd also like to add a feature to make the use of break_up_long_words() on line 225 of block_rss_plus.php optional or configurable.
  • Picture of Brendan Anderson
    Wed, Jun 3, 2015, 8:52 PM
    Or maybe implementing a renderer is the way to go. That way you don't introduce any new (maybe complicated) configuration options to administrators while allowing themers the flexibility to control the markup. Again, I am happy to contribute this. Let me know.
  • Picture of Flemming Bornemann
    Thu, Aug 13, 2015, 2:32 PM
    Thanx for the nice plugin. Is there a way to make it show rss-feeds from Vimeo? I tried adding a url for a rss-feed consisting of video, but it shows nothing.
Please login to post comments