Hi, Is there a way to disable comments sitewide for everything but the forum? Or the content creator has to remember to keep disabling comments everytime he or she creates a new node?

Some people use drupal to create not community portals, but just regular websites where having a comment link at the bottom of each page doesn't make sense. I want comments in the forum because that's only way the forum operates, but not anywhere else.

Comments

Aleet’s picture

I am using version 4.5.2.

venkat-rk’s picture

Simple.

Go to administer>content>configure>default workflow.

Under 'content' in the default workflow, you will have a drop-down box with three options (disabled, read only, read/write). For the node type for which you want to disable comments, choose 'disabled', and save your configuration.

That's it.

Edit: The advantage to setting this in workflow is that you don't to have remember disabling comments in the node creation form.

Aleet’s picture

Thank you so much.

venkat-rk’s picture

You are welcome. I am not an expert drupal user, so it makes me happy when the little knowledge I have is useful to someone.

Aleet’s picture

So I lose the links to terms. Is there anyway to just lose the comments and not the category links?

venkat-rk’s picture

Are you talking about links to vocabulary terms? Like "Posted in term x | term y"?

That is strange because I have never had that problem before. You can see it in action on my non-profit's site:
www.ciosa.org.in

Aleet’s picture

Hello,

Yes, I lose all term links when I disable comments, either in an individual node or when I disable comments globally.

I suspect it has to do with my theme, Chameleon.

I noticed that you have customized your label on the links: "Posted by ... " Mine has a different verbage. How did you do that? Maybe I can solve the problem if I knew which file to edit to separate the comments block from the links block. Can you help me in that area?

Aleet’s picture

Both the term links and the add new comment link are inside a div with class "links" that disappears completely once comments is turned off, like here:

http://ihea.info/dr/?q=node/413

On this page, comments are not disabled:

http://ihea.info/dr/?q=node/411

With a site like this, with so much content, it is critical to have those links in there to give visitor clues about the depth of the content.

But having an "add new comment" link doesn't make sense for this type of content.

Steven’s picture

This is indeed a bug in the chameleon theme.

To fix it, open up chameleon.theme in a text editor. Replace the following part (not including the PHP tags):

  if ($node->links) {
    $output .= " <div class=\"links\">". theme('links', array_merge($submitted, $terms, $node->links)) ."</div>\n";   
  }

with:

  $links = array_merge($submitted, $terms);
  if ($node->links) {
    $links = array_merge($links, $node->links);
  }
  if (count($links)) {
    $output .= " <div class=\"links\">". theme('links', $links) ."</div>\n";   
  }

I've fixed it for 4.6.1 and HEAD.

--
If you have a problem, please search before posting a question.

Aleet’s picture

Fantastic. It worked great. I appreciate your help.