By wessex on
I'm using Organic Groups to create a series of multi-author blogs, and now I'd like to add the ability for anonymous commenting (with captcha) for just the blog content type (the rest of the site has thousands of book/page nodes, and I wouldn't have time to keep up with comments on all of them!).
I've read that enabling comments by node type is in D6, but has anyone managed to achieve this in D5?
Cheers,
Tom
Comments
Yes, it works
Yes, it works in Drupal 5. Disabling and enabling comments per content type can be done in the "Publishing" fieldset in that content type's settings (for example, Administer -> Content management -> Content types -> Blog).
Large Robot
http://www.largerobot.com
Thanks
I'll give it a try. It's probably been staring at me for ages - can't see the wood for the trees! :-)
Disabling comments
Thanks to christefano I've got comments enabled on the blog node type, and disabled comments by default on all other node types. The trouble is, this hasn't set that default across existing published nodes - I have to edit each node and disable comments manually.
Any tips for disabling comments across all existing nodes of, for example, the book node type? Any new book nodes will have comments switched off, but the 2000 odd current ones... This will take some time..!
Cheers!
In the database
It's an integer field 'comment' in the database. UPDATE node SET comment=1 WHERE 1 should do it, but TEST THAT ON A BACKUP.
Great!
I was on the brink of figuring that out, so thanks for the catalyst!
UPDATE node SET comment=0 WHERE 2;
is what did it for me (in my sandbox). I only have 2 nodes at the moment where I am allowing comments.
Perfect - thanks to people for their help.
Input formats and commenting
I now have comments enabled with CAPTCHA set up, and it's working well. I still have one problem to iron out though, and could do with some more sagely advice.
The "Input Formats" drop down appears underneath the comment box, which I'm a bit uncomfortable with. I use TinyMCE for authenticated users, and have a "TinyMCE" input format as the default input format (and it's therefore available to all roles). I want to have "Filtered HTML" for anonymous users leaving comments, and don't want to expose any other option to them.
Can anyone suggest a good way of doing this?
Thanks!
Form Filter Module
The Form Filter module seems to do the trick: http://drupal.org/project/formfilter
Although when editing the form for commenting, the Submit button to register the changes to the form isn't present. There is a hack around it by using Firebug to manipulate the form's action URL: http://drupal.org/node/161435
This seems to have fixed it - no more "input format" link underneath my comments form for anonymous users - phew!