Category Archives: WordPress

WordPress theme for Colloquy

I got bored the other week and created a WordPress styled theme for the Colloquy IRC client. It uses the standard WordPress colors and includes a nice WordPress logo in the background.

There are two variations of it– WordPress, and WordPress Busy. The only difference is that the latter hides events (join, part, nick, etc), which I find very useful for very busy rooms. Hence the name. ;)

Colloquy WordPress Theme

To install download the zip file containing the styles and image, unzip and drag the variants folder into ~/Library/Application Support/Colloquy/Styles/

From there you should be able to activate the style in Colloquy from Style > Standard > WordPress / WordPress Busy

Restored Archives

I set up my first WordPress site back in 2004 when WordPress was a very immature project. It was a great site and there were some good discussions, but due to some circumstances in 2006, it led me to delete my blog and all my content. It wasn’t necessarilly “deleted”, but taken offline.

About 2 years later, near fall of 2008 I set up my site again. Just to get something going I started from scratch and never imported the content. There were some bad memories with some of the old content. I wanted to move on.

Over the past 6 months or so I had toyed with re-importing the content. I had the backup. The last version I had run with the old site was 2.0.4. Today I decided to pull the trigger and import the old content.

I’ve imported 439 posts into this site. Now I have archives back to 2004. In September it will be 8 years I’ve been using WordPress– since version 1.2. It truly is an awesome publishing platform.

Mr WordPress On Your Bed

A friend pinged me on IM today and sent me a chunk of latin that was filler in a word document. It’s uhh… interesting when you run it through Google Translate.

Original latin:

Suspendisse bibendum magna sit amet lectus molestie faucibus. Sed semper blandit tortor. Etiam cursus.

English Translation:

Mr WordPress on your bed is great here. But you are always more. An accident.

Removing Standard Image Sizes from WordPress

I ran across an issue today where I needed to specify which image sizes were generated within WordPress. I didn’t need the stock sizes (thumbnail, medium, large) but I did need a few custom sizes. Adding custom sizes is the easy part but removing others threw me for a loop.

The quick and dirty solution would be to set the sizes in Settings > Media to 0 so that nothing would be generated. While this works on a single site, its not the best solution for something that would be deployed on multiple sites. After all, who wants to remember to change individual settings on each new site?

Best solution, filtering intermediate_image_sizes. Basically all you need to do is return an array of what sizes you want generated. In the example below, I had already used add_image_size() to generate 3 new sizes: theme-small, theme-medium, and theme-large.

Here’s the code:

add_filter( 'intermediate_image_sizes', 'rcd_remove_stock_image_sizes' );

function rcd_remove_stock_image_sizes( $sizes ) {
    return array( 'theme-small', 'theme-medium', 'theme-large' );
}

Basically what this does is define only our 3 new image sizes in the array eliminating the stock sizes of thumbnail, medium, and large.

Thanks to @Otto42 for the tip!

Capital “P”s, Communities, and Conspiracy Theories

I’m sure you’ve heard about the debate with WordPress vs WordPress. There was a patch committed to WordPress 3.0 that automatically converts it to include an uppercase P and follow the WordPress branding. This was added as as an easter egg of sorts to help the WordPress brand, and while I don’t have an issue with it, I do have an issue with the way some in the community reacted to it.

The problem with easter eggs is they’re supposed to be found by those in the community and they’re supposed to be fun. Of course, there was no hiding this one. The revision was committed in the public eye, but without a ticket. I don’t think there was much need for a ticket and public discussion because this has been in play on WordPress.com for a few years now. Of course, some argue that there was no community input because there was no trac ticket.

The one legitimate issue I could find with this patch was the fact that because the way it corrects text, it can possibly break image links and directories. I’m sure this is only in a minor percentage of cases, because as most have learned, their hosting environment is case sensitive and they use all lowercase directory and file names. This has since been fixed for trunk and 3.0.1 in revisions 15377 and 15378.

This begs the question, if this patch worked properly and didn’t break links, would we even be in this situation? Would the few squeaky wheels be complaining about Matt and Automattic doing their will and not respecting the community? Would this issue have been blown out of proportion? Would anything have even been said about it?

As usual, some in the community to complained. I’ve heard all sorts of excuses from editing user’s content (albeit just a spelling correction), to the capital P caused the BP oil spill. Yes, I’m not joking. Conspiracy theories breed conspiracy theories. There have even been parody sites made– capitalp.org and lowercasep.org

This brings about another point– I recently had a discussion with Aaron Brazell regarding the WordPress community and complaining. The point he made was that if it doesn’t affect your bottom line (income) stop complaining about it. All you do is waste your breath, waste your time, and don’t make as much money as you could. By directing your resources to other places, such as your business or contributing patches to WordPress, you can further better yourself and the WordPress community.

As usual though, there’s always a few that want to complain, and while I won’t mention them by name (they know who they are), I hope they take one thing away from this post– focus your time on making WordPress and the WordPress community better instead of complaining about this or that. Please  stop coming up with conspiracy theories about Matt, WordPress and Automattic; they’re rarely true. Its not an issue of principal, Matt, or Automattic; its an issue of making things better. Focus your time on creating a patch to fix the filter and fix the bug. That helps improve the community.

Upgrading Multiple Subversion Copies of WordPress With a Script

I run all my WordPress installs as Subversion checkouts. This makes it easier to upgrade since there’s no FTP involved and I can choose when to upgrade as well as to what version. Since I have multiple blogs, I created a script to facilitate an easy upgrade all of them at once when a new version is released.

As a Christmas present to the WordPress community I’m making my script available to the public.

The only requirement is that you’re using subversion to manage your WordPress installs already. Other than that, the script is pretty simple to use, there’s just one line of paths that needs to be updated.

To use this script, start by creating a new bash script on your server:

vi wpupdate.sh

Press “I” to turn insert mode in vim and paste in the following:

#! /bin/bash
# Copyright (c) 2009 Ryan Duff <http://ryanduff.net>
# This script is licensed under GNU GPL version 2.0 or above
#
# This script upgrades (switches) a subversion copy of WordPress to a tagged version of your choice
# List of Current WordPress tag versions can be found at <http://core.trac.wordpress.org/browser/tags>

# Set your paths
paths=(/path/to/install/1/ /path/to/install/2/)

clear

echo WordPress Update Script
echo ------------------------
echo
echo -n "Please enter version number and press [ENTER]: "
read version

for path in ${paths[@]}
do
cd $path
svn sw http://core.svn.wordpress.org/tags/$version/ .
done

Move your cursor up to the paths line and change to match the full paths to your WordPress installs.

Save the file. (Press Esc to exit insert mode. Type :wq and press Enter to save the file and quit vim)

Make the file executable:

chmod +x wpupdate.sh

To run the script type:

./wpupdate.sh

When prompted, enter the version tag you want to update to and press Enter. Current WordPress version tags can be found here.

If you have any questions or problems, feel free to leave them in the comments.

On Domain Trademarks in the Open Source Community

After reading an article on Weblog Tools Collection in regards to the WordPress trademark, and reviewing the information on WordPress.org, I got to thinking about how this affects the open source community.

In the commercial realm, it is very important for a company to protect their trademark. If they fail to do so, somebody might sell a similar product using the same name which could confuse consumers. In the open source realm, the software and code base is community based. Because of the community involvement, other related websites crop up to extend the original software.

In the case of WordPress, the code is maintained by a commercial entity, Automattic. As a commercial company, Automattic has an interest in protecting the name “WordPress,” especially since they run a hosted service at WordPress.com. At the same time, there are also plugins and themes developed for the software, as well as meetups and “WordCamps” which are a WordPress un-conference.

Naturally, people extending WordPress, would use “WordPress” in the name of their project or website, but unfortunately, this is a no-no based on the information on WordPress.org. Because of their legal advice, they recommend that you use “wp” instead of “WordPress” in the domain name of any related project– unless, of course, you want to be sued for trademark infringement. On the flip side of this, the WordPress logo, which has also been trademarked, is allowed to be used, as long as you use the “official” logo. They’re granting full use to the logo trademark, but not the name trademark.

The problem arises with making money off WordPress in a way that Automattic and/or WordPress already gains income from. In essence, you would be taking from profits not rightfully yours since you’re not the trademark owner. But what if you are just contributing to the community? Giving back, as in charity to the community with nothing to gain? Shouldn’t you be allowed to use “WordPress” in the clear? Common sense would agree.

This puts everybody– Automattic and the WordPress community in a catch-22. How can you effectively use WordPress in a domain name without degrading to “wp” or facing legal action. Is it just an issue with US Trademark law, or is there a better way to handle the issue and allow the use of “WordPress” in a domain name while keeping the trademark protected?

There may be a fix. Mozilla has allowed the use of their trademarked names in domains, as long as you have permission. They have a fairly straightforward application that you can fill out and send along to the Mozilla Foundation. Pending approval, you can use the trademark as long as you don’t do anything to confuse your website and the trademarked product. Something similar out of the Automattic/WordPress camp would allow common sense, non infringing uses of “WordPress” without worrying somebody might steal their business. And since it’s permission based, it can be denied if things start to go awry.

Since I’m not a lawyer, this is just my opinion. What are your thoughts on the whole situation?