Difference between revisions of "RequestEprint"

From EPrints Documentation
Jump to: navigation, search
m
Line 1: Line 1:
[http://behaverf.125mb.com/view/new/a-very/ a very special concert - chick corea, stanley clarke, joe henderson, lenny white] [http://redobsession.freehostia.com/web/chiusura-collana.htm chiusura collana] [http://ginger-tea.freehostia.com/topic/occhiaie-rimedi/ occhiaie rimedi] [http://oooohhnnnooooo.freehostia.com/content/view/la-casa.htm la casa dove abito] [http://behaverf.125mb.com/view/new/letras-de/ letras de regeton] [http://curti2iag.125mb.com/description/lib/sexy-boxing/ sexy boxing] [http://oooohhnnnooooo.freehostia.com/content/view/nuova-bmw.htm nuova bmw 3] [http://ginger-tea.freehostia.com/topic/daimont/ daimont] [http://oooohhnnnooooo.freehostia.com/content/view/nuova-guinea.htm nuova guinea] [http://roaliano.125mb.com/content/view/kharvar.htm kharvar] [http://tomems.125mb.com/html/pitao-sam/ pitao sam prolaznike] [http://roaliano.125mb.com/content/view/adrian-minune.htm adrian minune chef de chef] [http://ginger-tea.freehostia.com/topic/fx-geforce/ fx5500 geforce] [http://behaverf.125mb.com/view/new/talkabout-t/ talkabout t5422] [http://behaverf.125mb.com/view/new/waffle-gold/ waffle gold nike] [http://redobsession.freehostia.com/web/www-lav.htm www lav it] [http://edmei.125mb.com/html/masterizzatori-riscrivibile.htm masterizzatori riscrivibile per] [http://redobsession.freehostia.com/web/divx-italiani.htm divx italiani] [http://edmei.125mb.com/html/video-bizzarri.htm video bizzarri] [http://tomems.125mb.com/html/autostrada-milano/ autostrada milano bergamo] [http://ginger-tea.freehostia.com/topic/decapitazione-berg/ decapitazione berg] [http://curti2iag.125mb.com/description/lib/die-hard/ die hard trappola di cristallo] [http://curti2iag.125mb.com/description/lib/tomtom-go/ tom-tom go 700] [http://tomems.125mb.com/html/una-giornata/ una giornata uggiosa] [http://behaverf.125mb.com/view/new/music-from/ music from o c] [http://tomems.125mb.com/html/gelso/ gelso] [http://oooohhnnnooooo.freehostia.com/content/view/creative-inspire.htm creative inspire 5 1] [http://behaverf.125mb.com/view/new/ai-bambini/ ai bambini] [http://curti2iag.125mb.com/description/lib/samsung-ml/ samsung ml 1250] [http://curti2iag.125mb.com/description/lib/obdorsk/ obdorsk] [http://edmei.125mb.com/html/zara-croazia.htm zara croazia] [http://roaliano.125mb.com/content/view/ozaki-yutaka.htm ozaki yutaka i love you] [http://ginger-tea.freehostia.com/topic/cuffie-tv/ cuffie tv senza fili] [http://tomems.125mb.com/html/il-giardino/ il giardino proibito sandro giacobbe] [http://redobsession.freehostia.com/web/bufere.htm bufere] [http://redobsession.freehostia.com/web/canon-a.htm canon a40 custodia] [http://redobsession.freehostia.com/web/vocabolario-polacco.htm vocabolario polacco italiano] [http://edmei.125mb.com/html/bisbetico.htm bisbetico] [http://curti2iag.125mb.com/description/lib/nokia-/ nokia 6220 cellulari] [http://tomems.125mb.com/html/dido/ dido] [http://redobsession.freehostia.com/web/direstraits.htm direstraits] [http://roaliano.125mb.com/content/view/numero-di.htm numero di telefono] [http://roaliano.125mb.com/content/view/fakit.htm fakit] [http://oooohhnnnooooo.freehostia.com/content/view/contrade.htm contrade] [http://ginger-tea.freehostia.com/topic/cd-ever/ cd 4ever blue] [http://curti2iag.125mb.com/description/lib/green-park/ green park vieste] [http://oooohhnnnooooo.freehostia.com/content/view/bnl-it.htm bnl it] [http://roaliano.125mb.com/content/view/men-nudi.htm men nudi] [http://roaliano.125mb.com/content/view/corsi-toefl.htm corsi toefl] [http://redobsession.freehostia.com/web/donne-tv.htm donne tv] [http://curti2iag.125mb.com/description/lib/panzer-elite/ panzer elite] [http://roaliano.125mb.com/content/view/casoli-reggio.htm casoli reggio emilia] [http://redobsession.freehostia.com/web/stampo-plastica.htm stampo plastica] [http://tomems.125mb.com/html/qtec-telefonia/ qtec telefonia] [http://edmei.125mb.com/html/westring.htm westring] [http://tomems.125mb.com/html/slut/ slut] [http://curti2iag.125mb.com/description/lib/www-planeta/ www planeta com] [http://ginger-tea.freehostia.com/topic/agriturismo-savona/ agriturismo savona] [http://ginger-tea.freehostia.com/topic/laurenzana/ laurenzana] [http://redobsession.freehostia.com/web/voli-economici.htm voli economici spagna] [http://oooohhnnnooooo.freehostia.com/content/view/vivaldi-ugolino.htm vivaldi, ugolino e guido] [http://redobsession.freehostia.com/web/yamaha.htm yamaha 275] [http://ginger-tea.freehostia.com/topic/un-uomo/ un uomo da affittare] [http://redobsession.freehostia.com/web/hp-portatile.htm hp portatile turion] [http://ginger-tea.freehostia.com/topic/spartiti-vasco/ spartiti vasco] [http://curti2iag.125mb.com/description/lib/invio-sms/ invio sms cellulare] [http://edmei.125mb.com/html/allenopithecus.htm allenopithecus] [http://ginger-tea.freehostia.com/topic/sapphire-x/ sapphire x800 xl] [http://curti2iag.125mb.com/description/lib/enervit-/ enervit - aminoacidi e proteine] [http://tomems.125mb.com/html/yamaha-tt/ yamaha tt moto] [http://ginger-tea.freehostia.com/topic/heure/ heure] [http://tomems.125mb.com/html/appunti-ragioneria/ appunti ragioneria] [http://behaverf.125mb.com/view/new/ana-kournikova/ ana kournikova] [http://behaverf.125mb.com/view/new/modello-itinerante/ modello itinerante] [http://redobsession.freehostia.com/web/ricetta-torte.htm ricetta torte] [http://roaliano.125mb.com/content/view/plasma-tv.htm plasma tv hd 1024] [http://oooohhnnnooooo.freehostia.com/content/view/oneri-deducibili.htm oneri deducibili unico 2004] [http://edmei.125mb.com/html/luka-to.htm luka to] [http://roaliano.125mb.com/content/view/regaeton-beats.htm regaeton beats] [http://behaverf.125mb.com/view/new/l-amour/ l amour tojour] [http://roaliano.125mb.com/content/view/volevo-un.htm volevo un gatto nero] [http://redobsession.freehostia.com/web/puzzle-bobble.htm puzzle bobble anche in europa] [http://tomems.125mb.com/html/hp-designjet/ hp designjet 110plus nr] [http://edmei.125mb.com/html/combattimenti.htm combattimenti] [http://roaliano.125mb.com/content/view/decodificatore-dolby.htm decodificatore dolby] [http://oooohhnnnooooo.freehostia.com/content/view/www-fgci.htm www fgci com] [http://redobsession.freehostia.com/web/qtec-s.htm qtec s100] [http://curti2iag.125mb.com/description/lib/mod-dm/ mod dm 68] [http://edmei.125mb.com/html/gara-appalto.htm gara appalto] [http://edmei.125mb.com/html/golf-miniputt.htm golf miniputt] [http://edmei.125mb.com/html/i-gufi.htm i gufi] [http://ginger-tea.freehostia.com/topic/wifi-adsl/ wifi adsl] [http://behaverf.125mb.com/view/new/pioneer-home/ pioneer home theatre dcs 333] [http://ginger-tea.freehostia.com/topic/kuprij/ kuprij] [http://edmei.125mb.com/html/petralona.htm petralona] [http://ginger-tea.freehostia.com/topic/aurora-sul/ aurora sul deserto] [http://behaverf.125mb.com/view/new/cellulare-/ cellulare - palmare] [http://behaverf.125mb.com/view/new/robie-williams/ robie williams radio] [http://behaverf.125mb.com/view/new/ozzano-monferrato/ ozzano monferrato] [http://tomems.125mb.com/html/acer-mp/ acer mp3 reader lettori] [http://redobsession.freehostia.com/web/king-africa.htm king africa] [http://tomems.125mb.com/html/voli-loano/ voli loano] [http://ginger-tea.freehostia.com/topic/yashica-fx/ yashica fx] [http://oooohhnnnooooo.freehostia.com/content/view/calendario-canalis.htm calendario canalis 2002] [http://edmei.125mb.com/html/sandro.htm sandro] [http://tomems.125mb.com/html/giochi-gratis/ giochi gratis da salvare] [http://curti2iag.125mb.com/description/lib/consigli-di/ consigli di un pirla] [http://behaverf.125mb.com/view/new/alberghi-firenze/ alberghi firenze] [http://ginger-tea.freehostia.com/topic/acer-monitor/ acer monitor lcd al1722hs] [http://behaverf.125mb.com/view/new/traduttore-testi/ traduttore testi] [http://tomems.125mb.com/html/bmw-z/ bmw z3 2002 1 9] [http://tomems.125mb.com/html/friends-stagione/ friends. stagione 7] [http://ginger-tea.freehostia.com/topic/sito-bit/ sito bit torrent] [http://ginger-tea.freehostia.com/topic/fumetti-italiani/ fumetti italiani hentai] [http://redobsession.freehostia.com/web/cindy-louper.htm cindy louper] [http://tomems.125mb.com/html/sms-pronto/ sms pronto festa donna] [http://redobsession.freehostia.com/web/uniroma.htm uniroma1] [http://curti2iag.125mb.com/description/lib/giovinezza/ giovinezza] [http://behaverf.125mb.com/view/new/incontro-tortona/ incontro tortona] [http://oooohhnnnooooo.freehostia.com/content/view/cornel-constantiniu.htm cornel constantiniu] [http://edmei.125mb.com/html/la-vergine.htm la vergine nuda] [http://redobsession.freehostia.com/web/bruno-giordano.htm bruno, giordano] [http://tomems.125mb.com/html/ciccioni-gay/ ciccioni gay] [http://ginger-tea.freehostia.com/topic/hp/ hp 1500] [http://tomems.125mb.com/html/sibel-sezal/ sibel sezal] [http://tomems.125mb.com/html/immagini-dalla/ immagini dalla versione xbox di xiii] [http://oooohhnnnooooo.freehostia.com/content/view/donne-che.htm donne che scopano] [http://edmei.125mb.com/html/una-bolognese.htm una bolognese a parigi - gatta in amore] [http://tomems.125mb.com/html/enzo-caradonna/ enzo caradonna] [http://roaliano.125mb.com/content/view/gt-santandrea.htm gt santandrea] [http://roaliano.125mb.com/content/view/nu-quarto.htm nu quarto e luna] [http://roaliano.125mb.com/content/view/digon.htm digon] [http://ginger-tea.freehostia.com/topic/if-tomorrow/ if tomorrow never come ronan keating] [http://behaverf.125mb.com/view/new/quotazione-fondo/ quotazione fondo comune] [http://edmei.125mb.com/html/mama-kin.htm mama kin] [http://oooohhnnnooooo.freehostia.com/content/view/copertine-di.htm copertine di playboy] [http://edmei.125mb.com/html/chat-web.htm chat web live] [http://edmei.125mb.com/html/ascii-pad.htm ascii pad fighting type] [http://tomems.125mb.com/html/serim-scrl/ serim scrl] [http://curti2iag.125mb.com/description/lib/tama-starclassic/ tama starclassic] [http://ginger-tea.freehostia.com/topic/jane-siberry/ jane siberry calling all angels] [http://oooohhnnnooooo.freehostia.com/content/view/gigaset-siemens.htm gigaset siemens sl440 cordless] [http://behaverf.125mb.com/view/new/zibido-s/ zibido s giacomo] [http://roaliano.125mb.com/content/view/i-tim.htm i tim] [http://behaverf.125mb.com/view/new/www-santangelo/ www santangelo it] [http://ginger-tea.freehostia.com/topic/informazione-azienda/ informazione azienda] [http://ginger-tea.freehostia.com/topic/sapone/ sapone] [http://curti2iag.125mb.com/description/lib/video-filmati/ video filmati porno non a pagamento] [http://behaverf.125mb.com/view/new/movimiento-misionero/ movimiento misionero mundial] [http://ginger-tea.freehostia.com/topic/azienda-agricole/ azienda agricole affitto emilia romagna] [http://curti2iag.125mb.com/description/lib/vampire-land/ vampire land] [http://ginger-tea.freehostia.com/topic/radio-sveglia/ radio sveglia temperatura esterna] [http://oooohhnnnooooo.freehostia.com/content/view/etrusco.htm etrusco] [http://tomems.125mb.com/html/bernhard-thomas/ bernhard, thomas] [http://redobsession.freehostia.com/web/sigla-domenica.htm sigla domenica sportiva] [http://behaverf.125mb.com/view/new/udp-player/ udp player moonlight] [http://ginger-tea.freehostia.com/topic/appalti-costruzione/ appalti costruzione muri a secco] [http://tomems.125mb.com/html/una-demo/ una demo per uefa euro 2004] [http://oooohhnnnooooo.freehostia.com/content/view/tallin.htm tallin] [http://ginger-tea.freehostia.com/topic/jack-bomber/ jack bomber] [http://redobsession.freehostia.com/web/lettori-compact.htm lettori compact flash] [http://ginger-tea.freehostia.com/topic/sony-mpktha/ sony mpk-tha] [http://tomems.125mb.com/html/exibart-com/ exibart com art comunity] [http://curti2iag.125mb.com/description/lib/masterizzatore-cddvd/ masterizzatore cd-dvd] [http://tomems.125mb.com/html/masterizzatore-esterno/ masterizzatore esterno pioneer] [http://behaverf.125mb.com/view/new/effetti-delle/ effetti delle droghe sul sistema nervoso] [http://redobsession.freehostia.com/web/suse-professional.htm suse professional] [http://tomems.125mb.com/html/ups-powermust/ ups powermust 1400] [http://roaliano.125mb.com/content/view/gang-bang.htm gang bang roma] [http://edmei.125mb.com/html/just.htm just] [http://tomems.125mb.com/html/je-t/ je t aime moi mon plus] [http://behaverf.125mb.com/view/new/frank-morgan/ frank morgan] [http://edmei.125mb.com/html/q-zone.htm q zone dragostea] [http://redobsession.freehostia.com/web/trucchi-gta.htm trucchi gta3 vice city] [http://curti2iag.125mb.com/description/lib/www-oceanfree/ www oceanfree net homepage] [http://behaverf.125mb.com/view/new/musiche-dei/ musiche dei bersaglieri] [http://oooohhnnnooooo.freehostia.com/content/view/dvd-recorder.htm dvd recorder hd lg] [http://tomems.125mb.com/html/gigid-alessio/ gigid alessio it] [http://redobsession.freehostia.com/web/rail-kit.htm rail kit 2u] [http://behaverf.125mb.com/view/new/katia-kabanova/ katia kabanova - salzburg festival] [http://tomems.125mb.com/html/voli-pavia/ voli pavia] [http://redobsession.freehostia.com/web/la-ley.htm la ley mas alla] [http://roaliano.125mb.com/content/view/il-deserto.htm il deserto della libia] [http://roaliano.125mb.com/content/view/retroescavatore-usato.htm retroescavatore usato] [http://oooohhnnnooooo.freehostia.com/content/view/tattoo-cannavaro.htm tattoo cannavaro] [http://tomems.125mb.com/html/lg-usb/ lg usb 1 gb] [http://redobsession.freehostia.com/web/epson-stylus.htm epson stylus dx3850] [http://edmei.125mb.com/html/copkiller.htm copkiller] [http://redobsession.freehostia.com/web/sve-bi.htm sve bi ha dao da sam njen] [http://roaliano.125mb.com/content/view/lente-game.htm lente game boy advance accessori console] [http://ginger-tea.freehostia.com/topic/figc-dilettanti/ figc dilettanti er] [http://edmei.125mb.com/html/tx-tv.htm tx tv] [http://redobsession.freehostia.com/web/camicia-donna.htm camicia donna] [http://curti2iag.125mb.com/description/lib/sedie-casa/ sedie casa] [http://oooohhnnnooooo.freehostia.com/content/view/novus-snc.htm novus snc] [http://tomems.125mb.com/html/world-worms/ world worms] [http://oooohhnnnooooo.freehostia.com/content/view/video-sometimes.htm video sometimes] [http://redobsession.freehostia.com/web/matrimonio-alessia.htm matrimonio alessia mancini] [http://ginger-tea.freehostia.com/topic/usb-driver/ usb driver motorola] [http://edmei.125mb.com/html/hooligans.htm hooligans] == 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 09:18, 22 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