Tag: plugins

SEO Friendly Titles – The first WordPress plugin you should install

Posted by – August 5, 2008

One of the very first things I do when installing a WordPress blog is to hack the titles. By default the page titles that WordPress generates are not SEO friendly, and the individual post page titles put the title of the post after the blog and archive wording.

The all in one seo pack plugin allows you to modify the blog’s meta tags through the WordPress admin panel as well as on the individual posts through the post editor. Its defaults are sensible and it represents a cleaner solution than hacking at the code to do it yourself because of the abstraction gained through the WordPress plugin architecture.

It’s now part of my standard WordPress install and should really be a part of the core software.

Extending Firebug through plugins

Posted by – July 30, 2008

It’s happened. My favorite Firefox plugin, firebug, is so useful and well-designed, that developers have decided to add on to it’s functionality through plugins. While these are still installed and managed the same as a normal Firefox plugin, they require firebug to be installed first. In fact, they are not extending the functionality of Firefox, they are extending firebug itself. They are plugins for a plugin.

It started (AFAIK) with Yslow. This plugin, developed by Yahoo!, analyzes the page, and determines why it is loading slowly. It is based on their own best practices for high performance websites. This is most likely not the type of tool you will use daily, but when you get to the optimization stage of a project it is very handy.

Just the other day, I had the need to analyze the cookies one of my sites was using, and to do so installed Firecookie. Overall I was impressed. It provides a dead-simple way to view, edit, and delete any cookies associated with a page. The one feature I wish it had, was the ability to temporarily disable cookies, without deleting them. This is handy if you want to quickly check what something looks like while logged out of a site, without having to actually log out, and then back in.

There are other firebug plugins I have yet to use, and I’m sure more are currently being developed. All of this added functionality strengthens my belief that firebug is becoming less of a nicety for developers, and more of a necessity. It is definitely one of the larger tools in my development toolbox.

WordPress code escape plugin: escapeCode

Posted by – July 15, 2007

The problem with most code escape plugins
After starting this blog, I quickly realized that I need a plugin that will automatically escape html in a code block. Otherwise, it is a big pain to go through and convert all symbols to their escaped equivalents (ex: less then signs to ‘&lt;’). I looked into a couple different solutions, but there was a major problem with them all: they convert the code on input. What this means is after you write a code block, it escapes everything inside of it, then saves it to the database. This works fine, until you need to edit your post. When you go to edit, you see ‘&lt;’ instead of ‘<’. Not only is confusing and hard to read, but when you save it again, then it escapes everything a second time, making what is displayed on your blog incorrect.

Why my wordpress code escape plugin is different
I decided to escape the code blocks right before it is output to the page. This means that whatever you type in a code block is saved that way in the database. Because of this, you can edit posts multiple times, with no errors. When editing a post, the code in the blocks looks exactly how you typed it in, so it’s nice and easy to read. However on page everything is escaped for you. This plugin also gets rid of the ‘Smart Quotes’ that wordpress annoyingly tries to use.

Download / Install escapeCode

  1. download the file: escapeCode.zip
  2. unzip and upload to your plugins directory.
  3. activate it

That’s it! Nice and easy to understand code, with nothing to configure. I’ll also post the code below so if you prefer, you can copy the code and paste it into a php file you create. Enjoy!

(.*?)<\/code>/es', "nsa_contentFilter::formatCodeString('\\\\1')", $content);
        return $str;
    function formatCodeString($str)
      $str = str_replace('\"','"',$str);
      $str = htmlspecialchars($str);
      $str = str_replace('&','&',$str);
      $str = str_replace(array("&#8216;", "&#8217;", "&#8242;"), "&#039;", $str);
      $str = str_replace(array("&#8220;", "&#8221;", "&#8243;"), "&#034;", $str);

      return "<code>$str</code>";