How to Disable Commenting on Custom Activity Types?
I would like to disable commenting on
ArticleComment activity types.
I have defined those activity types in the Article app's structure.php file with:
$ActivityModel = new ActivityModel(); $ActivityModel->DefineType('Article'); $ActivityModel->DefineType('ArticleComment');
This creates two new rows in the GDN_ActivityType table with the
AllowComments field set to the default of
When I insert a new activity with either the
Article or the
ArticleComment activity type, I can still leave a comment on the activities when comments shouldn't be allowed. It's the same on both an admin account and a normal user account.
I see that the comments link for activities doesn't have any logic to hide the link if
AllowComments is set to false. Reference: https://github.com/vanilla/vanilla/blob/master/applications/dashboard/views/activity/helper_functions.php#L82
AllowComments property being ignored and simply not used in the code, or is there another way to do this?
Add Pages to Vanilla with the Basic Pages app