Welcome

My name is Tim and I build websites with Drupal. Drupal is an open-source content management system capable of powering just about any type of website, everything from a social network to a company intranet.

The beauty of Drupal is the great community of developers and designers behind it. There are literally thousands of modules and themes to provide just about any functionality you need.

Every website has different requirements and usually several solutions exists. That's where I come in. I provide Drupal web application development and implementation.

Take a look at my portfolio to see some of my work or contact me to discuss your project.

What is Drupal?

How to Remove the Colon After Field Labels

Paste this in your template.php in 'sites/all/themes/your_theme/' replacing 'theme' with the title of your theme folder.

function theme_form_element($element, $value) {
  // This is also used in the installer, pre-database setup.
  $t = get_t();
 
  $output = '<div class="form-item"';
  if (!empty($element['#id'])) {
    $output .= ' id="'. $element['#id'] .'-wrapper"';
  }
  $output .= ">\n";
  $required = !empty($element['#required']) ? '<span class="form-required" title="'. $t('This field is required.') .'">*</span>' : '';
 
  if (!empty($element['#title'])) {
    $title = $element['#title'];
    if (!empty($element['#id'])) {
      $output .= ' <label for="'. $element['#id'] .'">'. $t('!title !required', array('!title' => filter_xss_admin($title), '!required' => $required)) ."</label>\n";
    }
    else {
      $output .= ' <label>'. $t('!title !required', array('!title' => filter_xss_admin($title), '!required' => $required)) ."</label>\n";
    }
  }
 
  $output .= " $value\n";
 
  if (!empty($element['#description'])) {
    $output .= ' <div class="description">'. $element['#description'] ."</div>\n";
  }
 
  $output .= "</div>\n";

Ubercart for donations

All you need to set up a quick Ubercart donate function is the UC Variable Price module http://drupal.org/project/uc_varprice.

Thanks Ryan!

How to set up Ubercart and PayPal Sandbox for Testing

PayPal sandbox preface:

The trick with the PayPal sandbox is you have 3 accounts. The primary account is your developer account. This logs you into http://developer.paypal.com/. The other two (one Buyer one Seller) work within the sandbox system. You need to login with your developer account before you can use these other accounts. The way I set mine up was to use my email address for the developer account and just use the default address generated by PayPal for the Buyer and Seller accounts. Also, if need be you can create multiple Buyer and Seller accounts under your developer account.

Below is a complete step-by-step for setup and checkout (tested with Drupal 6.10 and Ubercart 2.0 beta3)

1. Go to http://developer.paypal.com/ and create an account. This is separate from any existing PayPal account you may have.

2. Click on “Create a preconfigured buyer or seller account.”

3. Check “Buyer”, leave the email address alone, change the password if you’d like (but remember to write it down), then click “Create Account”.

4. Click again on “Create a preconfigured buyer or seller account.” but this time create a “Seller” account.

Using Views Custom Field

On a recent project I found the need to print an image in a view. The image would be coming from one of three possible places.

1) An ImageField image upload.
2) The value of a text field.
3) A default location on the server.

I only wanted 1 image to show up in the view. I used the http://drupal.org/project/views_customfield module to add the image based on conditional logic.

Basically, if an image was uploaded via the ImageField CCK widget, I wanted that image to appear, if there had not been an image uploaded, but there was a value in the textfield, I wanted that image to be displayed. Otherwise, if both of those fields were empty, then I wanted to print a default image from the server.

Below is the logic I put into the Views Customfield PHP field.

<?php
  if ($data->node_data_field_location_field_apt_image_fid) {
    $img_apt_img = field_file_load($data->node_data_field_location_field_apt_image_fid);
    $php_arg = theme('imagecache', '200wide', $img_apt_img['filepath']);
  }
  elseif ($data->node_data_field_location_field_defaultimage_value) {

Convert Mac Fonts for Use in Ubuntu Linux

On a current project the client supplied me with about 8 fonts, all of which were from a Mac. These were files with .lwfn and .ffil extensions.

After a bit of research I finally figured out how to convert these so I could use them on my development machine, which is Linux Mint 8. Linux Mint is awesome by the way. It's basically the current version of Ubuntu Linux but with all the media players, codecs, etc. included for you.

First I went to http://www.asy.com/sharecf.htm and downloaded their windows application 'CrossFont'. I keep a laptop around with Windows XP mainly for testing site in IE and for times like these when I need to install some conversion program and use on Windows. For some reason, I feel "icky" posting about Windows here and feel the need to explain myself....

Anyway, install CrossFont on Windows, then use it to convert your .iwfn and .ffil fonts to an OpenType/TrueType format.

Now copy those files over to your Linux machine and put them in your fonts folder.

sudo cp folder_where_your_fonts_are/* /usr/share/fonts/.

Then run the following to refresh the font cache
sudo fc-cache -f -v

File Attachment: 

Make Your PHP Variables Available to JavaScript

For my Visitor Info module I needed to pull some info out of the database and make that info available to JavaScript. Following is the code I used to do just that.

Visitor Info Module

I have been working on a module to satisfy the feature request to map location of visitors to a website. I'm calling the module Visitor Info and it is active on my demo page.

Several people have requested a module that maps the location of visitors to a website. Most of the other contributed modules I have seen will map registered users on your site but not the anonymous visitors.

I have just contributed the module and you can download it from the project page here.

Display a Custom Page From a Module

The following comes from the developer example pages at api.drupal.org.

The code is well commented and very easy to understand.

// $Id: page_example.module,v 1.13 2007/10/17 19:38:36 litwol Exp $

/**
* @file
* This is an example outlining how a module can be used to display a

Syndicate content