EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #06973


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] insert Altimetrics html5 code in Eprints abstract


https://eprints.soton.ac.uk/410101/

Here I can see it is rendered in the page, not in the box, am I right? Looking at the eprints template, summary boxes appears under the title in the abstract page.

Can you point me to an existing site using the altmetrics plugin (that render in the box)?


Il 22/11/2017 13:59, John Salter ha scritto:
Have a look in [ARCHIVEID]/cfg/cfg.d/z_altmetrics.pl:
$c->{plugins}->{"Screen::EPrint::Box::Altmetric"}->{appears}->{summary_bottom} = 25;
$c->{plugins}->{"Screen::EPrint::Box::Altmetric"}->{appears}->{summary_right} = undef;
To see how the boxes are rendered, have a look at:
EPrints::DataObj::EPrint::render

$content_left->appendChild( render_box_list( $self->{session}, $self, "summary_left" ) );
$content_right->appendChild( render_box_list( $self->{session}, $self, "summary_right" ) );
$content_bottom->appendChild( render_box_list( $self->{session}, $self, "summary_bottom" ) );
$content_top->appendChild( render_box_list( $self->{session}, $self, "summary_top" ) );

If you've changed your rendering from the EPrints default - and don't use the summary_left etc. sections, you can do something like this:
$c->{plugins}->{"Screen::EPrint::Box::Altmetric"}->{appears}->{summary_bottom} = undef;
$c->{plugins}->{"Screen::EPrint::Box::Altmetric"}->{appears}->{summary_right} = undef;

And then in [ARCHIVEID]/cfg/citations/eprint/summary_page.xml
<epc:if test="id_number or isbn">
     <div id="altmetric">
       <h2>Statistics</h2>
         <epc:choose>
           <epc:when test="id_number">
             <div id="summary_altmetric" data-doi="{id_number.as_string()}" data-altmetric-id="{id_number.as_string()}" data-altmetric-id-type="doi" data-condensed="true" class="panel panel-body" />
           </epc:when>
           <epc:when test="isbn">
             <div id="summary_altmetric" data-doi="{isbn.as_string()}" data-altmetric-id="{isbn.as_string()}" data-altmetric-id-type="isbn" data-condensed="true" class="panel panel-body" />
           </epc:when>
         </epc:choose>
         <script type="text/javascript">
           new EP_Altmetric_Badge( 'summary_altmetric' );
         </script>
	</div>
</epc:if>

Hope that helps!
Cheers,
John

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri
Sent: 22 November 2017 12:18
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] insert Altimetrics html5 code in Eprints abstract

our @ISA = ( 'EPrints::Plugin::Screen::EPrint::Box' );

where this appears? In the abstract page?


Il 22/11/2017 12:51, John Salter ha scritto:
Hi Yuri,
Are you aware of this: http://bazaar.eprints.org/463/ - Altmetric plugin?

I'd suggest this is the most 'standard' way of displaying Altmetrics for an EPrint!

Cheers,
John

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri
Sent: 22 November 2017 11:24
To: EPrints.org Technical List <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] insert Altimetrics html5 code in Eprints abstract

Hi!

    is there a way (maybe xml text nodes?) to insert an html5 (example:
Altimetrics) in the abstract page? Is this procedure still valid:

https://help.altmetric.com/support/solutions/articles/6000086846-using-the-altmetric-embeds-on-eprints

?


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/