EPrints Technical Mailing List Archive

Message: #03763


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

[EP-tech] Re: Local plugin


I’ve restarted Apache – the test says “Everything seems OK.”

 

I’ve copied the process I’ve used on other things which are working as expected…

 

Lizz

 

--

Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)

Technical Data Officer

The Library 4.10, University of Bath, Bath, BA2 7AY UK

Ext. 3570 (External 01225 383570)

E.Jennings@bath.ac.uk

Research Data Management: http://www.bath.ac.uk/research/data

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter
Sent: 12 January 2015 10:06
To: 'eprints-tech@ecs.soton.ac.uk'
Subject: [EP-tech] Re: Local plugin

 

That all looks sane to me…

If you do a:

~/bin/epadmin test

does it return any errors (if you have multiple archives, you can add the ARCHIVEID at the end of that command to test just that one)?

 

And I’m guessing you’ve restarted Apache (or done a ~/bin/epadmin reload ARCHIVEID)?

 

Cheers,

John

 

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Lizz Jennings
Sent: 11 January 2015 10:31
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Local plugin

 

​I'm trying to make a small change to the UploadMethod.pm file from:

/perl_lib/EPrints/Plugin/Screen/EPrint

 

I've copied it to:

/usr/share/eprints/archives/[name]/cfg/plugins/EPrints/Plugin/Screen/EPrint

 

and renamed it to UBUploadMethod.pm

 

I'm (at first) just adding a little logging script:

open(LIZZLOG, ">>/usr/share/eprints/archives/[name]/lizz.log") || die "Cannot open file: $!";

print LIZZLOG "UBUploadMethod filename: $filename \n";

close(LIZZLOG);


I've used this in numerous places to work out what's in a particular variable, and when I tried it in the perl_lib it did exactly what I needed, but obviously once I've worked out what's where, I'll want to be able to change it so I need the local file to actually register.

 

I've renamed the package to:

EPrints::Plugin::Screen::EPrint::UBUploadMethod

 

and I've added the alias to the plugins.pl cfg file:

 

$c->{plugin_alias_map}->{"Screen::EPrint::UploadMethod"} = "Screen::EPrint::UBUploadMethod";

$c->{plugin_alias_map}->{"Screen::EPrint::UBUploadMethod"} = undef;

 

​Lizz

 

--

Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)

Technical Data Officer

The Library 4.10, University of Bath, Bath, BA2 7AY UK

Ext. 3570 (External 01225 383570)

Research Data Management: http://www.bath.ac.uk/research/data

 

 


From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Adam Field <af05v@ecs.soton.ac.uk>
Sent: 09 January 2015 19:40
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Local plugin

 

Hi

 

Could you post a little more detail, please.  What code are you putting in which files in which directories?

 

--

Adam

Business Relationship Manager and Community Lead
EPrints Services

 

On 9 Jan 2015, at 18:56, Lizz Jennings <e.jennings@bath.ac.uk> wrote:

 

Hi,

 

I'm trying to get a local version of a perl_lib file to change some behaviour - I can't seem to get it to register - I'm only trying to write to a log file at the moment to see what it's doing, and I temporarily put it in the perl_lib file where it works, but obviously I want to be able to make local changes.

 

I've given it a local package name and added it to the config and restarted apache and it resolutely refuses to recognise it.  What am I missing?

 

Lizz

 

--

Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)

Technical Data Officer

The Library 4.10, University of Bath, Bath, BA2 7AY UK

Ext. 3570 (External 01225 383570)

Research Data Management: http://www.bath.ac.uk/research/data

 

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/