Beta testers wanted for Post Avatar

It’s nearly here! Post Avatar 2.0 is pretty much ready but before I release into the wild I’m looking for some beta testers to, well, test it out.

So what are the major changes?

WordPress 2.7 Baseline

When I first developed Post Avatar, WordPress 2.0 had just come out and all upgrades have been compatible with it. But lets face it, having to maintain support for that long a range of WordPress releases has been difficult. Plus I want to take advantage of newer features in WordPress that I’ve decided to benchmark development for the 2.7 release and up.

Filters and Actions

I’ve added a number of actions and filters that hook into Post Avatar to make development of add-ons (uploading capability, additional image selectors and so on) much easier.

Changes to the gkl_postavatar template tag

Yes, I have made changes here. For people who don’t feel comfortable editing their themes, the HTML/CSS options will still be available in the Post Avatar settings page. However, you will no longer be able to set HTML to display before and after an image within the template tag.

If you’re interested in beta testing, drop me a line: vix@garinungkadol.com and I’ll send you the zip file.

So how's that rewrite coming?

I’ve converted most of the Post Avatar plugin into a class and added hooks for certain areas: the options screen and the write screen. My goal for this rewrite is extensibility. This idea is coming up more and more in WordPress land, particularly in themes, so I think plugins (which extend WordPress themselves) can do more for integrating with one another.

For Post Avatar what I want from the plugin is to simply choose from a library of existing images. Last year I rewrote the plugin from scratch to take into account: image uploads, tagging and a whole slew of features. It worked but I wasn’t completely happy with it and I felt it was taking away from what I originally designed Post Avatar for.

This time when I do put in uploading capabilities, user-centric post avatars and the like I’m going to be exploring methods of taking advantage of WordPress’s table structure and api.

Going back to this rewrite. The code is mostly ready – I’ll be releasing it for beta testing in a week or so.

Post Avatar 1.2.5

Changes to Post Avatar include:

  • Compatibility with WordPress 2.7
  • Fixed “Cannot modify header information” error when saving posts
  • Theme developer override for automatic avatar display
  • Template tag to return post avatar data in an array

UPDATE: Fixed a couple of bugs with the avatar display: css class was not being properly shown and the image dimensions were mixed up. So please download the plugin again.

New Features

I’ve added a couple of new things for developers who wish to integrate post avatar with custom functions.

For theme developers, you can override the automatic display of post avatars with this template tag:

<?php gkl_dev_override(true); ?>

Place this in your themes’ function.php and now the post avatars will not display unless you use the gkl_postavatar tag or use your own function.

To get an array of each post’s avatar data, use this function:

<?php gkl_get_postavatar(); ?>

The array contains the following information:
avatar_url -> URL to the post avatar
show_image_dim -> 0 to indicate that showing of image dimensions is off, 1 for on.
image_height -> image height
image_width -> image width
post_id -> post ID
post_title -> post title

Download now or visit the plugin page

Post Avatar Compatibility

I’ve received some support questions regarding the compatibility of Post Avatar with WordPress 2.6. Version 1.2.4 is compatible with WordPress 2.6.3.

I’ve started beta testing with WordPress 2.7 and thus far, even with the changes in the interface, everything is working as it should.

Post Avatar 1.2.3

A couple of minor bugfixes and a few new features, namely:

  • Avatar selection rights for Authors, Editors and Administrators only. Use the role manager plugin to customize access rights. If you already have Post Avatar installed, deactivate and reactivate the plugin to update user rights
  • Customize HTML and CSS within the options page. Dominik added this to make it easier to change the styling of avatars. It will work with both the template tag and the automatic avatar display
  • Automatic avatar display for post excerpts is now included
  • I fixed the bug where avatars where showing up in feeds

Download now or visit the plugin page

UPDATE (Oct. 9, 2007): Discovered a bug (Thanks Paul!) – automatic avatar display causes the image to appear twice when using the_excerpt. Download the updated zip file or if you’re feeling adventurous:

Open up gkl-postavatar.php and look for this code at the end of
// Display avatar without template tag
if ($gkl_ShowInContent == 1){
add_filter('the_content', 'gkl_postavatar_filter');
add_filter('the_excerpt', 'gkl_postavatar_filter');
add_filter('wp_head', 'gkl_postavatar_showcss');
}

Just comment out or remove “add_filter(‘the_excerpt’, ‘gkl_postavatar_filter’);”.

It should look something like this:
// Display avatar without template tag
if ($gkl_ShowInContent == 1){
add_filter('the_content', 'gkl_postavatar_filter');
add_filter('wp_head', 'gkl_postavatar_showcss');
}

Post Avatar Compatible with WordPress 2.3

I’ve installed the beta version of WordPress 2.3 and Post Avatar is running smoothly. Wheeee

There will be an update of the plugin due in a couple of weeks. Here’s a feature list:

  • Post avatar role – this will be useful for a community blog that wants to limit posting avatar rights to editors and admins only. If you’re using Role Manager 2.0, you can customize access rights.
  • Customizable HTML/CSS options for automatic display – if you’re not using the template tag, you will be able to specify your own HTML styling or CSS class to match your theme instead of editing the stylesheet that comes with post avatar.
  • Display in excerpt – Avatars currently show up wherever the the_content() tag is. I’ll be adding the display for the_excerpt() as well.

Update: Corinne helpfully pointed out a bug which causes the avatar to show in feeds. I’ve made the necessary fixes and updated the download file

Post Avatar 1.2

Post Avatar has been updated with the following:

*Scan subdirectories for images
*Created external scriptfile to make extending script easier
*Check if PHP_SELF contains substring (for subdomain installations)
*Improved image display in Write Post screen
*Add trailing slash to image directory option
*Check image existence using absolute path instead of url (for those without “Allow_url_fopen”)

Download it here

Version 2.0 is currently in the works and will feature multi-user options and avatar management. If you have any requests, please let us know.