Hi Jose, Thanks for your quick reply! I've followed your instructions and added your codes in the two files. But after recompiled and started up Dspace. It didn't show any altmetrics donut in the quick item-view page that has DOI information. Where can I start checking for error? I couldn't find anything in Dspace.log. Do I need to make any change in altmetrics.cfg file?
Please advise, -P On Wednesday, October 21, 2020 at 1:20:06 PM UTC-5 [email protected] wrote: > I did not find anything out of the box. This is how I added altmetrics > *AND* dimensions: > > in Mirage2/xsl/core/page-structure.xsl > > right after: > > else > > return true; > > } > > *</script>* > > > Add this: > > > *<script *type="text/javascript"*>* > > *<*xsl:attribute name="src"*>* > > *<*xsl:text*>*https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js > *</*xsl:text*>* > > *</*xsl:attribute*>*async > > *</script>* > > > *<script *type="text/javascript"*>* > > *<*xsl:attribute name="src"*>* > > *<*xsl:text*>*https://badge.dimensions.ai/badge.js*</*xsl:text*>* > > *</*xsl:attribute*>* > > *</script>* > > > And then in Mirage2/xsl/aspect/artifactbrowser/item-view.xsl, you need to > add this where you want it to appear on the item page. Note that it grabs > the doi from the metadata identifier.doi, so you need to have it there, for > this to work. If an item does not have a doi, the altmetrics and > dimensions icons will not show up as expected. I put this xslt at the end > of this template: > > *<*xsl:template name="itemSummaryView-DIM-file-section"*>* > > > here is the code: > > > *<*xsl:variable name='doi_alt' > select="/mets:METS/mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/dim:field[@element='identifier' > > and @qualifier='doi']"*></*xsl:variable*>* > > > *<*xsl:variable name='handle_alt'*><*xsl:value-of select= > "/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='object']" > */></*xsl:variable*>* > > > > *<p *align="center"*>* > > *<span *align="center" data-badge-popover="right" > data-badge-type="1" data-hide-less-than="1" class="altmetric-embed" > data-style="large_rectangle"* >* > > *<*xsl:attribute name="data-handle"*>* > > *<*xsl:value-of select= > "substring-after($handle_alt,':')"*/>* > > *</*xsl:attribute*>* > > > *<*xsl:attribute name="data-doi"*>* > > *<*xsl:choose*>* > > *<*xsl:when test="contains($doi_alt, ' > http://dx.doi.org/')"*>* > > *<*xsl:value-of select="substring-after($doi_alt,' > http://dx.doi.org/')"*/>* > > *</*xsl:when*>* > > *<*xsl:otherwise*>* > > *<*xsl:value-of select="$doi_alt"*/>* > > *</*xsl:otherwise*>* > > *</*xsl:choose*>* > > *</*xsl:attribute*>* > > *</span>* > > *</p>* > > > *<p>* > > *<span *style="margin-left: auto; margin-right: auto; width: > 8.5em" class="__dimensions_badge_embed__" data-hide-zero-citations="true" > data-style="large_rectangle"* >* > > *<*xsl:attribute name="data-doi"*>* > > *<*xsl:choose*>* > > *<*xsl:when test="contains($doi_alt, ' > http://dx.doi.org/')"*>* > > *<*xsl:value-of select="substring-after($doi_alt,' > http://dx.doi.org/')"*/>* > > *</*xsl:when*>* > > *<*xsl:otherwise*>* > > *<*xsl:value-of select="$doi_alt"*/>* > > *</*xsl:otherwise*>* > > *</*xsl:choose*>* > > *</*xsl:attribute*>* > > *</span>* > > *</p>* > > > Hope this helps, > -Jose > > On Wed, Oct 21, 2020 at 12:29 PM [email protected] <[email protected]> > wrote: > >> hi everyone! >> Is it possible to configure and display altmetrics on Dspace 6.3 - >> Mirage2? >> I couldn't find much information on how to get it setup. >> >> thanks >> -Peter >> >> -- >> All messages to this mailing list should adhere to the DuraSpace Code of >> Conduct: https://duraspace.org/about/policies/code-of-conduct/ >> --- >> You received this message because you are subscribed to the Google Groups >> "DSpace Technical Support" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/dspace-tech/473e12ee-079f-4991-be44-fdf93b3c6a76n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/dspace-tech/473e12ee-079f-4991-be44-fdf93b3c6a76n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/128a5c63-ee9a-4ae8-a600-4c13248f448dn%40googlegroups.com.
