Automatic e-mail
-
Hello,
Can anybody tell me if it is possible to autmaticly e-mail (some) user when there is placed an new thread or an answer on a thread?
-
Notifications are planned and will be available in a future release:
https://github.com/Asgaros/asgaros-forum/issues/22I use the function script so everbody get The notification there is a new topic/thread. The only thing i want to add is The url to the topic/thread. Can anybody help me with the code for The threadID?
Hello @jmolenaar,
what code do you use? Can I have a look so I can check it out?
Offcourse u can. after http://www.xxx.nl/?view=forum&id=1 i would like the threadID so when sombody clicks they directly go to the topic/thread. THANK U!!!
function after_add($post_id) {
global $wpdb;
$post_title = get_the_title( $post_id );
$post = $wpdb->get_row($wpdb->prepare(“SELECT text FROM wp_forum_posts WHERE id = %d;”, $post_id));
$to = ‘xxx@xxxx.nl’;
$subject = “Nieuw topic geplaats op xxx Forum”;
$message = “Er is een nieuwe topic geplaatst het xxxx-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>
http://www.xxx.nl/?view=forum&id=1”;
$headers = ‘From: no-reply@xxxx.nl’ . “\r\n” .
‘BCC: xxx@xxx.nl; xxxx@xxxxl.com’ . “\r\n” .
‘Reply-To: no-reply@xxx.nl’ . “\r\n” .
‘Content-Type: text/html; charset=UTF-8’;
‘X-Mailer: PHP/’ . phpversion();mail($to, $subject, $message, $headers);
}
Hello @jmolenaar,
I just uploaded a new commit on GitHub:
https://github.com/Asgaros/asgaros-forum/commit/1aabc3a8ef7c10c275b71ae9afd2cd2e0370c2dbThis adds a new option in the user profiles of all users as long as the subscription-functionality is enabled in the forum-settings. With this option each user (this means also moderators and administrators) can decide to get notifications on new forum-topics β no matter in which category/sub-forum they got created.
This means that you dont need to use your custom code anymore because everyone who wants to get notified on new topics can activate this option now.
I will include this functionality in the upcoming v1.2.4-release which will be published in the next few days.
Hello @Asgaros,
That is great news!!! I dont know if i am technical enough to place aan new commit (never done it before) but i will give it a try! Else i wait till the new update.
TANK U!!!
I tried to update. Now i lost all my date :(. Can i fix it?
@jmolenaar: Version 1.2.4 is not released yet, so just please wait for the update.
@asgaros to late π I already did the update. So i lost my data. No way to bring it back i think?
What did you exactly, @jmolenaar
@Asgaros, i made a copy trough FTP (and saved it on my desktop) from the plugin on our site. Then i deleted the map and i uploaded yours wich i donwloaded from Github π
So now the plugin works fine (so thank u!!!) but the topics which already were posted are gone.
@jmolenaar: Did you delete the old version of the plugin via FTP or via the WordPress uninstaller?
I think both. It was two times in The list. I dont know for sure.
The topic ‘Automatic e-mail’ is closed to new replies.