Do you use ArrowChat with your SE Site now here is a simply way to enable site notifications
First go to your Arrowchat Administration panel -> General Features and enable “Enable Site Notifications”.
After that go to “Manage” -> “Notifications” -> “Private Messages” and press “Edit”
You will see “Notification Number” is “1” (we need that later)
Next open “application/modules/Messages/controllers/MessagesController.php”
Go to Line 188
You will see
// Send notifications foreach( $recipients as $user ) { if( $user->getIdentity() == $viewer->getIdentity() ) { continue; } Engine_Api::_()->getDbtable('notifications', 'activity')->addNotification( $user, $viewer, $conversation, 'message_new' );
After that Add
//connect to DB $file = APPLICATION_PATH . '/application/settings/database.php'; $options = include $file; $dbArrow = Zend_Db::factory($options['adapter'], $options['params']); $dbArrow->getConnection(); //end DB setup $sql = "INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time, misc1, misc2, misc3) VALUES ('".$user->getIdentity()."', '".$viewer->getIdentity()."', '".$viewer."', '1', '".time()."', '', '', '')"; $dbArrow->query($sql);
Save and re-upload, done
Just copy paste this snippet to any controller, where you want notifications to appear and change “type” to the number you want.
In our case 1 is the type for “Private Messages”
Looking for quality SocialEngine Hosting? Look no further than Arvixe Web Hosting!