xtint (@xtint)

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @xtint

    Member

    Gautam that is the source.i adopted it from Thomas Klaiber post notification plugin.Klaiber plugin sends one email notification on topics in their favourites only without the contents.so i need to figure out how to reply to a post through email.

    <?php

    function notification_new_post()

    {

    global $bbdb, $bb_table_prefix, $topic_id,$bb_current_user,$post_id;

    $all_users = notification_select_all_users();

    foreach ($all_users as $userdata) :

    $topic = get_topic($topic_id);

    $posts = get_thread($topic_id, 1, 1);

    $posts = array_reverse($posts);

    $last = array_pop($posts);

    $last_text = strip_tags($last->post_text);

    $message = __(“There is a new post on the forumnnTopic title: %1$s nPosted by: %2$snn Url:%3$s nn Contents nn %4$s”);

    mail( $userdata->user_email, bb_get_option(‘name’) . ‘:’ . __(‘Notification’),

    sprintf( $message, $topic->topic_title,get_user_name($bb_current_user->ID),get_topic_link($topic_id),$last_text),

    ‘From: ‘ . bb_get_option(‘admin_email’) );

    endforeach;

    }

    add_action(‘bb_new_post’, ‘notification_new_post’);

    function notification_select_all_users()

    {

    global $bbdb;

    $all_users = $bbdb->get_results(“SELECT ID, user_email FROM $bbdb->users WHERE user_status=0”);

    return $all_users;

    }a

    ?>

    @xtint

    Member

    i have now figured out how to send forum posts to registered users through email but what i have failed is to let users reply to this post through email.please any one have an idea.

    xtint

    @xtint

    Member

    Thanks Michael3185.nways one of the things i need right now is the filter that pulls the post’s content like this one for the topic

    topic_title.

    Cheers

    Xtint

Viewing 3 replies - 1 through 3 (of 3 total)