Hello,

I think that these configuration keys only work on Mirage "1" theme.

For Mirage2 there is an open PR:

https://github.com/DSpace/DSpace/pull/1819

https://jira.lyrasis.org/browse/DS-3666

Regards,

Toni

On 22/10/20 19:16, Jose Blanco wrote:
I think that functionality is configurable. Experiment with these settings, especially the second:

# Possible values: true
#altmetric.noScore =

# Possible values: true
#altmetric.hideNoMentions =

On Thu, Oct 22, 2020 at 12:23 PM lon...@gmail.com <mailto:lon...@gmail.com> <long...@gmail.com <mailto:long...@gmail.com>> wrote:

    hi Jose,
    I modified the altmetrics.cfg as you suggested. So if there is no
    match handle OR Doi then the altmetric donnut won't show up at all
    correct?  I will look more into the Issues-322.
    thanks
    -P

    On Thursday, October 22, 2020 at 11:15:43 AM UTC-5 al...@vt.edu
    <mailto:al...@vt.edu> wrote:

        My understanding is that you have to set Altmetrics to match
        on Handle (dc.identifer.uri) OR DOI (dc.identifier.doi). See
        https://github.com/VTUL/vtechworks/issues/322
        <https://github.com/VTUL/vtechworks/issues/322> for a discussion.

        On Wednesday, October 21, 2020 at 5:42:12 PM UTC-4
        bla...@umich.edu wrote:

            I think if you enable it, it uses the doi stored in
            identifier.uri ( but this field is configurable ).

            altmetric.enabled = true

            altmetrics.field = dc.identifier.uri


            On Wed, Oct 21, 2020 at 5:38 PM Jose Blanco
            <bla...@umich.edu> wrote:

                I'm so sorry, I just realized that 6.3 has altmetrics
                functionality built in, so you should be able to do it
                without my change.

                I see there is the altmetrics.cfg, as you pointed
                out.  I would try to config using that file.  I have
                not used it, so not quite sure how to advice.



                On Wed, Oct 21, 2020 at 5:31 PM Jose Blanco
                <bla...@umich.edu> wrote:

                    Not all dois have altmetrics data, and if that is
                    the case you don't get the donut, so perhaps the
                    DOI you are experimenting with does not have
                    counts.  To test, put this in for identifier.doi
                    10.1111/ele.12286
                    and see what happens.

                    Note that for altmetrics, this attribute
                    data-hide-less-than="1" indicates not to show the
                    donut if there is not at least one hit in
                    altmetrics. I think if you remove this, you should
                    get a donut.

                    Debugging the xsl can be tricky.  Go to the webapp
                    area and open item-view.xsl for Mirage2. You can
                    edit that file and see changes show up
                    instantaneously ( no need to rebuild dspace ).

                    Make sure the code I sent you is there. Experiment
                    by writing some junk text in there, save the file
                    and see it shows up. I am assuming you are not on
                    a live system but in some development area.

                    -Jose

                    On Wed, Oct 21, 2020 at 5:06 PM lon...@gmail.com
                    <lon...@gmail.com> wrote:

                        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 bla...@umich.edu 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
                            
<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
                            
<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/'
                            <http://dx.doi.org/'>)"*>*

                            
*<*xsl:value-of**select="substring-after($doi_alt,'http://dx.doi.org/'
                            <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/'
                            <http://dx.doi.org/'>)"*>*

                            
*<*xsl:value-of**select="substring-after($doi_alt,'http://dx.doi.org/'
                            <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
                            lon...@gmail.com <lon...@gmail.com> 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/
                                
<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 dspace-tech...@googlegroups.com.
                                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/
                        <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
                        dspace-tech...@googlegroups.com.
                        To view this discussion on the web visit
                        
https://groups.google.com/d/msgid/dspace-tech/128a5c63-ee9a-4ae8-a600-4c13248f448dn%40googlegroups.com
                        
<https://groups.google.com/d/msgid/dspace-tech/128a5c63-ee9a-4ae8-a600-4c13248f448dn%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/
    <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 dspace-tech+unsubscr...@googlegroups.com
    <mailto:dspace-tech+unsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/dspace-tech/27d7af4a-8f46-4d2a-b44a-b21c9cf189c0n%40googlegroups.com
    
<https://groups.google.com/d/msgid/dspace-tech/27d7af4a-8f46-4d2a-b44a-b21c9cf189c0n%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/ <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 dspace-tech+unsubscr...@googlegroups.com <mailto:dspace-tech+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-vjiQVxRFsZ42u7pzwULyNADu_X4_4fEg-cJYN8Ncnmsg%40mail.gmail.com <https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-vjiQVxRFsZ42u7pzwULyNADu_X4_4fEg-cJYN8Ncnmsg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
Toni Prieto
Universitat Politècnica de Catalunya
Tel.: 93 405 42 49

--
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 dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/3065c91c-01ae-7e4b-c58a-316ea73c9020%40upc.edu.

Reply via email to