Categories
General

Fixing unserialize() error at offset…

I’m working on an update to flickpress so it’s compatible with WP 3.3. I decided to upgrade to the latest version of phpFlickr, but started getting an error when browsing my favorites, something like this:
unserialize(): Error at offset 3400 of 8999

I tracked it down to a Japanese character in one of the photo titles and unserialize in phpFlickr. It was my fault though: the MySQL table that flickpress was installing didn’t specify a character set. I finally figured out that setting the table’s character set to UTF-8 would make unserialize happy. To do this with dbDelta, WordPress’ handy database table install/upgrade function, I changed my CREATE TABLE SQL to look like this:
CREATE TABLE table_name ( column1 CHAR( 35 ) NOT NULL ) DEFAULT CHARACTER SET UTF8;

To generalize, if you’re getting an unserialize error on data stored in a database, take a look at the table’s character set.

Categories
General

flickpress 1.9.2

This version fixes more bugs uncovered by WP_DEBUG and adds a way to import Flickr images into the Media Library. When you’ve clicked through to a photo, if your user has upload permission there’ll be a link at the bottom of the popup to import the image as an attachment to the current post. Then you can use the imported image as you would any other attachment, such as for the post thumbnail or featured image. Please only import images when you have permission to do so!

Get flickpress 1.9.2 at the WordPress Plugin Directory or by upgrading as usual in your WordPress admin panel.

Update: I installed a derivative of Twenty Ten so you can sorta see the image import feature in action. I imported a photo of a leaf and set it as the featured image for this post, so if you’re viewing this post by itself you should see that as the header image.

Categories
General

flickpress 1.9.1

This release adds one big feature, refines a few things introduced in the last release, and fixes some bugs.

First the bugs: A discussion about WP_DEBUG on the wp-hackers list inspired me to turn it on track down the avalanche of warnings, notices, and errors that flickpress was causing. Actually, it wasn’t that bad and fixing the issues didn’t take long. The major change was in the widget code – I was still using pre-2.8 widget functions. So, if you’re using the widget you may will need to check re-enter your settings. I also found and fixed a few breadcrumb problems in the popup tool.

Refinements: Thanks to some feedback from Gustav, I changed the before/between/after caption text fields to allow HTML. This can be used for a variety of things, such as breaking the caption into two lines or wrapping the caption with a tag to use custom style. The last version added simple ThickBox lightbox support, but in case you wish to use another lightbox method I added a custom lightbox option that works with plugins like LightBox Plus.

New feature: On the settings page you can now specify default licenses for photo searches. This will save you a few clicks if you always search for photos licensed the same way.

Get flickpress 1.9.1 at the WordPress Plugin Directory or by upgrading as usual in your WordPress admin panel.

Categories
General

flickpress 1.9

This update adds some caption options, ThickBox support, moves the widget into the main plugin, and updates the phpFlickr library to 3.0. The new caption options let you switch the order of title and author, and put arbitrary text before, between, and after the caption parts. I moved the widget into the main plugin, so you may need to make sure it’s still in your sidebar. If you enable ThickBox support in the options then clicking an inserted Flickr image will display the largest image size available (up to Large) in a ThickBox window.

The plugin should work with the latest version of WordPress, currently 3.0.

Get flickpress 1.9 at the WordPress Plugin Directory or by upgrading as usual in your WordPress admin.

Categories
General

flickpress 1.8

I got a report of a conflict with a plugin called Scribe, so I’m hoping this version fixes the issue – if you use Scribe please let me know. At some point I’ll rewrite flickpress to be more immune to these conflicts, but in the meantime the changes I made should help.

In addition, this version fixes a small bug in the popup’s menu and uses a built-in WordPress function to make better (I think) page navigation links.

Report bugs early and often!

Get flickpress 1.8 at the WordPress Plugin Directory or by upgrading as usual in your WordPress admin.