Closed renzms closed 7 years ago
Another +1 for this here in a private/internal ticket: https://websharks.zendesk.com/agent/tickets/13056
There are two functions in Comment Mail that deal with clipping of the comment content body specifically, and therefore instead of going through each template file it might be easier just to filter these methods so that you can change this behavior easily.
So what is needed is a new configurable option, and then have these two methods look for that option and either do the clipping, or skip the clipping altogether.
It seems this is already possible. See attached screenshot.
@jaswsinc
It seems this is already possible. See attached screenshot.
This feature needs to be added in the Lite version as well. :)
Problem This fix is only applicable for Pro users, but currently not an option for Lite users since Advanced Templates are only available in the Pro version.
@jaswsinc writes...
It seems this is already possible. See attached screenshot.
So how do we disable clipping in the email templates?
Oh... now I get it. You have to set the minimum lengths to very large numbers and the resulting effect is the same as not clipping...
However, the problem with this is that the content still runs through the clipping function, which destroys things like line breaks, so if you want multi-paragraph comments to show up as multi-paragraph comments in your email templates, setting the minimum clip lengths to a large number does not do it... we need to edit the templates and strip out that clipping method.
So, an option is still necessary here. We need something that allows a site owner to disable clipping, which should have the effect of stripping out the clip function from the email templates (e.g., have the clipping function check if clipping is disabled and simply return without doing anything).
I see. Great points all around. I'll add this in just a moment.
Next Release Changelog:
The following Simple template replacement codes are now deprecated:
[comment_clip]
is deprecated; use [comment_content]
[comment_parent_clip]
is deprecated; use [comment_parent_content]
The old replacement codes will continue to work, but since the behavior of these replacement codes is now dependent upon clipping being enabled or disabled by CM options, the name of these has changed along with the description they have in the UI.
@renzms If you can help me test this I'd appreciate it. I implemented the new logic and config. option, but I have not yet tested receiving email notifications since this change was made.
@jaswsinc @raamdev
Tested using Comment Mail v161210 Pro/Lite RC and WP 4.7.
With Clipping Without Clipping
With Clipping
Without Clipping
With Clipping
Without Clipping
Comment Mail v161213 has been released and includes changes from this GitHub Issue. See the v161213 announcement for further details.
This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#281).
It would be nice to have the option to disable comment clipping in email notifications to show the full comment, i.e, using HTML in comments without it being converted to plain text and full content length.
Current Workaround
Currently, the only way to prevent a comment from being clipped/stripped of HTML in the comment notification email is to modify the Advanced Templates and remove the function that is clipping the comment.
Problem
This fix is only applicable for Pro users, but currently not an option for Lite users since Advanced Templates are only available in the Pro version.
Solution
Add an option for both Lite and Pro users to turn off automatic clipping in the menus.