Questions tagged [comments]

Use it for questions about the comment entity.

Filter by
Sorted by
Tagged with
20 votes
3 answers
8k views

Remove subject field from comments

Is it possible to remove the subject field on comment forms? I find it to be kind of useless and redundant, since the subject of the comment is usually the title of the article being read, at least ...
Lester Peabody's user avatar
15 votes
5 answers
10k views

How To Show Node Comment Count in node.tpl?

I have had the bright idea of changing my user permissions so as guests cannot see the comments on a node. I have no problems with Views around my site, as they can clearly see there are comments on ...
Reg Gordon's user avatar
12 votes
13 answers
14k views

How to finally disable comments on content type?

I am trying to disable comments on webform. I tried all settings I could find, but: Link to comment form still appear Name field and submit button still appear on comment form Could somebody give me ...
Codium's user avatar
  • 4,955
12 votes
3 answers
4k views

Drupal commenting system vs Disqus

I like the multiple login possibility of Disqus. You can login with facebook or twitter or google etc. On the other hand, comments will exist on a 3rd party server and the package that includes the ...
john's user avatar
  • 1,601
11 votes
10 answers
7k views

How do I enable comments for user profiles?

With users being entities in D7 I assumed the user type would would have built in "comment" option. That doesn't seem to be the case. I just want to allow users to leave comments on the user profile ...
uwe's user avatar
  • 12k
11 votes
10 answers
6k views

deleting comments in bulk

how can I delete all comments at once? I have seen how to do it with nodes and bulkdelete module, How to delete all nodes of a given content type? but am looking at a similar solution for comments. ...
brian_d's user avatar
  • 317
10 votes
3 answers
1k views

Why are comments not a node content type?

So Drupal has a 'special' commenting system. Comments are second-class citizens in Drupal compared to nodes... But why did the core team not just create a default Content Type, Block and View for ...
dayuloli's user avatar
  • 579
9 votes
2 answers
6k views

How do I disable comment auto approval?

I have comments that are being auto approved in Drupal and I'd like to disable that. I want to approve comments before they are published.
Jordash's user avatar
  • 201
9 votes
5 answers
6k views

Disabling CKEditor in comments

Does anyone know of a way to force plain text mode in comments for all roles? Edit: is it in any way possible to do so through CSS? Thanks!
Jane's user avatar
  • 1,805
9 votes
2 answers
6k views

Disable Rich Text in comment field

I have installed CkEditor for drupal. But it is showing it for comment form also. I don't want it to be shown. I dont want the user to have an option to select either. I just want them to have plain ...
esafwan's user avatar
  • 1,348
9 votes
3 answers
2k views

How to noindex comment/reply in Drupal 7

I use Drupal 7, and I am trying to use the "noindex" meta tag to prevent http://example.com/comment/reply/43/738 from being indexed by search engines. The comment/reply page is being indexed, even ...
Naweed Chougle's user avatar
9 votes
6 answers
2k views

How to implement a Comment Reply Form through Views and using JS?

We have a comment body, using views, where we have the name, comment, picture, and date for each of the posted comments. At the end of all comments we have a comment body, where one can add a comment. ...
Pratik Bothra's user avatar
8 votes
5 answers
6k views

How do you rename the "save" comment button?

Does anyone know how to rename the "save" comment button? I am trying to change it to "Post". I am using Drupal 7 and the Zen sub theme.
Jasmine Ahmed's user avatar
8 votes
2 answers
4k views

How to hide comments below the node, but not close them?

Аctually I want to list comments for nodes myself (by Views, for example), so I need to hide standard comments list from core comment module. I can do it like that: unset($node['comments']['...
kalabro's user avatar
  • 7,949
8 votes
4 answers
948 views

How to add comment field to custom entity

I tried to add a comment field in the Basefieldsdefinitions of my custom entity but in my view the add comment form doesn't appear: Here's the basefielddefinition $fields['comments'] = ...
cirtrus's user avatar
  • 139
7 votes
5 answers
3k views

Sorting comments from newest to oldest

How should I configure Drupal 8 to sort comments from newest to oldest, similarly to what the Comment Goodness module does in Drupal 7?
pooceger's user avatar
7 votes
1 answer
6k views

Print the comment form with PHP

I'm trying to print a comment form with the following code. <?php print drupal_get_form('comment_form', array('nid' => $row->nid), t('Post new comment')); ?> All I get is the ...
emc's user avatar
  • 863
7 votes
4 answers
5k views

How to apply the attribute "rel=nofollow" to links in the comments?

I configured the Text Format "Plain text" (admin/config/content/formats) to "Convert URLs into links" so I would like to add the attribute rel="nofollow" to all the links in the comments. This way I ...
FR6's user avatar
  • 514
7 votes
2 answers
3k views

How to get the node id the comment is attached to in hook_comment_insert?

How can I get the node id the comment is attached to in hook_comment_insert? I tried the following code: function mymodule_comment_insert(Drupal\Core\Entity\EntityInterface $entity) { if ($entity-&...
D34dman's user avatar
  • 326
7 votes
2 answers
790 views

What are the implications of duplicate content issues with Drupal comments?

Say we have a node called node/123 with comments enabled. When comments are made, additional URLs are generated /comment/1, /comment/2 ... and /comment/reply/2/1 etc. Unfortunately, these new URLs are ...
Nigel Waters's user avatar
  • 1,024
7 votes
3 answers
2k views

How to restrict each user to making only 1 comment per node?

Does anybody know if there is any way I can restrict each site user to making only one comment per node on my Drupal 7 site? I haven't found anything yet. I've just tried a complicated setup with ...
BenjaminRH's user avatar
7 votes
1 answer
1k views

Mention/Reply to users in comments using @ (@name)

I am looking for a feature that makes it possible to reply to comments, or mention users in a comment using the @ symbol. So, if I was to write the following in a comment on a node: @Michael ...
Alexander Sandberg's user avatar
7 votes
4 answers
3k views

How to remove the default "Anonymous" from comment author name?

In the comment form field (core comment module) I would to leave the comment author name empty, in order to encourage commentators to come up with original epithets. What's the easiest way to do it?
daphshez's user avatar
  • 1,082
7 votes
1 answer
513 views

sort views comments by vote result keeping thread

I want to show comments of nodes ordered by vote result (most popular comment at the top of the list). I have installed voting API, rate and views module. Then add a yes/no voting to comments and ...
shekoufeh's user avatar
  • 589
6 votes
7 answers
5k views

How to delete all unpublished comments?

I have literally thousands of unpublished comments. I am wondering what is the easiest way to git rid of them altogether. Thanks
alfish's user avatar
  • 1,947
6 votes
3 answers
8k views

Warning: Cannot modify header information - headers already sent

My log is cluttered with this message: Warning: Cannot modify header information - headers already sent by (output started at /home/path/to/drupal/7/includes/common.inc:2681) in drupal_send_headers() ...
camcam's user avatar
  • 2,111
6 votes
4 answers
2k views

How do I change the permalinks to #1, #2, #3?

I would like to change the comment/forum links to something like: TOPIC: #1 #2 #3 Do you have any idea on how should I do this?
bart's user avatar
  • 149
6 votes
3 answers
283 views

Is there a way to make the comment module email the administrators when a comment needs approval?

I'd like to be notified whenever comments are made on the site which require administrator approval before publishing; basically, I'd like to know when something new appears in the Approval Queue. I ...
Joe Corkery's user avatar
6 votes
4 answers
4k views

Is it possible to change the "add new comment" text on certain content types?

Is it possible to change the "add new comment" text on certain content types? Also is it possible to only allow certain roles to post comments on this content type?
hollyh's user avatar
  • 391
6 votes
2 answers
4k views

Custom Template for Comment based on node type

I'm trying to add a custom template file per content type for my comments. comment--[contenttype].tpl.php is not being picked up by default. I read where this may be a d7 bug or perhaps by design. ...
user379468's user avatar
  • 2,520
6 votes
3 answers
4k views

Ajax based commenting system [closed]

In Drupal 7 I'm facing one problem, I'm going to implement a comment system in that way that it should work as chatting systems. I've a content type Article, at the end there is a comment box where ...
Drupalizer's user avatar
6 votes
2 answers
5k views

Theme user pictures in comments in drupal 7

I'm trying to set a specific style for user pictures in comments in drupal 7, but can't find how to do it. I know there is a module for this (http://drupal.org/project/imagecache_profiles) but it's ...
fourmi4x's user avatar
  • 451
6 votes
2 answers
2k views

Comments sorted by oldest first

I've set my comments display order to be oldest first. When there are more comments than the number allowed per page, the comments are spread across 2 pages and a pager is provided. My issue is that ...
Evanss's user avatar
  • 2,026
6 votes
1 answer
1k views

How to create a view of unread comments on own nodes for the user's profile page?

I'd like to create a view for the user's profile page that displays all unread comments on the nodes he/she created. When I say 'unread', I mean that the page where the comment is situated (namely, ...
Jeroen's user avatar
  • 2,518
6 votes
1 answer
1k views

Is there a way to set the pager's page number programmatically without the page being in the url?

I would like a user who has previously left a comment on a node to initially see the last page of comments while a new user (to that node) will initially see the first page of comments. I know that ...
David Barratt's user avatar
5 votes
2 answers
9k views

Removing input formatting options and description from comment form

How do I remove the input formatting options and descriptions from the comment form? I'm not interested in a CSS and/or jquery based solution, nor am I interested in using the Better Formats module, ...
User's user avatar
  • 1,723
5 votes
3 answers
4k views

Change date format in comments

How can I change the date format in my comments? Right now it looks like this: Sat, 09/01/2012 - 12:00 I want it to look like this: Saturday, September 1, 2012 I was able to achieve this in ...
Jane's user avatar
  • 1,805
5 votes
1 answer
5k views

Comment form not showing

I got a panel and added a comment form for this certain node type but the comment form does not show up. I have enabled commenting for this content type and appropriate permissions (can post comment) ...
jan's user avatar
  • 865
5 votes
2 answers
796 views

How to make the comment author name required for anonymous users?

I'm trying to make the comment author name required with this code: use Drupal\Core\Form\FormStateInterface; /** * Implements hook_form_FORM_ID_alter(). */ function ...
Adrian Cid Almaguer's user avatar
5 votes
3 answers
456 views

How to make a comment only visible to the commenter before approval?

There is no registered users (apart from user/1 of course ...) in the website and anonymous visitors have the permission to comment on the website. Comments are not shown before approval. What I ...
herci's user avatar
  • 2,142
5 votes
3 answers
3k views

Restrict comments on nodes of a content type based on user role

I am building a site in Drupal, where there are 2 different types of registered users. Let us call them basic users and premium users. These could be roles, or groups, or something else. Authorized ...
Kostas's user avatar
  • 242
5 votes
2 answers
255 views

How can a poster of a comment notify selected users about a new comment?

When I write a comment on a node, I want to be able to select the users that will get a notification (via e-mail) about that new comment. Basecamp has this feature and I think it is very cool. Is ...
Jose San Pedro's user avatar
5 votes
1 answer
4k views

How to change "Your name" label in comments form?

I have a blog with comments and I need to change the "Your name" field to something different and make it a required field. Can I do this from hook_form_comment_form_alter() hook in template.php or ...
joshas's user avatar
  • 285
5 votes
4 answers
4k views

drupal 7 comment moderation modules

I am looking for modules that can extend drupal 7 comment admin. For example, I want to be able to set different statues for comments, like Approved, pending, spam and unapproved. And maybe comment ...
Funky Dude's user avatar
5 votes
1 answer
1k views

add comment form in views

I've created a views from comments. I want to have add comment form at the button of my views (in footer). so I installed "views_php" module and add "Global: PHP" to footer and write this code to ...
shekoufeh's user avatar
  • 589
5 votes
1 answer
914 views

How to replace 'reply' link with button?

I want to replace the 'reply' link with button. As an intermediate solution I styled the link as a button with CSS, but I want it to be a real html 'button' element. The reason is, I do not want the ...
hennadiy.verkh's user avatar
5 votes
3 answers
2k views

How to embedding Comment form for each individual item in drupal's view?

In my current project I want to embedding comment form for individual item in views but I did not get any settings/ configurations for the same in view. I tried to override template for the same using ...
Ashwin's user avatar
  • 173
5 votes
1 answer
975 views

Post comment permission by content type and role

I want to only allow users of a specific role to be able to comment on a specific content type. The only current solution for this is using the "Comment Permissions" module which unfortunately is only ...
grimurd's user avatar
  • 153
5 votes
2 answers
2k views

comment per page settings

How can I change "Default comments per page" array to my own. What hook I need to use, if it needed? hook_form_FORM_ID_alter(&$form, &$form_state) with FORM_ID = node_type_form $form doesn't ...
Matt Moody's user avatar
5 votes
1 answer
267 views

Minimum comment length?

I have yet to find a snippet or a solution to enforce a minimum comment length. Most validation modules deal with fields.
giorgio79's user avatar
  • 4,631

1
2 3 4 5
17