EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09800


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

RE: [EP-tech] Override 3.4.5 Import plugin


CAUTION: This e-mail originated outside the University of Southampton.

Hi Alan,
Do plugins in 3.4 work the same as 3.3?

From: https://github.com/eprints/eprints3.4/blob/v3.4.5/flavours/pub_lib/cfg.d/plugins.pl#L46-L54 it looks like they do.


If so, would creating your custom plugin as Import::LocalDOI and then aliasing it in plugins.pl:

$c->{plugin_alias_map}->{"Import::DOI"} = "Import::LocalDOI";

$c->{plugin_alias_map}->{"Import::LocalDOI"} = undef; # hide this so only the above shows in the import list

 

might do the trick?

 

Cheers,

John

 

From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Alan.Stiles [He/Him/They]
Sent: Thursday, July 25, 2024 4:22 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Override 3.4.5 Import plugin

 

CAUTION: External Message. Use caution opening links and attachments.

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hi,

I’m trying to override the way /opt/eprints/flavours/pub_lib/plugins/EPrints/Plugin/Import/DOI.pm checks for duplicates so it includes the review buffer.

 

Obviously, if I update that file it will work fine, but it also means I’ve changed the core code, which is not good.

 

I’ve attempted to override it in /opt/eprints/archive/{ARCHIVE_ID]/cfg/plugins/EPrints/Plugin/Import/DOI.pm with and without replacing the function pointers e.g.

 

package EPrints::Plugin::Import::DOI;

undef &EPrints::Plugin::Import::DOI::input_text_fh;

*EPrints::Plugin::Import::DOI::input_text_fh = \&local_input_text_fh;

 

and it just doesn’t seem to pick up my code changes.

 

Please tell me the obvious thing I’m overlooking!

 

Alan