Want to contact me by voice?
(720) 254-1546

Drupal Basics

Drupal Basics: Insert Module

When I was working on the California Watch site, we needed an easy way to allow non-technical folks to add photos to the bodies of articles. There was a fair bit of effort put into setting up alternate solutions prior to settling on using quicksketch's fabulous Insert module.

A few housekeeping items.

  • You need cck 2.5
  • You need to have WYSIWYG setup
  • It helps to have FileField
  • and ImageField
  • and ImageCache
  • and of course the Insert Module itself

Unpack the module in your sites/all/modules directory (I like creating a contrib directory inside the modules directory so I can separate out various kinds of non-core modules.) Enable the module at admin/build/modules

I added a new field to my page content type by going here: admin/content/node-type/page/fields and added a field image_uploads

Drupal Basics - An Even EASIER Way to Set Up a Local Install

In October of 2007 I wrote a short tutorial on how to set up a local install of Drupal on a Mac.  Since originally writing the post I have received feedback ranging from “Thanks for documenting the process-it is really easy!”  to “You’ve got to be nuts!  I don’t understand 3/4s of what you are saying!”

At Drupalcon DC, Acquia announced a “Drupal Stack Installer” that simplifies the process significantly. 

Windows Live Writer

livewriterI am not a huge fan of Microsoft even though I do make use of the company’s products regularly.  I have XP running on my Macbook Pro for browser testing.  I regularly make use of the Office suite.  I also have a few Microsoft games that I play on a regular basis.  The long and short is, I am a fan of open-source.

Yesterday was a strange day.  My brother Alec asked about online and offline HTML editors for Drupal and through the conversation it came out that he uses Live Writer for his personal blog.  Then later, at work, I was talking with a client who has a CMS that is really repository for Word docs.  There is the desire to move the content from these Word documents into Drupal without losing formatting.

FCKeditor was one option that came to mind.  It will allow you to cut and paste from Word.  This works fairly well.  It retains much of the formatting, but perhaps doesn’t quite echo the desktop experience that was desired.

Drupal Forums - Drupal Basics

I've been playing with Drupal forums quite a bit lately for TraumaAdoption.org, a site for parents of Children of Trauma.  The discussion forums are a focal point for the site for parents.

Drupal's core module "Forum" is basic.  It uses the node and comment system to allow for conversations but not much more.  The look and feel isn't like other forums like vBulletin or phpBB and users may have some difficulty getting used to the interface, particularly if  your participants have used other forum systems in the past.  There are, however, a plethora of contributed modules that can help improve the user experience. 

Drupal Basics--xmlsitemap Configuration Solution

A couple of nights ago I upgraded from Drupal 6.4 to 6.5. The next post I created threw an error--something like:

The selected file /tmp/filexxxx could not be uploaded, because the destination files/xmlsitemap/sitemap.xml.gz is not properly configured.
Unable to load site map. Make sure that there is an xmlsitemap directory in your files directory and that it is writable by Drupal.

Drupal Basics-Improving SEO with a Sitemap

There are two main kinds of search engine optimization (SEO)--Off Page and On Page.  Off Page optimization relies on the links you get from others increasing your page rank.

On Page optimization can include:

  • Ensuring that you have unique tiles and meta tags for your different pages and that they reflect the content of the page
  • Using a robots.txt file to prevent search engine bots from indexing pages you don't want them to index
  • Bulleted lists
  • Using "static pages" for each of your pages (pathauto will do this nicely and automatically on your Drupal site)
  • Creating a sitemap for the search engines to access

Drupal Basics -- Dealing With Spam

If you allow any kind of user generated content on your Drupal site including comments, you will invariably start to see users crop up with user names like: "gyigrrgq", "porn", and "buy viagra". At best, the users sit in the user's table and do nothing. At worst, the users probe and then blast your Drupal instance with more spam than you can shake a stick at. Often the technique will be to leave comments on old content in the hopes that site managers won't notice it but it will generate some clickthroughs to whatever site the spammer is targeting.

What I like to do is set up a block of recent comments. Sometimes it is public and sometimes it is private to a single role depending the on the site-owner's needs. This is a very simple thing to do and will allow you to see new spam comments at a single glance. If you check your site every few days, you'll catch any spammy ugliness.

Drupal Basics -- What to do after UID1 is Created?

The first thing I do after setting up a fresh Drupal install and creating user id 1 (which I normally name Admin) is to create a second user.

  • Go to Administer
  • Go to User management
  • Go to Users
  • Click on the "Add user" tab
  • Create your new user

After that I create a brand new role called "Admin"

Drupal Basics--Applying a Security Patch

Over the last three or four days, I have had several people ask me about upgrading Drupal to the most recent versions of the software. At this point version 4 is up to 4.7.10 and version 5 is up to 5.5

Upgrading a Drupal site is pretty easy. It is always a good idea to grab a backup of your database and your Drupal files before starting the process. Upgrading from 4.x to 5.x is a little tougher than 5.x to a higher version of 5.x. This tutorial will focus on upgrading from a lower version of 5 to a higher version of 5. The most current version of Drupal is 5.5.

Drupal Basics-Install a Theme

Drupal is pretty flexible in its look and feel. A Drupal site can look like almost anything. The way the look and feel of a site is defined is through theming. Drupal comes with a few themes out of the box. To change a theme, you do it through the admin of your site--you can look at which themes you currently have installed at /admin/build/themes.