Last active
July 27, 2016 07:16
-
-
Save eulereadgbe/1dc8b601a5da9d127f0a46653328f1f0 to your computer and use it in GitHub Desktop.
Scopus citation counts in DSpace xmlui modified from https://gist.github.com/aschweer/6772579
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * The contents of this file are subject to the license and copyright | |
| * detailed in the LICENSE and NOTICE files at the root of the source | |
| * tree and available online at | |
| * | |
| * http://www.dspace.org/license/ | |
| */ | |
| callbackCitedbycount = function(){ | |
| if (sciverse.areSearchResultsValid()) { | |
| var resultObj = sciverse.getSearchResults(); | |
| if (resultObj.returnedResults > 0) { | |
| citedbycount = resultObj.results[0].citedbycount; | |
| scp = resultObj.results[0].scp; | |
| if (citedbycount > 0) { | |
| citeHtml = '<small>Cited '; | |
| if (scp != null) { | |
| citeHtml += '<a href="http://www.scopus.com/inward/citedby.uri?'; | |
| citeHtml += 'scp='; | |
| citeHtml += scp; | |
| citeHtml += '&origin=inward'; | |
| citeHtml += '&partnerID=HzOxMe3b'; | |
| citeHtml += '" class="citing-link" target="_new" title="View citing articles in Scopus">'; | |
| citeHtml += '</small><span class="bold">' | |
| citeHtml += citedbycount; | |
| citeHtml += '</span></a><small> times in </small>'; | |
| } | |
| //articleLink = resultObj.results[0].inwardurl; | |
| if (scp != null) { | |
| citeHtml += '<small><a href="http://www.scopus.com/inward/record.uri?'; | |
| citeHtml += 'scp='; | |
| citeHtml += scp; | |
| citeHtml += '&origin=inward'; | |
| citeHtml += '&partnerID=HzOxMe3b'; | |
| citeHtml += '" class="article-link" target="_new" title="View record in Scopus" >'; | |
| citeHtml += 'Scopus'; | |
| citeHtml += '</a></small>'; | |
| } | |
| var citecountsScopus = $("#citecounts-scopus"); | |
| citecountsScopus.html(citeHtml); | |
| citecountsScopus.removeClass('hidden'); | |
| citecountsScopus.show('blind'); | |
| } | |
| } | |
| } | |
| }; | |
| runSearch = function() { | |
| //setting defaults | |
| sciverse.setApiKey("YOUR-API-KEY"); | |
| sciverse.setCallback(callbackCitedbycount); | |
| //setting search query | |
| var DOI = $("meta[name='citation_doi']").attr('content'); | |
| var strQuery = "DOI(" + DOI + ")"; | |
| var varSearchObj = new searchObj(); | |
| varSearchObj.setSearch(strQuery); | |
| varSearchObj.setNumResults('1'); | |
| //launching search | |
| try { | |
| sciverse.runSearch(varSearchObj); | |
| } catch(err) { } | |
| }; | |
| $(document).ready(runSearch); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xsl:template name="impact-scopus"> | |
| <script type="text/javascript"> | |
| document.write('<script type="text/javascript" src="http://api.elsevier.com/javascript/scopussearch.jsp"> </' + 'script>'); | |
| </script> | |
| <script src="{$theme-path}scripts/scopus-citecounts.js" defer="defer"> </script> | |
| <div id="citecounts-scopus" class="simple-item-view-other citecounts hidden"> </div> | |
| </xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment