SUNScholar/Altmetrics/5.X
Jump to navigation
Jump to search
BACK TO ALTMETRICS
Step 1
Edit the following file:
nano $HOME/source/dspace/config/modules/altmetrics.cfg
Modify as need.
See example below.
#---------------------------------------------------------------# #-----------IMPACT METRICS DISPLAY CONFIGURATIONS---------------# #---------------------------------------------------------------# # Configuration properties used by impact metrics badges # #---------------------------------------------------------------# # Metadata field which contains the interesting identifiers altmetrics.field = dc.identifier.uri #---------------------------------------------------------------# # Configure altmetric.com badges. # # See http://api.altmetric.com/embeds.html # #---------------------------------------------------------------# # Is the Altmetric.com badge enabled? altmetric.enabled = true # Possible values: donut medium-donut large-donut 1 4 altmetric.badgeType = donut # Possible values: left right top bottom #altmetric.popover = # Possible values: right #altmetric.details = # Possible values: true #altmetric.noScore = # Possible values: true #altmetric.hideNoMentions = # e.g. _blank #altmetric.linkTarget = #---------------------------------------------------------------# # Configure PlumX Artifact widgets. # # See https://plu.mx/pitt/developers/widgets # #---------------------------------------------------------------# # Is the PlumX Artifact widget enabled? plumx.enabled = true # Possible values: popup summary details plumx.widget-type = popup # Used with widget types: popup # Possible values: top bottom left right #plumx.data-popup = left # Used with widget types: popup summary details # Possible values: true false #plumx.data-hide-when-empty = true # Used with widget types: summary details # Possible values: true false #plumx.data-hide-print = false # Used with widget types: summary # Possible values: vertical horizontal #plumx.data-orientation = vertical # Used with widget types: details # Possible values: any positive integer #plumx.data-width = # Used with widget types: details # Possible values: true false #plumx.data-border = false
Step 2
Normally this step would be the rebuild of DSpace, however in DSpace 5.2 no provision was made for Altmetrics to be rendered in the new Mirage 2 theme.
So we continue and enable Altmetrics in the XMLUI Mirage 2 theme.
Edit the following file:
nano $HOME/source/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/item-view.xsl
Directly after the <xsl:template name="itemSummaryView-DIM"> on line 42, add the following. Make sure to indent correctly.
<!-- optional: Altmeric.com badge and PlumX widget -->
<xsl:if test='confman:getProperty("altmetrics", "altmetric.enabled") and ($identifier_doi or $identifier_handle)'>
<xsl:call-template name='impact-altmetric'/>
</xsl:if>
<xsl:if test='confman:getProperty("altmetrics", "plumx.enabled") and $identifier_doi'>
<xsl:call-template name='impact-plumx'/>
</xsl:if>
Step X
Then rebuild DSpace.