Hi Toni, I have no problem in sharing the code, as long as you promise to bear with me about the code quality!
I'm also sending it to the list, as it may be of interest for other countries. There are some requirements, though. You'll need a local copy of the database, which you can get using the MonumentsAPI 'dump' module. Hopefully, these are the steps you need: 0. Download the code from here: http://www.wikilovesmonuments.org.pt/tools/juri-demo/tools/juri/juri-demo.zip 1. review header.inc/header.php and footer.inc/footer.php as it is fit to our layout; 2. Create a database where you should create the structure you'll find inside the ZIP (MySQL sql file): juri-tables.sql 3. review DB configuration at tools/plist/myconfig.php to point to your DB. 4. Load the images into the table 'statisticsct2': you can use the script in tools/stats to fetch them from the MonumentsAPI (set the country to Andorra only to be faster, and run it multiple times until you get a single dot - that should be the last image to fetch) 5. Create juris like this (for each juri): INSERT INTO juri VALUES('Your Juri Name', UUID(), NULL); You will use the generated UUID() as a token to access the juri profile, as in: http://yourdomain/tools/juri/?level=1&token= (followed by the UUID) To get them: SELECT * FROM juri; 6. When you have all your juri loaded, run 'php -f _sorteio.php' (tools/juri) which will random sort the images for each one (and put a reference for it at 'juri_selection'). Don't forget to change "Portugal" to "Andorra" in the code. And - hopefully - that'll be it. "_sorteio.php" puts images in "bucket 1", the juri will demote the image to "bucket 0" if not interested, and promote to "bucket 2" if it's interesting. If you want the simplify the URL for the juri, such as http://juri.wikilovesmonuments.org.pt/TOKEN here's what your Apache should be doing: RewriteCond %{HTTP_HOST} ^juri\.wikilovesmonuments\.org\.pt [NC] RewriteRule ^/(.*) http://yourdomain/tools/juri/?level=1&token=$1 [R,L] PS: I've setup a demo at: http://www.wikilovesmonuments.org.pt/tools/juri-demo/tools/juri/ (nice photos by the way, congratulations!) But the thumbnailing server at Commons seemed to be facing problems, I hope this enough to set it up. -- Nuno Tavares Wikimedia Portugal http://www.wikimedia.pt Imagine um mundo onde é dada a qualquer pessoa a possibilidade de ter livre acesso ao somatório de todo o conhecimento humano. É isso o que estamos a fazer. Participe também: http://www.wikimedia.pt Em 06-10-2011 14:20, Toni Hermoso Pulido escreveu: > Hello Nuno, > > I've been forwarded your message from here: > http://lists.wikimedia.org/pipermail/wikilovesmonuments/2011-October/001829.html > > I'm a web developer from WLM Catalan team and we were wondering > whether your tools could be useful for our awards jury as well. > May I ask you to share your code so we can take a look on it? If we > made any modification, we would also share it in the conditions you > best consider. > > Let me know and thanks for your work! _______________________________________________ Wiki Loves Monuments mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikilovesmonuments http://www.wikilovesmonuments.eu
