New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Option to disable comment clip in email notifications #281

Closed
renzms opened this Issue Jun 15, 2016 · 12 comments

Comments

Projects
None yet
3 participants
@renzms
Contributor

renzms commented Jun 15, 2016

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.

@jaswrks

This comment has been minimized.

Member

jaswrks commented Jun 17, 2016

Another +1 for this here in a private/internal ticket:
https://websharks.zendesk.com/agent/tickets/13056

@jaswrks

This comment has been minimized.

Member

jaswrks commented Jun 17, 2016

Quick Outline

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.

@raamdev raamdev added this to the Future Release milestone Jun 17, 2016

@renzms renzms self-assigned this Jun 29, 2016

@raamdev raamdev modified the milestones: Next Release, Future Release Jul 19, 2016

@raamdev raamdev modified the milestones: Next Release, Future Release Oct 11, 2016

@raamdev raamdev assigned jaswrks and unassigned renzms Nov 29, 2016

@raamdev raamdev removed the needs estimate label Nov 29, 2016

@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 2, 2016

It seems this is already possible. See attached screenshot.

2016-12-02_01-16-20

@jaswrks jaswrks referenced this issue Dec 2, 2016

Closed

PR: feature/281 #97

@renzms

This comment has been minimized.

Contributor

renzms commented Dec 2, 2016

@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.

screen shot 2016-12-02 at 11 04 37 pm

@raamdev

This comment has been minimized.

Contributor

raamdev commented Dec 2, 2016

@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).

@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 3, 2016

I see. Great points all around. I'll add this in just a moment.

jaswrks pushed a commit to websharks/comment-mail-pro that referenced this issue Dec 3, 2016

jaswsinc

@jaswrks jaswrks referenced this issue Dec 3, 2016

Merged

PR: feature/281 #101

@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 3, 2016

2016-12-03_00-27-04
2016-12-03_00-26-50

@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 3, 2016

Next Release Changelog:

  • New Feature: In Comment Mail Pro it is now possible to enable/disable comment content clipping entirely; e.g., if you prefer that email notifications include the full original comment content in raw HTML instead of being clipped and displayed in the email as plain text. See: WP Dashboard → Comment Mail → Config. Options → Email Notification Clips. See also: Issue #281.

jaswrks pushed a commit to websharks/comment-mail-pro that referenced this issue Dec 3, 2016

jaswsinc
@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 3, 2016

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.

@jaswrks

This comment has been minimized.

Member

jaswrks commented Dec 3, 2016

@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.

jaswrks pushed a commit to websharks/comment-mail-pro that referenced this issue Dec 5, 2016

jaswrks pushed a commit to websharks/comment-mail-pro that referenced this issue Dec 5, 2016

@renzms

This comment has been minimized.

Contributor

renzms commented Dec 13, 2016

@jaswsinc @raamdev

Confirmed Working

Tested using Comment Mail v161210 Pro/Lite RC and WP 4.7.

Comments on front end

With Clipping
screen shot 2016-12-13 at 5 24 33 pm
Without Clipping

screen shot 2016-12-13 at 5 26 30 pm

Backend Clip Settings

With Clipping
screen shot 2016-12-13 at 5 31 51 pm

Without Clipping
screen shot 2016-12-13 at 5 31 44 pm

Email Notifications

With Clipping

screen shot 2016-12-13 at 5 26 46 pm

Without Clipping

screen shot 2016-12-13 at 5 26 57 pm

raamdev added a commit that referenced this issue Dec 13, 2016

Phing release of v161213 with the following changes:
- **Bug Fix:** Prevent browser autocomplete in Comment Mail options. See [Issue #319](#319).
- **Bug Fix:** Searching by email address alone should always narrow to the search to that specific email address and not result in any fuzzy or fulltext matching. See [Issue #226](#226).
- **Bug Fix:** The conflict check for 'Subscribe to Comments Reloaded' was not working in the previous release; i.e., if you attempt to activate both Comment Mail and the 'Subscribe to Comments Reloaded' plugin at the same, this should result in a Dashboard warning. Fixed in this release. See [Issue #315](#315).
- **Bug Fix:** Notify 'Subscribe to Comments Reloaded' users about the comment form template being disabled under certain scenarios. See [Issue #314](#314).
- **Bug Fix:** Do not attempt to import 'Subscribe to Comments Reloaded' (StCR) settings if StCR is no longer installed, even if old StCR options exist in the database. See [Issue #294](#294).
- **Bug Fix** (Pro): Do not show SparkPost partner image when Mandrill is selected as the RVE handler. See [Issue #318](#318).
- **Bug Fix** (Pro): Conflict checks between lite and pro corrected. This was not working properly in the previous release; i.e., installing Comment Mail Pro when Comment Mail Lite is already running should result in Comment Mail Lite being deactivated automatically. See [Issue #270](#270).
- **New Feature:** It is now possible to manually process the outgoing mail queue. See: **WP Dashboard → Comment Mail → Mail Queue**. See also [Issue #282](#282).
- **New Feature** (Pro): In Comment Mail Pro it is now possible to enable/disable comment content clipping entirely; e.g., if you prefer that email notifications include the full original comment content in raw HTML instead of being clipped and displayed in the email as plain text. See: **WP Dashboard → Comment Mail → Config. Options → Email Notification Clips**. See also: [Issue #281](#281).
- **Accessibility:** This release improves screen reader accessibility by adding `aria-hidden="true"` to all FontAwesome icons. See [Issue #304](#304).
- **Accessibility:** This release improves screen reader accessibility by offering a new setting that allows a site owner to enable or disable select menu option enhancement via jQuery. Disabling select menu option enhancement has the benefit of improving accessibility for screen readers whenever accessibility is of more concern than presentation. See: **Dashboard → Comment Mail → Config Options → Misc. UI-Related Settings**. See also [Issue #304](#304).
@raamdev

This comment has been minimized.

Contributor

raamdev commented Dec 13, 2016

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).

@raamdev raamdev closed this Dec 13, 2016

@websharks websharks locked and limited conversation to collaborators Dec 13, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.