Archive for the ‘Technology’ Category

New WordPress Plugin – Paul’s Latest Posts

Tuesday, January 20th, 2009

I’ve written a new plugin for WordPress called Paul’s Latest Posts. This sidebar widget pulls your latest posts and displays them with an excerpt. I’ve just gotten confirmation from WordPress Plugins that it’s been approved for hosting on the official WordPress Plugins page. It’s not showing yet, but when it is I’ll provide the link and you can tell me what you think.

500 Common Passwords

Saturday, January 3rd, 2009

We use passwords almost everywhere to protect our private, so a strong password is essential. There are numerous ways for generating strong passwords, yet people still continue to depend on weak passwords.

If your password is listed here, then it’s time to change it.

Edit: Had one of my “Duh” moments and forgot to include the link to the password list.

Mac OS Password Assistant

Wednesday, December 31st, 2008

Mac OS has a useful utility for generating secure passwords – Password Assistant. While it’s certainly useful, it’s only accessible from within preference panes that require you to enter a password.

I spent some time with Activity Monitor to see if I could determine if Password Assistant was a separate program being called. No joy there, so I turned to my old friend Google.

That’s how I found a utility from codepoetry that calls Password Assistant directly. It’s small, it works and best of all it’s free.

I May Have Found The Answer…

Tuesday, December 30th, 2008

…. to our current economic woes.

Just keep making mistakes like this until you find someone gullible enough to pay off the bank.[1]

VoilĂ , problem solved!

  1. Targeting students is probably not the way to go. Instead the banks should be looking for billionaires with a whole lot more money than sense. The US would be a good place to start I think. []

Copying Mac Address Book to LG Viewty (LG-KU990)

Monday, December 29th, 2008

My phone contract was up recently, and as an incentive to sign on for another year, my provider offered me a free upgrade. So I took the LG Viewty also known as the LG-KU990.[1] I’ll do a full review later, but for the moment, I want to talk about one issue I’ve experienced with it.

LG Viewty (LG-KU990)

LG Viewty (LG-KU990)

I go through so many phones that I like to keep my address book on my MacBook and sync it with my phone. While the Viewty does have Bluetooth, it’s not supported by iSync. Even worse, Bluetooth File Exchange couldn’t see any of the files or folders on the phone[2].

I had the same problem with my Nokia 3120, so I was somewhat hopeful that I’d find an iSync plugin to get me up and running.

After a lot of searching, I discovered that LG use their own OS on the phone which is overlaid with Flash screens to enable interactivity. Worse still, LG don’t implement the SyncML protocol used by the other major manufacturers, and by iSync. So there’s no way to sync my brand new phone with my MacBook.

My only concern is the phone book, I don’t use iCal, and I really don’t want to have to manually enter every name in my Address Book. Luckily, there is a work-around, and here’s how:

  • Open Address Book,
  • Use CMD-A to select all the entries in your Address Book,
  • Navigate to “File” -> “Export” -> “Export vCard…”,
  • When prompted save the vCard.

The next step involves connecting to the Viewty via Bluetooth. If you have not paired the devices before, then you should do so now.[3]

  • Click the Bluetooth icon in the Menu Bar and navigate to “Browse Device”,
  • Select your phone name from the list and click “Browse”,
  • Tap “Yes” on the Viewty to accept the incoming connection request,
  • On your Mac, click the “Send…” button in Bluetooth File Exchange,
  • Locate the vCards file that you saved earlier, and click “Send”,
  • Once the transfer has completed, the Viewty should prompt you to “Restore Contact backup file”, tap “Yes”.

And that’s it. Your Address Book has now been copied to your phone.

  1. I’d usually link to the official site, but it’s flash based and doesn’t work on Mac OS X – and there doesn’t seem to be a text based version available []
  2. Even though Bluetooth File Exchange won’t display any files or folders, the phone is still connected via Bluetooth and files can still be transferred in the normal manner. []
  3. Short and simple explanation: Turn on Bluetooth on your Mac, turn on Bluetooth on your phone, click the Bluetooth icon in the Menu Bar, select “Set Up Bluetooth Device” and follow the Setup Assistant. []

WordPress and the GPL

Monday, December 29th, 2008

There’s an interesting debate going on in relation to WordPress and the GNU General Public License (GPL), more specifically WordPress themes and the WordPress.org theme repository. (WPCandy has a great post about the in’s and out’s of the whole situation.)

For many bloggers, the GPL means nothing to them. In short, the GPL is a license used to distribute “Free Software”. In this context “Free” doesn’t mean that there’s no cost associated with obtaining the software (though in practice Free Software often is), but that there are certain Freedoms guaranteed to the end user by the GPL.

The basic tenets of the GPL are:

  • If you release software to the public under the GPL, you must provide the source code, either with the initial download or on request.
  • You may charge for software, and/ or, source code released under the GPL.
  • The end user is allowed to re-distribute the original software, but must do so under the GPL. (The end-user is not required to charge for for re-distributed GPL software, even if they paid to obtain it.)
  • The end user is allowed to modify the original software in any way that they want.
  • If the modified software is released to the public, then the modified software also must be released under the GPL and the modified source code must also be made available. (The modified can also be charged for, but once again the end-user is allowed re-distribute it at no cost under the GPL.)
  • Any software derived from the GPL’d software, must also be released under the GPL.

So how does this affect WordPress themes? WordPress is released under the GPL, and according to Matt Mullenweg, founder of WordPress and Automattic, WordPress themes and plugins are derivatives of WordPress and therefore have to be released under the GPL.

As a result of this declaration, over 200 themes were removed from the WordPress theme directory because they did not comply with the GPL. The main reasons given were that these incompatible themes:

  • contained hidden spam links, or
  • had conditions attached which were forbidden under the GPL, or
  • linked back to sites that also provided premium themes that were not released under the GPL.

While I, and many others, agree that removing themes that fell under the first two conditions above was the right thing to do, the controversy is raging over those themes that fell into the last category.

A lot of people have made a lot of money developing Premium Themes. While the GPL has no issue with charging for this work, Premium Themes often come with conditions that prevent the end user from re-distributing and/ or modifying the theme.

These Premium Themes clearly do not comply with the GPL, and if Matt’s argument regarding the derivative nature of WordPress themes is accepted, then the theme developers are in breach of the GPL.

Given that WordPress has been GPL since day one, and that the team behind WordPress are committed to promoting the GPL, I can fully understand why these themes should not be included in the Theme Directory. After all, the Theme Directory is run and maintained by the WordPress team, and they are free to decide the criteria required to be admitted.

On one side of the debate, we have those themes that are GPL compliant and will be included in the Theme Directory. On the other side of the debate, are those themes that are not GPL compliant and won’t be included in the Theme Directory.

In the middle of these two sides are the themes released under the GPL, fully compliant with the license, but link back to a site promoting themes that do not comply with the GPL. It is these themes that have led to the current controversy.

The developers of these themes that are making the most noise about being removed from the Theme Directory. I can understand their frustration. Their business model depends on two things: being able to sell multiple copies of the same theme without fear that it will be re-distributed for free; and being linked to by WordPress.org and all the sites using their themes.

The decision to remove these “middle ground” themes has hit the premium theme developers in their pockets, and they’re being extremely vocal about it.

As always, there’s two sides to the story. Matt’s opinion seems to be that WordPress is GPL’d and therefore anything derived from it should also be released under the GPL. This is not to say that theme developers can’t make money from their creations, but that they can only do so under the terms of the GPL.

The premium developers on the other hand don’t believe that themes are derivative works and therefore don’t fall under the GPL. Being the case, they believe that they should be free to sell their creations under any license that they want, and that they should be free to restrict distribution in order to protect their copyright and their business.

In the end, the debate comes down to one question: Can a WordPress theme be considered a derivative work?

Unfortunately, there is no standard definition of what constitutes a derivative work, but one generally accepted definition is that a derivative work is one that uses, modifies or changes the original source code to produce a result. In other words, the derivative work would not function if the original did not exist.

If you accept this definition, then a WordPress Theme has to be considered a derivative work because it simply does not work once it is removed from the WordPress framework. (You can see this for yourself by following this link to my WordPress theme, hosted outside the WordPress directory.)

So where does this leave the Premium Theme developer?

In order to comply with the GPL, developers will have to remove any restrictions forbidding re-distribution of their work. While they may be able to still to sell their themes, it won’t take much time for others to release them for free, in line with the terms of the GPL. When that happens, their entire business model will disappear, along with their revenues.

I’m not suggesting that there is no way for WordPress theme developers to make a living from their work, but they will have to seriously reconsider their current business models.

There are alternative business models available, all of which are compatible with both the spirit and the letter of the GPL.

Linux is probably the best known GPL software, and there are plenty of companies that have made money from Linux – mainly by providing paid-for support. WordPress Themes are nowhere near as complicated as a full OS, but there should be more than enough customers out there willing to pay for support on their WordPress based site.

The GPL only applies if you release your derivative work to the public. Therefore, you are not required to release your modifications if you keep the software in-house. This leaves the option to develop an theme framework (which is not released to the public), upon which you can develop customised themes.

While customised themes may take more time to develop, this is offset by the fact that they can be sold for a higher price. Using a decent theme framework would cut down on development time and reduce costs.

There is one drawback to developing custom themes: once you have released the theme to the customer, you are required to do so under the terms of the GPL. Once the customer has paid for the theme, it is theirs to do with as they wish, and they are free to release it, if they so wish. (The upside is that, in most cases, someone requiring a customised theme is not going to release it – at least not free. Either way, it doesn’t matter – you’ll have been well paid for your work.)

After all of that, what does this mean to bloggers? In the short term, the WordPress theme directory obviously has a whole lot less themes to choose from. Then there’s those who have already bought Premium Themes. Where are they going to stand, once all of this has blown over? (As it undoubtedly will.) That’s probably the hardest question to answer, and I’ll hold my hand to my heart and say I just don’t know.

In the long term, not a whole lot will really change. If you want to start to blogging, want a decent looking theme, and just get stuck in, then there are plenty of GPL themes out there to satisfy your every blogging need.

Watch The Newgrange Winter Solistice On-Line

Saturday, December 20th, 2008

The Office of Public Works will be streaming the Winter Solstice live from Newgrange. The broadcast will require Windows Media Player, so those of you on a Mac can use the User Agent Plugin for Firefox and Flip4Mac to watch.

The broadcast is available from 08:30 on Sunday 21st.

Edit: Just as I posted this, an article from The Irish Times appeared in my feed reader with more details about the “rebuild” of Newgrange in the 1960’s.

So You’re Still Using Internet Explorer? Why?

Wednesday, December 17th, 2008

You know that it’s a major problem when some of the biggest news outlets are running the story and when some of the best known security firms are advising against running IE until a fix is issued.

So why are you still running Internet Explorer?

Here are some of the main reasons NOT to use IE:

  • It’s full of security holes – being integrated with the OS is a Bad Idea. There’s too much complexity in deciding whether a file operation should be allowed or not. Is the browser running as a file explorer or as a “normal” browser?
  • It’s terrible at web standards – ask anyone who has to design a website and they’ll tell you about the recurring nightmares they have about getting sites to work in IE.
  • It’s slow – rendering pages takes forever, especially if a site incorporates JavaScript.
  • Updates aren’t provided in a timely manner. One of the reasons that the latest security scare has become so big, is that Microsoft only release patches once a month. That gives malware writers a full months head-start before a patch may be released.

So if security and privacy are important to you, then switch to another browser. There’s quite a few out there, available for free, and much better than Internet Explorer.

EDIT: For those of you that didn’t, or won’t, take my advice, here’s the patch to fix the latest security problem with IE. One more word of advice: Get used to patching IE, this is not going to be the last security issue you’ll have to deal with.

Updating Your WordPress Theme to Use More Than One Sidebar

Tuesday, December 16th, 2008

Since I started working on my own themes, I’ve learnt a lot about how WordPress works. I’m still not at the level where I can write a theme from scratch, but I’m learning to modify themes for my own use. My first themes were based on either Public Domain or GPL themes, and I mainly stuck to modifying the CSS stylesheet.

My latest theme now uses five different sidebars to display information. There are four on the homepage (home.php) and one on the single post page (single.php). Most themes that I’ve come across implement one sidebar, or at most two. So how do you add more sidebars?

The first step is to edit your themes function.php file. Search the file for the following code:

if ( function_exists('register_sidebar') )

Some themes might also use the following code instead:

if ( !function_exists('register_sidebars') )

Within this section you’ll need to locate the code that tells WordPress how many sidebars you are using. Themes using a single sidebar will generally use this WordPress API function:

register_sidebar();

Themes using more than one sidebar, will use the following API function:

register_sidebars();

Both API functions take an array as a parameter. This array specifies the HTML code that appears before and after each widget that will appear in the sidebar. register_sidebars(); takes an additional parameter that allows you to specify how many sidebars should be used.

In either case, you’ll need to change this code to the following:

register_sidebars(x, array);

Replace x with the number of sidebars that you want in your theme. The array part of the code can be left as is.

The next step is to add the actual sidebars to the theme files that you want to contain the new sidebars. (Usually these would be either index.php, home.php, single.php, orarchives.php.)

Add the following code to the appropriate theme file:


<div class="sidebar_css_class">
<ul class="sidebar_list_class">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(x) ) : ?>
<?php endif; ?>
</ul>
</div>

The class names used in this code example can be anything that you want, and will have to be added to your theme’s style.css file. Replace x with the specific number of the sidebar that you want to insert, e.g., if you want to insert a second sidebar into the theme, then your code will look like this:


<div class="sidebar_css_class">
<ul class="sidebar_list_class">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
<?php endif; ?>
</ul>
</div>

Upload the files to your theme directory, overwriting the original files if prompted. (To be extra safe, you should already have backed up the original files.) To configure the new sidebar, go to the Widgets sub-page under the Design page in your WordPress Admin and select your sidebar from the drop-down list.

Footnote: register_sidebar(); does allow more than one sidebar to be specified. It’s used in cases where each sidebar needs a different name and allows the theme designer to specify different layouts/ appearances for each sidebar. More information can be found on the relevant WordPress codex pages: register_sidebar(); and register_sidebars();.

The Mouse is 40

Wednesday, December 10th, 2008

On the 9th December 1968, the first mouse was demonstrated. Who would have guessed that a wooden, one button piece of kit would go on to revolutionise how we interact with out computers? Just look how far the humble mouse has come since then: