By lbelloq on
Hey everyone,
My question is Exactly What It Says On The Tin. I've googled for many days without an answer. (can it actually be done?)
Cheers, and thanks for all your help.
Léster
Hey everyone,
My question is Exactly What It Says On The Tin. I've googled for many days without an answer. (can it actually be done?)
Cheers, and thanks for all your help.
Léster
Comments
_
not sure how you googled, but one of the first links i found was: http://drupal.org/node/575034.
.
Just out of curiosity... Why do they use LIKE and not = in the query?
I need some clarification about your requirement..
Hi lbelloq,..
I need some clarification about your requirement..
Whether you created any content by using your custom content type with "Comment Enable : Read/Write" settings? or Here after you create content with "Comment Disable" settings?..
Why i ask this means, already you created content with "Comment Enable" settings, then you use the "UPDATE" query for removing(Disable) the comment settings..
By using the following query,
UPDATE node SET comment = 0 WHERE type LIKE "story";
Since you didn't create any content means you didn't disable the comment settings through coding. But you can do through interface in content type settings page..
I hope this is helpful for you...
Thanks & Regards,
Sarav..
Thanks & Regards
Sarav..
Thanks for your help. The
Thanks for your help.
The problem is, I've coded a custom content type but I want to programatically disable comments in my content type. Like, adding a sentence in the .install or .module file that automatically will disable comments when I enable the module.
And that's it. Sorry for not explaining myself properly before, ahaha~
To do that set the variable
To do that set the variable named: comment_my_node_type to '1'.
So in your hook_install function:
Replacing 'my_node_type' with the name of your node type obviously. Give that a try.
Thanks,
Matt
Using drush...
You can also do this with drush
drush vset comment_my_node_type 0 -yNote: 0 = disabled, 1 = Read Only, 2 = Read and Write