Wulf's Webden

The Webden on WordPress

Comments HTML


Yesterday, I posted about the update to my comments system. Today I will start unpacking the code. This is the information that is copied towards the end of each entry:

<div class=”flickrcomment” id=”flickr-33914938-6232fa9c0f-22″>
   <p>Want to add something? Please <a href=”http://www.flickr.com/photos/wulf/33914938/”>join the conversation</a> about this posting (nb. Flickr or Yahoo! account required).</p>

Without any manipulation, this works for all browsers. The important information is id tag associated with the flickrcomment division. That contains four elements, separated by hyphens:

  • The word flickr. I am sure I remember reading that id tags should not start with numbers, although I can not lay my hands on the reference! If nothing else, it hints at the purpose of the id tag, rather than leaving it as an impenetrable string of numbers.
  • The unique reference to the picture in Flickr’s database
  • The “secret”, a string that needs to be included when displaying the picture away from the main Flickr page it is stored on
  • The Flickr server the image lives on.

That is a lot of information but it is quite compact and not going to give a performance hit for people who, through choice of browser or Javascript settings, won’t see anything else. It also contains the right seeds that allow me to unpack it with the jQuery Javascript library and turn it into something a little more interesting.

Want to add something? Please join the conversation about this posting (nb. Flickr or Yahoo! account required).

Technorati Tags:

Leave a Reply

Required fields are marked *.

This site uses Akismet to reduce spam. Learn how your comment data is processed.