Bug 7843 - Add RSS feeds for OPAC news
Summary: Add RSS feeds for OPAC news
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Viktor Sarge
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 13729
Blocks: 13782
  Show dependency treegraph
 
Reported: 2012-03-29 08:21 UTC by Magnus Enger
Modified: 2016-12-05 21:24 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 7843 Create an RSS feed for news in Opac (4.75 KB, patch)
2014-06-18 12:45 UTC, Viktor Sarge
Details | Diff | Splinter Review
Bug 7843 Create an RSS feed for news in Opac (4.65 KB, patch)
2015-02-08 19:52 UTC, Viktor Sarge
Details | Diff | Splinter Review
Bug 7843 Create an RSS feed for news in Opac (4.72 KB, patch)
2015-02-19 09:24 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 7843 Create an RSS feed for news in Opac (4.72 KB, patch)
2015-02-19 11:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7843: Remove the useless use of casAuthentication (983 bytes, patch)
2015-02-19 11:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7843: (qa-followup) Create an RSS feed for news in Opac (1.61 KB, patch)
2015-02-19 11:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7843: (follow up) Improve RSS feed language (1.28 KB, patch)
2015-03-03 11:07 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 7843: Followup - fix broken url (1.37 KB, patch)
2015-03-03 11:57 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 7843 Create an RSS feed for news in Opac (4.78 KB, patch)
2015-03-03 15:52 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 7843: Remove the useless use of casAuthentication (1.01 KB, patch)
2015-03-03 15:52 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 7843: (qa-followup) Create an RSS feed for news in Opac (1.66 KB, patch)
2015-03-03 15:52 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
(follow up) Improve RSS feed language (1.33 KB, patch)
2015-03-03 15:52 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 7843: Followup - fix broken url (1.42 KB, patch)
2015-03-03 15:52 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
[PASSED-QA] Bug 7843 Create an RSS feed for news in Opac (4.84 KB, patch)
2015-03-06 09:53 UTC, Kyle M Hall
Details | Diff | Splinter Review
[QA-FOLLOWUP] Bug 7843: Remove the useless use of casAuthentication (1.08 KB, patch)
2015-03-06 09:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED-QA] Bug 7843: (qa-followup) Create an RSS feed for news in Opac (1.73 KB, patch)
2015-03-06 09:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED-QA] Bug 7843 - (follow up) Improve RSS feed language (1.40 KB, patch)
2015-03-06 09:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED-QA] Bug 7843: Followup - fix broken url (1.49 KB, patch)
2015-03-06 09:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 7843 [QA Followup] - Make news selection persistant (2.79 KB, patch)
2015-03-06 09:54 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-03-29 08:21:03 UTC
We have news items in the OPAC - why not create an RSS stream for them?
Comment 1 Viktor Sarge 2013-06-18 16:21:43 UTC
Hear hear. This would be highly useful. And not too complicated I imagine.
Comment 2 Viktor Sarge 2014-06-18 12:45:42 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-06-18 14:03:05 UTC
(In reply to Viktor Sarge from comment #2)

> * The news items have no individual links since there is no graphical view
> of individual news items in the way that a blog would have. Is this a
> problem for RSS-readers?

I think it could be potentially confusing. Maybe we should add an id to each news item header row and link to that as an in-page anchor? opac-main.pl#newsitem4

> * Should we add additional metadata like author, administrator, publishing
> dates etc?

I would add publish date. We don't store author or administrator information with individual news items so we can't show anything relevant there.

> * Currently the feed will display news for all libraries + your home branch
> if you access it while logged in. Would only "all libraries" be better? Or
> maybe all libraries + every item for individual branches?

I would assume that anyone who was looking at the RSS feed would be doing so in a feed reader outside the context of a logged-in session, so I'm not sure the home branch items are going to get seen. I don't like that the feed a logged-in user would see in their RSS reader would be different from the news they see on the site, but I'm not sure there's a better way to handle it. A feed for all libraries might be inappropriate or simply too much data. One option might be to offer the user a choice?

 - "All libraries" news plus the user's library
 - "All libraries" news plus news for all libraries

I don't know how savvy users are with multiple RSS feeds.
Comment 4 Viktor Sarge 2014-06-19 07:10:49 UTC
(In reply to Owen Leonard from comment #3)
> (In reply to Viktor Sarge from comment #2)
> 
> > * The news items have no individual links since there is no graphical view
> > of individual news items in the way that a blog would have. Is this a
> > problem for RSS-readers?
> 
> I think it could be potentially confusing. Maybe we should add an id to each
> news item header row and link to that as an in-page anchor?
> opac-main.pl#newsitem4

If we use an id that stays unique over time that would work quite well. I would however like it better if we could create a view where news article are displayed as single page items. Then we could also create a news archive where news items are migrated as the time out. 

> > * Should we add additional metadata like author, administrator, publishing
> > dates etc?
> 
> I would add publish date. We don't store author or administrator information
> with individual news items so we can't show anything relevant there.

* I'll look into picking up publish date. I do think that the possibility of auto displaying author would be great. If you run with that thought you might even end up with auto created staff pages and a tab for "Our staff" you could enable. 

> > * Currently the feed will display news for all libraries + your home branch
> > if you access it while logged in. Would only "all libraries" be better? Or
> > maybe all libraries + every item for individual branches?
> 
> I would assume that anyone who was looking at the RSS feed would be doing so
> in a feed reader outside the context of a logged-in session, so I'm not sure
> the home branch items are going to get seen. I don't like that the feed a
> logged-in user would see in their RSS reader would be different from the
> news they see on the site, but I'm not sure there's a better way to handle
> it. A feed for all libraries might be inappropriate or simply too much data.
> One option might be to offer the user a choice?
> 
>  - "All libraries" news plus the user's library
>  - "All libraries" news plus news for all libraries
> 
> I don't know how savvy users are with multiple RSS feeds.

* This is a bit of a problem. The quickest solution might be to only display news that is for all libraries. But I think the actual problem is that you have to log in to see news that should be public from the start. If we use the news to customize the opac to be used as websites for all the different branches then there should be a public way to navigate between branches. My suggestion would be to only display "all libraries" in the RSS if we want to push this functionality quick. Would looking (and searching) another branch than the home branch you have on your account mess with anything?
Comment 5 Bernardo Gonzalez Kriegel 2014-07-01 12:05:00 UTC
Testing, no errors.
But:
1) Copyright to "Mark Tompsett" :), think that you must change that to yourself.
2) Validation outputs 2 warnings using http://feedvalidator.org/
Don't know if those can be solved
Comment 6 Owen Leonard 2014-08-11 16:39:13 UTC
Viktor do you plan to work more on this and submit a new patch? If so this should be set to "ASSIGNED" instead of "Needs signoff."
Comment 7 Viktor Sarge 2014-08-19 09:33:38 UTC
Thanks for pointing it out Bernardo and I do plan to do the last parts too Owen. I just quite quickly came to a halt in development when the vacation started. So let me just find the horse and I'll get right back up on it.
Comment 8 Viktor Sarge 2015-02-08 19:52:55 UTC Comment hidden (obsolete)
Comment 9 Viktor Sarge 2015-02-08 20:07:18 UTC
Ok first of all - sorry I forgot about this one for a long time. But here's a new patch. 

Validation of the feed is ok but it still wants an unique identifier. I chose however to rather keep it a small patch and update if people are ok with the additional changes to news. Especially since I'd like to have a newsarchive + a view for single newsitems to link to.

The text "RSS for the librarys general newsfeed." on opac-main.pl is there to try and explain to people will se only news directed to all libraries and will not get the news they might be seeing if they are logged in to a branch. We will need a way to switch between branches since both news, CSS and other content might be different on the branches.
Comment 10 Chris Cormack 2015-02-19 09:24:38 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2015-02-19 11:54:28 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2015-02-19 11:54:32 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2015-02-19 11:54:36 UTC Comment hidden (obsolete)
Comment 14 Viktor Sarge 2015-03-02 11:09:37 UTC
Thanks for helping out with newbie mistakes! I'll add links to the posts too since 12729 is now pushed, but I think I'll do a new patch for that even if it's a tiny patch so I don't mess this one up after it's now passed QA.
Comment 15 Nicole C. Engard 2015-03-03 11:03:39 UTC
If you visit : http://mykoha/cgi-bin/koha/opac-main.pl then the RSS feed works and goes to : http://mykoha/cgi-bin/koha/opac-news-rss.pl but if you're on http://mykoha and you click the rss icon you get : http://mykoha/opac-news-rss.pl which is a 404 page.
Comment 16 Nicole C. Engard 2015-03-03 11:07:39 UTC Comment hidden (obsolete)
Comment 17 Bernardo Gonzalez Kriegel 2015-03-03 11:57:33 UTC Comment hidden (obsolete)
Comment 18 sandboxes@biblibre.com 2015-03-03 15:51:14 UTC
Patch tested with a sandbox, by Pierre <tredok.pierre@gmail.com>
Comment 19 sandboxes@biblibre.com 2015-03-03 15:52:07 UTC Comment hidden (obsolete)
Comment 20 sandboxes@biblibre.com 2015-03-03 15:52:10 UTC Comment hidden (obsolete)
Comment 21 sandboxes@biblibre.com 2015-03-03 15:52:14 UTC Comment hidden (obsolete)
Comment 22 sandboxes@biblibre.com 2015-03-03 15:52:17 UTC Comment hidden (obsolete)
Comment 23 sandboxes@biblibre.com 2015-03-03 15:52:20 UTC Comment hidden (obsolete)
Comment 24 Kyle M Hall 2015-03-06 09:53:45 UTC
Created attachment 36651 [details] [review]
[PASSED-QA] Bug 7843 Create an RSS feed for news in Opac

Test plan:
* Install the patch
* Make shure there is news in the Opac
* Go to the Opac (opac-main.pl)
* Make shure you see an RSS icon below the news and a short text.
* Click the RSS icon and verify that you get an RSS feed that validates.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

I took the liberty of fixing the copyright statement when signing it off

Signed-off-by: Pierre <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 25 Kyle M Hall 2015-03-06 09:54:07 UTC
Created attachment 36652 [details] [review]
[QA-FOLLOWUP] Bug 7843: Remove the useless use of casAuthentication

Certainly a c/p error from opac-main.pl

Signed-off-by: Pierre <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 26 Kyle M Hall 2015-03-06 09:54:12 UTC
Created attachment 36653 [details] [review]
[PASSED-QA] Bug 7843: (qa-followup) Create an RSS feed for news in Opac

1/ use strict and warnings are useless, Modern::Perl is used
2/ Prefer to use the interface and theme TT var instead of the hard
coded path

Signed-off-by: Pierre <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 27 Kyle M Hall 2015-03-06 09:54:16 UTC
Created attachment 36654 [details] [review]
[PASSED-QA] Bug 7843 - (follow up) Improve RSS feed language

The RSS button used to read ' RSS for the librarys general newsfeed.'
This included one grammatical error and I think included more words
than most average people would read.  This patch simplifies it to say
'RSS for Library News.'

To test:
* Apply all patches
* Review RSS feed button's text on main page under news

http://bugs.koha-community.org/show_bug.cgi?id=7843

Signed-off-by: Pierre <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 28 Kyle M Hall 2015-03-06 09:54:21 UTC
Created attachment 36655 [details] [review]
[PASSED-QA] Bug 7843: Followup - fix broken url

This patch fixes an invalid URL when clicking
on RSS feed.

To test:
1) Using Nicole words :)
If you visit : http://mykoha/cgi-bin/koha/opac-main.pl
then the RSS feed works.
If you're on http://mykoha and you click the rss icon you
get : http://mykoha/opac-news-rss.pl which is a 404 page.

2) Apply the patch

3) Repeat 1, error is now fixed

Signed-off-by: Pierre <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 29 Kyle M Hall 2015-03-06 09:54:26 UTC
Created attachment 36656 [details] [review]
Bug 7843 [QA Followup] - Make news selection persistant

This patch makes the following changes:
1) If there is no logged in patron, the RSS link states it is for
   system-wide news.
2) If a patron is logged in, the RSS link states it is for system-wide
   news *and* news for the patron's home library.
3) The patron's home branch code is embedded in the RSS feed url so
   he or she no longer needs to be logged in for us to know what branch's
   news to pull.
Comment 30 Tomás Cohen Arazi 2015-04-30 19:34:45 UTC
Patches pushed to master.

Thanks Viktor!
Comment 31 Viktor Sarge 2015-06-17 07:08:22 UTC
Had another look at this one and just have to say thanks! You are quite awesome all of you.