when a user put a new comment, my wordpress blog sends a mail notification.
it is possible modify this mail notification?
(i want put other text in last part of each mail notification)
when a user put a new comment, my wordpress blog sends a mail notification.
it is possible modify this mail notification?
(i want put other text in last part of each mail notification)
Hi,
Check with these plugins:
http://wordpress.org/extend/plugins/post-notification/
http://wordpress.org/extend/plugins/subscribe2/
http://wordpress.org/extend/plugins/subscribe-to-comments/
Thanks,
Shane G.
This plugin looks like it might do that:
thanks for comments!
i tell you more info about my problem.
at the moment, i'm using "Subscribe to Comments" plugin (i like it a lot. it is a very good plugin: when an user puts a comment, he can choose if he wants also info about new comments for that post) and each mail notification has:
- author
- comment text
- link to a post of my blog
- link to subscription manager
i simply want to put in mail notification also another field where i want simply put a signature (simply some words, not a long text).
so i ask you if it is possibile this notification:
using another plugin?
or editing a file of wordpress?
i don't know very well english, please help me in easy english.
thanks :-)
I'd see if that plugin comes close then modify that.
MichaelH, i think that it is possibkle to edit "Subscribe to Comments" plugin and so each mail notification has also a " final text for signature".
but how i can edit it?
do you kwnow it?
please, can help me?
:-|
Assuming the plugin is http://wordpress.org/extend/plugins/subscribe-to-comments/ looks like you need to change the code around line 588 inside the function send_notifications().
MichaelH,
i read here
http://wordpress.org/support/topic/242380?replies=9
and maybe also editing
wp_notify_postauthor() in /wp-includes/pluggable.php
is a solution.
but maybe your solution is better because i use "Subscribe to Comments" plugin.
i found
function send_notifications() in /plugins/subscribe-to-comments.php file (plugin file).
thanks.
---
i'm using "Subscribe to Comments" plugin + italian translation
so, i has 2 files:
not only
"subscribe-to-comments.php", where you find function send_notifications()
but also another file "subscribe-to-comments-it_IT.mo"
!!
i think i must edit "subscribe-to-comments-it_IT.mo" file.
what do you think?
Possible but I don't believe you edit an .mo file. You will want to review Translating_WordPress.
sorry for my later.
i tried to edit function send_notifications() in /plugins/subscribe-to-comments.php file (plugin file), but i don't undestand how i can put a new text signature (a signature always the same) in the final part of the notification mail
here i copy the code:
function send_notifications($cid) {
global $wpdb;
$cid = (int) $cid;
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$cid' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");if ($comment->comment_approved == '1' && $comment->comment_type == '') {
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications$message = sprintf(__("There is a new comment on the post \"%s\"", 'subscribe-to-comments') . ". \n%s\n\n", stripslashes($post->post_title), get_permalink($comment->comment_post_ID));
$message .= sprintf(__("Author: %s\n", 'subscribe-to-comments'), $comment->comment_author);
$message .= __("Comment:\n", 'subscribe-to-comments') . stripslashes($comment->comment_content) . "\n\n";
$message .= __("See all comments on this post here:\n", 'subscribe-to-comments');
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
//add link to manage comment notifications
$message .= __("To manage your subscriptions or to block all notifications from this site, click the link below:\n", 'subscribe-to-comments');
$message .= get_settings('siteurl')."/wp-subscription-manager.php?email=[email]&key=[key]";$subject = sprintf(__('New Comment On: %s', 'subscribe-to-comments'), stripslashes($post->post_title));
how i must edit this code?
I use:
http://www.satollo.net/plugins/comment-notifier
Which settings screen includes the emails to send.
thanks Gangleri,
but i prefer at the moment try to edit "Subscribe to Comments" plugin.
---
i hope you can help me! :-(
please, can help me?
:-)
Use FTP and copy your wordpress files from your host to your local computer then use http://wingrep.com and search the files for the existing text then that will tell you what file the existing text resides.
MichaelH,
but i know where there is the code!
this is not a problem!
i found the file!
the problem is the i don't know how i can edit the code to put a new text signature (a signature always the same) in the final part of the notification mail.
i copied the code above.
please can you help me?
Hmmmm...
Just include another:
$message .= __("\nThe signature I want to add\n", 'subscribe-to-comments');
It won't be localized (so you can use this too):
$message .= ("\nThe signature I want to add\n");
You must include it in the position you want it. Note that \n is a new line.
(sorry for my later)
bi0xid
sorry but i don't understand your nfo.
where and how i must put
$message .= __("\nThe signature I want to add\n", 'subscribe-to-comments');
and
$message .= ("\nThe signature I want to add\n");
???
please can you give me more info step by step in easy mode?
i hope you can help me :-)
thanks
please, can help me?
:-)
I FOUND A SOLUTION! :-)
different solution ...but good!
---
at the first: i use "Notepad++" when i want to edit a file, so i can see when between words there is a space as NUL (Null character, in ASCII)
---
you know: i simply want to put in mail notification also another field where i want simply put a signature (simply some words, not a long text).
i told you: i'm using "Subscribe to Comments" plugin + italian translation
so, i has 2 files.
not only "subscribe-to-comments.php", where you find function send_notifications()
but also another file "subscribe-to-comments-it_IT.mo"
!!
i edited "subscribe-to-comments-it_IT.mo" file.
in this file (line number 28), i found the words
NUL"To manage your subscriptions or to block all notifications from this site, click the link below:"
and then, in this same file (line number 51), i found below also italian translation:
NUL"Per gestire le tue iscrizioni o bloccare tutte le notifiche da questo sito, fai clic sul link seguente:"
but question is:
where i can put the code for a signature (simply some words, not a long text) in mail notification?
solution:
i simply put my signature AFTER "NUL" and BEFORE "Per gestire le tue iscrizioni o bloccare tutte le notifiche da questo sito, fai clic sul link seguente:"
for example, if i want to put a signature as "visit also my site http://www.mywebsite.com", i will put signature like this below:
"NULvisit also my site http://www.mywebsite.com
Per gestire le tue iscrizioni o bloccare tutte le notifiche da questo sito, fai clic sul link seguente:"
---
i hope to help others people with this solution!
thanks :-)
This topic has been closed to new replies.