EPrints Technical Mailing List Archive

Message: #00351


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

[EP-tech] Re: Altering DajaObj/Eprint.pm behaviour without altering core code


IRStats caches lots of stuff, so clear your cache also (archives/[id]/var/irstats/[cache|graphs]/*)

On 04/04/12 15:56, Ian Stuart wrote:
Hmmmm does not appear to be playing:

in ~/archives/[ID]/cfg/cfg.d/irstats.pl I added
   # My replacement chartdirector_render (see end of file)
   *IRStats::Visualisation::Graph::Line::chartdirector_render =
\&my_chartdirector_render;

... and then

sub my_chartdirector_render
{
.... exactly the same routine, but without the title element
}

Not playing ball
(yes: saved both files, and restarted apache)


On 04/04/12 15:37, Ian Stuart wrote:
Then again, why not ~/archives/[ID]/cfg/cfg.d/...

?

On 04/04/12 15:40, Sebastien Francois wrote:
Good! Yes I'd add a file in cfg.d/ as you suggested. However be aware
that other repositories set up there (ie. archives/[id1],
archives/[id2]...) will inherit the change!

Seb.

On 04/04/12 15:33, John Salter wrote:
Thanks Seb, works like a dream!

Do you have any 'good practice' advice on how to do this within an archive?
I already have ~/archives/[ID]/cfg/plugins/... for over-riding plugins.
Would your advice be to add something within there, or to add something like cfg.d/core_overrides.pl?

Cheers,
John

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Sebastien Francois
Sent: 04 April 2012 12:29
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Altering DajaObj/Eprint.pm behaviour without altering core code

What about:

*EPrints::DataObj::EPrint::render_fileinfo = \&my_render_fileinfo;

sub my_render_fileinfo
{
# your code ...
}

Seb.