Title: Notifications
Last modified: August 31, 2016

---

# Notifications

 *  Resolved [Oazar](https://wordpress.org/support/users/oazar/)
 * (@oazar)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/)
 * Hello,
 * I like your forum, so easy to install and use.
    But I need the forum users o 
   be notified of new posts or new answers, and it seems this feature does not existe
   in your plugin. Do you recommand maybe some other plugin for these notifications?
 * Thaks for your answer
 * [https://wordpress.org/plugins/asgaros-forum/](https://wordpress.org/plugins/asgaros-forum/)

Viewing 15 replies - 1 through 15 (of 51 total)

1 [2](https://wordpress.org/support/topic/notifications-30/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/notifications-30/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/notifications-30/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/notifications-30/page/2/?output_format=md)

 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7065968)
 * Hello Oazar,
 * this feature is not planned yet. Maybe I can add it in a future version of the
   plugin.
 * Another possibility would be the addition of an action hook which allows you 
   to add this functionality by your own. Lets see what I can do.
 *  Thread Starter [Oazar](https://wordpress.org/support/users/oazar/)
 * (@oazar)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7065971)
 * Thanks very much for your fast answer.
 * Well I am not a developper myself, of course I can do a few things to edit existing
   code, but if “adding this functionality on my own ” means writing code ‘from 
   scratch”, sadly enouch I don’t feel up to it unless you tell me exactly what 
   to do… is this what you mean ?? !
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7065974)
 * Maybe I can give you an example. It will be not so difficult, maybe 4-5 lines
   of code. 🙂
 *  Thread Starter [Oazar](https://wordpress.org/support/users/oazar/)
 * (@oazar)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7065980)
 * that would be great !
 *  Thread Starter [Oazar](https://wordpress.org/support/users/oazar/)
 * (@oazar)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066198)
 * Hello,
 * Any news about these lines of code to add ? Sorry to be back so soon, but I am
   in a hurry..
 * Thanks for your answer
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066203)
 * No news yet. I have to implement and test other features with a higher priority
   first.
 * I will add a hook for this in 1.0.10
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066219)
 * Hello Oazar!
 * I added some submit hooks to the development version:
    [https://github.com/Asgaros/asgaros-forum/commit/56cc13648d023d957573613826caaa3d9a5eeea1](https://github.com/Asgaros/asgaros-forum/commit/56cc13648d023d957573613826caaa3d9a5eeea1)
 * They will be accessible via your themes _functions.php_ file:
 *     ```
       function after_submit($post_id) {
       	// Your code here ...
       }
       add_action('asgarosforum_after_thread_submit', 'after_submit');
       add_action('asgarosforum_after_post_submit', 'after_submit');
       add_action('asgarosforum_after_edit_submit', 'after_submit');
       ```
   
 * The ID allows you to access all fields in the database. This can be used to get
   information about subject/content/author for example.
 * Those kind of information can be used inside your mail if you want. Here is an
   example on how to send a mail via PHP:
    [http://stackoverflow.com/a/5335311/4919483](http://stackoverflow.com/a/5335311/4919483)
 * So your code in your themes _functions.php_ file code be something like this:
 *     ```
       function after_submit($post_id) {
       	global $wpdb;
       	$post = $wpdb->get_row($wpdb->prepare("SELECT text FROM wp_forum_posts WHERE id = %d;", $post_id));
       	$to      = 'nobody@example.com';
       	$subject = 'New post/thread';
       	$message = "A new post/thread has been created:\r\n".$post->text;
       	$headers = 'From: webmaster@example.com' . "\r\n" .
           'Reply-To: webmaster@example.com' . "\r\n" .
           'X-Mailer: PHP/' . phpversion();
   
       	mail($to, $subject, $message, $headers);
   
       }
       add_action('asgarosforum_after_thread_submit', 'after_submit');
       add_action('asgarosforum_after_post_submit', 'after_submit');
       add_action('asgarosforum_after_edit_submit', 'after_submit');
       ```
   
 *  Thread Starter [Oazar](https://wordpress.org/support/users/oazar/)
 * (@oazar)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066223)
 * Hello and thanks so much for writing all this !
 * I’ll try to understand it all tomorrow and run some tests. I might have some 
   questions to be able to do it well.
    Thanks !
 *  [Li-An](https://wordpress.org/support/users/li-an/)
 * (@li-an)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066248)
 * Hello,
    strange that the feature is not “top priority”. The plugin looks very
   sexy and the function will make it a very good alternative to existent solutions.
 *  [yujitamiya](https://wordpress.org/support/users/yujitamiya/)
 * (@yujitamiya)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066306)
 * Hello,
 * I just installed Asgaros Forum on my website and I have the same problem: I need
   notifications via email when users post or reply.
 * I tried to understand your code above but I’m not so used to insert codes. What
   should I do exactly?
 * Thanks for your help!
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066310)
 * This code allows you to implement some kind of notification functionality on 
   your own. It sends you an email when something new has been posted into the forums.
   But it is only an example so it should be used and modified by experienced users
   only.
 *  [yujitamiya](https://wordpress.org/support/users/yujitamiya/)
 * (@yujitamiya)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066311)
 * Ok, I see. But my question is: Do I copy the code as it is, or should I change
   emails addresses ‘nobody@example.com’ and ‘webmaster@example.com’ with my admin
   emails?
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066312)
 * Of course you have to modify it. It is still an example and I think it needs 
   some kind of modifications before it works correctly.
 *  [yujitamiya](https://wordpress.org/support/users/yujitamiya/)
 * (@yujitamiya)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066313)
 * ok, thank you very much
 *  [trollheimendesign](https://wordpress.org/support/users/trollheimendesign/)
 * (@trollheimendesign)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/notifications-30/#post-7066314)
 * Really want this future to. Hope it will be included in the plugin soon.
    Just
   need a checkbox for checking “Notify members on new post/answers” in the forum.
 * Or a “Notify me of follow-up posts via email” where every single user can check
   on/off.

Viewing 15 replies - 1 through 15 (of 51 total)

1 [2](https://wordpress.org/support/topic/notifications-30/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/notifications-30/page/3/?output_format=md)
[4](https://wordpress.org/support/topic/notifications-30/page/4/?output_format=md)
[→](https://wordpress.org/support/topic/notifications-30/page/2/?output_format=md)

The topic ‘Notifications’ is closed to new replies.

 * ![](https://ps.w.org/asgaros-forum/assets/icon-128x128.png?rev=1546717)
 * [Asgaros Forum](https://wordpress.org/plugins/asgaros-forum/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/asgaros-forum/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/asgaros-forum/)
 * [Active Topics](https://wordpress.org/support/plugin/asgaros-forum/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/asgaros-forum/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/asgaros-forum/reviews/)

 * 51 replies
 * 10 participants
 * Last reply from: [Asgaros](https://wordpress.org/support/users/asgaros/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/notifications-30/page/4/#post-7066368)
 * Status: resolved