<div dir="ltr">Hello,<div><br></div><div>Monica and Yuri, thank you both for your help and advice. I got it working this morning with your guidance.</div><div><br></div><div>Now my next challenge is getting an "ep_no_js" div to stop being "hidden" so I can see the titles for Altmetric and the CORE Recommender (I should be able to fix this one by myself!).</div><div><br></div><div>Thanks again for your help,</div><div>James</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 5, 2018 at 7:50 AM Yuri <<a href="mailto:yurj@alfa.it">yurj@alfa.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for the mess, here the code:<br>
<br>
<br>
subEprints::Plugin::Screen::Eprint::Altmetric::Box::can_be_viewed {<br>
<br>
my( $self ) = @_; return 0 if( !defined $self->{processor}->{eprint} );<br>
<br>
return 0 if( !$self->{session}->can_call( "altmetric", "get_type_and_id" <br>
) );<br>
<br>
return 1<br>
<br>
}<br>
<br>
<br>
The best thing to do would be to make it configurable and update the <br>
plugin.<br>
<br>
<br>
Il 05/09/2018 08:21, Yuri ha scritto:<br>
> Or overwrite it in some cfg.d perl files (I've deleted the check on<br>
> get_secure:<br>
><br>
><br>
> |subEprints::Plugin::Screen::Eprint::Altmetric::Box::||can_be_viewed {my( $self ) = @_; return 0 if( !defined<br>
> $self->{processor}->{eprint} ); return 0 if(<br>
> !$self->{session}->can_call( "altmetric", "get_type_and_id" ) ); return<br>
> 1} The best thing to do would be to make it configurable and update the<br>
> plugin. |<br>
><br>
> Il 05/09/2018 05:02, Monica Wood ha scritto:<br>
>> Hi James.<br>
>><br>
>><br>
>> There is a little rule in the Box module that hides them when being<br>
>> served through a secure connection. It was meant to be there to hide<br>
>> it from the preiew window, but since most people serve their entire<br>
>> repository through https, then it gets in the way.<br>
>><br>
>><br>
>> You can either add the almetrics badge to your summary page template<br>
>> directly (by passing the use of the Box module that the altmetrics<br>
>> plugin uses), or you can edit the perl code.<br>
>><br>
>><br>
>> see <a href="https://github.com/eprintsug/altmetric/issues/3" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/issues/3</a> for info. The<br>
>> file is found under lib<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib</a>>/plugins<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib/plugins" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib/plugins</a>>/EPrints<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints</a>>/Plugin<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin</a>>/Screen<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen</a>>/EPrint<br>
>> <<a href="https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen/EPrint" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/tree/master/lib/plugins/EPrints/Plugin/Screen/EPrint</a>>/Box/<br>
>><br>
>><br>
>><br>
>> Be aware that if you edit this file it will make it hard to update the<br>
>> plugin in the future, as the checksums will no longer match.<br>
>><br>
>><br>
>> email me directly if you need any more info.<br>
>><br>
>><br>
>> Cheers,<br>
>><br>
>> Monica<br>
>><br>
>> <<a href="https://github.com/eprintsug/altmetric/issues/3" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/issues/3</a>><br>
>> <br>
>> Altmetric box not displaying on HTTPS · Issue #3 · eprintsug/altmetric<br>
>> <<a href="https://github.com/eprintsug/altmetric/issues/3" rel="noreferrer" target="_blank">https://github.com/eprintsug/altmetric/issues/3</a>><br>
>> <a href="http://github.com" rel="noreferrer" target="_blank">github.com</a><br>
>> the line in the Altmetrics.pm return 0 if<br>
>> $self->{session}->get_secure; Means the altmetrics box will not<br>
>> display on any https pages (or pages that were rendered/generated over<br>
>> https). this l...<br>
>><br>
>><br>
>> ------------------------------------------------------------------------<br>
>> *From:* <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a><br>
>> <<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a>> on behalf of James Kerwin<br>
>> <<a href="mailto:jkerwin2101@gmail.com" target="_blank">jkerwin2101@gmail.com</a>><br>
>> *Sent:* 04 September 2018 22:52:50<br>
>> *To:* <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a><br>
>> *Subject:* Re: [EP-tech] Altmetric Doughnut<br>
>> Hi Monica,<br>
>><br>
>> You are exactly right. That's where they differ. Shame on me for not<br>
>> considering that...<br>
>><br>
>> Do you know how I can get the doughnut to show on a server using https?<br>
>><br>
>> Thanks,<br>
>> James<br>
>><br>
>> On Tue, Sep 4, 2018 at 1:22 PM Monica Wood <<a href="mailto:monica.wood@utas.edu.au" target="_blank">monica.wood@utas.edu.au</a><br>
>> <mailto:<a href="mailto:monica.wood@utas.edu.au" target="_blank">monica.wood@utas.edu.au</a>>> wrote:<br>
>><br>
>> Hi James.<br>
>><br>
>> Is your production server using https while your test server is<br>
>> only http?<br>
>><br>
>> Monica<br>
>><br>
>> Get Outlook for Android <<a href="https://aka.ms/ghei36" rel="noreferrer" target="_blank">https://aka.ms/ghei36</a>><br>
>><br>
>> ------------------------------------------------------------------------<br>
>> *From:* <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a><br>
>> <mailto:<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a>><br>
>> <<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a><br>
>> <mailto:<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a>>> on behalf of James<br>
>> Kerwin <<a href="mailto:jkerwin2101@gmail.com" target="_blank">jkerwin2101@gmail.com</a> <mailto:<a href="mailto:jkerwin2101@gmail.com" target="_blank">jkerwin2101@gmail.com</a>>><br>
>> *Sent:* Tuesday, September 4, 2018 10:04:02 PM<br>
>> *To:* <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a><br>
>> <mailto:<a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a>><br>
>> *Subject:* [EP-tech] Altmetric Doughnut<br>
>> Hi,<br>
>><br>
>> I'm attempting to install the Almetric plugin on my live<br>
>> repository through the EPrints Bazaar and I have a problem with it<br>
>> not showing.<br>
>><br>
>> I installed it on our test server with no issues. It worked<br>
>> straight away.<br>
>><br>
>> When I upgraded and installed it on Live I restarted the server,<br>
>> reloaded repository config along with anything else I could think<br>
>> of trying. I've taken a look at the EPrints Bazaar to see which<br>
>> files were installed and where they should be. The files and<br>
>> locations match across both the Live and Test servers.<br>
>><br>
>> The CORE Recommender works on both Live and Test, so it's not some<br>
>> sneaky "don't show any plugins" issue.<br>
>><br>
>> Has anybody experienced similar or have any advice?<br>
>><br>
>> Thanks,<br>
>> James<br>
>><br>
>><br>
>><br>
>> University of Tasmania Electronic Communications Policy (December,<br>
>> 2014).<br>
>> This email is confidential, and is for the intended recipient<br>
>> only. Access, disclosure, copying, distribution, or reliance on<br>
>> any of it by anyone outside the intended recipient organisation is<br>
>> prohibited and may be a criminal offence. Please delete if<br>
>> obtained in error and email confirmation to the sender. The views<br>
>> expressed in this email are not necessarily the views of the<br>
>> University of Tasmania, unless clearly intended otherwise.<br>
>><br>
>> *** Options:<br>
>> <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
>> *** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
>> <<a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a>><br>
>> *** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
>> <<a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a>><br>
>> *** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
>> <<a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a>><br>
>><br>
>><br>
>><br>
>> *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
>> *** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
>> *** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
>> *** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
> *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
> *** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
> *** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
> *** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
<br>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
</blockquote></div>