Gallery3:Modules:photo annotation - Gallery Codex
Personal tools

Gallery3:Modules:photo annotation

From Gallery Codex

Photo annotation

This module allows you to create comments on photos similar to Flickr and Facebook (see screenshots below). It can notify users when a photo is tagged and comments are added. This module is partially compatible with rWatcher's [url=]TagFaces module[/url] which means that faces/notes/annotations created with one module will be shown by the other as well (user annotations create with the Photo annotation module will however not be shown by the TagFaces module).

IMPORTANT: You cannot run both modules at the same time.


Add and edit annotations An annotation linking to a tag An annotation with title and description
Photoannotation add edit.png Photoannotation tag.png Photoannotation note.png


  1. Uses a modified version of jquery-image-annotate
  2. Annotations are added and edited directly on the photo page
  3. Annotations are displayed below the photo
  4. Tags can be added to a photo and/or created while creating an annotation
  5. All annotation areas are displayed when hovering over the photo with the mouse
  6. Titles and descriptions are shown when hovering over an annotation area
  7. Tag- and user-annotations are click-able and will display the tag collection / user profile page
  8. Users can be notified when someone tags a photo with them and/or adds a comment to a photo
  9. "People" block can be added to the sidebar showing users with tagged photos and allowing to search for users
  10. Admin: Convert existing tag annotations (created with either Photo annotation or TagFaces module) can be converted to user annotations
  11. Admin: When deleting a user, user annotation can be automatically converted to tag or note annotations


  • Download the module from:
  • Extract the module to the module directory of your G3 install.
  • Activate the module: Login -> Admin -> Modules. Check the box next to the module. Click update at the bottom of the page.
  • To add the "People" block to the sidebar go to Login -> Admin -> Appearance -> Manage sidebar
  • If you are updating from a previous version, please run the upgrader (http://yourdomain/pathtogallery/upgrader)
  • If you want to add the "User cloud" to your sidebar go to Login -> Admin -> Appearance -> Manage sidebar


  • On any photo page go to the Photo Options menu and click on "Add Annotation"
  • To delete an annotation, hover over it with the mouse and then click on the little "x" in the upper right corner of the annotation area
  • To modify an annotation, hover over it with the mouse and then click on the little pen in the upper right corner of the annotation area
  • To modify your notification settings go to your profile page (click on your name where it says "Logged in as") and click on "Edit"


  • You can configure the module by going to Login -> Admin -> Settings -> Photo annotation
  • To add the "People" block to the sidebar go to Login -> Admin -> Appearance -> Manage sidebar

Version history

Version 1

  • Initial release

Version 1.1

  • Clicking 'Cancel' when editing an annotation would prevent viewing the image in full size
  • Theme now works with greydragon theme without modifications

Version 1.2

  • Fixed incorrect re-direct with "non-webroot-installs" and mod_rewrite activated
  • Fixed bug when re-activating the module
  • Fixed bug causing video pages not to display the video (not tested)

Version 2

  • Improved tag handling:
    • Drop down was replaced by ajax-textbox
    • Tags can now be added while creating the annotation
    • If a tag is entered which does not exist it will be created
  • When entering text in the tags textbox, the notes textbox is cleared and vice versa to avoid confusion
  • Added photoannotation.php provided by tkott to allow compatibility with the XMP module
  • Deletion confirmation dialog now looks better
  • Canceling deletion does not show the full size image anymore
  • Fixed positioning bug for RTL languages
  • Fixed bug when deleting an annotation when image contained annotations with same tag attached to them
  • Fixed tiny bug with positioning of the add / edit form

Version 2.1

  • Form is now hidden when resizing and dragging the annotation area
  • A few minor UI improvements

Version 3

  • Only beta releases (had to bump version number to 4)

Version 4

  • Increased initial size of the annotation area
  • Added possibility to associate users with annotations
    • Clicking on an annotation that has a user associated you will get to the user profile page
    • User profile page shows images of users
  • Added side bar block "People"
    • Displays all users with annotations
    • Allows to search for users
    • Admins can hide the block for guests
  • Added user notification
    • Users can decide if they want to receive notifications by editing their profile
    • Admin can decide if notifications is switched on by default for new users and users who have not saved this setting
    • Notifications will be sent out when a user annotation is created on a photo and/or if a comment is added to a photo with user annotations
  • Annotations can now be displayed below the resized photo (legend)
  • Hovering over the legend will now highlight the corresponding annotation
  • Added options to change annotation borders
  • Added admin option that allows to convert existing tag annotations to user annotations
  • Added admin option allowing to automatically convert a user annotation to a tag or note annotation when deleting a user
  • Added admin option to remove orphaned annotations (this can happen if a tag is deleted)

Version 4.1

  • Disable notification sending for new and updated comments if the commenter is the same as the user to be notified and notification module is active
  • First time installation would set the version number incorrectly to 3 instead of 4

Version 4.2

  • Fix undefined variable error

Version 4.3

  • Search now also works for full name
  • Fix undefined variable error

Version 4.4

  • Fixed two JavaScript bugs in IE8