EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07398
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] How to add form in "Request a copy"
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
 - Subject: Re: [EP-tech] How to add form in "Request a copy"
 - From: John Salter <J.Salter@leeds.ac.uk>
 - Date: Mon, 6 Aug 2018 08:49:50 +0000
 
| 
 Hi Izwan, I've completed the page on the wiki describing how to achieve what you need: https://wiki.eprints.org/w/Altering_the_'Request_a_copy'_function If you are using EPrints 3.3.12 or above, the 'adding information  to the email' is a bit easier - as there is a citation style for
 the request that is used in the email. Let me know if you have any problems with it! Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of John Salter For info, I've put the info below onto a wiki page: https://wiki.eprints.org/w/Altering_the_%27Request_a_copy%27_function The 'altering emails' bit will be added in a couple of hours, but will follow this:
 https://wiki.eprints.org/w/Instructions_for_local_plugins for the Screen::Public::RequestCopy plugin, overriding the 'action_request' method. Cheers, John From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of John Salter Hi Izwan, The 'requests' are dataobject - very similar to an EPrint, or a User, so you can add fields in the same way: In a config file e.g. [EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/cfg.d/z_request_fields.pl push @{$c->{fields}->{request}}, {         name => "contact_num",         type => "text", }, {         name => "id_num",         type => "text", }; Test the config is OK: > [EPRINTS_ROOT]/bin/epadmin test [ARCHIVE_ID] Add the phrases to e.g. [EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/lang/en/phrases/z_request_fields.xml: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE phrases SYSTEM "entities.dtd"> <epp:phrases xmlns="http://www.w3.org/1999/xhtml" xmlns:epp="http://eprints.org/ep3/phrase"
 xmlns:epc="http://eprints.org/ep3/control">   <epp:phrase id="request_fieldname_contact_num">Contact number</epp:phrase>   <epp:phrase id="request_fieldhelp_contact_num">A number that we can contact you on to discuss your request if necessary </epp:phrase>   <epp:phrase id="request_fieldname_id_num">ID number</epp:phrase>   <epp:phrase id="request_fieldhelp_id_num">The identification number from your staff/student card</epp:phrase> </epp:phrases> Then run: > [EPRINTS_ROOT]/bin/epadmin update [ARCHIVE_ID] This will add the columns to the database Finally, copy the default request workflow to the repository config: > mkdir [EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/workflows/request > cp [EPRINTS_ROOT]/lib/workflows/request/default.xml [EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/workflows/request/ Test the config again: > [EPRINTS_ROOT]/bin/epadmin test [ARCHIVE_ID] Restart Apache (this command depends on which operating system you use - you may need to do something slightly different!) > sudo service httpd graceful This will get you to a point where the data can be submitted into your system. The next part you probably want to do is to include this information in the email sent to the contact_email address. To do this, you need to create a local version (subclass) of the EPrints::Plugin::Screen::Public::RequestCopy module. I'm still working out exactly what you need to do for this part. I'll write it up as a wiki page! Cheers, John From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Mohd Izwan Salim Dear Eprints Community
  | 
- Follow-Ups:
- Re: [EP-tech] How to add form in "Request a copy"
- From: John Salter <J.Salter@leeds.ac.uk>
 
 
 - Re: [EP-tech] How to add form in "Request a copy"
 
- References:
- [EP-tech] How to add form in "Request a copy"
- From: Mohd Izwan Salim <mohdizwan8733@salam.uitm.edu.my>
 
 - Re: [EP-tech] How to add form in "Request a copy"
- From: John Salter <J.Salter@leeds.ac.uk>
 
 - Re: [EP-tech] How to add form in "Request a copy"
- From: John Salter <J.Salter@leeds.ac.uk>
 
 - Re: [EP-tech] How to add form in "Request a copy"
- From: John Salter <J.Salter@leeds.ac.uk>
 
 
 - [EP-tech] How to add form in "Request a copy"
 
- Prev by Date: Re: [EP-tech] ORCID Support Advance Update
 - Next by Date: [EP-tech] Excluding items from a view
 - Previous by thread: [EP-tech] EPrints/CRIS
 - Next by thread: [EP-tech] DOI handling in orcid_support_advance
 - Index(es):
 
