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.

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.

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.

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.

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!

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

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.