Hi, The problem of adding Captcha to DSpace document request form pops from time to time, but I never saw any public solution. I hope this message could be one.
In our university, students thesis are kept online and are publicly available upon request. DSpace fits that policy very well, the thesis are not anonymously readable and when one wants a copy of the work, the document request form make it very easy. Recently, some of my users have been complaining that they are receiving a high number of document requests and the attached message is obviously spam. This problem is even more critical for the users in charge of batch processing the older thesis and who are owner of many documents. Spam poses two problems: it wastes the time of the receiver on one hand, but more importantly, a legitimate request for a document may ends being mistakenly classified as spam and ignored. One of the proposed solution was to limit the document request to registered users, but not only it does not fit our policy where registered users are only the students and no outsiders (in fact, registration is disabled) but it only pushes the problem one step further, a viewer would have to register, wait for approval and only then request the document. One easy solution is to add an anti-spammer control to the document request form, that is a Captcha. With the great help from Leandro ([email protected]) I managed to install the following solution, the installation steps are as follow (the instructions are for Unix, sorry Windows guys), it works well on my site with DSpace 4.2 and xmlui: 1) create a reCaptcha account with Google: https://www.google.com/recaptcha/admin#list once done, you end up with a Site Key and a Secret Key; you will need these keys in the next step; 2) save the attached file patch-4.2-reCaptcha and edit it: you will find two placeholders in the file that read "XXX reCaptcha SECRET KEY XXX" and "XXX reCaptcha SITE KEY XXX"; replace these by the respective keys from step 1; 3) apply the patch: go to the directory that contains your DSpace source ([dspace-source]/..) and apply he patch with the command; patch -p <path-name_to_the_patch_file_patch-4.2-reCaptcha 4) save the attached file Span.java into the directory [dspace-source]/dspace-xmlui/src/main/java/org/dspace/app/xmlui/wing/element 5) go to [dspace-source and run the command: mvn pakage 6) stop tomcat 7) go to [dspace-source]/dspace/target/dspace-4.2-build/ and run the command : ant update 8) restart tomcat Enjoy, Olivier -- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/dspace-community. For more options, visit https://groups.google.com/d/optout.
patch-4.2-reCaptcha
Description: Binary data
Span.java
Description: Binary data
-- -- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/dspace-community. For more options, visit https://groups.google.com/d/optout.
