The Idea Behind WP Questions

I was just reading this inspiring article called Five things Free Software taught me. One of the things that stuck with me is the idea that knowledge tends to spread, beyond any obstacle.

So instead of working to prevent this spread, why not encourage it? Why not get the ideas, capabilities, and functionality of any given piece of software out to as many people as possible and kindle the flame? There are many ways to make money, so why choose a method that requires investing just as much time and effort into making software that lots of people want to use as trying to prevent the usage of said software? It sounds counterintuitive and/or just plain stupid on paper, but is generally seen as the traditional and conservative way to do it. Physical products must be treated differently than knowledge.

Continue reading…

scbFramework: Version 1.4

The plugin toolkit has been getting a lot of useful classes recently, so I though a version bump was in order.

scbUtil

scbUtil is a collection of useful little functions that I was using in a lot of my plugins. My favourite is the debug() function. Then there’s html() and html_link() for HTML generation. There are several other useful bits in there, but you’ll have to discover them yourself.

scbRewrite

One of the areas I wasn’t comfortable working with was the Rewrite API. The scbRewrite class was distilled from a discussion on wp-hackers. It’s only job is to take the rewrite rules you specify and hook them in all the right places.

If you would like to “try before you buy”, you can browse the source here.

Handling plugin options effectively

The more popular a plugin is, the more options it seems to have. This goes for themes too. Managing options is apparently brain-dead simple, using add_option() and friends.

However, when you find a plugin specifically wrote for cleaning up the Windows registry WordPress options table, you know it’s not all rainbows and unicorns.

People often complain that their options table is filled with cruft from previously installed plugins. How can this happen? The main reason is that those lazy developers are too distracted to take out the trash when you’re done with their plugins.

Because I’m a plugin developer too, ergo hard-working & focused, I wrote a class to help me with this problem. It’s called scbOptions and it’s a part of my little plugin framework.

It takes care of removing the options automatically when the plugin is uninstalled via the WordPress interface. It also encourages and makes it easier to work with consolidated options.

So that takes care of 2 out of the 10 most common mistakes. Do you have any tips for handling options better? Do share.

AWN 0.4 is awesome!

Avant Window Navigator is a dock-like window and launcher manager for Linux. The newest version (0.4) is available for testing.

Why is it awesome? Because it allows me to combine the two boring Gnome panels into one slick OS X / Windows 7 like dock.

I placed it on the right side to maximize the available vertical space, which is very scarce on my laptop screen:

AWN in action

After deleting the first Gnome panel, I found out that the second one can’t be removed. So I set it to auto-hide instead and put the AWN panel over it. It works suprisingly well.

I didn’t like the reflections so I set the Panel Offset to 0 in Dock Preferences -> Advanced.

I also set the Notification area background color to gray, so that the icons shipped with Ubuntu Jaunty look alright.

Now it’s just the way I like it. :D

You can read more about the new version over at OMG! UBUNTU!

Front-end Editor: Version 1.5

Straight from the lab, we bring you the latest and greatest in front-end editing:

Swap theme images

Currently, there is no easy way to change an image from your theme. You have to either override the image file through FTP or locate the code in your theme and modify it.

Wouldn’t it be nice if you could just double-click on the image you want to change and then just do it, without leaving the page you’re on?

Good news: now you can, with a little bit of tweaking. To make an image editable, you have to make a one-time edit to your theme.

Continue reading…

Merge Tags: Version 1.1

This plugin has been integrated into Term Management Tools.

While frantically merging tags on a site using this plugin, I realised that it would be easier if you could use the checkboxes, instead of typing each tag by hand.

Now it’s possible. In the bulk action dropdown you will find the Merge option. When you select it, a new field pops up, where you can write the destination tag:

bulk merge interface

The old interface is still there, for cases where you have tags that are very wide apart.

Also, the plugin is now ready for translations.

Translations

Belorussian – FatCow
German – Natalya Pastukhova
Polish – Krzysztof Kudłacik

Query Multiple Taxonomies: Version 1.0

Say you have two custom taxnomies defined: genre and artist.

Currently, you can do the following types of queries on your site:

?genre=jazz

?genre=jazz&cat=1

But you can’t do this:

?genre=jazz&artist=chet-baker

WordPress will just ignore one of the parameters.

This plugin fixes that.

Smart Archives Reloaded: Version 1.8

Previous versions of this plugin allowed only a single type of archive, controlled entirely from the settings page.

Version 1.8 is a lot more developer friendly: any options set on the settings page can be overwritten:

In your theme, you can now write:

<?php smart_archives('format=list&exclude_cat=123,543'); ?>

This works for the shortcode too. In any post or page, just write:

[smart_archives format=list exclude_cat=123,543]

What’s neat about this is that you can have more than one archive, or have the archive display differently in different parts of your site.

Trusting users with their HTML

One of the most longstanding complaints that WordPress gets is related to HTML formatting:

switching from HTML to Visual editor, wordpress changes things. Not everything, but enough to make it very annoying – if I’ve gone into HTML and coded things a certain way, I do not want wordpress to second-guess me.

The first thing we have to realise is that there are 2 types of users:

  • regular folks that just want to write the damn post and publish it
  • power users that need <iframes>s embedded in <div>s that form an unordered list of tag soup

So how do we please both?

Continue reading…