Loading ...
Sorry, an error occurred while loading the content.

A couple possible bugs?

Expand Messages
  • Dallan Quass
    Hi, A couple of things I came across that might be problems: 1) fnEscapeHTML should add /g to the regex s: return html.replace(/&/g, & ).replace(/
    Message 1 of 3 , Oct 28, 2006
    View Source
    • 0 Attachment
      Hi,

      A couple of things I came across that might be problems:

      1) fnEscapeHTML should add /g to the regex's:
      return html.replace(/&/g, '&').replace(/</g, '<').replace(/>/g,
      '>');

      2) The line in fnAddNote: newArea.appendChild(newID);
      should be: newNote.appendChild(newID);

      3) Also, when adding a new note, I think you need to set the title
      attribute of the 'fn-note-id' span to whatever the noteID is in
      fnEditComplete, or people will get errors when they try to edit a note
      that they've just added in the same session.

      BTW, I love this app you've created - thank you! I'm in the process
      of modifying it to work with MediaWiki software so people can add
      annotations to uploaded images. It's been a pretty straightforward
      modification. If you're interested, I'll give you the modification
      when I'm done.
    • Greg Elin
      Dan, Thanks for the good eyes. I ve made the changes and need to get them into the repository. It would be terrific to add your mediawiki version into the
      Message 2 of 3 , Oct 29, 2006
      View Source
      • 0 Attachment
        Dan,

        Thanks for the good eyes. I've made the changes and need to get them
        into the repository. It would be terrific to add your mediawiki version
        into the repository, too.

        Can we talk more about the mediawiki version on the list? I'm in the
        process
        of enriching the XML format of the notes to allow for richer features
        (like shapes).
        I need some help...and if we talk more about online maybe the list
        will wake up
        a bit.

        See comments below...

        On Oct 29, 2006, at 1:59 AM, Dallan Quass wrote:

        > Hi,
        >
        > A couple of things I came across that might be problems:
        >
        > 1) fnEscapeHTML should add /g to the regex's:
        > return html.replace(/&/g, '&').replace(/</g, '<').replace(/>/g,
        > '>');

        You are right. Although, fixing it suggests some other changes to be
        made to allow links to be included in notes; probably through a wiki-
        like syntax.

        >
        > 2) The line in fnAddNote: newArea.appendChild(newID);
        > should be: newNote.appendChild(newID);

        Hmmm...right again.

        >
        > 3) Also, when adding a new note, I think you need to set the title
        > attribute of the 'fn-note-id' span to whatever the noteID is in
        > fnEditComplete, or people will get errors when they try to edit a note
        > that they've just added in the same session.

        This is true. The noteID should be generated server-side. Already on
        the to do list is to have server-side return the noteID on successful
        saving of a note.

        >
        > BTW, I love this app you've created - thank you! I'm in the process
        > of modifying it to work with MediaWiki software so people can add
        > annotations to uploaded images. It's been a pretty straightforward
        > modification. If you're interested, I'll give you the modification
        > when I'm done.

        Awesome!

        Greg
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
      • dallan
        I just barely finished the MediaWiki extension. I ve posted installation instructions at http://meta.wikimedia.org/wiki/Fotonotes. Please let me know what
        Message 3 of 3 , Nov 1, 2006
        View Source
        • 0 Attachment
          I just barely finished the MediaWiki extension.  I've posted installation instructions at http://meta.wikimedia.org/wiki/Fotonotes.  Please let me know what you think.  In particular, am I representing the licensing correctly? 
           
          In MediaWiki, every uploaded image is associated with an Image wiki page that includes textual information about the image.  This extension gets the image annotations from that wiki page.  When someone edits the image wiki page, it puts the image annotations into the text edit box for the page.  So annotations are not stored into the image file, and there are no AJAX requests.
           
          What I changed:
          * Fotonotes.php and FotonotesExt.php - new files.  Install into MediaWiki to insert notes information into the Image: wiki page.
          * fnclient.js - replaced the AJAX calls to read notes information from a DIV placed in the document by the php script, and write changes to an edit field.  Note ID's are their bounding boxes.  A few other minor changes.  All changes are marked by // WIKI.  The new file is called fnclientwiki.js
          * css - I changed the url locations to point to the standard image location for MediaWiki.  That's all.
           
          I should have a demo up and running on my website tomorrow.  I'd love to get some feedback then.
           
          -dallan
           


          From: fotonotes@yahoogroups.com [mailto:fotonotes@yahoogroups.com] On Behalf Of Greg Elin
          Sent: Sunday, October 29, 2006 7:47 AM
          To: fotonotes@yahoogroups.com
          Subject: Re: [fotonotes hackers] A couple possible bugs?

          Dan,

          Thanks for the good eyes. I've made the changes and need to get them
          into the repository. It would be terrific to add your mediawiki version
          into the repository, too.

          Can we talk more about the mediawiki version on the list? I'm in the
          process
          of enriching the XML format of the notes to allow for richer features
          (like shapes).
          I need some help...and if we talk more about online maybe the list
          will wake up
          a bit.

          See comments below...

          On Oct 29, 2006, at 1:59 AM, Dallan Quass wrote:

          > Hi,
          >
          > A couple of things I came across that might be problems:
          >
          > 1) fnEscapeHTML should add /g to the regex's:
          > return html.replace( /&/g, '&amp;').replace( /</g, '&lt;').replace( />/g,
          > '&gt;');

          You are right. Although, fixing it suggests some other changes to be
          made to allow links to be included in notes; probably through a wiki-
          like syntax.

          >
          > 2) The line in fnAddNote: newArea.appendChild (newID);
          > should be: newNote.appendChild (newID);

          Hmmm...right again.

          >
          > 3) Also, when adding a new note, I think you need to set the title
          > attribute of the 'fn-note-id' span to whatever the noteID is in
          > fnEditComplete, or people will get errors when they try to edit a note
          > that they've just added in the same session.

          This is true. The noteID should be generated server-side. Already on
          the to do list is to have server-side return the noteID on successful
          saving of a note.

          >
          > BTW, I love this app you've created - thank you! I'm in the process
          > of modifying it to work with MediaWiki software so people can add
          > annotations to uploaded images. It's been a pretty straightforward
          > modification. If you're interested, I'll give you the modification
          > when I'm done.

          Awesome!

          Greg
          >
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >

        Your message has been successfully submitted and would be delivered to recipients shortly.