Perhaps I am missing something? If one of my users goes in and edits a page, then I don't see that in my notification emails. But the project description says "new or revised content".

Ideally I would like to be notified (or have the option to be notified) when users update a node as well. As an admin it makes it easy for me to review what people are doing without having to have everything formally moderated.

Very nice module - thanks.

- Peter

Comments

tecto’s picture

Status: Active » Closed (works as designed)

the module description isn't very clear on this. best i can tell from reading the code, the notify module will send notifications on content that is either newly created or newly submitted to the moderation queue. it won't notify on content that is just changed without moderation. to accomplish this (i needed it also), i made the following change in the 4.7 version:

line 337:
'AND n.created > %d AND n.created <= %d ORDER BY n.created'), $period, time());

change to:
'AND ((n.created > %d AND n.created <= %d) OR (n.changed > %d AND n.changed <= %d)) ORDER BY n.created'), $period, time(), $period, time());

ktrammel’s picture

Very cool modification. Just what the doctor ordered! I recommend this as an option for the module!

johnsim’s picture

Does the above code work for Drupal 5 too?

beginner’s picture

Title: I don't get notified of Revised Content » get notified of Revised Content
Category: support » feature
Status: Closed (works as designed) » Active
Jürgen Depicker’s picture

I believe this is a task taken care of by the subscription module. It works very nicely, and allows you to be notified of updates/new content per category, node type or per node. It sends mails instantly or per cron.

Jürgen Depicker’s picture

More detailed: I use both modules at my site: notification sends all users updates on new content only, every 6 hours. subscription takes care of updates or 'urgent' new content types.

beginner’s picture

Priority: Normal » Minor

Duplicate: http://drupal.org/node/19232

Thanks for the comments, Jürgen. I need to think about it.
I don't want notify to grow into a mammoth module competing with subscription (or did you mean subscriptionS ?)

If the feature is available elsewhere, then that's good for me.
I need time to study the differences and similarities with other, similar modules.

Jürgen Depicker’s picture

Subscriptions it is, not subscription. Sorry...

godo’s picture

@Jürgen Depicker

Are you sure about this: "subscriptions takes care of updates or 'urgent' new content types"? I have tried this module, subscriptions, and this feature is not working yet. You can see this: http://drupal.org/node/132983.

Perhaps, I haven't understood anything... I would greatly appreciate your help. Thanks.

godo’s picture

Priority: Minor » Normal

@johnsim: Does the above code work for Drupal 5 too?

Yes, I do. And it is working fine!!!

@beginner (you are a developer of this module, aren't you?)

Please, you can see my previous comment. I would like you add this "patch" to the dev code. Is it possible? I think that this feature is being very needed for some users.

I have tested the patch in #1. I am using next versions of drupal and modules:
Drupal 5.2
Archive 5.x-1.3
Notify 5.x-1.1
SiteMenu 5.x-1.0
Subscriptions 5.x-2.x-dev (2007-Aug-06)
Taxonomy Access Control 5.x-1.1
Update status 5.x-2.0-rc
Xstatistics 5.x-1.x-dev (2007-Jun-19)

I have made the following change in the "Notify 5.x-1.1" version:

[12:50:08(godo@olivo)~/temp/Modulos-drupal/notify]> diff notify.module notify.module-v01
341c341,342
<     $nresult = db_query(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE (n.status = 1 OR n.moderate = 1) AND n.created > %d AND n.created <= %d ORDER BY n.created'), $period, time());
---
>     //$nresult = db_query(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE (n.status = 1 OR n.moderate = 1) AND n.created > %d AND n.created <= %d ORDER BY n.created'), $period, time());
>     $nresult = db_query(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE (n.status = 1 OR n.moderate = 1) AND ((n.created > %d AND n.created <= %d) OR (n.changed > %d AND n.changed <= %d)) ORDER BY n.created'), $period, time(), $period, time());

I have tested this "patch" and it is working fine: I have updated a node (with "Create new revision" activated) and... one mail has been sent to my account!!!

Thanks, tecto (for your idea in #1).

beginner’s picture

@godo: See my recent comment in the Subscription issue.

This issue doesn't have a patch attached. See http://drupal.org/patch/create

Anyway, you are certainly aware that issues will be dealt in this order: http://drupal.org/node/159427
How long it will take will depend on how much help I get.

qube’s picture

I vote for this feature. It would be nice to have an option in user configuration to be notified of changed content.

I tried code change, published by godo and it is working. Only notification email is not so polished, because new content message is used for everything - changed/new content.

martinship’s picture

There is an obvious need for a proper implementation of this "feature" (or, in my case, required functionality). At least change the project description from "new or revised content" to just "new content" so you can avoid the angry mob of mislead users (like myself).

tenjindaira’s picture

I'll add my voice to those requesting this required functionality. I've made the change suggested by tecto and godo and confirm it works fine in Drupal 5.5.

Making this change raises another issue in regards to email notification: that the original author of a node is shown as the author of updated content. To make this less confusing, I also added code to display the author of the most recent update.

The message reads (eg) "Published Page created by john and edited by jane".

I've included the code below in the hope that someone else might find it useful (disclaimer: I'm a Drupal/PHP/SQL noob :)

From line 380 (5.x-1.1):

// Get author of most recent revision
$rev_author = "unknown";
$rev_author_query = 'SELECT u.name FROM {node_revisions} r INNER JOIN {node} n ON r.vid = n.vid INNER JOIN {users} u ON r.uid = u.uid WHERE n.nid = ' . $node->nid;
$rev_author_name = db_result(db_query($rev_author_query));
if ($rev_author_name) {
	$rev_author = $rev_author_name;
}	

// Print the revision author in the email message
$node_body .= t('@status @type created by @author and edited by @rev_author', array('@status' => $status, '@type' => node_get_types('name', $node), '@author' => ($node->name ? $node->name : variable_get('anonymous', 'Anonymous')), '@rev_author' => $rev_author)) ."\n";
cahaya’s picture

StatusFileSize
new2.67 KB

I've collated changes suggested by tecto, godo and tenjindaira into a single patch.
Hopefully there are no issues.

mdowsett’s picture

i can't get this patch (From #15) to go for some reason...other patches I have no problem with. Can somone supply a .zip of the patched version?

zacherbaugh’s picture

Component: Miscellaneous » Code
StatusFileSize
new1.77 KB
new9.42 KB

I needed notification that distinguished updates from new nodes, Subscriptions/subscription didn't really do what I wanted, so I finally got around to adding it to notify. I've attached my patch, which, in addition to the functionality in the above patches, provides:

* Information on revised nodes in a separate section of the notification message
* Log text for from the revision in the notification
* The ability for each user to choose (at /user/(uid)/notify) whether or not to get notified about revisions

...or possibly not - this is my first serious module patch, so I may well have mucked things up. I'd appreciate any suggestions you have.

This is all against 5.x-1.1 - I'll need to try this on 5.x-2.x-dev as well at some point.

NOTE: There are patches for both notify.module and notify.install, because the per-user setting required a new column in the "notify" table.

prodosh’s picture

Have these patches made it into the Drupal 6.x version?

rkdesantos’s picture

Version: 5.x-1.0 » 5.x-1.2

Can the patches be updated to work with the latest Notify version?

rkdesantos’s picture

Version: 5.x-1.2 » 5.x-1.3
StatusFileSize
new5.35 KB

I made a patch for this for v5.x-1.3 of the module from my hand fixes. It also addresses the issue raised in http://drupal.org/node/316234 for v5. This has not been tested so no guarantees. Hope it helps someone else.

rkdesantos’s picture

Any reason why we can't get this moved into the next dev release and eventually into a point release?

jromine’s picture

subscribe

matt2000’s picture

Version: 5.x-1.3 » 6.x-1.x-dev
Assigned: Unassigned » matt2000
Status: Active » Needs review

A possible solution for this is included in the new dev release for the 6.x branch. Please test.

matt2000’s picture

Status: Needs review » Fixed

To be released...

rkdesantos’s picture

Excellent @matt2000 Is it in the dev files yet?

Status: Fixed » Closed (fixed)

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