RSS feed (news) in a block

Re: RSS feed (news) in a block

by Jon Bolton -
Number of replies: 10
Picture of Particularly helpful Moodlers Picture of Testers
Hey WP - ok, let's try to work this out...

The aim of this block is to display RSS feeds from other sites in your course. It's not related to the RSS feed from YOUR forums.

In the settings page, you need to set the 'Maximum Items' - for now, just set that to 5. In the 'Refresh' box, type 1. This means that 5 items from each RSS feed will display on your site, and the content will be checked for updates every hour.

Now, there is the ability to set a different RSS feed for each course. I see you have selected your Scientific Method course.

The feed you have displayed there is a Moodle Forum feed - which will work - but just to prove the concept, let's change it to a feed not related to your site.

As Jan says, the rss feed from http://www.basw.co.uk is working, but no problem, we can use another example, eg. http://thescotsman.scotsman.com/index.cfm?format=rss

So, type that URL into the box labelled 'rssfile Scientific Method'.

Ok, now 'Save Changes', and navigate to the Scientific Method course.

Turn editing on, and go the 'Add Blocks' box. Select 'Add Newsfeed'.

And the theory is that you should have news from The Scotsman newspaper displaying on your site.

If not... "Houston, we have a problem!"
But we WILL sort it! big grin

EDIT: Oops - just noticed that WP had managed to sort out this problem. That'll teach me to dash to the keyboard and reply without reading the full thread!! But I'll leave this post here just in case anyone else wants the step-by-step instructions.
In reply to Jon Bolton

Re: RSS feed (news) in a block

by W Page -
Hi!

Thank you anyway Jon for taking the time to write all of this out.  Hopefully De Jong will be able to convert what you wrote into an instruction document for the block.

WP1
In reply to W Page

Re: RSS feed (news) in a block

by Birdie Newborn -
Hurry up with those instructions for RSS feeds, Jon. I don't know where I'm supposed to be putting or editing -- am I replacing the rss directory already there? I'm afraid to touch the programming now that it's more or less working.
In reply to Birdie Newborn

Re: RSS feed (news) in a block

by Jan Dierckx -
There is no need to change the code.
You get an overview of every block installed and the ability to delete them or change their settings. Click on settings and follow Jon's instructions.
In reply to Jan Dierckx

Re: RSS feed (news) in a block

by Birdie Newborn -
Jan --
Are you talking about looking at the source code by finding admin/blocks.php? I can read the parts in English, but I really don't want to mess with the code.

Or is there some way in the Moodle courseware to reach this -- because I looked and didn't find. Please be more specific.
In reply to Birdie Newborn

Re: RSS feed (news) in a block

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Birdie, the instructions for 'editing' the RSS feeds are at http://moodle.org/mod/forum/discuss.php?d=10245#49561

But your question reads more like where to put the actual code.

Firstly, you need to upload the files in the zip attachment to your webserver. All of the files in the rssfeed directory should be copied to your public_html/moodledirectory/blocks directory, and the language file (rssfeed.php) should be copied to your public_html/moodledirectory/lang/en directory (or whatever language you are using).

Log in to your Moodle site as Admin, and go to your Admin Configuration page (www.yourmoodle.com/admin. Your site will be updated to recognise the rssfeed block.

From the Admin page, click on the 'Blocks' option. You will see a block for Newsfeed. Click on Settings and then follow the instructions at http://moodle.org/mod/forum/discuss.php?d=10245#49561.

It might be worth just reiterating some points:
1. The aim of this block is to display RSS feeds from OTHER sites in your courses.
2. You do NOT need to replace the rss directory already there. This is for the RSS feed FROM your site.
3. Your newsfeed will not display in courses unless you add the block to the courses you want newsfeeds to display in. In each course, turn editing on and go the 'Add Blocks' box. Select 'Add Newsfeed'.
In reply to Jon Bolton

Instructions for using newsfeed block

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
I've taken the liberty of starting the instructions for the Newsfeed block. Please feel free to suggest amendments.

Please note that this excellent block is not my work - the credit needs to go to Paul De Jong. I'm just responding to the queries in this thread for guidance in installation and use.
In reply to Jon Bolton

Re: Instructions for using newsfeed block add one instruction maybe ?

by Joyce Smith -
Great documentation Jon, and great 'block' Paul !
Got it all up and running with no probs !
Only one little thing, don't forget to enable the rssfeeds in the Moodle configuration ! I forgot that at first , and couldn't figure out why I couldn't edit the 'settings '!
Thanks again for a great resource !
cheers
Joyce smile
In reply to Jon Bolton

Re: Instructions for using newsfeed block

by Miguela Fernandes -

Hello,

I think i have done everything you say in the pdf document, but when i save it, it appears this message

A required parameter (sesskey) was missing

Sorry, if this problems is already answered but i didnt find it on any place. I only use moodle for 2 year, so i´m still a new user J .

Thanks a lot

Miguela

In reply to Jon Bolton

Re: RSS feed (news) in a block

by Birdie Newborn -
Jon --
But your question reads more like where to put the actual code.

Yes, that's right.

Firstly, you need to upload the files in the zip attachment to your webserver. All of the files in the rssfeed directory should be copied to your public_html/moodledirectory/blocks directory,

What I did: created a new directory in blocks named rssfeed, installed three files and a db folder (with files installed in it) inside the new rssfeed directory. Was I wrong to create the rssfeed directory? (cuz I'm getting no results).

and the language file (rssfeed.php) should be copied to your public_html/moodledirectory/lang/en directory (or whatever language you are using).

Here I uploaded only the rssfeed.php into en_us (and also the nl one -- presumably Dutch? -- in the nl folder.

Log in to your Moodle site as Admin, and go to your Admin Configuration page (www.yourmoodle.com/admin. Your site will be updated to recognise the rssfeed block.

Found configuration page.

From the Admin page, click on the 'Blocks' option. You will see a block for Newsfeed. Click on Settings and then follow the instructions at http://moodle.org/mod/forum/discuss.php?d=10245#49561.

Found Blocks option. It does not list Newsfeed or RSS. It does list Latest News, but none of these have any options except to delete (except Online Users).

Stymied again.

Oh, now I'm getting this message on a page called Setting Up Block Tables -- with a line of code at the top: block_rssfeed.phpP1/2 01/2 0mBIN‚?ÎV mysql.phpi1/2(1/2(mBIN‚? ò


rssfeed

Error

Block rssfeed tables could NOT be set up successfully!