Skip to main content

Customizing Anonymous Comments In Drupal

I've always felt that if you needed to comment on a story or blog post, you should take the time to register with the site, log in, and do things properly. Somewhere along the way, a handful of readers managed to convince me to at the very least, open up anonymous comments and see how it goes. That was the easy part. The hard part cost me a few hours and an eventual trip to the #drupal-support IRC channel where a user who goes by nick "nearlythere" got me there. Allow me to explain.

My sites run on Drupal and while I love the power and flexibility of Drupal, there are times . . . [ insert sounds of growling here ] Since I wanted to avoid a massive influx of comment spam, my first step was to add captchas with the aid of the reCaptcha module which makes use of the wonderful and superb reCAPTCHA system. I also wanted to force Anonymous users to include their names and email addresses, a common enough practice on blog sites around the Net. Here's what Drupal gave me to work with when I turned on anonymous comments.


Note: Click the images for a full sized view.

Not exactly what I was looking for. What I really wanted looks more like this:

The trouble here is that finding the settings for this in Drupal is anything but easy. What would you expect? Something under comment settings in the Administration menu? You could be wrong if you said yes. Even though the menu option clearly states that "Comment page" (admin/content/comment_page) lets you "Adjust the settings for the comment page module. How about under Permissions or Access Rules. Wrong and wrong again. In fact, there is nothing in the administration menu that says anything about Anonymous Commenting. What to do?

As it turns out, you set up Anonymous Commenting this way: Administer-> Content Types-> BLog Entry-> Edit. Now, look down to where it says "Comment settings" and click that link to open up the options below. You'll see a host of options for commenting in general and, more importantly for this discussion, Anonymous commenting. Have a look at the image below.

Check the radio button labeled "Anonymous posters must leave their contact information", save your settings, and off you go. Make sure, of course, that your system permissions allow anonymous users to post comments.

As you can see, the functionality is there, but isn't entirely intuitive, even from an administration point of view.

Oh, did I mention that you can now leave anonymous comments? With a few reservations, of course.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

woot!

well done!

this is something i think i used to know, but forgot, nd then wheni went to go find it, i got very confused.

i agree it is in an unexpected place... or at least when we go to where we expect it to be, it'd be nice to have a pointer there.

Good on ya!

Good one Marcel,

I saw your chat flying by and I agree that this is counterintuitive. Seems like this link would have given you the information also.
http://drupal.org/handbook/modules/comment

I was thinking about Drupal's interface today and that finding certain settings is sometimes frustratingly hard. A solution could be to make a (AJAX powered?) search specifically for configuring/administrating the site.

Good luck with your site!

With kind regards,
Niels Bom

yippeee! thanks so much for

yippeee! thanks so much for this tip i had been searching google for a while combing through sites looking for this information!

Just what I was looking for.

Thanks for the assist. I knew it was in there, but I couldn't find the options within Drupal settings. Much appreciated.

Thanks

Just wanted to say thank you for this post, it was just what I needed to add to my new site (http://www.androidtweaks.net). One question I have for you, how safe is it to allow Anonymous users to select the input format Full HTML? Since your site allows it, is why I ask.

Changing anonymous comment name

Actually your solution only modifies the comment settings for the content type "blog." To modify universal comment settings, you need to visit /admin/content/comment/settings as described in this article - Jow to change anonymous commenter's name.

Great work, keep it up. I

Great work, keep it up. I love returning back to this site and reading the quality content you always have on offer. downloading moviesplay roulettepoker websites

Anonymous

Posting with an Anonymous name is always be a spam and it is not preferable.

Where are the shows?

Hi-Marcel,
Have you stopped doing the bytes and the live show?
Really miss your style! What happened?
Jon in Dallas.

Thank you!

Excellent! Thanks for this, just what I have been struggling to find out for a while now... such a funny place to hide them away.

Do you automatically get an email though when a new comment is posted? Haven't figured that yet.

Jon

re: Emails from comments

Hello Jon,

Glad to help. As for emails when comments are posted, yes, there is a solution for that as well. You'll need to install the comment_notify module for Drupal. Works like a charm.

-- Marcel

Good information.

Good information.

You're a lifesaver!

I have been going nuts for over an hour trying to figure out how to do exactly what you described. Thanks! I owe you my sanity!

Hi there, I'm having issues

Hi there, I'm having issues with your site in Maxthon (I can barely read the words). I've tried raising the font size from my browser but that only helped a tiny bit. Do you have any tips on what I should do? (By the way, I'm on Windows Vista) - anorexia weight loss tips

Thanks!

Let me make use of your anonymous enabled comment form to thank you for figuring this out and posting it. :-)

re: Thanks for anonymous comments

 Hey Dan,

My pleasure. Glad you enjoyed the opportunity to post anonymously. :-)

-- Marcel

New Books

I bought your book, "Moving to Linux, 1st Edition" a few years ago, but recently started classes at ITT Tech to get a BS in Network Security. My current class based loosely on the material for the CompTIA Network+ class requires that we have access to a current version of Linux for Labs, etc. I bought the latest Version 10.04 LTS that included both 32-bit and 64-bit versions of both Ubuntu and Kubuntu and some Linux tutorial disks for about $24.00. A pretty good deal since I didn't have the hassle of downloading and burning ISO images which didn't go well in the past. I decided on installing the 64-bit version of Kubuntu because I just prefer the KDE desktop. I've thought about getting your second edition, but then I saw your "Moving to Ubuntu Linux" book. My question is, can I apply what's in the Ubuntu book to Kubuntu, and are you going to publish a book specifically on Kubuntu in the near future, and will any new additions address these new 10.04 LTS editions? That's 3 questions in 1, I know. I've heard that these new versions are significantly different, at least in the version 4 of KDE. Also, what does the LTS part mean? I've tried to change the look and feel of the current desktop and the website the configuration desktop utility takes you to talks about installing something someone has created to make the desktop look either like Windows 7 or like OS-X Leopard. I like the way Leopard looks but can't afford the machine, yet, and I like the look of Windows 7, just not the crashes and viruses that come along with it, but my classes require it along with Linux, and they don't support a MAC OS for classwork. Not yet, anyway.

I really love Kubuntu 10.04 so far, but would love a book that will help me discover all that it has to offer and how to add things that it doesn't initially come with. I figured out how to add Google Chrome and Firefox, so I guess that's a start but the limited options availiable initially to change the icons and lack of themes that work with KDE 4.0 are a drawback that I hope the Kubuntu community remedies eventually. Any suggestion on which of your books would apply to this version of Kubuntu would help my buying decision. Thanks,

Billy Cloud,

Retired USAF/Student-ITT Tech

Comment notify

Great tutorial. I found this while I was troubleshooting form editing when anonymous people are allowed to comment.

I wanted to notify both users and guests via mail when threads they had been active in had new posts and thread authors when people commented their threads (which are nodes). Hence I had to enable form details for guests (before adding the comment notify module - great module btw I didn't need guests' mail).

My main concern was the homepage field, as the homepage field would be annoing to my guests as they are not very savvy, and long forms might scare them away from posting.

The solution was to use CSS to hide the div wrapped around the homepage input. Not a great solution, but it works.

You should check out the notify module. I'm sure it will do wonders for recurring traffic from guest commentators.

Thank again,
Hjemmeside
Norway

This really helped!

Thanks for the guide, this was exactly what I needed!

Felix

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.