1

I want to notify users immediately when a node they’ve subscribed to is commented on, but then not send them any more notifications (from any other node either) until they’ve visited the site. This is because I want users to immediately know when a discussion has a reply, but not have their inbox filled up with unnecessary emails. As far as I know no module can do this.

Im more of a themer than developer but it occurred to me that maybe this could be done with the Rules module. It would work this this:

1) When a node is commented on, send an email to the user if the user doesn't have role of ‘no’, and then add a role of ‘no’ to user.

2) When the user logs in, wait until they log out or are timed out, and then remove the role of ‘no’.

My reason for waiting until the user logs out before removing the role is I don't want them to get emails of comments while they are on the site. These may be emails from a discussion they are replying to several times while still logged in.

One issue could be if a user closes down their browser or leaves it open without refreshing it, but doesn't log out. Then Rules won't send them an email until they are timed out but they won't be aware or any comments made before this. Is there a solution to this?

Does anyone know how other forum software deal with this situation of wanting to have immediate notifications but not send loads of pointless emails to users?

1
  • Your method seems sound, though roles seems like overkill. Perhaps store the value in an account field hidden from the user? The field could store a timestamp value and that way if the value was past a certain amount of time you could also send an email getting around the open browser situation you described above. I'm tired. Just saw the date you asked this, I suppose you have a fix by now.
    – Brent
    Jan 20, 2013 at 3:17

1 Answer 1

1

Regarding the "... other forum software ..." near the end of your question: how about using the Flag module and its Rules integration?

Consider "somebody subscribing to some node" as the equivalent of "somebody flagging that node". And if your current technique to "send them notifications" is not flexible enough to do so in combination with the Rules and Flag module, then you may want to consider the Message module (which goes together with Rules and Flag very well also, and which is also used in some of the popular distributions).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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