EPrints Technical Mailing List Archive

Message: #07474


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

Re: [EP-tech] Altmetric Doughnut


Sorry for the mess, here the code:


subEprints::Plugin::Screen::Eprint::Altmetric::Box::can_be_viewed {

my( $self ) = @_; return 0 if( !defined $self->{processor}->{eprint} );

return 0 if( !$self->{session}->can_call( "altmetric", "get_type_and_id" ) );

return 1

}


The best thing to do would be to make it configurable and update the plugin.


Il 05/09/2018 08:21, Yuri ha scritto:
Or overwrite it in some cfg.d perl files (I've deleted the check on
get_secure:


|subEprints::Plugin::Screen::Eprint::Altmetric::Box::||can_be_viewed {my( $self ) = @_; return 0 if( !defined
$self->{processor}->{eprint} ); return 0 if(
!$self->{session}->can_call( "altmetric", "get_type_and_id" ) ); return
1} The best thing to do would be to make it configurable and update the
plugin. |

Il 05/09/2018 05:02, Monica Wood ha scritto:
Hi James.


There is a little rule in the Box module that hides them when being
served through a secure connection. It was meant to be there to hide
it from the preiew window, but since most people serve their entire
repository through https, then it gets in the way.


You can either add the almetrics badge to your summary page template
directly (by passing the use of the Box module that the altmetrics
plugin uses), or you can edit the perl code.


see https://github.com/eprintsug/altmetric/issues/3 for info.  The
file is found under lib
<https://github.com/eprintsug/altmetric/tree/master/lib>/plugins
<https://github.com/eprintsug/altmetric/tree/master/lib/plugins>/EPrints
<https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints>/Plugin
<https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin>/Screen
<https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen>/EPrint
<https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen/EPrint>/Box/



Be aware that if you edit this file it will make it hard to update the
plugin in the future, as the checksums will no longer match.


email me directly if you need any more info.


Cheers,

Monica

<https://github.com/eprintsug/altmetric/issues/3>
	
Altmetric box not displaying on HTTPS · Issue #3 · eprintsug/altmetric
<https://github.com/eprintsug/altmetric/issues/3>
github.com
the line in the Altmetrics.pm return 0 if
$self->{session}->get_secure; Means the altmetrics box will not
display on any https pages (or pages that were rendered/generated over
https). this l...


------------------------------------------------------------------------
*From:* eprints-tech-bounces@ecs.soton.ac.uk
<eprints-tech-bounces@ecs.soton.ac.uk> on behalf of James Kerwin
<jkerwin2101@gmail.com>
*Sent:* 04 September 2018 22:52:50
*To:* eprints-tech@ecs.soton.ac.uk
*Subject:* Re: [EP-tech] Altmetric Doughnut
Hi Monica,

You are exactly right. That's where they differ. Shame on me for not
considering that...

Do you know how I can get the doughnut to show on a server using https?

Thanks,
James

On Tue, Sep 4, 2018 at 1:22 PM Monica Wood <monica.wood@utas.edu.au
<mailto:monica.wood@utas.edu.au>> wrote:

     Hi James.

     Is your production server using https while your test server is
     only http?

     Monica

     Get Outlook for Android <https://aka.ms/ghei36>

     ------------------------------------------------------------------------
     *From:* eprints-tech-bounces@ecs.soton.ac.uk
     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>
     <eprints-tech-bounces@ecs.soton.ac.uk
     <mailto:eprints-tech-bounces@ecs.soton.ac.uk>> on behalf of James
     Kerwin <jkerwin2101@gmail.com <mailto:jkerwin2101@gmail.com>>
     *Sent:* Tuesday, September 4, 2018 10:04:02 PM
     *To:* eprints-tech@ecs.soton.ac.uk
     <mailto:eprints-tech@ecs.soton.ac.uk>
     *Subject:* [EP-tech] Altmetric Doughnut
     Hi,

     I'm attempting to install the Almetric plugin on my live
     repository through the EPrints Bazaar and I have a problem with it
     not showing.

     I installed it on our test server with no issues. It worked
     straight away.

     When I upgraded and installed it on Live I restarted the server,
     reloaded repository config along with anything else I could think
     of trying. I've taken a look at the EPrints Bazaar to see which
     files were installed and where they should be. The files and
     locations match across both the Live and Test servers.

     The CORE Recommender works on both Live and Test, so it's not some
     sneaky "don't show any plugins" issue.

     Has anybody experienced similar or have any advice?

     Thanks,
     James



     University of Tasmania Electronic Communications Policy (December,
     2014).
     This email is confidential, and is for the intended recipient
     only. Access, disclosure, copying, distribution, or reliance on
     any of it by anyone outside the intended recipient organisation is
     prohibited and may be a criminal offence. Please delete if
     obtained in error and email confirmation to the sender. The views
     expressed in this email are not necessarily the views of the
     University of Tasmania, unless clearly intended otherwise.

     *** Options:
     http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
     *** Archive: http://www.eprints.org/tech.php/
     <http://www.eprints.org/tech.php/>
     *** EPrints community wiki: http://wiki.eprints.org/
     <http://wiki.eprints.org/>
     *** EPrints developers Forum: http://forum.eprints.org/
     <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/