For each blog entry, in the Behaviours tab, there is a tickbox defaulting to 'allow comments.'
Where can I change the default?
Does anyone know?
TIA
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
For each blog entry, in the Behaviours tab, there is a tickbox defaulting to 'allow comments.'
Where can I change the default?
Does anyone know?
TIA
In BlogEntry.php at the top it is set in the $defaults array(). Look for something like
static $defaults = array(
'AllowComments'....
Set that to 0 / false to disable the comments by default.
Thanks Willr - superfast!
AllowComments didn't work for me, although ProvideComments did :)
This no longer works for me.
BlogEntry/php
static $defaults = array(
"ProvideComments" => false,
'ShowInMenus' => false
);
Me neither - anyone got any suggestions?
It did work for me, but I'm not a fan of changing the code in an external module, especially if pulling it in using svn:externals (or the git equivalent). Any fresh installation or update could potentially restore the change unnoticed.
A more sensible way to override the default is to add this line of code to mysite/_config.php:
BlogEntry::$defaults["ProvideComments"] = false;