Version 1 (modified by 17 years ago) (diff) | ,
---|
Example 4: a more complex application
In this application, volunteers locate fossils in images of desert terrain. They can locate several (zero or more) fossils in the same image, and can associate a type and a comment with each annotation. They can remove existing annotations. When they're all done, they click a "Done" button.
This is implemented as a sequence of web pages; each addition or deletion of an annotation goes to a new web page. Hence, in addition to the job_show() callback function, the application uses a separate web page, user/bossa_example4.php, that handles the edit operations.
The application is implemented by three scripts in ~/projects/test/html/:
- ops/bossa_example4_make_jobs.php: a script that creates jobs.
- inc/bossa_example4.inc: the application's callback functions.
- user/bossa_example4.php: the handler for editing operations.
Creating jobs
Using the administrative interface, create an application named "bossa_example4". Create a directory ~/projects/test/html/user/example4_images. Put some images (.png or .jpg) there; a good source is http://isaac.ssl.berkeley.edu/test/example4_images/
Now go to the project's ops/ directory and type
php bossa_example4_make_jobs.php --dir example4_images
==