Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress & Arrowchat Notifications – help needed!

  • @thefluxo

    Participant

    Hi there,

    this is my first thread here and i hope i make everything right, so here is my configuration:

    i run WP3.6, along with BP 1.8.1. and Geotheme 3.3.2. on a subdomain, but on root directory.

    and here is my problem: i’d like to use arrowchat with the site and i already bought it. arrowchat gives you the opportunity to use a notification system. there are several integrations ready for oxwall, phpbb and stuff, but there is only an general tutorial for customized notifications. this is what the say about it:

    First, you need to understand how notifications work and the basic process of installing them. The most difficult part of installing a notification is finding the place where the action occurs. Consider the following example:

    Let’s assume that we want to install a notification for when a user comments on a photo:

    function add_photo_comment()
    {
    // Process the photo comment

    if ($comment)
    {
    // Insert the photo comment

    $msg = “Success! The comment was added to the user’s photo”;

    // BEGIN ARROWCHAT NOTIFICATION
    $sql = “INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time)
    VALUES (‘”.$to_id.”‘, ‘”.$author_id.”‘, ‘”.$author_name.”‘, ‘1’, ‘”.time().”‘)”;
    mysql_query($sql);
    // END ARROWCHAT NOTIFICATION
    }
    else
    {
    $error = “You did not enter a comment”;
    }
    }
    As you can see from the example above, we only inserted the notification into the database where the action occured, which in this case, was adding a photo comment. If you want to add a notification for private messages, you would insert the ArrowChat mySQL code where a user has successfully sent a private message.

    Sample MySQL Insert Code
    Here is the way a proper notification should be entered into the database:

    $sql = “INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time, misc1, misc2, misc3)
    VALUES (‘”.$to_id.”‘, ‘”.$author_id.”‘, ‘”.$author_name.”‘, ‘1’, ‘”.time().”‘, ”, ”, ”)”;
    mysql_query($sql);
    The above is a basic template that you should use for inserting notifications. Some modification might be necessary.

    to_id – (int) The user ID of the user that should receive the notification.
    author_id – (int) The user ID of the user that sent the notification. Can be left blank if none.
    author_name – (varchar) The name of the user that sent the notification. Can be left blank if none.
    type – (int) The type of notification. You need to create a notification markup in the admin panel, and then insert the number of that markup as the type.
    alert_time – (int) The unix time of when the notification was sent.
    misc1 – (varchar) A miscellaneous field that can be used for anything or left blank.
    misc2 – (varchar) A miscellaneous field that can be used for anything or left blank.
    misc3 – (varchar) A miscellaneous field that can be used for anything or left blank.

    The Notification Markup and Type Number

    If you need to install a notification that is not already included in the default ArrowChat installation, you can add one by clicking Notifications under the Manage menu. Add a name and the HTML markup that should be used when receiving the notification. You can look at the notifications already installed for reference.

    After the notification is created, click “Edit” and you will be shown the notification number that is to be used to generate that markup.

    since i am not a programmer, i don’t know how to implement it and i hope to find anybody here who can help me with that. i want to use the notifications for new messages in BP, friendship notifications and activity comments.

    it would be nice if anyone can help me out here!

    thank you
    oliver

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

    Participant

    Hi thefluxo,
    Can you send a copy of geotheme 3.3.2, so that I can try to find problem with your installation.
    I will analyze and then reply to you.

    Mail me at kevintodler@gmail.com

    @hnla

    Participant

    since i am not a programmer, i don’t know how to implement it and i hope to find anybody here who can help me with that.

    To be honest it’s a little outside the scope of this forum which aims to provide help with BP it’s self rather than third party integrations. If you are not a programmer or code savy then you might want to think about hiring a developer for a few hours to implement this for you.

    @rastarr

    Participant

    Just wondering whether anyone got this to work as I’m interested in getting ArrowChat myself?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Buddypress & Arrowchat Notifications – help needed!’ is closed to new replies.
Skip to toolbar