Ah okay. I thought you had your own templates used.
This
is a chunk that is provided with the articles snippet but goes back to Quip itself. It is like a default tpl for the comments to output (cf.
http://rtfm.modx.com/display/ADDON/Quip.Quip.tplComments).
The
is the one with the code in it to reply to a comment.
So you have two choices now: exchange these comments and comments_form with the Quip and QuipReply but this would make more sense if you'd have your own tpls. I don't know about the articles tpls and how these inherit some tags that might get broken if you change something.
In that case you would have to think a bit differently about the last solution I presented for "closing comments". So you have to think like this: If +comments shows the list of comments already made, and if comments_form is only representing the form making a new comment what do I need to do, to suspend users from commenting?
It is that you have to not output the comments_form. Then you make use of another tv. To check for this you could use a template variable with radio options as well. Yes is 1 and no is 0.
//excursion
Whenever you want something hidden or shown you could make use of tvs in a way like this.
//excursion end
Name your tv like you want, I'd say something like
closeCommentsTV would do fine. So you change the input type to radio options, better to say "radio buttons" (it's called like that in the manager). Then there is the field for input options of the tv. There you have to put in those options you wanted to be choosable. Every single option is separated by these two vertical lines ||. If it's only two options it would recur to yes and no, and then you would type
It really does not matter what kind of names you chose but if you chose some that "speak", so to say, they help you understand what the whole thing does. So you ask the question "Do I/you (the editor) want to close the comments?" The TV represents the answer to your question therefore I chose yes and no.
Now think of the answer "Yes" I want to close comments. What do you have to do to achieve this goal? ... No longer show the "respond to comment" (which is comments_form). Hence you should first create the tv as I mentioned above and then change the "template" like follows. Instead of
you write
[[*closeCommentsTV:isnot=`1`:then=`[[+comments_form]]`:else=``]]
So to translate this into words... it would be "Do you think that comments_form (possibility of commenting) should not be shown?" If your answer is yes, you would interpret like "Yes" I don't want the comments to be closed otherwise they should and then you output nothing. It is important though that you replace the comments_form with the code I posted above.
I often formulate those conditions in a negative way with "isnot". It's because you can check the case which is less often used.
If you put it like "isnot=1" this would be translated like "If I don't want to close Comments" then I output the comments_form. Otherwise (if you chose no and the value of the variable is 0) the comments_form is not output.
Update: What I forgot to mention. "If" you change those standard tpls for Articles and you do an update of the Articles snippet then those tpls will be overwritten. You hence should think of making your own tpl or at least you have to change this line of code every time you update your Articles snippet.
[ed. note: gameship last edited this post 12 years, 2 months ago.]