<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <tt>$c-&gt;add_trigger( EP_TRIGGER_DYNAMIC_TEMPLATE , sub</tt><tt><br>
      </tt><tt>{</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; my( %args ) = @_;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; my( $repo, $pins ) = @args{qw/ repository pins/};</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; $pins-&gt;{"utf-8.head"} = "" if( !exists
        $pins-&gt;{"utf-8.head"} );</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; my $protocol = $repo-&gt;get_secure ? 'https':'http';</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; $pins-&gt;{"utf-8.head"} .= &lt;&lt;GCHARTS;</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&lt;!-- IRStats2 --&gt;</tt><tt><br>
      </tt><tt>&lt;script type="text/javascript"
        src="$protocol://www.google.com/jsapi"&gt;// &lt;!-- No script
        --&gt;&lt;/script&gt;</tt><tt><br>
      </tt><tt>&lt;script
        type="text/javascript"&gt;google.load("visualization", "1",
        {packages:["corechart", "geochart"]});&lt;/script&gt;</tt><tt><br>
      </tt><tt>&lt;!-- end IRStats2 --&gt;</tt><tt><br>
      </tt><tt>GCHARTS</tt><tt><br>
      </tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; return EP_TRIGGER_OK;</tt><tt><br>
      </tt><tt>} );</tt><br>
      <br>
      <br>
      If not, could you replace with the code above &amp; re-try please?<br>
      <br>
      Thanks again!<br>
      Seb<br>
      <br>
      <br>
      On 25/06/13 15:47, Jose Martin wrote:<br>
    </div>
    <blockquote
cite="mid:BEC1740CB2EDF74F87D8DCE72B18B935170CFC@uni-ex2.universe.lon.ac.uk"
      type="cite">
      <pre wrap="">Hi Seb,

1- Yes, I did restart Apache

2- The &lt;epc:pin ref="head"/&gt; is in place. I am using a template inside a theme, but that should not interfere, I guess.

3- Yes, it is, but when loading the cgi/stats/report page a Dumper($pins) outputs:

        $VAR1 = {
          'head' =&gt; bless( do{\(my $o = '47743427226608')}, 'XML::LibXML::DocumentFragment' ),
          'page' =&gt; bless( do{\(my $o = '47743215127744')}, 'XML::LibXML::DocumentFragment' ),
          'languages' =&gt; bless( do{\(my $o = '47743427226496')}, 'XML::LibXML::DocumentFragment' ),
          'title' =&gt; bless( do{\(my $o = '47743215188816')}, 'XML::LibXML::DocumentFragment' ),
          'login_status' =&gt; bless( do{\(my $o = '47743427161872')}, 'XML::LibXML::Element' )
        };

   so it seems to never get into the if block that writes the IRStats2 scripts.

Any other useful debugging that might help?

My pleasure testing IRStats 2...   It looks great!

Thanks,

        Jose


-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a class="moz-txt-link-freetext" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] On Behalf Of Sebastien Francois
Sent: 25 June 2013 15:33
To: <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>
Subject: [EP-tech] Re: IRStats2 Beta

Hi Jose,

A few pointers:

1- did you restart Apache? this is necessary for the trigger to be loaded

2- in your template file(s) (usually under archives/&lt;id&gt;/cfg/lang/en/templates), do you have the following line:

&lt;epc:pin ref="head"/&gt;

in your &lt;head&gt; section?

That "pin" was added in 3.3 but may be missing on some repositories upgraded from older EPrints version.

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.


Thanks to everyone for testing IRStats2, I will be updating the 
code/writing a FAQ soon to tackle those issues.

Kind regards,
Seb.


On 25/06/13 15:14, Jose Martin wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi Seb,

I have installed IRStats2 on a 3.3.10 and it does not show the Charts (keeps displaying the "Loading..." image).

I used the irstats2-0.0.3.epm package and upgraded Prototype to 1.7.1 applying <a class="moz-txt-link-freetext" href="https://github.com/eprints/eprints/commit/f7a9088aae29b8732cb5d8edd83d17e94f069e63">https://github.com/eprints/eprints/commit/f7a9088aae29b8732cb5d8edd83d17e94f069e63</a>

The browser reports no network or console errors, although I have noticed that it does not request "jsapi" from Google as does <a class="moz-txt-link-freetext" 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?

BTW, irstats2-0.0.3.epm did not include the images/irstats2/datepicker folder.

Thanks,

        Jose


-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a class="moz-txt-link-freetext" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] On Behalf Of Sebastien Francois
Sent: 30 May 2013 16:18
To: <a class="moz-txt-link-abbreviated" href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>
Subject: [EP-tech] IRStats2 Beta

Hi all,

I have added IRStats2 to the eprints GitHub so you may now download and use/test it.

EPrints 3.3 users may use the bazaar package available from there:
<a class="moz-txt-link-freetext" 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>
(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.

EPrints 3.2 users will have to copy files by hand, it's pretty straight-forward and the INSTALL file contains some instructions.

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.

I hope you'll enjoy, please contribute (ideas / comments / bugs etc) directly to me or to GitHub.

Seb.

PS: yes, it can run in parallel to IRStats1.
*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>

*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
</pre>
      </blockquote>
      <pre wrap="">
*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>

*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>