Forum breadcrumbs – You are here:Asgaros Support ForumSupportNotification content
Please or Register to create posts and topics.

Notification content

Page 1 of 2Next

I would like to exclude the text of the post from the email notification form.

Is there any possibility to modify the notification content ?

 

I would like that too!

Lou

Hello everyone,

please add the following code to your themesĀ functions.php-file to remove the text of a new post/topic from the notification:

function change_notification_message_topic($notification_message, $topic_name, $topic_text, $topic_link, $author_name) {
  return sprintf(__('Hello,<br /><br />You received this message because there is a new forum-topic:<br />%s<br /><br />Author:<br />%s<br /><br />Link to the new topic:<br /><a href="%s">%s</a>', 'asgaros-forum'), esc_html(stripslashes($topic_name)), $author_name, $topic_link, $topic_link);
}
add_filter('asgarosforum_filter_notify_global_topic_subscribers_message', 'change_notification_message_topic', 10, 5);

function change_notification_message_post($notification_message, $topic_name, $answer_text, $answer_link, $author_name) {
  return sprintf(__('Hello,<br /><br />You received this message because there is a new answer in a forum-topic you have subscribed to:<br />%s<br /><br />Author:<br />%s<br /><br />Link to the new answer:<br /><a href="%s">%s</a><br /><br />You can unsubscribe from this topic using the unsubscribe-link at the end of the topic as a logged-in user. Please dont answer to this mail!', 'asgaros-forum'), esc_html(stripslashes($topic_name)), $author_name, $answer_link, $answer_link);
}
add_filter('asgarosforum_filter_notify_topic_subscribers_message', 'change_notification_message_post', 10, 5);

 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Added the code to my theme function.php file and no more notifications are coming at all.

 

Do you get any error message? Also keep in mind, that you dont get any notifications for your own posts/topics.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

No error message.

I created a test user, he’s not getting notifications neither.

Can you double-check if you have subscribed to the correct topics/forums? I checked it again on my test-installation and it seems to work fine.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Sure, I will check it.

Quote from Gbr on January 24, 2018, 8:12 pm

Sure, I will check it.

Just curious. Does it work now?

Yes, it is working now !

Thank you Asgaros for your support !

Asgaros has reacted to this post.
Asgaros
Page 1 of 2Next