Drupal - Modules

As of Drupal 5, there are six core required modules (Block, Filter, Node, System, User, Watchdog) and around 23 supplied modules that are usually not activated.

The required core modules are - well - required. They cannot even be turned off - so we need not bother learning about them unless we are into custom module development. The other 23 modules are worth looking into, and they usually will supply most of the basic extended functionality you might need.

Help - This module can be turned off, but by default it is turned on and it handles the online help functionality for the various other features of your Drupal website.

Legacy - If you are starting fresh with a Drupal installation - ignore this. This module is provided for backward functionality.

Drupal - This is a module that registers to a central server. With this enabled, all the different Drupal powered websites in the internet, become a sort of ’super-website’ in terms of user base. It lets a user of one website log in to another Drupal powered website. This is generally disabled by default.

Locale - This allowed for using multiple localization UI files that would translate the UI to specific languages.

Contact - This provides the essential contact page. I believe every site must have this, and I enable it for every site I setup using Drupal.

Profile - This module is not so important for a single user website. But if community is involved, then you will want to store more information about your users. The Profile modules lets you define custom fields for the user.

Path - The module allows you to rename the URLs. By default, the URLs would be <yoursite.com>/?q=node/<number>. If you had switched on clean URLs, then it would be, <yoursite.com>/node/<number>. With the Path module, you can rename the URL for any node - <yoursite.com>/<anything-you-want>. (This module combined with the Pathauto module, become a versatile combo that I use for every Drupal powered site).

Comment - This module turns on the commenting system. It can have various setups of who can post comments, and where they end up in the moderation queue.

Poll - This allows you to create polls in your website.

Search - This module starts indexing all your content internally, and provides a versatile search option to search any type of content with in your site.

Ping - This pings other sites whenever new nodes (content) is created in your site.

Blog, Blog API - These two modules are a must have for a site that is setup to run multiple blogs by multiple users. The API module allows you to hook up offline applications to post to their blogs.

Aggregator - This allows you to show links or briefs from feeds (RSS or Atom)

Taxonomy - This module is the gem of Drupal. It requires a write up in itself, but for now, we will leave it by saying that it lets you organize all the content on your site any way you want.
Read the rest of this entry »

Version Control

Version Control is a practice that is not just used in software development but other domains like engineering and general documentation. Let us have a brief look at what it is all about.

When a single person is working on software, the version control may not seem to be of much use at the cursory glance. But if the software is intended to do anything more than a singular task, it would be prudent to use a version control system - it makes it easier for software development. (Note that I would use the word ’software’ or ‘code’ but it would apply to any work). If a group of people are working on the same project, then version control system is certainly necessary.

There are many version control software out there - but you can apply the system just by following a certain set of processes. A version control system should do the following.

  1. Maintain the revisions of a particular unit of code
  2. Enable to go back to a particular revision
  3. Enable branching and merging of code

The last one becomes important when a group of people work on a project.

A version control system lets you save the state of a code at all stages. Most systems employ the use of version numbers to maintain different states. This is sometimes visible to the user of the end product - the numbers like 1.0, 2.5, or multiple set of numbers get attached to the software.

Many times when you are working on a piece of code, and apply changes to it - there might be instances when things do not work as they should. That is the point, where the version control system becomes useful. You would be able to go back to the state of the code, just before you made those changes. You can either review that code to apply the change to the faulty version, or if not many versions were created after that version; you can start of from that point.

In cases of large projects, a group of people work on a software. Most of the times they would need to work on the same file or set of file. When such is the case, the particular person, takes out a branch from the main set of files, and works on it. The main version of code is usually called the ‘head’. Once the development to that branch is complete, it is merged back into the main set of files. If changes have been done to different part of the same code file by two people, the code is reviewed and merged appropriately.
Read the rest of this entry »

Drupal - Initial Setup

After setting up a handful of Drupal powered sites, it has formed a habit on setting up the different modules and themes that put the site on a ‘ready to go live’ or ‘ready to build upon’ state. This basically involves going through a set of items and options in the Drupal administration area and setting them up.

In this article, I will be assuming a Drupal 5 installation. The Drupal 6 would be having what are called ‘install profiles’ that will actually ask few questions and setup these basic setups for you.

Site name, description, mission, copyright info

Once Drupal site is installed and the first user (the super-user) is created, login with it and proceed to ‘Home › Administer › Site configuration > Site Information’ and fill in the details like the site name, slogan, mission statement, and copyrithg info. I like to put this one before setting up anything else, because once these details are put, it lets me identify the Drupal instance easily by the website name instead of the default ‘Drupal’ title.

Status Report

This step lays down the crucial baseline and ensures that whatever you build and setup over it need not be rolled back. Go to ‘Home › Administer › Logs > Status Report’ and fix any errors that it might indicate. Usually, the ‘files’ folder is not created, and you would need to create it in the installation directory with proper read-write-execute permissions.

Basic theme selection and customization

Even if I am going to apply a custom theme to the website later, it helps to add direction to the website development by customizing the default themes. Go to ‘Home › Administer › Site building > Themes’ and play around with all the options. Choose a particular theme, and customize it. If you chose Garland theme, then you will be able to tweak the color sheme with the help of ‘Color’ module. You will also be able to switch off the logo or replace it with a custom one here.

URLs

This is a crucial first step in building a search engine friendly as well as user friendly website. At ‘Home › Administer › Site configuration > Clean URLs’, enable the Clean URLs option. You may need to give write access to the .htaccess file while doing this. At this point, you may have trouble with the cookies where it might show an ‘Access Denied’ message even if you are logged in. Just clear the browser cookies and cache and login again. Next, proceed to ‘Home › Administer › Site building > Modules’ and activate the ‘Path’ module if it is not already activated. You are now prepared to install the custom module - Pathauto.
Read the rest of this entry »

Drupal - Installation

Drupal, is one of the choices you may take among the other CMS.  And as I said earlier, there are three things that you need to setup a Drupal powered website - a webserver, PHP and a database.  If these are available, you can install a Drupal instance.

Before I go into a bit of details on how you can install Drupal, let us look at what phases a software undergoes before being actually used by the users.

In simple terms, software needs to be developed, tested and then deployed into production. This is generally how it happens in full blown software development scenarios. Do we need all of this for setting up Drupal?  In my opinion, you need at least two instances of your website. One that is actually visible and sits in a public URL. Another one where you can develop and test the website.

Hosting costs have come down these days, but yet it might not seem prudent to go setting up your test instance on a server. You can setup a local instance quite easily for Drupal.  For setting up a local instance, I usually use the XAMPP package that gives me the full stack of webserver (Apache), MySQL and PHP.  (You can get XAMPP from the Apache Friends website).

The installation is quite simple in the present version of Drupal 5. (It is said that it would be more simpler with the Drupal 6 release).  I will be explaining how it is done for MySQL as the database.

  1. Download Drupal. At this point in time, I would advice for using Drupal 5.2 as Drupal 6 would be coming out soon.
  2. Unzip and put the contents of the folder in your root location. In case of a webhost, it would be in the ‘public_html’ or similar root folder provided for your account. In case of a local instance, and if you have gone for XAMPP, it would be \xampp\htdocs folder.
  3. Go to phpMyAdmin and create a database - give a proper database name so that it is easily decipherable. Create a database user and give all permissions to that user on that database.
  4. Open your browser and give the URL that should point you to the root where you unzipped the contents of Drupal download file.  In case of a webhost, it will usually be the domain name you parked there.  In case of local instance, it will be http://localhost/ or http://localhost/<install folder> depending on how you unzipped the files into htdocs.
  5. This should automatically fire up the install.php - and it is a pretty easy from here on as it is a guided install. Give the database name, database user name, the password, and you should be good to go.

Always have a process in place where you can develop and test your site separately and move the files and database to ‘production’ or live environment. And before making any new changes to your website, take full backups.  It is much easier to restore your website from backups if the changes you put in go wrong. Of course, this is not a problem during installation.

Please use the comment section if you have any doubts or if you need more details.

Drupal - Hosting Requirements

Drupal is an Open Source Content Management system. It is a CMS with which you will be able to build a website.

To install Drupal, the hosting setup needs to meet certain set of requirements. The basic requirements are:

  • Webserver - As common sense as it seems, I get a lot of questions on how one can install Drupal on a PC in order to setup a website. Unless you are running your PC as a server, it does not make sense to ask that question. What you should be looking for, is a hosting account. Drupal needs to be setup on a server, that responds to requests over the WWW through HTTP. It is recommended to have Apache webserver, but you can install it on IIS too.
  • PHP - The webserver must have PHP, in order to process the request and render HTML responses. The version of PHP required is dependent on the version of Drupal you are going to setup. Drupal 4.7.2 requires PHP 4.3 or higher. Only Drupal 4.7.5 (and greater) or 5.0 (and greater) run on PHP 5.x. At this point in time when the post is written, Drupal 6 is under development, and it is recommended to go for Drupal 5.x and PHP 5.x in view of future compatibility.
  • Database - Drupal does not store any of the content as files on the webserver, but stores it in database. Hence, you require a PHP supported database like MySQL or PostgreSQL. It is recommended to use MySQL 4.x (and greater) and in case of PostgreSQL, version 7.3 or greater. The out of the box is fully functional in both the databases, but some of the third party modules might not work on PostgreSQL.

Note that Drupal requires the following permissions for the database - SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES. Ensure that you have access to the database in your hosting account and are able to create database with a user who has the above permissions.

In the next post, we will briefly look at the installation procedure for setting up Drupal in a hosting account.

More On Drupal

This post is just a heads up on things I will be posting about Drupal in following weeks. I have been using this content management system (CMS) for quite some time (and also Wordpress).

This site - the root - runs on Drupal. (This blog though, runs on Wordpress).

My personal site, runs on Drupal. And so does, my friend, Sushil’s site, that I helped him setup. Drupal is a great choice for personal websites, when you need to do more than blogging. It lets you handle an assortment of types of content, and yet be able to manage it based on taxonomy system - in simple words - a way of categorization.

Drupal, can be used not just for personal sites, but also community sites. I used Drupal to setup FunKaam.com - a community site in the making.

In a series of post, I will try and cover:

  • Hosting and installation of Drupal sites - I have got quite a few requests on giving an explanation
  • Setting up Drupal powered site - regarding the core and supplied modules
  • On extending Drupal - choices on community/third-party modules

Please comment below if you would like to know anything else on Drupal.