EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #02680
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: plugin_alias_map restrictions?
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: plugin_alias_map restrictions?
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- Date: Fri, 28 Feb 2014 11:22:54 +0000
OK right I think I had read your post a bit too quickly Andrew, sorry!Not sure which version of EPrints you're using - on 3.3.12, Screen::EPrint::render_title is driven mostly by:
my $title = $self->{processor}->{eprint}->render_citation( "screen" );So why don't you just over-ride the "screen" citation and add the item type there?
Seb. On 28/02/14 11:16, Alan.Stiles wrote:
Hi Seb, So, in an attempt to understand the workings of this, trying to replace the render_title in the Screen::EPrint object by defining a local 'Screen::LocalEprint' package containing a render_title method doesn't work, because the Edit screen is essentially already defined as a child of the original EPrint definition before the alias mapping takes effect? So you need to replace/create the method in the specific class that is being instantiated? (I've probably just mashed up some OO terminology quite badly there!) Alan -----Original Message----- From: Sebastien Francois [mailto:sf2@ecs.soton.ac.uk] Sent: 28 February 2014 10:56 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Re: plugin_alias_map restrictions? Should look something like: e.g. in archives/<id>/cfg/plugins/EPrints/Plugin/Screen/EPrint/LocalEdit.pm #code-start package EPrints::Plugin::Screen::EPrint::LocalEdit; @ISA = ( 'EPrints::Plugin::Screen::EPrint::Edit' ); use strict; sub render_title { # whatever you need to do } 1; #code-end in the conf (e.g. archives/<id>/cfg/cfg.d/plugins.pl): $c->{plugin_alias_map}->{"Screen::EPrint::Edit"} = "Screen::EPrint::LocalEdit"; $c->{plugin_alias_map}->{"Screen::EPrint::LocalEdit"} = undef; Then when EPrints calls Screen::EPrint::Edit, it will call your LocalEdit plug-in instead, in a transparent manner. Seb. On 28/02/14 10:47, Andrew Beeken wrote:Hello! I’ve been working with archive localised plugins but have come up against one that’s giving me grief. I’m trying to extend Screen::EPrint with the intent of overriding the render_title function, adding the Eprint type to the output. I’ve gone through the motions of creating a new child plugin with all the correct dependencies, adding the alias map line into plugins.pl, however EPrints does not seem to be inheriting this plugin at all. Are there limitations on what can be changed this way? Andrew The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research. The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies. Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions. The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://www.lincoln.ac.uk/legal. *** 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/*** 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/ -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). *** 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/
- References:
- [EP-tech] plugin_alias_map restrictions?
- From: Andrew Beeken <anbeeken@lincoln.ac.uk>
- [EP-tech] Re: plugin_alias_map restrictions?
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: plugin_alias_map restrictions?
- From: "Alan.Stiles" <Alan.Stiles@open.ac.uk>
- [EP-tech] plugin_alias_map restrictions?
- Prev by Date: [EP-tech] Re: plugin_alias_map restrictions?
- Next by Date: [EP-tech] Re: plugin_alias_map restrictions?
- Previous by thread: [EP-tech] Re: plugin_alias_map restrictions?
- Next by thread: [EP-tech] Re: plugin_alias_map restrictions?
- Index(es):