provide subscriptions to comments for anonymous users (=> comment_notify module)

greggles - December 22, 2007 - 21:34
Project:Subscriptions
Version:5.x-2.0-beta5
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

This is basically a "replace comment_notify module with a subscriptions based module" patch.

LiveJournal gets the UI for this right, but their execution is pretty horrible IMO.

I think this would best be implemented by using hook_comment and allowing immediate registration integrated with the comment form. So, an extra checkbox is added to the comment form saying "subscribe to followups." If that checkbox is present then on hook_comment 'validate' we need to validate that the email is present and that it is unique within the system. If it is not unique, encourage them to login. If they enter a name, it uses that for that their username. If not, it uses the email.

There is no need to enable or disable this feature. It determines whether or not it should run based upon anonymous users having the ability to subscribe to content. So, you have to have the subscription_content module installed and subscription_ui and allow anonymous the "subscribe to content" permission.

I purposefully did not use the normal subscription form here. I think it is too complex for users here even though it provides them with way more options.

If this is not accepted as a patch to subscriptions_ui.module, the modular nature of subscriptions module can allow this to live as a contrib.

There are some TODOs in there based on some decisions that need to be made. They are:

// TODO we probably shouldn't do any of these drupal_set_messages for new users or at least make it optional
// TODO decide whether or not we want to send these emails either
// TODO provide a way to unsubscribe
// TODO associate the comment to the user (it takes more than what I've done here)

I'm leaving it "code needs work" for those reasons.

(forked from http://drupal.org/node/202982 so as not to waste archetwist's time)

AttachmentSize
subscriptions_anonymous_by_making_user.patch4.98 KB

#1

Michelle - December 22, 2007 - 21:50

I hate to add a "subscribe" comment but I've already said my piece on the original issue and I want to see how this pans out. :)

Michelle

#2

jmesam - December 24, 2007 - 01:41

If this add-on will create a new account in the "back office", how it could affect the performance (cache, ...)
will be those users like authenticated users?

Thank you for started this great addon

#3

greggles - December 24, 2007 - 02:49

@jmesam - that depends. they will have accounts, but whether they use them depends on the answers to the TODO items (i.e. do we email them to inform them about the account? if not, they will probably not be able to login so they will stay anonymous).

#4

tro - January 4, 2008 - 04:04

If I didn't want to register anonymous users, would it make sense to set the uid to DRUPAL_ANONYMOUS_RID and add an email_addr field to the approriate subscriptions tables?

#5

greggles - January 4, 2008 - 18:30

@tro - I suggest for that scenario that you look at the link I provided in the footer of my original issue. The other issue is for "subscriptions without creating a user." I'm not sure if there will be a solution for that within the subscriptions module structure, though.

#6

mdowsett - April 16, 2008 - 18:23
Version:5.x-2.0-beta5» 5.x-2.0-rc1
Component:Code» User interface

I successfully ran this patch (no errors anyways) and nothing has changed....I do have the subscription_content module installed and subscription_ui and have allowed anonymous the "subscribe to content" permission.

There is no "subscribe to followups." checkbox as stated there should be.

Am I reading it right that the visitor would have to actually submit a comment in order to subscribe?

#7

salvis - April 16, 2008 - 19:27
Version:5.x-2.0-rc1» 5.x-2.0-beta5
Component:User interface» Code

Oops, sorry, when I directed you here I didn't mean to install the patch but to participate in the discussion, as greggles has requested. It's unlikely that this old patch can work with RC1 and beyond. It's marked "code needs work", so it was never intended to be installed by anyone not actively working on the code.

Please restore RC1 before you do anything else.

#8

mdowsett - April 17, 2008 - 01:26
Version:5.x-2.0-beta5» 5.x-2.0-rc1

oh - I'm a sucker for trying anything when I want a feature... :)

I'm back at rc1

#9

salvis - April 17, 2008 - 19:06
Version:5.x-2.0-rc1» 5.x-2.0-beta5

Please let me manage my issues queue.

#10

eigentor - August 17, 2008 - 13:58

Just got to this issue because I did not realize before it is not possible for anonymous users to subscribe to a post. As I am not a coder my contribution cannot be more useful than that of others. Just can say Wordpress has the feature and it makes not much sense for the site I'm running to let users create an account, because all they could do with that is subscribe to posts...

So Maybe Greg wants to take the challenge up again.

#11

greggles - August 17, 2008 - 15:21

@eigentor - I have taken up the challenge in http://drupal.org/project/issues/comment_notify

EDIT: which is an already working solution for comments on nodes to anonymous and registered users, but is not (currently) integrated with either Subscriptions nor Notifications module though I do plan to integrate it with one of them at some point.

#12

Michelle - August 17, 2008 - 15:25

greggles - Awesome! I somehow missed that module. Perfect. :)

Michelle

#13

salvis - August 17, 2008 - 16:14
Title:provide subscriptions to comments for anonymous users (by making them authenticated users)» provide subscriptions to comments for anonymous users (=> comment_notify module)
Status:patch (code needs work)» fixed

@greggles: Nice!

I would be happy to cooperate on integrating Comment_Notify with Subscriptions. I just don't want to have this functionality inside Subscriptions, because I think the potential for abuse and the ensuing hassle are too great.

#14

Anonymous (not verified) - August 31, 2008 - 16:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.