Hello @jmolenaar,
you can use one of the following filters to modify the text:
– asgarosforum_filter_notify_topic_subscribers_message
– asgarosforum_filter_notify_global_topic_subscribers_message
Example:
function custom_notify_topic_subscribers_message($string, $thread_name, $answer_text, $answer_link) {
$string = "My new text.";
return $string;
}
add_filter('asgarosforum_filter_notify_topic_subscribers_message', 'custom_notify_topic_subscribers_message', 10, 4);
Hello Asgaros,
Thank u for the quick reply. I also want to include te link to the topic en the subject.
Would this work?
function custom_notify_topic_subscribers_message($string, $thread_name, $answer_text, $answer_link) {
global $asgarosforum;
$link = html_entity_decode($asgarosforum->get_link($asgarosforum->current_thread, $asgarosforum->url_thread).’#postid-‘.$asgarosforum->current_post);
global $wpdb;
$post_title = $thread_name;
$post = $wpdb->get_row($wpdb->prepare(“SELECT text FROM wp_forum_posts WHERE id = %d;”, $post_id));
$subject = “Nieuw topic geplaats op Flexwise Forum”;
$string = “Er is een nieuwe topic geplaatst het forum.<br><br><b>Let op!</b> Om op een notificatie te ontvangen wanneer er een reactie is
geplaatst op het topic dien je je aan te melden voor dit top. Dit doe je door onderaan <i><u>Abonneren op dit onderwerp.</u></i> aan te klikken.<br> <br>
Link naar het nieuwe topic:<br />$answer_link”;
}
add_filter(‘asgarosforum_filter_notify_topic_subscribers_message’, ‘custom_notify_topic_subscribers_message’, 10, 4);
Hello @jmolenaar
You dont need to generate the links or subjects again. Just use the variables of the functions, they contain everything:
– $thread_name
– $answer_text
– $answer_link
Hello Asgaros,
Again thank u for your support. Would this be enough then?
function custom_notify_topic_subscribers_message($string, $thread_name, $answer_text, $answer_link) {
$subject = “Nieuw topic geplaats op Flexwise Forum”;
$string = “Er is een nieuwe topic geplaatst het forum.<br><br><b>Let op!</b> Om op een notificatie te ontvangen wanneer er een reactie is
geplaatst op het topic dien je je aan te melden voor dit top. Dit doe je door onderaan <i><u>Abonneren op dit onderwerp.</u></i> aan te klikken.<br> <br>
Link naar het nieuwe topic:<br />$answer_link”;
}
add_filter(‘asgarosforum_filter_notify_topic_subscribers_message’, ‘custom_notify_topic_subscribers_message’, 10, 4);
-
This reply was modified 8 years, 11 months ago by
jmolenaar.