Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author julien731

    (@julien731)

    I’m not sure I understand your question. The plugin does send e-mail notifications every time a reply is added.

    Thread Starter neijisly

    (@neijisly)

    Yes

    Plugin Author julien731

    (@julien731)

    I still don’t understand what the question is ??

    Thread Starter neijisly

    (@neijisly)

    Thank for your reply
    My question: when administrator reply to a topic, the user whom created topic receive a notification or message buddypress ex: admin reply to your topic #457

    Plugin Author julien731

    (@julien731)

    I’m sorry if I understood the question wrong, but there is no integration between Awesome Support and BuddyPress.

    Awesome Support sends e-mail notification when new tickets and new replies are posted, but no link with BP here.

    Thread Starter neijisly

    (@neijisly)

    Yes, i want this e-mail notification arrives in buddypress message. I’m looking for a function to make it

    Plugin Author julien731

    (@julien731)

    Well in this case you will need to create a custom function. What you want to do is hook on those 2 hooks:

    For each scenario you’ll need to determine what to post and where to post in in BuddyPress.

    Thread Starter neijisly

    (@neijisly)

    Thank you. but I don’t know how i can write and send this in buddypress. Please write for me or give me an exemple.

    Thread Starter neijisly

    (@neijisly)

    Hi Julien, i wrote the function
    <?php
    function custom_filter_notifications_get_registered_components($component_names=array() ) {

    if(!is_array($component_names) ) {
    $component_names=array();
    }

    array_push($component_names,’custom’);

    return $component_names;
    }
    add_filter(‘bp_notifications_get_registered_components’,’custom_filter_notifications_get_registered_components’);

    function custom_format_buddypress_notifications($action,$ticket_id,$secondary_item_id,$total_items,$format=’string’) {

    if(‘custom_action’ === $action) {

    $custom_link= ‘/contact’;
    $custom_text=’We have replied to your ticket’;

    if(‘string’===$format) {
    $return=apply_filters(‘custom_filter’,’‘.$custom_text.’‘);

    }else{
    $return=apply_filters(‘custom_filter’,array(
    ‘text’=>$custom_text,
    ‘link’=>$custom_link
    ),$custom_link, (int)$total_items,$custom_text,$custom_title);
    }
    return$return;
    }
    }
    add_filter(‘bp_notifications_get_notifications_for_user’,’custom_format_buddypress_notifications’,10,5);
    function bp_custom_add_notification($ticket_id,$comment_object) {
    $author_id=$post->ID;
    bp_notifications_add_notification(array(
    ‘user_id’=>$author_id,
    ‘item_id’=>$ticket_id,
    ‘component_name’=>’custom’,
    ‘component_action’=>’custom_action’,
    ‘date_notified’=>bp_core_current_time(),
    ‘is_new’=>1,
    ) );
    }
    add_action(‘wpas_add_reply_after’,’bp_custom_add_notification’,99,2);
    ?>

    Thread Starter neijisly

    (@neijisly)

    Work fine but How can i take a link directly to a ticket when i click in notification ?. That will be very good if you will add this function in plugin core.

    Plugin Author julien731

    (@julien731)

    To link to a ticket you just need to use the WordPress core function get_permalink() and use the ticket ID (the post ID in fact) as the parameter.

    Thread Starter neijisly

    (@neijisly)

    I tried but does not work. the link returns the same page

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Support notification’ is closed to new replies.