Written by gerard on Friday 12 February 2010
I am continually making striving to improve the design of our community site, Unreality Shout. I'm quite fond of the grid-based design, but there's usually something that needs refined or improved.
A couple of days ago, I decided to move the search box to a more prominent place on the page. When I designed the site, I hastily threw in a search form as a sidebar block...right down around the bottom. I was never 100% happy about this arrangement, but my Drupal skills were weaker then.
However, I've been using Shout a lot more recently. And it started to bug me that I had to scroll to the bottom of the page to search for content. So I decided to bite the bullet and hard-code a search box into the top right-hand side of the header.
Tip for newbies: I thought I had all the code in place. But the search box failed to appear. Turns out that although I'd enabled the Search Box option in the global settings, it was switched off in my theme-specific settings. Whoops! Hopefully that's a time-saver for somebody else!
Written by gerard on Friday 4 December 2009
Something I've hated about running community sites on Drupal is the cursed Spam Link Deterrent filter.
The idea behind this filter is that it applies rel="nofollow" to any links in user-generated content. And the reason this is necessary is that when you have a membership site and you allow users to create content on it, you inadvertently attract spammers who want to drop links back to their own site.
By applying the nofollow attribute, you are telling search engines not to count that link as 'editorially approved' - therefore, the spammer doesn't derive any value from the link. The problem with the Spam Link Deterrent is that it's an all or nothing solution - even internal links to other content on the site get this added to them. This means that your site loses a lot of value from natural internal links.
Written by gerard on Friday 13 November 2009
This is just a short note to say that I'm closing comments on this site for a little while. Over the last week or so, I've been deluged with spam, despite having Drupal's highly regarded Mollom module installed.
I'm not going to bother fighting spammers by moderating comments constantly. Even when reporting spam comments to Mollom, the same stuff just keeps coming back: mostly Tiffany jewellry and Ugg boots spam. If I can't see the benefit of reporting spam to Mollom, then why bother?
What to do instead?
If you've found one of the tutorials or photos on this site useful and you have a website of your own, please drop me a link back. If you're commenting on something I've written, I'll pick up the response via Technorati, and it'll help other people to find my blog.
I am available in other places on the web, like Unreality TV, Unreality Shout and Twitter. And of course, if you need to speak to me, use the "Get In Touch" link at the top of the page.
Written by gerard on Saturday 2 May 2009
Drupal's default way of displaying categories really bugs me. They compile all the categories into an unordered list, which adds a lot of pointless complexity to the theme.
Coming from the WordPress school, I'd much prefer to have a comma-separated list of categories. Well, after an epic battle with my node.tpl.php file and much searching on the Interwebs, I've come up with a solution. It's based heavily on a code snippet used in this Lullabot article.
Essentially, what we need to do is parse through all the terms, build a link for each taxonomy term and then use the implode function to build the comma separated list. Here's a sample of the code I'm using:
Written by gerard on Friday 1 May 2009
When I set this blog up, my intention was not to go overboard on SEO or anything like that, so I created a basic set of categories, none of which were particularly keyword-rich. The list of categories stands at:
Written by gerard on Monday 30 March 2009
Here's another quick Drupal 6 tip: if you have the Update Status module enabled, you can get notifications by email when updated modules for your site are available.
This is a handy thing to have, particularly for security updates. As I understand it, the Update Status module periodically checks against the Drupal website (on each cron run) and will notify you if updates are available. I think it only checks activated modules though, so if there are updates to inactive modules, it won't notify you.
Written by gerard on Sunday 29 March 2009
If you were reading a couple of weeks back, I was musing about the effectiveness of minimalist blog designs and their impact on search engine optimisation.
The basic notion was that by eradicating all the extra stuff on the page and just displaying the page and the bare minimum of navigational links, you could improve search engine relevance and as a result, rank higher for any given search term. Why? Because, providing that the content is well written and follows the principles of good titling and semantic markup, there will be less irrelevant garbage on the page to confuse a search engine.
This follows on from the current discussion surrounding Twitter's value in terms of SEO - literally just the title and the content are displayed, along with a handful of navigational links back to the member profile.
I've decided to create a standard, one-column Drupal theme that only displays the content and not much else. I've left interlinking to the standard Drupal categories, but removed sidebars, Twitter statuses and anything else not relevant to the content.
Written by gerard on Sunday 8 March 2009
I'm working on a Drupal theme at the minute where I need to work out whether a user is is logged in (or not) and show them a message accordingly. One such scenario is user invitations:
So, how does one do this in a Drupal theme? It's actually quite easy.
For older versions of Drupal, they used to recommend the following code:
<?php
global $user;
if ($user->uid) {
// User is logged in.
}
?> But in Drupal 6 there's a tidy little function you can use: user_is_logged_in()
Written by gerard on Friday 6 March 2009

One of my biggest problems with Drupal is that it doesn’t have common solutions for standard problems: Image handling and WYSIWYG editing are just two areas where Drupal fails users.
Newcomers to Drupal will be aware of the hours of research needed to choose an Image management strategy. And for WYSIWYG editors, you have a fairly broad choice: TinyMCE, FCKEditor and many more.
One of the main reasons cited for Microsoft gaining dominance of the Office suite world was the consistency of its interface. You could go from Word to Excel to Outlook and have the same menu structure and icon sets. This easy familiarity led to people being able to get productive because they could find their way around the software intuitively.
Written by gerard on Monday 16 February 2009
At the current time, I've been a member of the Drupal.org website for 4 weeks shy of 3 years. I mention this because I had an awkward moment on the Drupal forum when an (obviously long-term) Drupaller showed his disdain for me for not contributing in all the time I'd been using Drupal.
Well, naturally said person was a bit of an asshole. One of those blinkered types who believes that everybody has the time or ability to contibute equally to the Drupal project. I'm not a PHP programmer, I've only just managed to work out how to theme in Drupal 6. I run a small ship of a few websites, and running them takes up all my time.
I mention this because I was quite annoyed at the implication that by not contributing, I was somehow a leech. Where was the legendary friendly Drupal community I heard so much about? While not able to contribute a hell of a lot, I was at least evangelising the product, writing how-to's and sharing interesting Drupal Planet articles via social media websites.