Changeset 1859511
- Timestamp:
- 04/17/2018 05:23:03 AM (8 years ago)
- Location:
- cometchat/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
cometchat.php (modified) (1 diff)
-
includes/cometchat_cloud.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cometchat/trunk/README.txt
r1826733 r1859511 4 4 Requires at least: 3.5.1 5 5 Tested up to: 4.9.4 6 Stable tag: 7.0. 46 Stable tag: 7.0.5 7 7 License: GNU General Public License v2.0 or later 8 8 … … 158 158 * Fixed issue with download link 159 159 * Miscellaneous Bug fixes 160 161 = 7.0.5 = 162 * Fixed issue with BuddyPress friend synchronization with CometChat 163 * Added feature to synchronization BuddyPress groups in CometChat 164 * Miscellaneous Bug fixes -
cometchat/trunk/cometchat.php
r1826733 r1859511 4 4 * Plugin Name: CometChat 5 5 * Description: Voice, video & text chat for your WordPress site 6 * Version: 7.0. 46 * Version: 7.0.5 7 7 * Author: CometChat 8 8 * Author URI: https://www.cometchat.com/ -
cometchat/trunk/includes/cometchat_cloud.php
r1858861 r1859511 108 108 $site_url = get_site_url(); 109 109 $protocol = parse_url($site_url); 110 $request_url = $protocol['scheme'].':// 10108.chatforyoursite.com/cometchat_update.php';110 $request_url = $protocol['scheme'].'://'.$cc_clientid.'.cometondemand.net/cometchat_update.php'; 111 111 112 112 if(function_exists('curl_init')){ … … 120 120 } 121 121 122 /** 123 * createGroupInCometChat 124 * Return create group 125 * @param (type) no param 126 */ 127 function createGroupInCometChat() { 128 global $cc_clientid; 129 global $current_user; 130 $user_id = $current_user->ID; 131 132 if(bp_is_active( 'groups' )) { 133 $group_ids = groups_get_user_groups( bp_loggedin_user_id() ); 134 135 if(!empty($_REQUEST['group_id'])){ 136 $groupid = $_REQUEST['group_id']; 137 } 138 foreach( $group_ids["groups"] as $id ) { 139 $group = groups_get_group( array( 'group_id' => $id) ); 140 if($_REQUEST['group_id'] == $group->id){ 141 $groupname = $group->name; 142 } 143 } 144 $groupDetails = array( 145 "userid" => $user_id, 146 "groupid" => $groupid, 147 "groupname" => $groupname, 148 "action" => 'creategroup' 149 ); 150 $groupInfo = json_encode($groupDetails); 151 $site_url = get_site_url(); 152 $protocol = parse_url($site_url); 153 $request_url = $protocol['scheme'].'://'.$cc_clientid.'.cometondemand.net/cometchat_update.php'; 154 155 if(function_exists('curl_init')){ 156 $result = wp_remote_post($request_url, array( 157 'method' => 'POST', 158 'body' => 'groupinfo='.$groupInfo 159 ) 160 ); 161 } 162 } 163 } 164 165 /** 166 * deleteGroupFromCometChat 167 * Return delete group 168 * @param (type) no param 169 */ 170 function deleteGroupFromCometChat() { 171 global $cc_clientid; 172 global $current_user; 173 $user_id = $current_user->ID; 174 175 if(bp_is_active( 'groups' )) { 176 177 if(!empty($_REQUEST['group-id'])){ 178 $groupid = $_REQUEST['group-id']; 179 } 180 $groupDetails = array( 181 "userid" => $user_id, 182 "groupid" => $groupid, 183 "action" => 'deletegroup' 184 ); 185 $groupInfo = json_encode($groupDetails); 186 $site_url = get_site_url(); 187 $protocol = parse_url($site_url); 188 $request_url = $protocol['scheme'].'://'.$cc_clientid.'.cometondemand.net/cometchat_update.php'; 189 190 if(function_exists('curl_init')){ 191 $result = wp_remote_post($request_url, array( 192 'method' => 'POST', 193 'body' => 'groupinfo='.$groupInfo 194 ) 195 ); 196 } 197 } 198 } 199 122 200 add_action('wp_head', 'getCometChatCloudDockedLayoutCode'); 123 201 add_action('init','cometchatUserDetails'); … … 126 204 if(function_exists('bp_is_active')) { 127 205 add_action('init','addCometChatFriends'); 206 add_action( 'groups_group_create_complete', 'createGroupInCometChat' ); 207 add_action( 'groups_delete_group', 'deleteGroupFromCometChat' ); 128 208 } 129 209
Note: See TracChangeset
for help on using the changeset viewer.