<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=342382415-14112012><FONT color=#0000ff 
size=2 face=Arial>Are there any examples of this anywhere?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=342382415-14112012><FONT color=#0000ff 
size=2 face=Arial>
<DIV dir=ltr align=left><SPAN class=342382415-14112012><FONT color=#0000ff 
size=2 face=Arial>(Graham, </FONT></SPAN><SPAN class=342382415-14112012><FONT 
color=#0000ff size=2 face=Arial>is this used in the newer Symplectic 
connector?)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=342382415-14112012></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN 
class=342382415-14112012>Cheers,<BR>John</SPAN></DIV></FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> eprints-tech-bounces@ecs.soton.ac.uk 
[mailto:eprints-tech-bounces@ecs.soton.ac.uk] <B>On Behalf Of </B>Graham 
Triggs<BR><B>Sent:</B> 14 November 2012 15:19<BR><B>To:</B> 
eprints-tech@ecs.soton.ac.uk<BR><B>Subject:</B> [EP-tech] Re: Adding a custom 
PerlResponseHandler<BR></FONT><BR></DIV>
<DIV></DIV>Hi,
<DIV><BR></DIV>
<DIV>Using EPrints 3.3, you can hang the code off of an EP_TRIGGER_URL_REWRITE 
trigger (in the config for a specific archive). This also has the advantage that 
you aren't modifying the EPrints code.</DIV>
<DIV><BR></DIV>
<DIV>Otherwise, just test for an archive specific value in the Rewrite script, 
for example, a config parameter that is only set in one archive.</DIV>
<DIV><BR></DIV>
<DIV>G</DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On 14 November 2012 14:21, John Salter <SPAN 
dir=ltr>&lt;<A href="mailto:J.Salter@leeds.ac.uk" 
target=_blank>J.Salter@leeds.ac.uk</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote>Hi,<BR>I'm trying to work out the best way to add a custom 
  handler for a URL to a specific archive within eprints.<BR><BR>I can either 
  set something like this in the vhost (and add '/foo/' to 
  $c-&gt;{rewrite_exceptions} ):<BR>&lt;Location "/foo/handler"&gt;<BR>&nbsp; 
  &nbsp; SetHandler perl-script<BR>&nbsp; &nbsp; PerlResponseHandler 
  Foo::FooHandler<BR>&lt;/Location&gt;<BR><BR>&nbsp;- OR -<BR>I could edit 
  ~/perl_lib/EPrints/Apache/Rewrite.pm, adding something like:<BR>if ( $uri =~ 
  m! ^$urlpath/foo !x )<BR>{<BR>&nbsp; $r-&gt;handler( 'perl-script' 
  );<BR>&nbsp; $r-&gt;set_handlers( PerlResponseHandler =&gt; [ 
  'Foo::FooHandler' ] );<BR>&nbsp; return OK;<BR>}<BR><BR>BUT I wouldn't 
  /really/ want to do that, as it would affect all archives, not just the one I 
  want it to.<BR><BR>So, what is the *most* sensible way to do this, making it 
  apply to only one archive? Am I missing some magic that will help 
  me?<BR><BR>Cheers,<BR>John<BR><BR>*** Options: <A 
  href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" 
  target=_blank>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</A><BR>*** 
  Archive: <A href="http://www.eprints.org/tech.php/" 
  target=_blank>http://www.eprints.org/tech.php/</A><BR>*** EPrints community 
  wiki: <A href="http://wiki.eprints.org/" 
  target=_blank>http://wiki.eprints.org/</A><BR></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>