Ermmm, the demo doesn't make sense without the tokens. Here:
+------------------+--------------------------------------+----+
| nome | token | id |
+------------------+--------------------------------------+----+
| Your Juri Name | a47c93a8-f05c-11e0-a298-003048f0198a | 9 |
| Your Juri Name 2 | fe8f16b6-f05e-11e0-a298-003048f0198a | 10 |
+------------------+--------------------------------------+----+
--
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 22:27, Nuno Tavares escreveu:
> 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.zi...
>
>
> 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.
>