Buddypress & Arrowchat Notifications – help needed!
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:
// Process the photo 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().”‘)”;
// END ARROWCHAT NOTIFICATION
$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().”‘, ”, ”, ”)”;
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!
You must be logged in to reply to this topic.