0

In the comment form, I can have a checkbox that allows me to tell EE to notify me of follow up comments

{exp:comment:form channel="news" preview="channel/preview"}
    ...
    <textarea name="comment" cols="70" rows="10">{comment}</textarea>
    ...
    <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label><br />
    ...
{/exp:comment:form}

I want the users to be able to toggle this feature since some of them want this feature disabled.

So I tried a solution. I unchecked the checkbox and submit with a blank comment textarea field.

However, when doing that I am shown an EE error that tells me that the comment field should not be blank.

My question is, how do I unsubscribe?

1

With the Comment Notification Links Tag
http://ellislab.com/expressionengine/user-guide/add-ons/comment/#comment-notification-links-tag

The {exp:comment:notification_links} tag can be [used] to allow members to subscribe to an entry without commenting via a simple link. This tag may only be used on a single entry page.
(edit: or provide parameters for entry_id or url_title to help the tag find the entry)

{exp:comment:notification_links entry_id="x"}
        {if subscribed}
                <h5><a href="{unsubscribe_link}">Unsubscribe to comment notification for this entry.</a></h5>
        {if:else}
                <h5><a href="{subscribe_link}">Subscribe to comment notification for this entry.</a></h5>
        {/if}
{/exp:comment:notification_links}

edit: if you want authors to be able to unsubscribe, make sure that
"notification of authors" in channel settings for a channel is set to OFF.
Authors then need to subscribe themselves (or with a custom extension)
via: https://expressionengine.stackexchange.com/a/6393/155

| improve this answer | |
  • OK, I tried doing this solution but nothing was outputted by the tag. – developarvin Apr 29 '14 at 0:16
  • you can set parameters to help the tag. entry_id="{segment_x} or url_title="{segment_x}". Also, the visitor has to be logged in! – GDmac Apr 29 '14 at 11:09
  • Ok, I got it to work by adding the entry_id parameter – developarvin Apr 30 '14 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.