In: , , On: 2008 / 08 / 25 Short URL: http://ozh.in/j2

To those using comment moderation on their blog, here is a simple trick that should become part of every theme.

I just left a comment on Logo Design Love, an empyreal blog about logo design by David Airey. My comment went into moderation as per his comment policy, but instead of the standard message you've been told a million times (the brutal "Your comment is awaiting moderation" which reads like a cold statement from a Custom officer), here is what I got:

See? Nothing genius, just less robotic attitude, just basic courtesy and a bit of information. But it definitely makes things more enjoyable. Will remember this whenever I code a theme.

As you may have read it already on Lorelle's blushful announcement, I made a Comment Counter widget for Liz Strauss.

Liz Strauss is considered to be an expert in the art of engaging conversations and, for blog, comments (I dig her blog tagline "You're only a stranger once"). One day Lorelle and Liz were chatting about how successful she was on that field, and the idea of a wickedly cool widget that would show comment counts popped out.

It's been an exciting opportunity to "work" with these two fine ladies, and I'm very pleased by the result. The widget I made is pretty cool and flexible, with a lot of options. Think "feedburner badge", except you have everything under control.

The whole purpose of displaying your comment count is really up to you. The obvious usage would be showing off how social a website is, with a humongous five or six figure digit, but I think even for more humble sites with a few thousands, or hundreds, or even dozens, it has its role: it shows you simply care about comments and commenter, which is engaging for visitors and an invitation to join the discussion.

And anyway, it's just yet another fun chicklet :) Get yours!

Edit: Oops! I actually forgot to press the "Commit" button :) Now you can get the new version!

Here is another update of your favorite plugin, the ubermighty Admin Drop Down Menu. I'll make it short:

  • Fixed: a bug with Safari & OSX that was causing sort of blank screens. Thanks to Dale for being a tester for me. He told me that everything looks fine on his Mac with Safari 3.1.2, Firefox 3.0.1, Camino 1.6.3, Flock 1.0.8, Netscape 7.1, Navigator 9.0.0.6 and Sunrise 1.7.4 :)
  • Improved: support for Fluency which has just been updated too
  • Improved: support for WordPress Mu, which gets its own set of cute menu icons
  • Added: translations, in French and Italian thanks to gidibao
  • Improved: breaking long menus, which is muuuch smarter and nicer now (see below)
  • Improved: various bits of PHP and javascript code to minimize impact on global warming

Get the new version now! I don't plan on adding any new feature in the near future, unless someone makes a killer suggestion or reports an atrocious bug. Next stop will be working for WordPress 2.7 compatibility, but I won't touch the plugin before a beta or a release candidate for 2.7 is out.

When updating my WordPress plugin Admin Drop Down Menu with all these cute icons from famfamfam, I felt a bit overwhelmed by them. I knew there were a lot of icons, I just never realized there were so many! Digging through 1000 icons for something that would match "Permalink options" is not that fast.

After spending 15 minutes looking at all these icons again and again ("now I need something that would mean Edit Stuff") I realized that this was too cumbersome not to be improved. I needed, the world needed, a tool to find and sort them! Was I going to spend 30 minutes searching for icons when I could be spending 80 minutes coding something to do it more easily? Can't beat geek logic.

So here is the famfamfam icon explorer. Thanks to consistent name patterns (something_edit, something_go, tag_something) it's now a lot easier to search for icons related to something particular.

For a given search pattern you'll see all corresponding icons, and hovering them will pop a detailed view with various sizes and various background colors.

That was fun to do, now I'm going to put icons everywhere!

Update: I've update the plugin doc and added a page for plugin coders.

I've just committed version 2.3 of the mother of all admin menu plugins, Admin Drop Down Menu, and there are some pretty hot stuff inside. Plugin coders, be sure to read this till the end.

First, it's finally ready for translation. That's something I've been asked a few times, so now polyglots can rejoice since there is a .pot file included. I've also added CSS classes and id's to all menu elements so styling maniacs can hack their stylesheet to death.

The most visible change will be optional menu icons. That's something I've been nagged about a gazillion times, and that I had never added because, well, I don't need them :) So, why add them now, you ask? Because I had a fun idea to implement!

The cool stuff with this release is there is sort of an API to play with. The function that builds the array that builds the menu is full of hooks so that if your plugin needs, for some reason, to modify menu entries, you don't have to write dirty patches, just throw some add_filters() in (hat tip to Kevin Behrens and his plugin Role Scoper for inspiring this)

But wait, there's more, and cooler!

Icons are stolen from the awesome FamFamFam, of course. By default, plugins get a cute green plugin icon, but this can get a bit boring when you have dozens of plugin entries looking the same. Plugin coders want their individuality!

Well, they can have it: there's an awesomely super cool hook that allows plugins to have their own icon! (I'm pretty excited with this feature:)

To do so, simply add the following in your plugin:

  1. add_filter('ozh_adminmenu_icon', 'myplugin_icon');
  2.  
  3. function myplugin_icon($hook) {
  4.     if ($hook == 'myplugin') return 'http://url/to/cute/icon.png';
  5.     return $hook;
  6. }

Where 'myplugin' is the $file argument used to add your administration page (for instance add_options_page('My Plugin', 'My Plugin', 10, 'myplugin', 'myplugin_do_stuff'))

If you use this cool feature in your plugin (or need help to do so) be sure to let me know!

The plugin quick reviews I recently did (Plugin Competition roundup, part 1, part 2) got two consequences so far. First, they generated some feedback from readers asking for insights or advices, and second, they quite left me in perplex astonishment regarding how many coders ship plugin with messy code.

About the second point, I threw together some personal thoughts and tips about how, and why, keeping plugin sources clean. Very common sense and obvious stuff for anyone who is a bit serious about maintaining code, but I hope this will make a decent pointer for novice coders (or just messy people:)

Internetrepreneurs drive mom cars and drool over a Bugatti Veyron (or an Aston Martin DBS). Entertaining read if you’re a bit into cars. (0) «

I've just committed a quick update to Admin Drop Down Menu, now showing version number 2.2.1
This update brings in a few CSS tweaks and improves the compatibility with Fluency, so if you're using this admin theme you'll be happier after upgrading.

On the subject of this wonderful little plugin, my ego quite inflated yesterday when I came across this article entitled "the plugin that changed WordPress forever. I tell you, coders need more hyperbolic praises like this:)

While I'm at it: if you like this plugin, you know what? Please, do me a favor. Head to its page on wordpress.org and rate it 5 stars! I will officially love those who will!

Here is part 2 (of 2) of my "reviewing", mostly from a plugin coder's point of view, the plugins running in the WordPress Plugin Competition.

Please, please and puh-leaaase, if you are a contestant and if you didn't read Part One, do read it before you proceed to part 2. There is a mandatory disclaimer that you and me don't want you to miss before you read any comment I could have made on a plugin of yours :) Thanks in advance. Now, let's go:
Read More

Every year or so, the excellent staff from the excellent Weblog Tools Collection runs a Plugin Competition. This is a very exciting moment of the plugin year because it fosters plugin coding and plugin ideas, and introduces new coders.

This year, 50 plugins were submitted, which I think is excellent. As I looked at some of the plugins I started to have ideas or comments that may (or may not:) qualify as valuable feedback for these plugin authors, so I thought, why not sort of review them all? Could be interesting and fun! So here it goes, 2008 Plugin Competition Review, Part One.
Read More