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

Update: for Drupal 7, you can use Display Suit to control the teaser display.

Video tutor: http://tutr.tv/t5822

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 8, read here: http://drupal.org/node/169938

thanks

Your current document is actually relating to educative wrestle undertaking to develop your successful advice.... myusrx.com

Drupal 5

Your post is very useful. Thanks for sharing this stuff, it will help the beginners on programming. The codes are easy to understand and very short easily applied to simple programs.

Thanks Again!!!
Andolasoft.com

Appreciation

I can see why you changed the name of your blog! If you could have accurately predicted with any degree of reliability what would lead to "the next big thing," then YOU would have been the one to start Blogger, Facebook, YouTube, Twitter, and Google.

Mike Fordwick
-------------------

awesomazing

Your awesome and amazing. I can imagine you a brilliant and genius mind. Thanks for sharing this stuff, a big help to beginners on programming. Your codes are easy to understand and very short easily applied to simple programs.

Nice stuff its really help me

Nice stuff its really help me on my development. buy-arearugs.com

Events and life, how it

Comment Text is good

Website development

Website development process is of complex nature and Preservance Tech has a team of highly skilled web developers who are committed to overcome this complexity. Our developers are well-versed with the nuances of web development and can develop a website that meets your expectations and also that of your target

S Buckinghams

I liked your question and the comments on your blog in Php coding. It is really beneficial for everyone those who are trying for giving the answer to your blog.

S Buckinghams

I noticed his critical

I noticed his critical scripts to remove "Login or register to post comments" in teaser part for Drupal 5. Really this post contains truly information. Thanks a lot!

Great info

I was following your instruction and this really work. Great job

Agus From KiranaTama.com

(#kanesaler02)

This is very good website

Option 3

Can you please me more detailed about Option 3?
Method three: Use view (List view with fields: node title, node body (teaser), link to node)

I use Drupal 6.

Thanks.

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.)

At images you can learn on

At images you can learn on how to make the right franchise decision, how to identify the right franchise opportunity that can make you a successful business owner.

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