Method one: In node.tpl.php, change this: <?php if ($links): ?>to: <?php if ($links && !$teaser): ?>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
|
|||
thanks it works
Hi drupalers,
Thanks it works.......... to prevent anonymous user to post their comments on node.
Regards,
Web-Farmer,
letsnurture
thanks
very nice sharing. Thank you.
aylak.com
Thanks best site
Thanks best site
I agree! lol -Daniel
I agree! lol
-Daniel Saltman
BostonDan@gmail.comGetting 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
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!