Archive for the 'Drupal' category

Drupal: How To Remove the Login Block From Public View

For Drupal-powered websites that do not allow the public to log in to the website, you will probably want to hide the log in block.

To do this, you need to know two things: how to hide the block (very easy, and fairly obvious), and how to log in when there is not login block (easy, if you know how).

Hiding the Login Block

The following instructions are for Drupal version 5. Version 4.7 is a little different, but this procedure should still help you.

  1. Navigate to the Administer page.
  2. Click blocks (in the Site Building section).
  3. Locate the user login block.
  4. Select <none> in the region menu.
  5. Click the Save blocks button.

This removes the login block.

Logging In With No Login Block

Now that the login block is gone, how do you log in?

Maintaining Consistent WWW Prefix in Drupal

It has been bothering me for months that visitors arriving at my sites without the www (for example, rather than end up at two different places (as far as Google is concerned).

Note to WordPress users: this does not seem to work for WordPress. I just tried it with out success. That is why this blog, which runs on WordPress, will not change into

I just stumbled across the solution in the Drupal Issues page which explains how to fix this.

Actually, I was lucky, because Drupal 5.x has a bug in the.htaccess file. There is provision for this - an explanation and some lines to be un-commented, but I had not bothered to read the .htaccess file.

Continue reading

Subdomains that Work Independently From Drupal

If you have Drupal installed in your main directory (i.e. public_html), and you want to use subdomains for webpages or websites that have nothing to do with Drupal, you may have noticed that they don’t work!

The problem is that the .htaccess file in the public_html folder is set up to assume that the default index file is index.php. What you probably want is to have index.htm and index.html recognized as the default file when your visitors browse to

The solution is simple:

  1. Create an .htaccess file in the subdomain folder (e.g. public_html/sub)
  2. Add the following line to the .htaccess file: “DirectoryIndex index.php index.htm index.html ” Add “index.php” as well if you think you might ever use php in the subdomain as part of your index file.
  3. And you are done!

Now, when you go to, your index.html or index.htm should get served up.

Thanks to CogRusty for his solution on the Drupal Support Forum for the solution.

Drupal Blocks - Error Causes Display Problems

I just about destroyed my Drupal-powered allergy website today. I made one small change to the HTML in a block, and the whole website came up blank. With a blank website, I did not have admin access to the menu that changes the blocks!

Rather than panicking, I reasoned that I had made a fundamental typo in the HTML in the block I had just changed, and that must be in the database somewhere.

It was.

Using phpMyAdmin from the account back-end, I looked through various likely tables. The most obviously named, “blocks” was not the right table. It lists all blocks, along with their display status, display location etc.

Boxes is the correct table. It contains the content and title of all blocks that simply contain HTML.

Sure enough, I’d failed to close a quote in the HTML in the block I had just edited. Other things to look for: unmatched tags (especially the <DIV> tag, and unmatched angle brackets. I fixed it in phpMyAdmin and now the allergy website works again.

rel=nofollow pros and cons

nofollowI recently ran across another article about whether to use rel=nofollow in links from your visitors comments. Jonathan, the author, advocates installing the Dofollow Plugin For WordPress, which removes the rel-nofollow attribute in comments.

Is this a good idea?

In a previous article on this blog, I commented that using rel-nofollow may improve the quality of comments. While this may be true, it may also discourage commenting in general, certainly among the link-savvy. At the same time, it may discourage comments for the sake of a link to the commenter’s blog.

I think I have a solution to this for anyone who wants to develop a plugin to make the following idea happen.

Extending the publish/delete comment function in a blog, how about being able to publish with or without rel=nofollow? This way you can reward on-topic comments with links to a related blog, but still publish comments that are a bit off-topic, or do not link to a related blog. Such a plugin would flag which comments are which, and publish your rel=nofollow policy next to the comment form.

I have not yet installed the dofollow plugin, but I am considering it.

What is your opinion about rel=nofollow? Would you like to be able to rate the comments left on your blog and reward the most relevant ones? Are you more likely to leave quality comments on a blog which does follow links back to your blog? Your comments please!



More articles about rel=nofollow:

Burry rel-nofollow - clearly against it.

Good Information About Drupal Forums

Drupal-Forum-InformationI am in the process of working out the best way of hosting a Drupal forum on my food allergy website. This sounds easy, but there are a few technical issues to overcome.

I don’t want a totally open public forum, or I’ll get spammed to death! And I don’t want a totally closed forum - I do want anyone with something valid to contribute to be able to join up. And I don’t want to spend all my time administering it either.

I found a good article about setting up forums in Drupal which looks very helpful. It suggests a few modules to control access to forums.

I’ll post again when I get the forum up and running, and explain what I did and how it all went.

Hiding Blocks in Drupal for Administrator

It is a curious oversight in the design of Drupal, that you can not directly control block visibility for the administrator by configuring the block.

The easiest way to hide a block when logged in as administrator, is to follow a modified version of the instructions on the Drupal site explaining the advanced use of block visibility.

This requires PHP, but you don’t actually have to know anything about PHP, just copy and paste the code below, as instructed. (View entire article to see code).

First, you have to set up the block so it will use the PHP code to decide if the block should be visible or not.

Then, you have to copy the code below into the pages field in the Show block on specific pages section.

Continue reading

The Bleeding Edge of Drupal


When I set up my allergy information website in January, I decided to use the latest version of Drupal, then just released. In deciding between WordPress or Drupal, I chose Drupal over WordPress, because I want the website to be much more than a blog. In this I am not disappointed - when I get the time, I’ll write more about the difference between the two content management systems - they each have their strong points.

Having chosen Drupal, I then had the choice of installing the tried and true 4.7.6, with its plethora of modules, or the latest and greatest Drupal version 5.1, with rather fewer modules available.

Continue reading

How to Remove Login Information From Drupal Site

Several times lately, I have been asked this question, by way of visitors arriving by search results for “How to Remove Login Information From Drupal Site”.

Normally, I write about problems I have experienced and solved. I assume others may benefit if I share my solutions.

In this case, I don’t know exactly what the question means. Could you clarify please? Just leave a comment explaining the problem. Is it related to the Drupal installation and database, or the browser?