Web Development Tutorials for December 2010

Drupal 6 - Adding an Above Comments Block to a node

At times it is necessary to add some content on a node but it should come before (above) the comments for that node. For example, you could want to display an advertisement or links for sharing or any other content like that.

Adding an above contents block can be done in 3 steps as shown below.

Open the YOUR-THEME-NAME.info file (located in the folder that belongs to your theme) and add the following line, ideally where the other regions are:

regions[above_comments] = Above Comments

Drupal 6 - Remove Homepage Textbox from Comment Form

To remove the homepage textbox from your Drupal comment form can be done easily using the instructions below. You may want to remove this textbox to clean up the default comment area that Drupal renders our of the box.

Just add the following lines of code to the "template.php" file which should be located in the directory of the theme that you are using. If "template.php" does not exist, simply create it.

You must replace "YOUR-THEME-NAME" in the code below with the name of the theme that you are using.

Drupal 6 - Remove / Hide Formatting Options Link in Comment Form

In this post, we show you how to remove "More information about formatting options" that Drupal places below the comment text area by default.

Just add the following code to the "template.php" file that exists in the directory of the theme that you are using. If the file does not exist just create it.

The code to be added is shown below:

function phptemplate_filter_tips_more_info()
    return '';

Remember to clear your cache after making the changes for best results. Hopefully this helps to clean up the comment area of your Drupal website.