How to debug plugin activation errors in WordPress

If you have ever developed a plugin for WordPress you may remember seeing one of those unhelpful messages saying your plugin generated N characters of unexpected output.

The problem with those messages, apart from not knowing what exactly is what your plugin generated, is that sometimes the errors are not easy to reproduce. You go to your Plugins section, deactivate the plugin in question, try to activate it again and now all you see is “Plugin activated”, no errors.

The last time that happened to me I decided I wanted to see the content of those errors every time they occurred, and I came up with a solution to achieve just that. Is not pretty, but it works. Basically, I stop WordPress execution when this errors occur and show the output in my screen:

Continue reading

How to add a subpages menu to WordPress pages

WordPress allows the creation of nested pages. That’s a great feature when you need to split a rather long content into several parts and give them some structure. However, the problem is you’ll have to manually add links to the additional pages in order to make it easy for the user to navigate through all the content. Wouldn’t it be great if you could automatically add a menu, right inside the content of your pages, with links to the subpages or parent of current page? I think it would, and I’ll show you how… Continue reading

JSFiddle Shortcode

JSFiddle Shortcode is a WordPress plugin to help you to easily embed Fiddles in your posts.

I was working on a post and wanted to embed a Fiddle to show an example. I’m currently using GitHub Gist Shortcode plugin to embed gists and tough there maybe something similar for JSFiddle, but after a quick search I couldn’t find anything available in the Plugin Directory. I decided to created it my self and this the result.

Continue reading

How to Install Aptana Studio 3 in Fedora 15

A friend told me about Aptana Studio, an Open Source web development IDE. I think I used it years ago but then switched to NetBeans for some reason. After taking a look at Aptana’s website I decided I wanted to try it again. Below are three simple steps I followed to install Aptana Studio in Fedora 15.

  1. Download Apatana Studio 3 from http://www.aptana.com/products/studio3/download and extract the content of the downloaded zip file.
  2. Move Aptana Studio 3 to a standard location
    mv Aptana\ Studio\ 3 /usr/local/aptana-studio-3
  3. Create a file /usr/share/applications/aptana.desktop with the following content:

Although Aptana can be easily run just after you download the application, I like to have menu entries for most of the software I use, hopefully I’m not the only one who thinks like that and the above can help them.

Mendeley 0.9.8 installer for Fedora 14 and Fedora 15

Recently I wrote about how to solve some issues with Mendeley Desktop in Fedora 14 but in that post I didn’t show how to properly install the application adding the necessary menu entries and installing the files in the right directories. The ideal approach would be to create an RPM to handle de installation process, however, this time I just created a short script that downloads Mendeley Desktop, install the files and apply the fixes from my previous post. Continue reading