[EP-tech] Re: integrating IRStat on items page

sf2 sf2 at ecs.soton.ac.uk
Mon Nov 25 10:40:38 GMT 2013


 

Ranju, 

FYI We've just had a discussion on ep-tech about installing irstats2 on
a repository and how to enable the graphs on the summary pages. 

Seb. 

On 25.11.2013 10:23, Ranju Upadhyay wrote: 

> Hi all, 
> 
> I have been trying to integrate IRStat (1.3) to items page on eprints 3.3.12, 
> 
> on the instructions it says 
> 
> 5 Integrating IRStats (optional) 
> 
> ---------------------------------- 
> 
> i) Add IRStats download graphs to individual item summary pages 
> 
> Add the following to archives/ARCHIVEID/cfg/cfg.d/eprint_render.pl: 
> 
> if( !$preview ) 
> 
> { 
> 
> # IRSTATS CODE STARTS HERE 
> 
> if ($session->get_repository->can_call('irstats_abstract_content')) 
> 
> { 
> 
> $page->appendChild($session->get_repository->call('irstats_abstract_content', $session, $eprint)); 
> 
> } 
> 
> # END IRSTATS 
> 
> $links->appendChild( $session->plugin( "Export::Simple" )->dataobj_to_html_header( $eprint ) ); 
> 
> $links->appendChild( $session->plugin( "Export::DC" )->dataobj_to_html_header( $eprint ) ); 
> 
> } 
> 
> return( $page, $title, $links ); 
> 
> but this code gives error saying 
> 
> Error in configuration: 
> 
> Global symbol "$session" requires explicit package name 
> 
> (having added the lines to the right place i.e. after declaration of $links) 
> 
> I realized that in this version the $session has to be replaced with $repository for it to work 
> 
> i.e. 
> 
> # IRSTATS CODE STARTS HERE 
> 
> if ($repository->get_repository->can_call('irstats_abstract_content')) 
> 
> { 
> 
> $page->appendChild($repository->get_repository->call('irstats_abstract_content', $repository, $eprint)); 
> 
> } 
> 
> # END IRSTATS 
> 
> ( in case anyone gets stuck with the same error!!) 
> 
> Thanks 
> 
> Ranju Upadhyay 
> 
> National University of Ireland Maynooth. 
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech [1]
> *** Archive: http://www.eprints.org/tech.php/ [2]
> *** EPrints community wiki: http://wiki.eprints.org/ [3]
> *** EPrints developers Forum: http://forum.eprints.org/ [4]

 

Links:
------
[1] http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
[2] http://www.eprints.org/tech.php/
[3] http://wiki.eprints.org/
[4] http://forum.eprints.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20131125/2df9e720/attachment.html 


More information about the Eprints-tech mailing list