Description
Magnus Enger
2012-03-29 08:21:03 UTC
Hear hear. This would be highly useful. And not too complicated I imagine. Created attachment 28926 [details] [review] Bug 7843 Create an RSS feed for news in Opac This patch introduces two new files: opac-news-rss.pl and opac-news-rss.tt. The files create an RSS feed for news in the opac between them, and to access the feed you go to opac-news-rss.pl in the opac. I intentionally waited with creating a RSS icon on opac-main.pl since I think we might want to discuss a few issues before exposing the feeds publicly even if the patch is pushed. Issues I know would be good to discuss is: * 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? * Should we add additional metadata like author, administrator, publishing dates etc? * 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? Test plan: * Install patch a * Make shure there is news in the Opac. * Go to the page opac-news-rss.pl in your Opac. * Verify that an RSS feed shows up with the same news as in opac-main.pl * Validate the RSS-feed. (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. (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? 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 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." 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. Created attachment 35733 [details] [review] 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. 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. Created attachment 36017 [details] [review] 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 Created attachment 36023 [details] [review] 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 Created attachment 36024 [details] [review] Bug 7843: Remove the useless use of casAuthentication Certainly a c/p error from opac-main.pl Created attachment 36025 [details] [review] 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 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. 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. Created attachment 36390 [details] [review] 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 Created attachment 36403 [details] [review] 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 Patch tested with a sandbox, by Pierre <tredok.pierre@gmail.com> Created attachment 36414 [details] [review] 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> Created attachment 36415 [details] [review] 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> Created attachment 36416 [details] [review] 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> Created attachment 36417 [details] [review] (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> Created attachment 36418 [details] [review] 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> 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> 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> 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> 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> 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> 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. Patches pushed to master. Thanks Viktor! Had another look at this one and just have to say thanks! You are quite awesome all of you. |