How we set up the comments on/off
I wanted to pass along a very basic overview of how we set this up.
Within InSite (our registration system) we created a new custom field that would allow users to indicate a yes/no on viewing comments. We created a new cookie so we could track this preference when the user logs in.
On our story pages we added buttons to allow this preference to be manually toggled based on the whim of the user. Depending on what button is selected a corresponding value is set for the cookie. We made sure that the cookie set by InSite and the one set by a manual toggle were the same.
Within our templating system we check for the existence of this cookie and it’s value. If it is ‘true’ we prevent certain aspects of Pluck’s commenting to load and/or fire. If it is ‘false’ then we allow all aspects of Pluck’s commenting code to load and fire. Our goal was not to re-write the MI-supplied commenting code but rather to intercept it in time to keep it from appearing.
We had to write a few custom Pluck functions to handle total comment count and recommending when comments are turned off. These functions originally existed inside some of code we were now hiding to prevent comments from appearing. If anyone is interested in these functions I can pass them along.