Skip to:
Content
Pages
Categories
Search
Top
Bottom

how can I send custom notices?

  • @carlla

    Member

    I developed a simple (and old) wordpress plugin where subscribers can “like” articles.

    This week I started to use buddypress and I am wondering about to send a custom notice to users saying something like ” Hello SomeAuthor, user Alpha likes your article. “

    Is possible to automatically compose and send custom messages?

    What documentation should I read?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @shanebp

    Moderator

    @carlla

    Member

    @shanebp Thanks for your help =) I’ll try that

    @carlla

    Member

    @shanebp I tried that code, but I couldn’t get it working yet. Could you help me with it?

    On my functions.php I added bp_send_private_bzzt, bp_send_private_bzzt_link and bp_get_send_private_bzzt_link.
    I also added the buzzt link on my theme, but this new link gets me to a 404 page. I’m using the twentyten theme and bp-themplate-pack plugin.

    @shanebp

    Moderator

    The link just goes to the page that it is on.
    That’s what this does: bp_core_redirect( wp_get_referer() ) in bp_send_private_bzzt()

    So a 404 indicates some other problem that I can’t diagnose, unless…

    Did you try putting the code in bp-custom.php, per the instructions, instead of functions.php ?

    @carlla

    Member

    @shanebp sorry my noob question, but what folder should I put bp-custom.php?

    @carlla

    Member

    =D This is working now! What nice thing! Thank you very much @shanebp

    @carlla

    Member

    I’ll try to get it working with an ajax call.

    I notice that the most bp components ( friends for instance ) does ajax call to wp-load.php.

    I am curious about why not use admin-ajax.php like most wordpress plugins does. Is there a special reason for that?

    @shanebp

    Moderator

    Glad you got it working.

    I’d love to see an example of this using an ajax call, about which I know little.
    Please post your working example when you get there, thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how can I send custom notices?’ is closed to new replies.
Skip to toolbar