remove login to post message

Remove "Login to post comments" from Drupal 6 sites

Comments Approach

By default, at the end of an article Drupal displays the text "Login to post comments". To remove this text, allow commenting for anonymous users or just disable the Comment module.

Settings Override

You can use custom strings by adding something like this to /sites/default/settings.php:

$conf['locale_custom_strings_en'] = array(
'Add new comment' => 'Discuss',
'<a href="@login">Login</a> to post comments' => '',
);

Anonymous User Override

If you want to keep the ability to comment for logged-in users only, and remove the "login to post comments" text for anonymous users, you can add the following snippet to the end of your template.php file in your Theme folder.

function phptemplate_links($links, $attributes = array()) {
  global $user;
  if (!$user->uid) {
    unset($links['comment_forbidden']);
  }
  return theme_links($links, $attributes);
}

for more info see: http://drupal.org/node/425332

Syndicate content
 
 

Drupal is a registered trademark of Dries Buytaert.