Archive for September, 2004

Thumb-in-Post Version 0.94

This is a very minor update to my Thumb-in-Post plugin. It corrects a problem that occurs with the Javascript popups in Microsoft Internet Explorer for Windows. Previously the javascript popups didn’t work properly in IE/Win. Otherwise the plugin is exactly the same as before.

The new version can be downloaded here.

The problem wasn’t actually a bug in the plugin but rather it was due to a rather strange behaviour of IE/Win.

In the original javascript code links which should be opened in a popup window were given an attribute rel="popup" and the dimensions of the image (needed so that a popup of the appropriate size could be generated) were stored in a class attribute, like so:

<a href="http://www.website.net/Content/picture.jpg" target="_new" rel="popup" class="320x240" >

The javascript routine retrieved the dimensions from the class attribute using a getAttribute call. Unfortunately, IE apparently sets the class attribute to null immediately after it displays an object. Obviously this causes the script to crash.

The solution is to store the dimensions in the name attribute, like so:

<a href="http://www.website.net/Content/picture.jpg" target="_new" rel="popup" name="320x240" >

In terms of semantic markup, this is probably an abuse of name, but it does work.

Thumb-in-Post Version 0.93

Yet another update to Thumb-in-Post. In fact this one is not so much an update to the plug-in but to its config file. In updating the plugin to make it validate as XHTML, seem to have inadvertently created an ‘incompatibility between the plugin and the config file.

The new version can be downloaded here.

The change that needs to be made is extremely minor, so if you’d prefer not re-enter your settings into the config file, you can simply alter your existing config file as follows.

In the old config file there is a line which reads:

ThumbDivStart == <div class="thumb"

What you need to do is remove that last quotation mark, so that it looks like this:

ThumbDivStart == <div class="thumb

And you also need to do the same thing to the settings for PicDivStart and ObjectDivStart.

Apologies to all who have been inconvenienced by this, and thanks to Randy D. for pointing it out.

Thumb-in-Post Version 0.92

This is a minor update to the Thumb-in-post plug-in for WordPress. It’s a very minor update to the plug-in and corrects two small problems:

  • The code now validates as XHTML. If you are getting problems with validation using the plug-in, check that the tag inserted into your post is on a line by itself, with a blank line above and below it. This will ensure that <p> elements are properly inserted into the text by WordPress.
  • The plug-in now correctly applies class attributes to the <div> elements surrounding the image and caption.
  • Fixed the bug that causes the ‘Picture’ quicktag button to incorrectly insert the wp:pic custom tag

Download it here.

If you are using v0.9 or v0.91, all you should have to do is install the .php file.