Photo Dropper for WordPress – validation problem

This is a great tool for WordPress sites – it’s a plugin that lets you search appropriately-licensed images on flickr and easily drop them into a post, complete with the appopriate attribution. This makes the whole process of searching for images and including them in your posts much quicker and more convenient.

Site validation problem

My only problem has been that the first time I used it, my site would no longer validate at http://validator.w3.org. This appears to be because the plugin produces code which doesn’t quite conform with the default WordPress document type (XHTML 1.0 Transitional). Specifically, when I added an image using Photo Dropper the plugin included the attribute align=”absmiddle” for the little CC icon. W3 didn’t like that – but when I changed it to align=”middle” it validated without a problem. Since search engine bots (eg Google) may penalize you for having unvalidated pages, I decided it was wise to fix this.

A simple fix

I’ll never remember to edit the HTML and change this attribute every time I use the plugin to add an image to a post. But it’s very easy to tweak the code to fix this:

  1. In the wp-content/plugins/photo_dropper directory, edit the file called flickr-js.php
  2. Change line 62 (but see note 1 below) so that the align attribute is now middle rather than absmiddle.
  3. Save the file and check that everything looks okay. You might like to use the validator to be on the safe side.

Note 1: As of 3 April 2008, a new version (1.0.5) is available from the Photo Dropper site. The code that needs changing is now at line 96, not 62.

Here’s an image added using Photo Dropper. You can see that changing this attribute does make the tiny CC icon look slightly off-centre, but I prefer this to the validation problem.

Have a happy Easter…
Odd Egg Out
Creative Commons License photo credit: terren in Virginia

Note 2: A cleaner fix might be to remove the CC image and replace it with text (eg the © symbol). See the photo below…


Odd Egg Out
© photo credit: terren in Virginia

Bookmark and Share

5 thoughts on “Photo Dropper for WordPress – validation problem

  1. Pingback: Validating Wordpress Plugins Flattr, Photo Dropper, Shadows | iThoughts.de

  2. Lucinda @ Photodropper

    Paul,

    We’ve recently updated the plugin to 2.0.3, which adds security upgrades and various other features. Try upgrading, and if you still experience the issue, shoot me an email and I can work on getting it fixed for you.

    Thanks,
    Lucinda

Comments are closed.