Drupal Development Blog is brought to you by Face 2 Interface, home of open source applications for your website.

Marty Landman's blog

My First Kludge

The history of the kludge apparently may go back as early as the 1940's.

Every computer programmer is all too familiar with what a kludge is, and how undesirable it is to be a part of one. On the flip side is the importance that software work well and consistently.

Here's what happened.

Fixing Search With Cron

Having the search module enabled, it turns out isn't good enough. At least not in the case of this site.

I found this forum posting on the Drupal website and following the advice of the first response it was easy to fix.

But running cron.php manually isn't good enough, because the whole point of a cron job is to have the operating system run it automatically.

The Old Switcheroo

Now that I've put the content for my old site onto my new site it's time to implement the change in the most visitor and search engine friendly way possible.

A permanent header redirect would be good for search engines but I felt that it could confuse visitors, so I decided to use the HTTP meta-tag refresh method along with a conspicuous message explaining things.

Changing Sites

Geez, did more of this manually than I thought. The old site is small right now, but I thought it might be easy to copy of the whole database on a fresh installation here.

Well it wasn't. I made a handful of changes to the exported data but it still gave me trouble. So I've just done it the hard way, which at least worked. With only 7 blog entries I copied and pasted them in by hand.

The Meta Tags / Nodewords Module

If you care at all about your site's search engine ranking then there are two things that are more important than anything else:

  1. interesting, well organized content
  2. well thought out meta-tags on every page

Drupal out of the box is great for the first, but to accomplish the second you'll need to install the Meta Tags, aka Nodewords module. Fortunately it is easy to do, here's how:

First go to the module's homepage at drupal.org which is right here.

Hacking the Statistics Module

I wanted to add a hit counter to my log report.

It's a pretty basic thing, in fact adding a log and hit counter to a website was the very first thing I learned years ago when getting into Perl and CGI programming, and it's still good to see. This site is new, I've barely started getting a bit of search engine coverage and can see the occasional anonymous user plus one acquaintance who's registered.. thanks Josh.

Here's what I did.

Enabling Built-in Modules

Looking over Administer > Site building > Modules list I've identified the following three modules to add to my site:

Path
Allows users to rename URLs
Search
Enables site-wide keyword searching
Statistics
Logs access statistics for your site

Easily done, just by checking those boxes and saving the configuration.

Putting them to use though requires a bit more work.

Search Settings

To get the search module working, go to Administer ? Site configuration >

Creating a New Module

I've been following along with the tutorial on drupal.org and it was pretty easy to get done.
There were only two issues that came up :

  1. The tutorial is written for Drupal 4.6/4.7 and I'm running Drupal 5.1. Perhaps for this reason, in addition to the steps described in the tutorial I found it necessary to create an onthisdate.info file - until I did this the new module did not show up on the admin > modules screen.

Drupal Themes

I found out by going to the themes screen in administration that my current default theme is called Garland. I like the fact that it is a liquid page design. So instead of changing over to another, instead I'm going to see what I can by way of configuring it.

My First Error

"It's Only Just Begun"

The heading for this entry derives from an old song by The Carpenters which I am chagrined to say is now running through my head. Stop that!@ Ok now. On to my first Drupal problem.

Syndicate content