<HTML><body>There is a much more up to date version of the plugin available in the eprints usergroup github pages: <a href="https://github.com/eprintsug/cookies" target="_blank">https://github.com/eprintsug/cookies</a><BR>
No bazaar package as I've been distracted with everything else... <BR>
<BR>
Both the bazaar package and the github plugin use the phrases, so can be used to display the message in any language you like. <BR>
<BR>
David<BR>
<BR>
-----Original Message-----<BR>
From: <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri<BR>
Sent: 11 June 2015 09:52<BR>
To: <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><BR>
Subject: [EP-tech] Re: European Cookie Law<BR>
<BR>
Being this Eprints 3.1:<BR>
<BR>
I've copied the eprints_api javascript:<BR>
<BR>
var EPrints = Class.create({<BR>
        _currentRepository: undefined,<BR>
<BR>
        initialize: function() {<BR>
                this._currentRepository = new EPrints.Repository();<BR>
        },<BR>
        currentRepository: function() {<BR>
                return this._currentRepository;<BR>
        }<BR>
});<BR>
<BR>
EPrints.Repository = Class.create({<BR>
        initialize: function() {<BR>
        },<BR>
        /*<BR>
         * Retrieve one or more phrases from the server<BR>
         * @input associative array where the keys are phrase ids and the values<BR>
         * are pins<BR>
         * @f function to call with the resulting phrases<BR>
         * @textonly retrieve phrase text content only (defaults to false)<BR>
         */<BR>
        phrase: function(phrases, f, textonly)<BR>
        {<BR>
                var url = eprints_http_cgiroot + '/ajax/phrase?';<BR>
                if (textonly)<BR>
                        url += 'textonly=1';<BR>
                new Ajax.Request(url, {<BR>
                        method: 'post',<BR>
                        onException: function(req, e) {<BR>
                                alert (e.toString());<BR>
                        },<BR>
                        onFailure: function(transport) {<BR>
                                throw new Error ('Error ' + transport.status + ' requesting phrases (check server log for details)');<BR>
                        },<BR>
                        onSuccess: function(transport) {<BR>
                                if (!transport.responseJSON)<BR>
                                        throw new Error ('Failed to get JSON from phrases callback');<BR>
                                f (transport.responseJSON);<BR>
                        },<BR>
                        postBody: Object.toJSON (phrases)<BR>
                });<BR>
        }<BR>
});<BR>
<BR>
var eprints = new EPrints();<BR>
<BR>
  and added /usr/share/eprints3/cgi/ajax<BR>
<BR>
Added also JSON module from eprints 3.3 and activated it in Eprints.pm<BR>
<BR>
but I get this:<BR>
<BR>
[Thu Jun 11 10:50:43 2015] [error] malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before &quot;(end of<BR>
string)&quot;) at /usr/share/eprints3/cgi/ajax/phrase line 21.\n<BR>
<BR>
my $input = JSON::decode_json( $json );<BR>
<BR>
so maybe I miss something else?<BR>
<BR>
Il 10/06/2015 11:56, Timothy Miles-Board ha scritto:<BR>
&gt; Download the 4 files from the bazaar page that start with <BR>
&gt; epm/cookies/cfg and drop them into the equivalent locations in <BR>
&gt; archives/too/cfg<BR>
&gt;<BR>
&gt; Eg.<BR>
&gt;<BR>
&gt; <a href="http://bazaar.eprints.org/356/1/epm/cookies/cfg/lang/en/phrases/zzz_co" target="_blank">http://bazaar.eprints.org/356/1/epm/cookies/cfg/lang/en/phrases/zzz_co</a><BR>
&gt; okies.xml<BR>
&gt;<BR>
&gt; into<BR>
&gt;<BR>
&gt; archives/foo/cfg/lang/en/phrases/<BR>
&gt;<BR>
&gt; Restart Apache and then go to your repository homepage and hard refresh to pull in the updated js/css.<BR>
&gt;<BR>
&gt; Tim<BR>
&gt;<BR>
&gt; On 10 Jun 2015 2:43 am, Yuri &lt;yurj@alfa.it&gt; wrote:<BR>
&gt;&gt; I know but I'm running eprints 3.1, and I prefer to install things manually.<BR>
&gt;&gt;<BR>
&gt;&gt; Il 09/06/2015 17:44, Alan.Stiles ha scritto:<BR>
&gt;&gt;&gt; The easiest way would be to install it via the Bazaar link in the <BR>
&gt;&gt;&gt; repository admin area ________________________________________<BR>
&gt;&gt;&gt; From: Yuri [yurj@alfa.it]<BR>
&gt;&gt;&gt; Sent: 09 June 2015 15:34<BR>
&gt;&gt;&gt; To: <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><BR>
&gt;&gt;&gt; Subject: [EP-tech] Re: European Cookie Law<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; <a href="http://bazaar.eprints.org/356/" target="_blank">http://bazaar.eprints.org/356/</a><BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; can I download it, and install it manually?<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Il 09/06/2015 15:36, Alan.Stiles ha scritto:<BR>
&gt;&gt;&gt;&gt; Hi Yuri,<BR>
&gt;&gt;&gt;&gt; if you look in the eprints bazaar there's a plugin for cookies that serves this purpose (though it isn't specifically multi-lingual).<BR>
&gt;&gt;&gt;&gt; ________________________________________<BR>
&gt;&gt;&gt;&gt; From: Yuri [yurj@alfa.it]<BR>
&gt;&gt;&gt;&gt; Sent: 09 June 2015 08:33<BR>
&gt;&gt;&gt;&gt; To: <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><BR>
&gt;&gt;&gt;&gt; Subject: [EP-tech] Re: European Cookie Law<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; anything on this?<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Il 05/06/2015 08:08, Yuri ha scritto:<BR>
&gt;&gt;&gt;&gt;&gt; Hi!<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;        is there something available, multilingual if possible, for <BR>
&gt;&gt;&gt;&gt;&gt; Eprints to be compliant with the European Cookie Law? :-)<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; *** Options: <BR>
&gt;&gt;&gt;&gt; <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>
&gt;&gt;&gt;&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt;&gt;&gt;&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt;&gt;&gt;&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
&gt;&gt;&gt;&gt; -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England &amp; Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; *** Options: <BR>
&gt;&gt;&gt;&gt; <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>
&gt;&gt;&gt;&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt;&gt;&gt;&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt;&gt;&gt;&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
&gt;&gt;&gt; *** Options: <BR>
&gt;&gt;&gt; <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>
&gt;&gt;&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt;&gt;&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt;&gt;&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; *** Options: <BR>
&gt;&gt;&gt; <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>
&gt;&gt;&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt;&gt;&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt;&gt;&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
&gt;&gt; *** Options: <BR>
&gt;&gt; <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>
&gt;&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt;&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt;&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
&gt; *** Options: <BR>
&gt; <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>
&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><BR>
&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><BR>
&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><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>
*** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">http://forum.eprints.org/</a><BR>
<br><br><span style="font-family:Arial; Font-size:10.0pt"> <hr width="100%"> This email has been scanned for email related threats and delivered safely by Mimecast.<br> For more information please visit <a href="http://www.mimecast.com">http://www.mimecast.com</a> <hr width="100%"> </span></body></HTML>