It will be very great if the notification e-mail could be enable or disable by node. In my case I have a nodes with embeded imatges with automatic actualitzation, with the actual module I receive e-mails in any change of this nodes and for my will be very good if the administrator can disable this feature in this nodes.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | notify_7.patch | 4.08 KB | lilou |
| #1 | notify-by-node-type.txt | 22.25 KB | lilou |
Comments
Comment #1
lilou commentedI modify this module to add this feature.
This is my code :
1°) Add before function notify_help :
define('NOTIFY_NODE_TYPE', 'notify_node_type_');2°) Remplace notify_admin_settings by :
3°) And remplace _notify_send by :
That's all x-)
Comment #2
kevinwalsh commentedsubscribing
Comment #3
RobRoy commentedCan you please post a patch against CVS according to http://drupal.org/patch? Thanks.
Comment #4
lilou commentedIt's my first patch.
Comment #5
stella commentedThis patch works for me. Other than a few changes to the coding style to match the drupal standards, this patch is good to go.
Cheers,
Stella
Comment #6
stella commentedMarked #140518 as a duplicate of this one.
Comment #7
stella commentedMarked #140518 as a duplicate of this one.
Comment #8
derieppe commentedHi,
Could theses functions be patched for the notify.module / drupal 5 version and publish here ?
Thanks a lot.
Comment #9
beginner commentedThe patch needs to be re-rolled to match the coding standards: http://drupal.org/coding-standards.
See also: When to set a patch RTBC: http://drupal.org/node/156119
I'll review the patch anyway, but only when I find time.
Comment #10
gracearoha commentedjust tracking to see when patch has been committed. Thanks!
Comment #11
designwork commentedjust tracking too
Dirk
Comment #12
beginner commentedSince you are all tracking, 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.
Anyway, this issue is currently assigned to Lilou.
Comment #13
goose2000 commentedtracking, thanks.
Comment #14
oprior commentedsubscribing
Comment #15
oprior commentedI thought I might just modify line 341 of notify.module like so to restrict it from notifying about certain content types:
$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' AND n.type != 'qc_product_colour' AND n.type != 'content_marketing' AND n.type != 'content_background' AND n.type != 'casetracker_basic_case'), $period, time());It doesn't seem to be working though, any suggestions at to why?
Comment #16
oprior commentedSorry, I had my extra ANDs after the ORDER By! Seems to be working now!
Does anyone see a reason why it might have been a bad idea for me to have hacked the module this way?
Comment #17
goose2000 commentedCan anybody offer up a .module of this? I could not get the patch to work with latest release. Or will this be integrated in some future release? Any ideas - thanks.
Comment #18
colincalnan commentedsubscribing :)
Comment #19
ron collins commentedsubscribing. notify isn't much use to me with out this.
Comment #20
beginner commentedsee #12
Comment #21
lilou commentedComment #22
enxox commentedThis version seems to work very well for me, but I noticed that If I choose a node type made with cck fields, and the title+body option, only text inserted in drupal-body field is notified.
How this can be modified to send info submitted also in other field?
to goose, beginner and others... download the txt in #1 and rename it notify.module
Comment #23
enxox commentedThis version seems to work very well for me, but I noticed that If I choose a node type made with cck fields, and the title+body option, only text inserted in drupal-body field is notified.
How this can be modified to send info submitted also in other field?
to goose, beginner and others... download the txt in #1 and rename it notify.module
Comment #24
mdowsett commentedIn response to post #15
I've already applied a few patches to my .module file (since patches don't seem to being committed to new releases of this module) so my line 341 is moved and modified by now.....I was hoping you could confirm some things for me to help with applying your code change.
I'm guessing my existing line to change is:
Is that right? It's now at line 369 so it is close. I've applied patches to notify of edited nodes (the stock module just notifies new nodes) and I think that code is now in this line so I'd want to keep it.
Would you mind modifying my code to be proper (I can change the node types myself)...so you add the node types that you WANT to be sent out right (not list the ones you want blocked from being sent out).
This is my best guess (I am not a coder):
A GUI would be ideal of course but this will get me by.
MANY thanks.
Comment #25
mdowsett commentedthis didn't work....I thought I'd try it....I got a whole whack of errors.
And I didn't understand post #16....I tried taking out just the one AND (the one immediately after ORDER BY) but that caused the entire site to go white (no errors).
Comment #26
mdowsett commentedsix weeks later on this issue....I decided to start fresh.
I had to manually change the code in #1 to get the options in the admin settings to select which node types I wanted to restrict the notifications to...and got that menu up.
I haven't yet seen any notifications come thru - this concerns me. I've created new content since the installation and preferences were set and also ran cron (manually).
Is there anywhere that I can see a log of what notifications went out?
Comment #27
matt2000 commentedSee Notify by Views as a means to accomplish this using views to select nodes by type.
Closing due to inactivity.