Helping you Build Your Own Social Network!

Faster, better and easier!

Bp Chat /Documentation

We are Hiring new WordPress/buddyPress developers

No Database Tables Created, what Should I do ?

It seems to be some issue in creating tables on some of the installs. If the tables does not get created, please use the sql from the file to manually create the table

http://buddydev.com/http//buddydev.com/public-download/bp-chat.sql-beta4.txt

Here is the complete code


CREATE TABLE IF NOT EXISTS `wp_bp_chat_channels` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`last_message_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`time_created` datetime NOT NULL,
`status` tinyint(3) unsigned NOT NULL,
`is_multichat` tinyint(3) NOT NULL,
`is_open` tinyint(4) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `wp_bp_chat_channel_users`
--

CREATE TABLE IF NOT EXISTS `wp_bp_chat_channel_users` (
`channel_id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL,
`status` varchar(32) NOT NULL,
`has_initiated` tinyint(4) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `wp_bp_chat_messages`
--

CREATE TABLE IF NOT EXISTS `wp_bp_chat_messages` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`sender_id` bigint(20) NOT NULL,
`channel_id` bigint(20) NOT NULL,
`message` text NOT NULL,
`sent_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `wp_bp_chat_users`
--

CREATE TABLE IF NOT EXISTS `wp_bp_chat_users` (
  `user_id` bigint(20) NOT NULL,
  `is_online` tinyint(4) NOT NULL,
  `last_active_time` datetime NOT NULL,
  `status_message` varchar(255) NOT NULL,
  `last_fetch_time` datetime NOT NULL COMMENT 'the last message fetch time',
  `friends_only` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Want to disable BP Chat for Specific Conditions, Is there a way:-

yes, if you are on beta 4 or above, you can use the filter “bpchat_is_disabled” to do that.

For example

add_filter("bpchat_is_disabled","my_custom_chat_disable");
function my_custom_chat_disable($disable){
if(my_condition_has_met())
return true;//disable chat

return $disable;
}

Want to Disable sound Notification:-


add_filter("bpchat_has_sound_notification_enabled","__return_zero");//disable sound

Want to Change Volume of Notification sound:-

currently, User can not control the volume. It will come in future. If you are the siteadmin, you can use following code to change default volume


add_filter("bpchat_get_notification_volume","my_custom_chat_notification_volume");
function my_custom_chat_notification_volume($current_volume){
return 50;// you can choose a value from 0-100
}

Hope the docs helps.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • BlinkList
  • DZone
  • FriendFeed
  • IndianPad
  • MySpace
  • Netvouz
  • Reddit
  • SphereIt
  • StumbleUpon
  • Technorati

Related posts:

  1. Buddypress Recent Profile Visitors Plugin
Get Adobe Flash playerPlugin by wpburn.com wordpress themes