Difference between revisions of "RequestEprint"

From EPrints Documentation
Jump to: navigation, search
m
m (Reverted edit of OxbLlr, changed back to last version by WikiSysop)
Line 1: Line 1:
[http://gekijuls.110mb.com/michael-vieth/ michael vieth video] [http://sneezingpops.110mb.com/on-line/ on line journalism] [http://slavkamolot.110mb.com/library/www-shakespear/ www shakespear] [http://unremig.110mb.com/ricciardi-franco/ ricciardi franco] [http://yeeden.110mb.com/data/motivatori/ motivatori] [http://trene-von-anty.110mb.com/description/adattatore-usb.htm adattatore usb 2 0] [http://forever-your.110mb.com/data/pedron-nuda.htm pedron nuda] [http://stitchesnglue.110mb.com/ravvedimento-operoso.htm ravvedimento operoso] [http://ultra-creator.110mb.com/articles/sala-convegno.htm sala convegno] [http://forever-your.110mb.com/data/asus-pgd.htm asus p5gd1 pro bundle] [http://slavkamolot.110mb.com/library/musei-archeologici/ musei archeologici] [http://unremig.110mb.com/anna-e/ anna e luca] [http://sneezingpops.110mb.com/carmaghedon/ carmaghedon] [http://dialed.110mb.com/small/hard-disk/ hard disk interno 250] [http://sneezingpops.110mb.com/help-me/ help me] [http://sister-sunshine.110mb.com/html/eugenia-grandet/ eugenia grandet] [http://funk-mastah-ion.110mb.com/data/sha-ross.htm sha ross] [http://sister-sunshine.110mb.com/html/nelly-feat/ nelly feat kelly rowland] [http://slavkamolot.110mb.com/library/toner-lexmark/ toner lexmark e321 12a7400] [http://trouble166.110mb.com/sales-training.htm sales training] [http://some-omeelse.110mb.com/data/reflex-digitali.htm reflex digitali konica] [http://lazythoughts.110mb.com/lib/musica-scaricabile/ musica scaricabile] [http://trouble166.110mb.com/saeco-comfort.htm saeco comfort] [http://some-omeelse.110mb.com/data/lan-yu.htm lan yu] [http://trouble166.110mb.com/dieci-secondi.htm dieci secondi per fuggire] [http://mouse-zae.110mb.com/scheda-grafica.htm scheda grafica] [http://yeeden.110mb.com/data/officina-zoe/ officina zoe testi] [http://stitchesnglue.110mb.com/pannello-giardino.htm pannello giardino] [http://slavkamolot.110mb.com/library/bmw-/ bmw 320 d touring] [http://trene-von-anty.110mb.com/description/pro-evolution.htm pro evolution soccer 4 modificato ps2] [http://gekijuls.110mb.com/estrazione-dna/ estrazione dna] [http://forever-your.110mb.com/data/cartoni-animati.htm cartoni animati musica sigla] [http://yeeden.110mb.com/data/teenage-dirtbag/ teenage dirtbag wheatus] [http://ultra-creator.110mb.com/articles/termoretraibile.htm termoretraibile] [http://mouse-zae.110mb.com/ie-.htm ie 6 0 scarica] [http://slavkamolot.110mb.com/library/www-prima/ www prima categoria calcio] [http://nationavce.110mb.com/view/i-patrizi.htm i patrizi] [http://slavkamolot.110mb.com/library/gabriele-paolini/ gabriele paolini] [http://gekijuls.110mb.com/email-gratuita/ email gratuita] [http://trouble166.110mb.com/panasonic-macchine.htm panasonic macchine fotografiche digitali] [http://dialed.110mb.com/small/pickup-chitarra/ pickup chitarra] [http://unremig.110mb.com/canon-laser/ canon laser lbp5200] [http://funk-mastah-ion.110mb.com/data/film-la.htm film la famiglia adams] [http://nationavce.110mb.com/view/tubi-gomma.htm tubi gomma temperatura] [http://blue-olusha.110mb.com/library/un-certo/ un certo giorno] [http://unremig.110mb.com/hub-usb/ hub usb da 1 1 a 2 0] [http://mouse-zae.110mb.com/cp.htm cp] [http://mouse-zae.110mb.com/arredo-giardino.htm arredo giardino mobili] [http://forever-your.110mb.com/data/saeco-magic.htm saeco magic espresso] [http://lazythoughts.110mb.com/lib/trovare-donne/ trovare donne disponibile] [http://blue-olusha.110mb.com/library/tiziano-ferro/ tiziano ferro free] [http://dialed.110mb.com/small/culture-beat/ culture beat] [http://sneezingpops.110mb.com/poeta-e/ poeta e contadino] [http://sister-sunshine.110mb.com/html/la-coq/ la coq sportif] [http://yeeden.110mb.com/data/depilatori-satinelle/ depilatori satinelle] [http://forever-your.110mb.com/data/antony-candy.htm antony candy] [http://funk-mastah-ion.110mb.com/data/nortek-webcam.htm nortek webcam 100  digitale usb] [http://dialed.110mb.com/small/comand-tiburon/ comand tiburon] [http://lazythoughts.110mb.com/lib/monica-roccaforte/ monica roccaforte nuda] [http://olikka.110mb.com/library/finepix-s.htm finepix s 7000] [http://blue-olusha.110mb.com/library/dee-jay/ dee jay tv] [http://slavkamolot.110mb.com/library/bull-durham/ bull durham] [http://sister-sunshine.110mb.com/html/piratage-code/ piratage code tps] [http://funk-mastah-ion.110mb.com/data/kledy.htm kledy] [http://unremig.110mb.com/irene-nonis/ irene nonis] [http://unremig.110mb.com/ultraiso/ ultraiso] [http://nationavce.110mb.com/view/marilyn-manson.htm marilyn manson canta per cold fear] [http://lazythoughts.110mb.com/lib/midi-elisa/ midi elisa electricity] [http://trene-von-anty.110mb.com/description/www-livos.htm www livos it] [http://some-omeelse.110mb.com/data/sito-di.htm sito di victoria silvested] [http://olikka.110mb.com/library/la-canzone.htm la canzone del deserto] [http://sister-sunshine.110mb.com/html/miriam-hopkins/ miriam hopkins] [http://forever-your.110mb.com/data/sindacato-del.htm sindacato del porto] [http://trouble166.110mb.com/incoronata-lodi.htm incoronata lodi] [http://slavkamolot.110mb.com/library/no-pressure/ no pressure over cappuccino] [http://funk-mastah-ion.110mb.com/data/eamon-video.htm eamon video] [http://some-omeelse.110mb.com/data/get-down.htm get down dei backstreet boys] [http://unremig.110mb.com/offerta-lavoro/ offerta lavoro europa] [http://nationavce.110mb.com/view/lesbian-games.htm lesbian games online] [http://lazythoughts.110mb.com/lib/provincia-di/ provincia di pescara] [http://unremig.110mb.com/monaco-baviera/ monaco baviera albergo] [http://yeeden.110mb.com/data/hitoria-del/ hitoria del derecho mexicano] [http://sneezingpops.110mb.com/violette-imperiali/ violette imperiali] [http://forever-your.110mb.com/data/il-demone.htm il demone sotto la pelle] [http://yeeden.110mb.com/data/www-nero/ www nero express 6 it] [http://trouble166.110mb.com/fz.htm fz5] [http://sneezingpops.110mb.com/racconti-immorali/ racconti immorali] [http://sneezingpops.110mb.com/www-gandalf/ www gandalf it] [http://olikka.110mb.com/library/offerta-regali.htm offerta regali lecce] [http://forever-your.110mb.com/data/sweet-simphony.htm sweet simphony] [http://mouse-zae.110mb.com/orologi-crono.htm orologi crono] [http://yeeden.110mb.com/data/peliculas-cantinflas/ peliculas cantinflas] [http://sneezingpops.110mb.com/bakelite/ bakelite] [http://unremig.110mb.com/scanner-konica/ scanner konica minolta] [http://mouse-zae.110mb.com/ml-.htm ml 320 cdi] [http://dialed.110mb.com/small/homa/ homa] [http://slavkamolot.110mb.com/library/hotel-candia/ hotel candia] [http://stitchesnglue.110mb.com/idesata-converter.htm idesata converter] [http://nationavce.110mb.com/view/foto-annunci.htm foto annunci uomini] [http://lazythoughts.110mb.com/lib/carpenterie-metalliche/ carpenterie metalliche] [http://sneezingpops.110mb.com/videogioco-erotici/ videogioco erotici] [http://ultra-creator.110mb.com/articles/i-grandi.htm i grandi nemici di roma antica] [http://slavkamolot.110mb.com/library/tvbs/ tvbs] [http://sister-sunshine.110mb.com/html/monitor-lcd/ monitor lcd 8 pollici] [http://nationavce.110mb.com/view/raniero-panzieri.htm raniero panzieri libri] [http://stitchesnglue.110mb.com/fuori-di.htm fuori di testa] [http://forever-your.110mb.com/data/panasonic-sc.htm panasonic sc dt310] [http://slavkamolot.110mb.com/library/www-regione/ www regione vda it] [http://mouse-zae.110mb.com/ona-on.htm ona on] [http://some-omeelse.110mb.com/data/software-linux.htm software linux suse 9 3] [http://slavkamolot.110mb.com/library/quanti-amori/ quanti amori midi gigi d alessio] [http://sneezingpops.110mb.com/isola-di/ isola di capo verde] [http://olikka.110mb.com/library/nissan-terrano.htm nissan terrano usato] [http://trene-von-anty.110mb.com/description/montagne-verdi.htm montagne verdi marcella bella] [http://mouse-zae.110mb.com/english-google.htm english google] [http://unremig.110mb.com/ventola-intel/ ventola intel] [http://gekijuls.110mb.com/saldatori-in/ saldatori in alluminio] [http://dialed.110mb.com/small/porfiria-it/ porfiria it] [http://trouble166.110mb.com/sunerie-per.htm sunerie per nokia 3410] [http://dialed.110mb.com/small/programma-per/ programma per scaricare film] [http://sister-sunshine.110mb.com/html/usb-/ usb  com] [http://stitchesnglue.110mb.com/lg-.htm lg 17 pollici lcd] [http://yeeden.110mb.com/data/caccia-alluomo/ caccia alluomo] [http://olikka.110mb.com/library/desiderativo.htm desiderativo] [http://funk-mastah-ion.110mb.com/data/relisys-tl.htm relisys tl766] [http://some-omeelse.110mb.com/data/robot-pulizia.htm robot pulizia] [http://blue-olusha.110mb.com/library/pc-notebook/ pc notebook compaq presario] [http://ultra-creator.110mb.com/articles/decoder-mpg.htm decoder mpg2] [http://gekijuls.110mb.com/ptty/ ptty] [http://sneezingpops.110mb.com/dvd-best/ dvd best] [http://olikka.110mb.com/library/www-pscheats.htm www ps2cheats com] [http://funk-mastah-ion.110mb.com/data/hotel-villa.htm hotel villa claudia augusta] [http://stitchesnglue.110mb.com/moda-elegante.htm moda elegante] [http://sneezingpops.110mb.com/pelu/ pelu] [http://book-wench.110mb.com/text/fissura/ fissura] [http://funk-mastah-ion.110mb.com/data/brasile-calcio.htm brasile calcio] [http://trene-von-anty.110mb.com/description/ironici.htm ironici] [http://ultra-creator.110mb.com/articles/dolori-basso.htm dolori basso ventre] [http://yeeden.110mb.com/data/cerca-te/ cerca te] [http://forever-your.110mb.com/data/hard-disk.htm hard disk maxtor 160gb] [http://gekijuls.110mb.com/canon-ef/ canon ef 400] [http://olikka.110mb.com/library/carrello-frutta.htm carrello frutta] [http://gekijuls.110mb.com/xena/ xena] [http://slavkamolot.110mb.com/library/www-m/ www m jackson com] [http://sister-sunshine.110mb.com/html/www-h/ www h l x com] [http://trouble166.110mb.com/unnao.htm unnao] [http://dialed.110mb.com/small/pst/ pst] [http://sister-sunshine.110mb.com/html/toshiba-l/ toshiba l10] [http://yeeden.110mb.com/data/the-blu/ the blu it] [http://forever-your.110mb.com/data/la-tierna.htm la tierna] [http://blue-olusha.110mb.com/library/giochi-con/ giochi con treni ] [http://trene-von-anty.110mb.com/description/brahms.htm brahms] [http://book-wench.110mb.com/text/www-somalinet/ www somalinet com] [http://unremig.110mb.com/quinny-freestyle/ quinny freestyle 3xl] [http://stitchesnglue.110mb.com/terme-di.htm terme di tivoli] [http://sister-sunshine.110mb.com/html/sa-sigla/ sa (sigla automobilistica)] [http://ultra-creator.110mb.com/articles/ceca-gore.htm ceca gore od ljubavi] [http://trene-von-anty.110mb.com/description/nascita-di.htm nascita di una nazione] [http://blue-olusha.110mb.com/library/la-mascotte/ la mascotte] [http://stitchesnglue.110mb.com/nuova-alfa.htm nuova alfa 147 2 serie] [http://blue-olusha.110mb.com/library/accessori-eten/ accessori eten p300] [http://trene-von-anty.110mb.com/description/climatizatori-lg.htm climatizatori lg] [http://yeeden.110mb.com/data/treni-per/ treni per zurigo] [http://trene-von-anty.110mb.com/description/rex-cucine.htm rex cucine] [http://yeeden.110mb.com/data/rathke-martin/ rathke martin heinrich] [http://trene-von-anty.110mb.com/description/tv-box.htm tv box] [http://book-wench.110mb.com/text/cinesi-troie/ cinesi troie] [http://gekijuls.110mb.com/sordi-e/ sordi e va e va] [http://blue-olusha.110mb.com/library/profumi-d/ profumi d oriente] [http://sister-sunshine.110mb.com/html/san-giorgio/ san giorgio asciugabiancheria] [http://lazythoughts.110mb.com/lib/delta-goodrem/ delta goodrem i don t care] [http://unremig.110mb.com/gps-garmin/ gps garmin 12] [http://sneezingpops.110mb.com/we-will/ we will we will rock you] [http://ultra-creator.110mb.com/articles/cover-all.htm cover all] [http://lazythoughts.110mb.com/lib/immigrazione-degli/ immigrazione degli italiani in america] [http://ultra-creator.110mb.com/articles/sigma.htm sigma 15  30] [http://ultra-creator.110mb.com/articles/obiettivo-macro.htm obiettivo macro nikon] [http://some-omeelse.110mb.com/data/disegni-pittura.htm disegni pittura su vetro] [http://unremig.110mb.com/lexmark-esacromia/ lexmark esacromia] [http://mouse-zae.110mb.com/costantino-vitagliano.htm costantino vitagliano telefono] [http://nationavce.110mb.com/view/huge-tit.htm huge tit] [http://unremig.110mb.com/yu-gi/ yu gi oh world] [http://book-wench.110mb.com/text/scaffale-industriali/ scaffale industriali] [http://lazythoughts.110mb.com/lib/viva-la/ viva la tristezza] [http://sister-sunshine.110mb.com/html/remi-vol/ remi vol 02] [http://slavkamolot.110mb.com/library/gang-bang/ gang bang coppia] [http://dialed.110mb.com/small/the-o/ the o c it] [http://blue-olusha.110mb.com/library/joe-buddens/ joe buddens] [http://nationavce.110mb.com/view/dance.htm dance 2003 04] [http://dialed.110mb.com/small/etica/ etica] [http://lazythoughts.110mb.com/lib/i-mate/ i mate 2020i] [http://stitchesnglue.110mb.com/senato.htm senato] [http://funk-mastah-ion.110mb.com/data/villaggio-in.htm villaggio in croazia] [http://nationavce.110mb.com/view/crack-tv.htm crack tv] [http://yeeden.110mb.com/data/coppia-taranto/ coppia taranto] [http://forever-your.110mb.com/data/nintendo-ds.htm nintendo ds silver solus] [http://funk-mastah-ion.110mb.com/data/cure-per.htm cure per la colite] [http://unremig.110mb.com/the-animal/ the animal song] [http://yeeden.110mb.com/data/digable-planets/ digable planets clinic] [http://some-omeelse.110mb.com/data/www-sat.htm www sat] == The Story ==
+
== The Story ==
  
 
A new feature built into EPrints software could dramatically increase the rate of growth of open access (OA) content deposited in institutional repositories while, perversely it seems, allowing authors to opt out of providing OA. It's extremely simple, and if implemented carefully by the repository can produce immediate results without additional cost or resource implications.
 
A new feature built into EPrints software could dramatically increase the rate of growth of open access (OA) content deposited in institutional repositories while, perversely it seems, allowing authors to opt out of providing OA. It's extremely simple, and if implemented carefully by the repository can produce immediate results without additional cost or resource implications.
Line 41: Line 41:
 
     <ep:phrase ref="eprint_fieldname_contact_email">Contact EMail</ep:phrase>
 
     <ep:phrase ref="eprint_fieldname_contact_email">Contact EMail</ep:phrase>
 
     <ep:phrase ref="eprint_fieldhelp_contact_email">Please enter your email address
 
     <ep:phrase ref="eprint_fieldhelp_contact_email">Please enter your email address
 +
      &lt;br /&gt;Example: &lt;span class="example"&gt;e.prints@soton.ac.uk&lt;/span&gt;
 +
    </ep:phrase>
 +
 +
=== Determine recipient of requests ===
 +
 +
Add an extra method to <tt>/opt/eprints2/archives/ARCHIVEID/cfg/ArchiveConfig.pm</tt>:
 +
 +
sub email_for_doc_request {
 +
        my ( $session, $eprint ) = @_;
 +
        # To turn off this feature, uncomment the line below
 +
        #return undef;
 +
        if( $eprint->is_set("contact_email") )
 +
        {
 +
                return $eprint->get_value("contact_email");
 +
        }
 +
        my $user = $eprint->get_user;
 +
        if( $user->is_set("email") )
 +
        {
 +
                return $user->get_value("email");
 +
        }
 +
        return $session->get_repository->get_conf("adminemail");
 +
}
 +
 +
This is how EPrints will determine who to send the request to. The method first checks the contact email field. If this is not set then it looks for the email address of the depositing user. Finally, it falls back to the archive administrator's email.
 +
 +
If you are using the "id" part of the the creators field for email addresses then you could also check there:
 +
 +
if( $eprint->is_set( "creators" ) )
 +
{
 +
        for( @{ $eprint->get_value( "creators" ) } )
 +
        {
 +
                return $_->{id} if $_->{id} ne "";
 +
        }
 +
}
 +
 +
'''Think carefully about how you configure this method'''
 +
 +
During trials on the [http://eprints.soton.ac.uk/ University of Southampton Research Repository], this feature generated up to 50 requests '''per day'''. You probably don't want all of these requests to end up in the archive administrators inbox!
 +
 +
=== Install MIME::Lite ===
 +
 +
The MIME::Lite module is used by the request document scripts for sending email with attachments.
 +
 +
root> perl -MCPAN -e 'install MIME::Lite'
 +
 +
=== Install scripts and phrases ===
 +
 +
http://files.eprints.org/10/
 +
 +
cp request_doc /opt/eprints2/cgi/
 +
cp respond_doc /opt/eprints2/cgi/users/
 +
 +
Insert the phrases into <tt>/opt/eprints2/archives/ARCHIVEID/cfg/phrases-en.xml</tt>
 +
 +
=== Add button rendering ===
 +
 +
Add the Request eprint button rendering to the <tt>eprint_render</tt> method in <tt>/opt/eprints2/archives/ARCHIVEID/ArchiveRenderConfig.pm</tt>:
 +
 +
        # Request eprint
 +
        if( $eprint->is_set( "full_text_status" ) )
 +
        {
 +
                my $status = $eprint->get_value( "full_text_status" );
 +
                if( $status ne "public" )
 +
                {
 +
                        if( $session->get_archive->can_call( "email_for_doc_request" ) )
 +
                        {
 +
                                if( defined( $session->get_archive->call( "email_for_doc_request", $session, $eprint ) ) )
 +
                                {
 +
                                        # only render if there is a contact email address
 +
                                        my $form = $session->render_form( "post", $session->get_archive->get_conf( "perl_url" ) . "/request_doc" );
 +
                                        $form->appendChild( $session->render_hidden_field( "eprintid", $eprint->get_id ) );
 +
                                        $form->appendChild( $session->render_action_buttons(
 +
                                                "submit" => $session->phrase( "request:button" )
 +
                                        ) );
 +
                                        $page->appendChild( $form );
 +
                                }
 +
                        }
 +
                }
 +
        }
 +
 +
Note: the can_call function in <tt>/opt/eprints2/perl_lib/EPrints/Archive.pm</tt> was only introduced in ePrints 2.3.13 those using older versions of ePrints can simply download the newer ePrints, find the function can_call in the <tt>Archive.pm</tt> and copy it into their own Archive.pm or you could of course upgrade.
 +
 +
Restart apache and run <tt>generate_abstracts</tt> to make the button appear on existing abstract pages.
 +
 +
'''The button will only be rendered if the item is not Open Acess AND a contact email can be determined'''

Revision as of 11:08, 28 August 2007

The Story

A new feature built into EPrints software could dramatically increase the rate of growth of open access (OA) content deposited in institutional repositories while, perversely it seems, allowing authors to opt out of providing OA. It's extremely simple, and if implemented carefully by the repository can produce immediate results without additional cost or resource implications.

http://www.eprints.org/news/features/request_button.php

Overview

This feature displays a "Request eprint" button on the abstract page of records with:

a) one or more restricted documents b) no documents

By clicking the button, users can submit their email address to EPrints. This generates an email to the author (or other recipient determined by EPrints - see below) requesting the restricted/missing items.

In the case of restricted documents, the email will contain 2 links:

  • Accept request (and optionally make the record Open Access from now on) - EPrints will email the documents to the requester
  • Reject request - EPrints will email the requester a rejection notice (the content of which can be edited)

At no point is the email address of the author (or other recipient) exposed without their consent.

Adding Request Eprint to your repository (2.3.13)

This feature will be part of the next release of EPrints. In the meantime, add the feature to existing releases by following these steps:

"Contact Email" field (optional)

To enable depositors to enter a contact email address directly.

Add an extra field to the eprint dataset in /opt/eprints2/archives/ARCHIVEID/cfg/ArchiveMetadataFieldsConfig.pm:

{ name => "contact_email", type => "email" },

Add a corresponding field to the database - see http://wiki.eprints.org/w/EPrints2/AddingLiveFields

Add the contact_email field to eprint types in /opt/eprints2/archives/ARCHIVEID/cfg/metadata-types.xml.

Add the following to the /opt/eprints2/archives/ARCHIVEID/cfg/phrases-en.xml or similar for whatever languages you support:

   <ep:phrase ref="eprint_fieldname_contact_email">Contact EMail</ep:phrase>
   <ep:phrase ref="eprint_fieldhelp_contact_email">Please enter your email address
     <br />Example: <span class="example">e.prints@soton.ac.uk</span>
   </ep:phrase>

Determine recipient of requests

Add an extra method to /opt/eprints2/archives/ARCHIVEID/cfg/ArchiveConfig.pm:

sub email_for_doc_request {
       my ( $session, $eprint ) = @_;
       # To turn off this feature, uncomment the line below
       #return undef;
       if( $eprint->is_set("contact_email") )
       {
               return $eprint->get_value("contact_email");
       }
       my $user = $eprint->get_user;
       if( $user->is_set("email") )
       {
               return $user->get_value("email");
       }
       return $session->get_repository->get_conf("adminemail");
}

This is how EPrints will determine who to send the request to. The method first checks the contact email field. If this is not set then it looks for the email address of the depositing user. Finally, it falls back to the archive administrator's email.

If you are using the "id" part of the the creators field for email addresses then you could also check there:

if( $eprint->is_set( "creators" ) )
{
       for( @{ $eprint->get_value( "creators" ) } )
       {
               return $_->{id} if $_->{id} ne "";
       }
}

Think carefully about how you configure this method

During trials on the University of Southampton Research Repository, this feature generated up to 50 requests per day. You probably don't want all of these requests to end up in the archive administrators inbox!

Install MIME::Lite

The MIME::Lite module is used by the request document scripts for sending email with attachments.

root> perl -MCPAN -e 'install MIME::Lite'

Install scripts and phrases

http://files.eprints.org/10/

cp request_doc /opt/eprints2/cgi/
cp respond_doc /opt/eprints2/cgi/users/

Insert the phrases into /opt/eprints2/archives/ARCHIVEID/cfg/phrases-en.xml

Add button rendering

Add the Request eprint button rendering to the eprint_render method in /opt/eprints2/archives/ARCHIVEID/ArchiveRenderConfig.pm:

       # Request eprint
       if( $eprint->is_set( "full_text_status" ) )
       {
               my $status = $eprint->get_value( "full_text_status" );
               if( $status ne "public" )
               {
                       if( $session->get_archive->can_call( "email_for_doc_request" ) )
                       {
                               if( defined( $session->get_archive->call( "email_for_doc_request", $session, $eprint ) ) )
                               {
                                       # only render if there is a contact email address
                                       my $form = $session->render_form( "post", $session->get_archive->get_conf( "perl_url" ) . "/request_doc" );
                                       $form->appendChild( $session->render_hidden_field( "eprintid", $eprint->get_id ) );
                                       $form->appendChild( $session->render_action_buttons(
                                               "submit" => $session->phrase( "request:button" )
                                       ) );
                                       $page->appendChild( $form );
                               }
                       }
               }
       }

Note: the can_call function in /opt/eprints2/perl_lib/EPrints/Archive.pm was only introduced in ePrints 2.3.13 those using older versions of ePrints can simply download the newer ePrints, find the function can_call in the Archive.pm and copy it into their own Archive.pm or you could of course upgrade.

Restart apache and run generate_abstracts to make the button appear on existing abstract pages.

The button will only be rendered if the item is not Open Acess AND a contact email can be determined