PhotoNotes

A Flickr-like photo annotation script with the following features:

  • Unlike fotonotes, does not alter the original JPEG in any way.
  • Add, move, resize, and delete notes.
  • Hover over a note to view the associated comment.
  • Click a note to edit the comment.
  • Tested with Firefox 3.5, Chrome 4, and IE 8.

The notes are not persisted to a database. However, there are function stubs available to enable saving and deleting notes with your database of choice.

Example

Installation and Usage

  1. Download and unzip the PhotoNotes files.
  2. Include the PhotoNotes JavaScript and CSS files in your site header.
  3. Include the appropriate script to enable PhotoNotes for your image of choice.
  4. Optionally implement the functions to persist the notes to your database.
<script type=”text/javascript”>
/* create the Photo Note Container */
var notes = new PhotoNoteContainer(document.getElementById(‘PhotoContainer’));

/* create a couple of notes, and add them to the container */
var note1 = new PhotoNote(‘Atmel ATMega168′,3,new PhotoNoteRect( 150,250,50,135));
note1.onsave = function (note) { return 1; };
note1.ondelete = function (note) { return true; };

var note2 = new PhotoNote(‘2048Hz buzzer’,3,new PhotoNoteRect(172,75,69,69));
note2.onsave = function (note) { return 1; };
note2.ondelete = function (note) { return true; };

notes.AddNote(note1);
notes.AddNote(note2);

function AddNote()
{
var newNote = new PhotoNote(‘Add note text here…’,-1,new PhotoNoteRect(10,10,50,50));
newNote.onsave = function (note) { return 1; };
newNote.ondelete = function (note) { return true; };
notes.AddNote(newNote);

newNote.Select();
}
</script>

Changelog

1.5

Initial release. Download

Acknowledgments

Thanks go to Dusty at dustyd.net for the original script. I basically took his code last updated in 2006 and made it work with the latest browsers.

  1. January 18th, 2010 at 09:20 | #1

    Great work Matthew – like this idea a lot!

  2. January 19th, 2010 at 11:23 | #2

    @Michael Toso
    Thanks Michael. I searched but didn’t find any (maintained) script that does the same thing. Hopefully people will find it useful. At least I will.

  3. bylove
    January 31st, 2010 at 11:31 | #3

    Hello

    How MYSQL database can be saved?
    Is sample available?

  4. February 1st, 2010 at 06:21 | #4

    Hi,

    I wanted to have the option that the notes cannot be edited. It seems that this is not working by using the available functions.
    Can someone please verify this?

    Thanks,
    Michael

  5. February 1st, 2010 at 06:31 | #5

    I have already fixed this on my local version. I can provide a patch if you like.

    - Michael

  6. jim
    March 6th, 2010 at 22:32 | #6

    Hi,
    Can you alert me to the latest update…I am building a website for our camera club (non profit) and this photo notes would be a great asset to the users on our site…please let me know via my email what you recommend and possibly send me the script if it is freeware.
    Thanks,
    Jim

  7. March 8th, 2010 at 09:51 | #7

    @jim
    Hi Jim,
    I have given thoughts to 1) creating a WordPress plugin to allow authors to use PhotoNotes and 2) creating a generic PHP/MySQL implementation of PhotoNotes but have not yet done so. What database does your website use?

  8. March 9th, 2010 at 04:06 | #8

    Wonderfull work remake. I’ll custom it to my needs, then i’ll make MySQL interface to it…

  9. Jim
    March 9th, 2010 at 13:45 | #9

    @jim
    Hi,
    I use mySQL and that would be great if you could create the php /mysql tables…thanks a million…can you email me the scripts…greatly appreciated.
    Thanks again for your time!
    Jim

  1. No trackbacks yet.