Enabling the blog features of Drupal

Date: Wed Mar 25 2015 Drupal
Out of the box Drupal comes very close to supporting blogging. A blog is, after all, just a sequence of website postings listed in reverse chronological order. By default when you post a new page on a Drupal site the teaser is listed on the front page, then when you post another page its teaser is listed before the previous teaser. After posting a few pages you've got a list of items on the site and the teasers for each item is listed in reverse chronological order. While this is sort of like a blog there are a few blog features which can be enabled to make Drupal more of a blog.

The first skill to learn is enabling and disabling modules. A lot of Drupal's power comes from modules, especially the contributed modules created and maintained by the Drupal community. Modules are plugins that extend Drupal's core functionality.

From the 'Administer' page scroll down to the Site Building section and click on Modules. You're shown a list of modules and next to each is a checkbox which controls which modules are enabled (or not). The default list of modules delivered with the Drupal install tarball are known as the Drupal Core.

Among those modules are a few to enable, to support blogging. These are

  • Blog: Enables keeping easily and regularly updated user web pages or blogs.
  • Blog API: Allows users to post content using applications that support XML-RPC blog APIs.
  • Comment: Allows users to comment on and discuss published content.
  • Help: Manages the display of online help. Not technically required for blogging, but useful to a Drupal newby.
  • Ping: Alerts other sites when your site has been updated.
  • Profile: Supports configurable user profiles.
  • Taxonomy: Enables the categorization of content.
  • Tracker: Enables tracking of recent posts for users.
  • Update status: Checks the status of available updates for Drupal and your installed modules and themes. Again, not required for Blogging, but an absolute must to keep sane in managing your Drupal installation.
  • Upload: Allows users to upload and attach files to content.

The next thing to do is visit the Content Types administration area. Content types allow you to have different types of pages on a site. Out of the box you have available 'Page' and 'Story' and these are have essentially the same functionality. Drupal allows you to create any number of content types however out of the box they all have the same capabilities, in that they store a title and a body. Content types have many potential uses, and there is a lot of power which comes from the contributed 'Content Creation Kit' module which gives nigh-on-infinite flexibility to what a content type is.

You'll notice that the content types list also shows 'Blog'. That's because the Blog module has already been enabled. While here you might disable either the 'Page' or 'Story' content types because, in my humble opinion, one of them is superfluous. It's up to you whether you think either one is superfluous.

If you click on the 'Edit' link next to one of the content types you can do some configuration over how the content type behaves.

You'll see some links with arrows next to them. This is a Drupal user interface paradigm where they hide some extra functionality which you can gain access to by clicking on the link. The area expands and the new functionality appears. This paradigm appears all over the Drupal site so get used to it.

It's useful to look at the 'Workflow' settings. Published means that, by default, a new instance of this content type is visible to users. If this is unchecked the new page is unpublished and is hence invisible to users until someone makes the page published. Promoted to front page means that, by default, a new instance of this content type is shown on the front page of the site. If this is unchecked the new page will not be on the front page, however it will still be reachable. You'll also see a choice for whether attachments are enabled or disabled. Attachments is one way to upload pictures to your site, and this is always done by attaching a file to a given post.

It's also useful to look at the 'Comments' settings. There's a long range of options here which mainly control how the comments are displayed to users. The Default comment settings control whether people can make comments at all. Anonymous commenting controls whether commenters are required to register with the site before making a comment. Note that spammers are able to spew comments into a Drupal site using software, and requiring users to register before making a comment is one way to protect against spammers.

Now click on Taxonomy. The taxonomy module allows you to categorize your content using both tags and administrator defined terms. It is a flexible tool for classifying content with many advanced features.

What we'll do is click on Add Vocabulary. In the taxonomy module a Vocabulary holds a set of Terms each of which has meaning within the given taxonomy. It's a quite powerful system and we're only going to scratch the surface a little bit.

In Vocabulary name enter Topics and in Description enter Blog topics and under Content Types click on the Blog choice. So far what you've done is describe the vocabulary and specify that it is used by blog postings.

Now we get to the interesting part, under Settings.

The Tagging choice makes the new Vocabulary a free-for-all where you enter the taxonomy terms each time you make a new posting. Sites like del.icio.us have made free tagging a popular thing. A Drupal Vocabulary can be made up either of predefined terms or, if the Tagging choice is selected, instead the terms can be specified while creating or editing a posting. I like the Tagging choice but having predefined terms is useful at times.

Multiple select means the posting can have more than one term. For example a vocabulary could be a list of ice cream flavors, and if Multiple Select is not available then the user could select only one flavor at a time. However if Multiple Select is selected then the user can select more than one flavor at a time.

Required means what it says. That the user is required to choose an item from this vocabulary for this posting.

How do you choose between Tagging or not? A lot depends on your blogging goals. I find, especially for blog postings, that the topic is often unique to the given blog posting. The topic of each blog posting should be reflected in the vocabulary choice. Over time there will be some topics which are used again and again and again but there are always those unique posts which have a one time only vocabulary term. In other words, the Tagging choice gives you a lot of flexibility. On the other hand in some cases you have a given set of topics you might choose from. For example a bible study blog might have a vocabulary choice listing the books of the bible, and for each post you would choose the relevant book of the bible. Since there are a fixed set of books in the bible then it makes sense to have a non-Tagging vocabulary.