Birthdaze 0.5.3

This version just adds a little feature that Matt asked for on Twitter: the widget and shortcode can now just show today’s birthdays. If you’re using the shortcode, set the time option to day.

Get the latest version of Birthdaze here: birthdaze-0.5.3

Tagged , Leave a comment

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.

Tagged Leave a comment

Birthdaze 0.5.2

I got an email suggestion to add a way to highlight a birthday if it’s today. It turned out to be pretty easy – this minor update adds a span tag with a class “bdaytoday” or “nobdaytoday” to each birthday in a list. So, adding this would make today’s birthday(s) red:

.bdaytoday {
color: #f00;
}

Get the latest version here: birthdaze-0.5.2

Tagged 2 Comments

Hiding the admin bar

The admin bar in WP 3.1 is really cool, but what if you don’t want it? Individuals can remove it on their Profile pages, but there’s no admin option to remove it globally – unless you count the show_admin_bar filter. Here’s how to use that filter, for instance in your theme’s functions.php file:

add_filter( 'show_admin_bar', 'orgten_hide_admin_bar' );

function orgten_hide_admin_bar($showhide) {
$show_admin_bar = false;
return false;
}

Leave a comment

W3 Total Cache CDN broken?

As I’m sure you know, I like W3 Total Cache – it’s a fairly painless way to implement a variety of methods to speed up a site and reduce server resource usage. I especially like being able to offload media library and other files to a content delivery network like Amazon S3. Earlier today I noticed that for a particular page only some of the images were pointing at their S3-mirrored versions. Apparently I’m not the only one having this problem. In my case at least, the fix was easy: clear out the unsuccessful file transfers queue and refresh the cache.

Tagged Leave a comment

Auto-update an image every X seconds

For a web cam site I’m working on, I wanted to automatically update the web cam image every so often. The classic way to do this is with meta refresh, but that’s supposedly deprecated and it unnecessarily reloads the entire page. JavaScript to the rescue! This little snippet reloads any image with the “refresh” ID every 60 seconds. It’s mostly borrowed from here, with the setInterval thing added because I didn’t like the onload thing in the body tag.

function cambox_refresh() {
echo "\n" . '<script type="text/javascript">// <![CDATA[
function refreshCam() {
image = document.getElementById("refresh");
image.src = image.src + "?rand=" + Math.random();
}                 setInterval("refreshCam()", 60000);
// ]]></script>'. "\n";
}
add_action('wp_footer', 'cambox_refresh');
Tagged Leave a comment

Photopress2 0.6

This version is a big update, so there are bound to be some bugs. The plugin now uses the WordPress taxonomy system for tags, and includes paging all over the album. There’s a tool for importing your tags into the new taxonomy.

The tag displaying template function now has more options:

<?php if (function_exists('photopress2_image_tags')) photopress2_image_tags($before='Image tags: ', $between=' ', $after='', $id=get_the_ID()); ?>

If you’re using the template function in your theme you should update that since the old version will display all of your tags…

Suggested upgrade steps:

  1. Deactivate and delete the old plugin.
  2. Unzip the new plugin, creating a “photopress2″ folder in your plugin folder.
  3. Make sure your album page contains <!–photopress2_album–>
  4. Go to Photopress2 : Settings and verify your album page slug and other settings.
  5. Refresh your permalinks at Settings : Permalinks.
  6. Go to Tools : Import photo tags to import your Photopress2 0.4 tags.
  7. If you’re using the template function, update that.
  8. If you use a cache plugin, clear it.

Get Photopress2: photopress2.0.6.zip.

Tagged Leave a comment

Birthdaze 0.5

This update corrects WP_DEBUG warnings in Birthdaze, mostly in the widget. If you’re using the widget you’ll need to reconfigure it due to the changes. This version also adds an option to display the next week’s birthdays. The “thismonth” option in the shortcode and template function is now called “time” and should be set to “all,” “month,” or “week” depending on what you want to display. The readme.txt file should be up-to-date if you need more information.

Get the latest version of Birthdaze here: birthdaze.0.5.zip.

Tagged Leave a comment

Titlematic 0.2

Titlematic is a simple plugin that gives title-less posts a title. This version adds an options page to configure the automatic title length, the character after the automatic title, and the fallback title text. It’s also now hosted at the WordPress plugins repository for easy upgrades.

Get Titlematic 0.2 from the WordPress Plugin Directory.

Update: If you auto-upgrade from 0.1, the old version may not be deleted and the new version may not be activated. If so, you’ll need to deactivate and delete 0.1, then activate 0.2.

Tagged Leave a comment

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.

Tagged , Leave a comment