The branch phtagr-media-schema was merged to the trunk successfully. The new database schema fits more the database relation between files and media and changes the model Image to the model Media.
Upgrade your phTagr instance
The database must be upgraded to the new schema. However, the new merged trunk comes with a handy shell script upgradeMediaSchema which handles the database upgrade and data migration. Update your phtagr code of trunk via svn and change to your phtagr directory and execute the shell script by ‘../cake/console/cake -app phtagr upgradeMediaSchema upgrade‘
phtagr$ svn up
phtagr$ ../cake/console/cake -app phtagr upgradeMediaSchema
Schema Upgrade Shell Script for Media Schema
---------------------------------------------------------------
Help screen
---------------------------------------------------------------
upgrade
Upgrade schema to media schema
---------------------------------------------------------------
phtagr$ ../cake/console/cake -app phtagr upgradeMediaSchema upgrade
Schema Upgrade Shell Script for Media Schema
---------------------------------------------------------------
Prepare upgrade...
Upgrade schema...
Migrate 132 media...
Finalizing upgrade...
All done. Enjoy!
phtagr$
Reasons for a new Schema
The old schema uses only one table for a image/media which includes also the file information. Since a media is not only restricted to one file, this schema does not model the reality well. E.g. a media could be a video and the video thumb file or an image with a sound memo attached to it. Since now, phTagr uses also the term media instead of image.
The new schema splits the old table images to the table media and table files while the model Media gets a HasMany relation to the model File.
Other changes
The merge comes also with an improved import functionality. phTagr has now a Filter Manger which handles the import and export of a media and/or metadata. Currently there are three different filters:
- Image Filter (JPEG)
- Video Filter (AVI, MOV, MPEG, THM)
- GPS Filter (LOG)
New filters could be implemented more convenient (e.g. a Sound Filter which attaches a sound memo to a media). The Filter Manager supports a priority based import that a video thumbnail is read after the video file.
A new HTML upload functionality was recently committed. Users can now upload files easily via the web browser in the ‘My Files’ section (while the more advanced functionality over the webdav interface still remains).
The new upload functionality is basic, but has some nifty features: Users can create folders to keep an order and upload files to the new created folder. Also files of a ZIP archives could be extracted automatically.

See the new screenshots at the demo page and happy uploading!
In revision 395 a new module was added for the google map. If you open the map of an image to see the geographic position, surrounding images are shown within map. The new module queries additional images – or markers – via Ajax in the background and add the overlays to the map. Its a pretty nice feature to see a geographic relation of your image.
A screenshot might help to describe the feature or visit the demo page for a live example.

Recently a new input filter for GPS data was added to phTagr. Now, NMEA files from GPS logger such as Sony’s GPSCS1 can be imported directly and adds the GPS coordinates of the images. Combined with Google Maps it adds a nice feature to the gallery to locate your image inside the map.
The GPS coordinates are exported to the EXIF header as GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef values on the next meta data sync.
While the GPS data are saved in UCT, your timezone of your image might be a different one. The current implementation has a static time offset of two hours (UCT+2), but a special option should be implemented soon. Also an import filter for KML files would be a nice option.
phTagr is now registered at SourceForge.net (https://sourceforge.net/projects/phtagr) to reach a larger community. Currently all services are still running under http://www.phtagr.org (demo, svn, trac) and might move to SF later.
phTagr supports now user comments and visitors and users could comment on images or videos. The home side shows the recent comments and a comment RSS is also availiable via URL comments/rss, e.g. from the demo page: http://demo.phtagr.org/comments/rss. See the screenshots or try it out.

Recent comments on home side

Add a new comment (for visitors with captcha)

Add a new comment (for users)
Visitors (anonymous users) have to enter a captcha which should prevent spam entries. The captcha is realized due the great
Kcaptcha project.
The image owner will receive a notification email on new comments:
Dear admin
A new comment of image PICT7375.JPG was submitted.
View image: http://demo.phtagr.org/images/view/113
Delete comment: http://demo.phtagr.org/comments/delete/3
From: Jon Doe
Date: 2008-08-10 12:46:09
If you are anonymous you have to enter your name, email and a captcha to your comment.
You are notified about new comments via email if you select "Notify me on new comments".
Sincerely
Your phTagr Agent
Also other comment writers are able to receive new comment notification mails on their commented images, if they select the notification options.
In the last couple of months, phTagr was completely rewritten from scratch using the great framework cakePHP. The new version called phTagr 2.0 is much better and faster! phTagr 2.0 supports so far the basic functionality like image uploading via WebDAV, multiple tagging, group based access control, guest account creation.
Short (and maybe incomplete) installation procedure is (on Ubuntu 8.04):
Install required tools (apart from apache2 with rewrite module, php, and mysql):
$ sudo apt-get install ffmpeg flvtool2 imagemagick exif php-pear
$ sudo pear update-channels
$ sudo pear install HTTP_WebDAV_Server-1.0.0RC4
Download the code
$ cd /var/www
$ sudo svn co https://svn.cakephp.org/repo/branches/1.2.x.x cake
$ sudo chown -R `whoami` cake
$ cd cake
$ svn co https://svn.phtagr.org/phtagr/trunk phtagr
$ cd phtagr
$ sudo chown -R www-data tmp users
Now open http://localhost/cake/phtagr/setup in your browser and follow the installation procedure.
www.phTagr.org is online! phTagr is another PHP/MySQL based gallery for multiple users.
Similar to flickr you can add tags, sets, and locations to the images. The meta data are written as IPTC directly into the image and the MySQL database backend offers a fast access by time or other metadata.
It supports:
- Multiple user accounts
- Group based access rights management
- Upload of images with quota limits
- EXIF (read)
- IPTC Metadata (read and write)
It requires:
- Webserver with PHP 5
- MySql >= 4
- Image Magick
Feel free to test the demo phTagr site. Login with username demo and password demo08:
http://demo.phtagr.org
Sourcecode is available via Subversion at:
svn co https://svn.phtagr.org/phtagr/trunk phtagr