How to remove "Login or register to post comments" in teaser part for Drupal 5

Method one: In node.tpl.php, change this:

<?php if ($links): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>

to:

<?php if ($links && !$teaser): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>

Problem: the "read more" is also removed in teaser.

Method two: change the comment module: http://drupal.org/node/170065

Method three: Use view (List view with fields: node title, node body (teaser), link to node).

For Drupal 7, read here: http://drupal.org/node/169938

jerseys-center

Thanks for sharing!it's great!I like this article, nice!

good

good

very good

very good site and very great stuff.

Good comment (sarcasm)

Good comment (sarcasm)

Thanks for sharing this tip.

Thanks for sharing this tip. But i would only want to remove the register link only and not the "read more". It would be nice if you could give another tip or article regarding it. Thanks a lot!

Great work.. thanks for

Great work.. thanks for sharing
qorser[dot]com

thanks it works

Hi drupalers,

Thanks it works.......... to prevent anonymous user to post their comments on node.

Regards,
Web-Farmer,
letsnurture

thanks it works

thanks it works

thanks

very nice sharing. Thank you.
aylak.com

Thanks best site

Thanks best site

NFL Jerseys

I just checked our change notes and that was one of the first things that we called Symantec about and I don't know exactly how they fixed it. It is a known is issue and was fixed with the release of MR2 (so they say). We are in the process of reinstalling MR2 so I cannot tell you if it works.
Technical support should be able to help you with it but they might suggest that you move to MR2.

I agree! lol -Daniel

I agree! lol

-Daniel Saltman
BostonDan@gmail.com

Getting rid of teaser comment

There is a super simple change one can make to avoid having a comment link on teasers regardless of login status.

It's formatted all nice here...
http://drupal.org/node/170065#comment-741011

And posted again here...

NOTE: Simple Review module users, the $links[comment_add] key is altered to be "Review this Article," but you can nip the issue in the bud at the comment.module level :)

Go to about line 320 in comment.module and find this...

if ($node->comment == COMMENT_NODE_READ_WRITE) {
  if(!teaser) {      // -------- Here is my teaser test
    if (user_access('post comments')) {
      $links['comment_add'] = array(
        'title' => t('Add new comment'),
        'href' => "comment/reply/$node->nid",
        'attributes' => array('title' => t('Add a new comment to this page.')),
        'fragment' => 'comment-form'
      );
    }    // -------- This ends the teaser test
    else {
      $links['comment_forbidden']['title'] = theme('comment_post_forbidden', $node->nid);
    }
  }
}

Add in the $teaser test as an if statement. (I've marked it in code comments.)

Hi Josh, thanks for post. I

Hi Josh, thanks for post.

I think we don't have other choice, but modify the core comment module.

This method does not work in Drupal 6. "Add comments" disppears only after a user log in.

Hopfully it will work in Drupal7

Hi,

I think we will get this option in Drupal 7 and it will easy to us to add this function in our program.

Thanks
jamy

thanks for post.

thanks for post.

web design new york

PHP currently does not have native support for Unicode or multibyte strings; Unicode support is under development for a future version of PHP and will allow strings as well as class, method, and function names to contain non-ASCII characters.

are you sure it is not in Drupal 6

hi jamy,

Are you sure this function is not in Drupal 6. I read about this function and i hope we can find it in drupal 6 too. I saw many site and this is one of them you can check this site too. May be you can get your problem solution here.

thanks
jack

Drupal

Why you need to remove this feature?

Fine.

Fine.

Thank you very much for the

Thank you very much for the information!

wow good

wow good

good sharing.

good sharing.

nicely written

Your blog is awesome I like it

Ed Hardy

123456