Monday, Apr 18th, 2011

This is a simple example of the use of Views hooks in the template.php file of a theme. It is written for use with Drupal 7 and Views 7.x-3.0-beta3. 

In this project, a page contains a View which must display one, two or three results/rows. Each row contains an image and and body text. The final output display must to stay roughly the same size regardless of the amount of content. To make it all fit and allow for custom theming/CSS, I decided to change the Image Style and Row Class depending on the number of results.

Monday, Apr 18th, 2011

Much of the styling and theming a designer specifies in a Drupal design mockup can be easily implemented. Once in a while, you'll run into a request that seems simple, but gets far more involved.

Friday, Apr 15th, 2011

In this project, I'm using both Drupal Blocks and Panels Panes. Blocks are used in the overall site layout/theme. Panes are used within the content area. Currently, there are five custom Panels layouts, and 15 custom Pages. Panels has made the content area customization significantly more straightforward.

Friday, Mar 25th, 2011

A section of my current project will be hosted by an external server/service. I hand them a HTML file, and they build their content within it. One problem is that the header search form must still work. For security reasons, Drupal won't accept a Form Post without the correct Form ID, so we need Drupal to generate the form.

Thursday, Mar 17th, 2011

A common web design feature is to move the label for a form field into the field value, then clear the field once it gains focus. There are many ways to implement this functionality, but this is the Drupal 7 theming method.

These steps assume your theme contains no custom Javascript. They describe how to add the word Search to the regular Drupal search block text field.

  1. Open your template.php file.
  2. We will use hook_form_alter() to change the value of the search field:
Wednesday, Mar 9th, 2011

Update 10/24/11: This article is the most popular article on my site. To simplify everything, I've implemented this as Image Caption Formatter on

Thursday, Mar 3rd, 2011

My sister owns a HP laptop. Recently, while powered up, she knocked it off an ottoman. This caused a head crash and intermittent clicking noises indicating a broken hard disk. When powered, the drive responded, but would no longer boot into Windows. I put the drive in an external enclosure and was able to quickly backup all of her data. The majority of the data was luckily intact and accessible.

Saturday, Feb 26th, 2011

Currently, is down. When is down you can still play single player, but multiplayer won't work. You can connect to a server, but login will fail with a 503 errror.

To temporarily fix the problem in v1.3, edit the file stored in the same directory as the server jar/exe. Change online-mode=true to online-mode=false to disable account authorization. Save the file. Restart the server and you'll be able to connect without a 503 error.

Sunday, Jan 30th, 2011

The most important thing to remember about hard disks is that they will fail. Often, they will do it without warning. So you must make back ups and keep them current.

Recently, I had a drive fail with excessive bad sectors. It happened after I had moved a new set of photos off my memory card, but before I had copied the files to my backup drive. The bad sectors corrupted the directory structure on the drive, but I doubted the actual file data was effected. It was time for a PhotoRec recovery.

Tuesday, Nov 23rd, 2010

We recently purchased a new computer for my mother. She wanted nothing to do with Windows, and asked if we could install Linux. An Ubuntu 10.10 install went well, but a few things were missing. Namely, the 10hr+ battery life claimed by the manufacturer. I quickly discovered the LCD brightness was set to 100% and both video cards were enabled.


Subscribe to Front page feed