in progress Stop comments on a specific Blog post

Xephius
Xephius
@xephius
7 years ago
93 posts
Hey all,

We have a BLOG entry that we want to disable comments on, but not on everything else on the site. Is this possible, and if so, how? :)

Clear skies,
John
updated by @xephius: 04/06/17 11:07:01PM
michael
@michael
7 years ago
7,746 posts
Job for the Form Designer.

Little bit of Template Editing.

Docs: "Using the Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1275/using-the-form-designer

Docs: "Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor

First Step is to add an extra field to the Blog 'Update' form. make it a checkbox and title it "disable comments". Then you need to figure out how you want it to work. Is it going to show the present comments but disable the ability to add more, or is it going to disable the comments from showing at all.

...... to be continued
gary.moncrieff
gary.moncrieff
@garymoncrieff
7 years ago
865 posts
I gave this some thought in the past but never got round to doing anything about it. My thinking was just to disable all comments if checked, more often than not you would be clicking this option upon creating the post.

My initial thought was to add the field in form designer and then just do a check in the template code, if checked, hide comments. But that isn't strictly as easy as it sounds as comments are included with jrCore_item_detail_features, and that also includes other items.

So the template would need to pull in Sharing, Like, Tag elements and comments separately, therefore allowing this to work easily.

I can see this would be a useful feature to have across all modules, so I'm wondering would if it be better served by the comments module injecting a field into the module forms, and then support being added to each modules item_detail.tpl.