jmolenaar
Forum Replies Created
-
Forum: Plugins
In reply to: [Asgaros Forum] Text notificationsHello 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 7 years, 9 months ago by jmolenaar.
Forum: Plugins
In reply to: [Asgaros Forum] Text notificationsHello 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);Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mailI think both. It was two times in The list. I dont know for sure.
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mail@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.
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mail@asgaros to late ?? I already did the update. So i lost my data. No way to bring it back i think?
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mailI tried to update. Now i lost all my date :(. Can i fix it?
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mailHello @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!!!
Forum: Plugins
In reply to: [Asgaros Forum] ThreadThat works GREAT!!! THANK U SO MUCH!!!
Forum: Plugins
In reply to: [Asgaros Forum] ThreadHello @asgaros,
Sorry but i am not that technical. You mean the code should be:
function after_add($post_id) {
global $asgarosforum;
$link = html_entity_decode($asgarosforum->get_link($asgarosforum->current_thread, $asgarosforum->url_thread).’#postid-‘.$asgarosforum->current_post);
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 = ‘[email protected]’;
$subject = “Nieuw topic geplaats op xxxxxx”;
$message = “Er is een nieuwe topic geplaatst het xxxxx. <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 to the new topic:<br />%s’, ‘asgaros-forum’), esc_html(stripslashes($topic_name)), wpautop(stripslashes($topic_text)), $topic_link);
“;
$headers = ‘From: [email protected]‘ . “\r\n” .
‘BCC: [email protected]‘ . “\r\n” .
‘Reply-To: [email protected]‘ . “\r\n” .
‘Content-Type: text/html; charset=UTF-8’;
‘X-Mailer: PHP/’ . phpversion();mail($to, $subject, $message, $headers);
}
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mailOffcourse u can. after https://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 = ‘[email protected]’;
$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>
https://www.xxx.nl/?view=forum&id=1”;
$headers = ‘From: [email protected]’ . “\r\n” .
‘BCC: [email protected]; [email protected]’ . “\r\n” .
‘Reply-To: [email protected]’ . “\r\n” .
‘Content-Type: text/html; charset=UTF-8’;
‘X-Mailer: PHP/’ . phpversion();mail($to, $subject, $message, $headers);
}
Forum: Plugins
In reply to: [Asgaros Forum] Automatic e-mailI 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?
Forum: Plugins
In reply to: [Calendar] Background when eventSorry i found it
Forum: Plugins
In reply to: [Asgaros Forum] NotificationsI miss the option “forum contributor” at the user (where forum modorator can be find). And i miss Forum -> Options -> Notify contributor about new topics.
Am i right?
Forum: Plugins
In reply to: [Asgaros Forum] NotificationsBecause i only see the option “Notify administrator about new topics” i still use the code on page one. It works for me at this moment. But i can be nicer if i am able to put in a link to the thread and if i can display de subject of the thread in te notification.
Can anybody help me with that?
This is the code i use at this moment
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 = ‘[email protected]’;
$subject = “Nieuw topic geplaats op het Forum”;
$message = “Er is een nieuwe topic geplaatst het forum met de volgende inhoud: \r\n ” .$post->text;
$headers = ‘From: [email protected]’ . “\r\n” .
‘Reply-To: [email protected]’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();mail($to, $subject, $message, $headers);
}
Thank u!!!