Created attachment 4035 [details] Screenshot of user reviews on book with avatars Adding Libravatar (http://www.libravatar.org) support to the OPAC will make it possible to display photos next to the reviewers' name as long as that patron has an email address on file. This is actually pretty simple to do since the Gravatar::URL CPAN package includes a module called Libravatar::URL: http://search.cpan.org/~fmarier/Gravatar-URL-1.04/lib/Libravatar/URL.pm which is in Debian as of wheezy. Otherwise: sudo apt-get install libnet-dns-perl libtest-warn-perl sudo cpan Gravatar::URL My branch is here: https://gitorious.org/~fmarier/koha/francois-sandbox/commits/libravatar_support and I will submit it to the mailing list for review once it's ready.
I would note that you should also edit the recent comments page with this code so that they're consistent.
Nicole, I quickly looked around but I couldn't find that recent comments page. Is it in the OPAC or on the admin side?
http://YOURCATALOG/cgi-bin/koha/opac-showreviews.pl
Created attachment 4038 [details] Screenshot of the recent reviews page with avatars I have added (smaller) avatars to the recent reviews page as per Nicole's suggestion.
Awesome!! :) Can't wait to see and test the patch.
Francois, the patches for this apply just fine, but I'm not seeing the avatars (I have fake patrons with fake email addresses - so I need to get some real addresses in there). I was thinking though that you don't have a preference for this. So that means if the library isn't showing patron names you're still showing avatars and if the library doesn't want to show avatars due to potentially offensive pictures showing they have no way to turn it off. There should be two edits: 1 - a preference to turn this on and off 2 - a check to see if the names are showing and if not then don't show the pictures either I'm off to add some of my friends email addresses to my test system so I can see some avatars ;)
Francois, I tried using your email address in a patron record and still don't see the avatar on the review. Where are you looking for the email? Nicole
I tested again with Magnus's email and still no avatars.
I have just sent a revised patchset to the list: - checks to see if ShowReviewer is ON - adds a new ShowReviewerPhoto pref - add Gravatar::URL >= 1.03 to list of optional perl dependencies The email address that's used for each patron is the "Primary Email" (under "Contact"). Have you got the extra Perl module that's required? (Gravatar::URL version 1.03 or later)? If it's not installed then the photos don't show up but no errors are thrown.
Created attachment 4055 [details] [review] add ShowReviewerPhoto pref to the manual Here is a quick patch for the Koha documentation to add the new system preference.
Created attachment 4056 [details] [review] manual: explain where the reviewer photos come from and how to get one Here is a rough idea for the manual: a small explanation of where the reviewer photos come from.
You did say that I needed that dependency right there is the first comment didn't you :) I'll install that now and test. Thanks for taking my suggestions into consideration! This is gonna be a cool enhancement. Testing now.
Question about manual updates - are they for the master branch or the 3.4 branch? Also, patches for the manual can be sent to the docs mailing list (https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-docs) in the future. I don't always look for them in the bug reports (I just saw these cause I'm testing things). Nicole
Created attachment 4058 [details] no avatar if it's 'my' comment This patch works as long as the comment isn't my own. Is it supposed to show your own avatar if you're logged in? Or just show your avatar to others?
Created attachment 4059 [details] works if i'm logged out Of course that's not my picture ;) but that handsome man shows only if I'm logged out because it's attached to my account.
Created attachment 4060 [details] avatar shows on 'my' comments on recent comments When on the recent comments page and I'm logged in I see my avatar. So this confirms that it should show on the bib detail as well if I'm logged in.
Okay, I tested all 5 patches and they work beautifully except for the issue of my avatar not showing on the bib detail if I'm logged in. Fix that and I'm ready to sign off.
Also, in updatedatabase you should have this line: $DBversion = "3.05.00.002"; reading $DBversion = "3.05.00.XXX"; The RM will assign a version number and kohaversion.pl shouldn't be updated by anyone but the RM.
The manual patches were for the master branch. I'll add the "me" pictures when logged in (I must have forgotten to test that), remove the DB version and then submit the update patches to the list.
Awesome. And thanks so very very much for the manual patches!! It would be awesome if everyone wrote the manual bits for their devs :) hint hint.
New patch submitted to the list (and pushed to my Gitorious branch): - don't bump kohaversion - show your own avatar on the bib detail page
Signed off and submitted to the list!!
Created attachment 4061 [details] 5 signed off patches
Pushed to master, please test