Building a Website with Drupal for Newbies – Adding Content

This is the sixth segment in my series of tutorials on building a Drupal website from scratch. I have been working on a lot of stuff and sort of drifted away from working on these tutorials, but I’m back to finish this up. This definitely won’t be the very last Drupal tutorial I ever do. I anticipate that you’ll be seeing a lot more Drupal related stuff at the Coding Pad, but this will wrap up the beginner basic stuff on getting the website completed.

OK,so far we’ve Introduced Drupal, learned how to install Drupal, we then set up and configured a Drupal site, and we went over how to build the Drupal site with blocks, menus, and modules. Finally, in our last tutorial, we talked about content. Recall that I have been working on a website concurrently with this tutorial: The Drupal Pad, and everything in these tutorials is implemented on that site.

So in the last tutorial we looked at the options under creating content,and we discussed the various default content types. So why don’t we go ahead and start fleshing out our website. Recall I said that we would start out by installing the Pathauto module so we would get our urls looking good from the start? I’ve decided to make that the topic of a different Drupal tutorial so as not to get things too complicated. Let’s just go into content for now and we’ll look at Pathauto in the next Drupal tutorial.

Continue reading “Building a Website with Drupal for Newbies – Adding Content”

Installing razorCMS – Resolving the Internal Server Error

In my last post, Introducing the razorCMS Testing Pad, I discussed this new flat-file CMS and the small website I am building as a way to test and experiment with razorCMS. I installed a barebones system with no extra bladepacks, just the basic system. In this post I will discuss my installation experience. I won’t go over all the installation details since you can find them well documented in the User Manual, which you can download here. Installation, for the most part, is a breeze. Because it’s a flat file CMS, you don’t have to worry about creating or configuring databases or anything like that. You just need to edit one file and you’re good to go. I did run into one small problem.

I followed the manual to the letter but when I tried to load my new site, I got a 500 Internal Server Error:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Continue reading “Installing razorCMS – Resolving the Internal Server Error”

Guest post: Excel add-ins tutorial

First, I would like to thank Mary for giving me this opportunity to introduce my first Excel add-in on her website. It is an excellent programming resource.

My purpose in this blog entry is to describe the Data Filter Tool, an add-in I created for Microsoft Excel, as well as discuss some steps you can take to make sure your Excel add-in works properly.

This add-in does one thing: it filters a table of data and copies or moves matchingrows to a new workbook. For example, if you have a list of addresses in Excel, this add-in lets you filter by state and copy (or move) all the rows matching a specific state to a newly created workbook. Headers are always copied, even if you select the Move option, to preserve headers in the original data. It preserves formatting of the original data (bold, italic, etc) but copies values, not any underlying formulas. So I don’t recommend you use this tool if your data contains formulas; it’s mostly for tabular data like addresses, contact information, etc.

The dialog box is devastatingly simple: you just select the range to be filtered, the column and unique data item to base the filter on, select what option you want (Copy or Move) and then click ‘Apply’.

Let’s peek under the hood to see how the add-in operates, and hopefully that will give you some idea of how to create your own add-ins.

The first thing we do is some start-up checks to make sure we are in the right environment. Please note that some of the code I will demonstrate actually comes from “Microsoft Excel 2000 Power Programming with VBA”, written by John Walkenbach, ISBN 0764532634. We check the OperatingSystem Property of the Application Object to make sure we are in a version of Windows.

Function WindowsOS() As Boolean

If Application.OperatingSystem Like “*Win*” Then
WindowsOS = True
WindowsOS = False
End If

End Function

Notice that even though the default value of a Boolean variable is False, I never assume that this will work properly so I always explicitly give a variable a value. We use this code in the Workbook_Open() event of the ThisWorkbook module as such.

If WindowsOS = False Then
MsgBox “This add-in is for Windows OS only.”, vbCritical
ThisWorkbook.Close False
Exit Sub
End If

This will close the add-in if someone tries to open it in a non-Windows setting. If your code is only intended for Excel 2000 or later, test for version compatibility with this code:

If Val(Application.Version) < 9 Then
MsgBox “This add-in will only work in Excel 2000 or later.”, vbOKOnly
ThisWorkbook.Close False
Exit Sub
End If

Before adding a menu item to the Data>Filter Menu, we always try to delete the menu, in case Excel did not close properly and the Workbook_BeforeClose Event was not able to run. I set an object reference to the Filter Menu like this:

Dim cb As CommandBarControl
Set cb = Application.CommandBars(“Data”).FindControl(ID:=30031)

Then we delete the menu, using an ‘On Error’ Statement to skip any errors, in case themenu item doesn’t exist, which is exactly what we want.

On Error Resume Next
cb.Controls(“Data Filter Tool”).Delete
On Error GoTo 0

If we passed all our startup checks, the add-in is installed and allowed to run.

In this post I showed you my new add-in and demonstrated some techniques for securing your own code. Hopefully you can use some of these techniques in your own add-ins.

To download the Data Filter Tool, visit
and of course check out my site at


Building a Website with Drupal for Newbies – Building Your Site

This is the fourth in a series of posts on how to build a Drupal website from scratch. My apologies for the delay in getting this installment out, a lot has been happening on the home and work front that sort of slowed me down, but here we are.

In the first segment we introduced Drupal, and went over what we would need to work with Drupal. In the second part, we went over how to install Drupal, and finally, in the third section we set up the Drupal site, changed configurations, and did some other cool stuff. If you have followed the tutorials this far, you should have your website all set up, with your desired settings and names, headers, logos, etc in place. As you know, I am creating a website in tandem with this tutorial, and everything that I do on that site I will describe here in this series and also in future Drupal related posts. The website is, and you can check it out to see how far things have progressed and compare it to your site.

Now that you have your site configured, and all the basics in place, the next step is to start building your site. At this stage, our site is still very basic looking, with the Drupal front page introducing the site. For now, let’s leave that as it is. Soon I will show you how to put something else there when we delve into content creation and content management. For now, let’s add some important components.

Continue reading “Building a Website with Drupal for Newbies – Building Your Site”

Building a Website with Drupal for Newbies – Installing Drupal

There are many resources out there on how to install Drupal, so I am going to go over this in brief in this post.

If your webhost provides you with control panel that has a script installer, check if Drupal is listed. An example of a script installer is Fantastico, which comes with cPanel. Using a script installer makes the process pretty painless. Make sure though that you have the latest version of any scripts you may install using a script installer such as Fantastico. Otherwise, you may want to visit the homepage and download the updates.

In our case, we want to install Drupal 5.7. Even though there’s a new version out (6.0), as of this posting a lot of the modules have not yet been updated to work with 6.0. So we’ll go with 5.7.

If you don’t have a script installer like Fantastico, or you just want to do the install manually, the process is a little lengthier but not too complicated. There are install directions at Drupal webisite, but I’ll break them down here for you:

1. Create a database and user, and assign the user to that database. Make note of the database name and username and password as you’ll need them.
2. Extract the drupal archive that you downloaded into a folder on your hard drive.
3. Using your ftp program, upload the files in this folder into your domain folder where you wish to install Drupal.
4. In your browser, type the name of your website where your drupal folder is sitting, and you will be prompted to enter your database information:

Drupal Install

5. Enter the database configuration information from step 1, and then click on “Save Configuration.” If all is well, you will see this screen.

Drupal Install Complete

6. After this you will need to create a user account for yourself. This very first account that you create is designated by Drupal as the admin account and is a superuser account.

Your website is now installed and you’re ready to set it up, which we will cover in the next tutorial.

You can find more detailed installation instructions at the Drupal website ( If you have any problems doing this install you can post them here and we will discuss them, or you can also check the Drupal forums to see if there is a solution there.

In the next installment, we will walk through the process of setting up your new website.