<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Seb,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That did it! The version I had from irstats2-0.0.3.epm had<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt"> if( exists $pins->{"utf-8.head"} && ref( $pins->{"utf-8.head"} ) eq "" )<o:p></o:p></span></tt></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt"> {<o:p></o:p></span></tt></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">that prevented the magic from happening.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> Jose<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> eprints-tech-bounces@ecs.soton.ac.uk
[mailto:eprints-tech-bounces@ecs.soton.ac.uk] <b>On Behalf Of </b>Sebastien Francois<br>
<b>Sent:</b> 25 June 2013 16:10<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: IRStats2 Beta<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Jose,<br>
<br>
Does your trigger looks like the block of code below (I know there were a few different versions hanging around):<br>
<br>
<tt><span style="font-size:10.0pt">$c->add_trigger( EP_TRIGGER_DYNAMIC_TEMPLATE , sub</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>{</tt><br>
<tt> my( %args ) = @_;</tt><br>
<br>
<tt> my( $repo, $pins ) = @args{qw/ repository pins/};</tt><br>
<br>
<tt> $pins->{"utf-8.head"} = "" if( !exists $pins->{"utf-8.head"} );</tt><br>
<br>
<tt> my $protocol = $repo->get_secure ? 'https':'http';</tt><br>
<br>
<tt> $pins->{"utf-8.head"} .= <<GCHARTS;</tt><br>
<br>
<tt><!-- IRStats2 --></tt><br>
<tt><script type="text/javascript" src="$protocol://www.google.com/jsapi">// <!-- No script --></script></tt><br>
<tt><script type="text/javascript">google.load("visualization", "1", {packages:["corechart", "geochart"]});</script></tt><br>
<tt><!-- end IRStats2 --></tt><br>
<tt>GCHARTS</tt><br>
<br>
<tt> return EP_TRIGGER_OK;</tt><br>
<tt>} );</tt></span><br>
<br>
<br>
If not, could you replace with the code above & re-try please?<br>
<br>
Thanks again!<br>
Seb<br>
<br>
<br>
On 25/06/13 15:47, Jose Martin wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Hi Seb,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>1- Yes, I did restart Apache<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>2- The <epc:pin ref="head"/> is in place. I am using a template inside a theme, but that should not interfere, I guess.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>3- Yes, it is, but when loading the cgi/stats/report page a Dumper($pins) outputs:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> $VAR1 = {<o:p></o:p></pre>
<pre> 'head' => bless( do{\(my $o = '47743427226608')}, 'XML::LibXML::DocumentFragment' ),<o:p></o:p></pre>
<pre> 'page' => bless( do{\(my $o = '47743215127744')}, 'XML::LibXML::DocumentFragment' ),<o:p></o:p></pre>
<pre> 'languages' => bless( do{\(my $o = '47743427226496')}, 'XML::LibXML::DocumentFragment' ),<o:p></o:p></pre>
<pre> 'title' => bless( do{\(my $o = '47743215188816')}, 'XML::LibXML::DocumentFragment' ),<o:p></o:p></pre>
<pre> 'login_status' => bless( do{\(my $o = '47743427161872')}, 'XML::LibXML::Element' )<o:p></o:p></pre>
<pre> };<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> so it seems to never get into the if block that writes the IRStats2 scripts.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Any other useful debugging that might help?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>My pleasure testing IRStats 2... It looks great!<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> Jose<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] On Behalf Of Sebastien Francois<o:p></o:p></pre>
<pre>Sent: 25 June 2013 15:33<o:p></o:p></pre>
<pre>To: <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><o:p></o:p></pre>
<pre>Subject: [EP-tech] Re: IRStats2 Beta<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Hi Jose,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>A few pointers:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>1- did you restart Apache? this is necessary for the trigger to be loaded<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>2- in your template file(s) (usually under archives/<id>/cfg/lang/en/templates), do you have the following line:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><epc:pin ref="head"/><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>in your <head> section?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>That "pin" was added in 3.3 but may be missing on some repositories upgraded from older EPrints version.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>3- is the trigger called by EPrints? You could for instance add a "print STDERR" debug message inside the trigger to see if it's properly called.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks to everyone for testing IRStats2, I will be updating the <o:p></o:p></pre>
<pre>code/writing a FAQ soon to tackle those issues.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Kind regards,<o:p></o:p></pre>
<pre>Seb.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>On 25/06/13 15:14, Jose Martin wrote:<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Hi Seb,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I have installed IRStats2 on a 3.3.10 and it does not show the Charts (keeps displaying the "Loading..." image).<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I used the irstats2-0.0.3.epm package and upgraded Prototype to 1.7.1 applying <a href="https://github.com/eprints/eprints/commit/f7a9088aae29b8732cb5d8edd83d17e94f069e63">https://github.com/eprints/eprints/commit/f7a9088aae29b8732cb5d8edd83d17e94f069e63</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The browser reports no network or console errors, although I have noticed that it does not request "jsapi" from Google as does <a href="http://files.eprints.org/cgi/stats/report">http://files.eprints.org/cgi/stats/report</a>. This looks like should be triggered in z_irstats2.pl, but does not seem to happen. Any ideas?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>BTW, irstats2-0.0.3.epm did not include the images/irstats2/datepicker folder.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> Jose<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] On Behalf Of Sebastien Francois<o:p></o:p></pre>
<pre>Sent: 30 May 2013 16:18<o:p></o:p></pre>
<pre>To: <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><o:p></o:p></pre>
<pre>Subject: [EP-tech] IRStats2 Beta<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Hi all,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I have added IRStats2 to the eprints GitHub so you may now download and use/test it.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>EPrints 3.3 users may use the bazaar package available from there:<o:p></o:p></pre>
<pre><a href="https://github.com/eprints/irstats2/blob/master/epm/irstats2-0.0.2.epm">https://github.com/eprints/irstats2/blob/master/epm/irstats2-0.0.2.epm</a><o:p></o:p></pre>
<pre>(note that it's not yet live on the Bazaar-store). Even so you can install the package easily this way, you still need to run a script to process the stats. That is not yet automated.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>EPrints 3.2 users will have to copy files by hand, it's pretty straight-forward and the INSTALL file contains some instructions.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>It's not quite the final/stable release yet but it has been thoroughly tested on a few "real" repositories and it's unlikely to break a repository anyway.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I hope you'll enjoy, please contribute (ideas / comments / bugs etc) directly to me or to GitHub.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Seb.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>PS: yes, it can run in parallel to IRStats1.<o:p></o:p></pre>
<pre>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><o:p></o:p></pre>
<pre>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><o:p></o:p></pre>
<pre>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><o:p></o:p></pre>
<pre>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><o:p></o:p></pre>
<pre>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><o:p></o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
<pre>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><o:p></o:p></pre>
<pre>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><o:p></o:p></pre>
<pre>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><o:p></o:p></pre>
<pre>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><o:p></o:p></pre>
<pre>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>