Adds badges to Islandora objects showing citation counts from Crossref, Web of Science, and Scopus; Altmetric social media interactions; and oaDOI fulltext links.
Not necessarily a badge, but fits within the badge suite due to the pieces it uses and what it does (gets DOI, generates a block leading somewhere external based on that DOI).
On citation-only objects (i.e. citation objects with no PDF datastream), generate a link to the free fulltext paper.
Module should check for the presence of a PDF datastream, and only generate a block when datastream does not exist.
First stab taken on the oadoi branch. Currently a few steps from merging.
By checking that the XPath that checks for the presence of a DOI contains at least one DOI, we can prevent "trying to get property of non object" errors when no DOI is present. This check will also prevent the errors when a thesis or citation doesn't have a DOI.
Thought I'd open this issue so we don't forget about it. Low priority for now?
The badge-specific code inside the case blocks in islandora_badges_block_view() should be refactored into functions, which in turn, could be placed in an include file. This would make adding new badges easier, plus keep the .module file smaller and more maintainable.
When a DOI is invalid or just not found by the service, Scopus resolves fine with no block at all. But Altmetric responds with an empty block, and Web of Science responds with an empty set that results in "0" citations and a bad link.
WOS should be easy enough to resolve when there's time.
Altmetric could be resolved after finding out what the callback response is.
Here's the Altmetric API callback data: http://api.altmetric.com/v1/doi/65465?callback=my_callback (where 65465 is a random non-DOI number) results in "Not Found" as results - as opposed to a nice set of results with a valid DOI.
If credentials are invalid or not present, objects display a badge with a citation count of 0 and an invalid link (goes to /array or something like that).
Need to examine $results with invalid credentials, see what the error is, and then exit the case before anything is generated. Also add a drupal_set_message to let admin know that they probably have invalid credentials.