Changeset 2085546
- Timestamp:
- 05/10/2019 06:14:48 PM (7 years ago)
- Location:
- iflychat/trunk
- Files:
-
- 4 edited
-
iflychat.php (modified) (6 diffs)
-
js/iflychat-popup.js (modified) (1 diff)
-
js/iflychat.js (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
iflychat/trunk/iflychat.php
r2051427 r2085546 2 2 /** 3 3 * @package iflychat 4 * @version 4.6. 14 * @version 4.6.2 5 5 */ 6 6 /* … … 9 9 Description: One on one chat, Multiple chatrooms, Embedded chatrooms 10 10 Author: iFlyChat Team 11 Version: 4.6. 111 Version: 4.6.2 12 12 Author URI: https://iflychat.com/ 13 13 */ … … 60 60 } 61 61 62 define('IFLYCHAT_PLUGIN_VERSION', 'WP-4.6. 1');62 define('IFLYCHAT_PLUGIN_VERSION', 'WP-4.6.2'); 63 63 if (!defined('IFLYCHAT_DEBUG')) { 64 64 define('IFLYCHAT_DEBUG', false); … … 123 123 $_iflychat_protocol = isset($_SERVER["HTTPS"]) ? 'https://' : 'http://'; 124 124 125 wp_enqueue_script('iflychat-ajax', plugin_dir_url( __FILE__ ) . 'js/iflychat.js', array( ), false, true);125 wp_enqueue_script('iflychat-ajax', plugin_dir_url( __FILE__ ) . 'js/iflychat.js', array('jquery'), false, true); 126 126 wp_localize_script('iflychat-ajax', 'iflychat_chatcamp_check', iflychat_chatcamp_check()?"1":"0"); 127 127 wp_localize_script('iflychat-ajax', 'iflychat_app_id', iflychat_get_option('iflychat_app_id')); … … 297 297 $options['body'] = json_encode(array('id' => $data['user_id'])); 298 298 $options['headers'] = array('Content-Type' => 'application/json', 'x-api-key' => $data['api_key']); 299 $result = wp_remote_head(CHATCAMP_EXTERNAL_A_HOST . ':' . CHATCAMP_EXTERNAL_A_PORT . '/api/ 1.0/users.get', $options);299 $result = wp_remote_head(CHATCAMP_EXTERNAL_A_HOST . ':' . CHATCAMP_EXTERNAL_A_PORT . '/api/2.0/users.get', $options); 300 300 if (!is_wp_error($result) && $result['response']['code'] == 200) { 301 301 $result = json_decode($result['body']); … … 308 308 else if($result['response']['code'] == 404){ 309 309 $options['body'] = json_encode(iflychat_chatcamp_process_user_data($data)); 310 $result = wp_remote_head(CHATCAMP_EXTERNAL_A_HOST . ':' . CHATCAMP_EXTERNAL_A_PORT . '/api/ 1.0/users.create', $options);310 $result = wp_remote_head(CHATCAMP_EXTERNAL_A_HOST . ':' . CHATCAMP_EXTERNAL_A_PORT . '/api/2.0/users.create', $options); 311 311 if (!is_wp_error($result) && $result['response']['code'] == 200) { 312 312 $result = json_decode($result['body']); -
iflychat/trunk/js/iflychat-popup.js
r1974773 r2085546 6 6 else if(iflychat_chatcamp_check === "1") { 7 7 var iflychat_popup=document.createElement("DIV"); 8 iflychat_popup.id="cc-app"; 8 iflychat_popup.className="cc-side-chat-app"; 9 // iflychat_popup.setAttribute('data-height', '600px'); 10 // iflychat_popup.setAttribute('data-width', '370px'); 9 11 document.body.appendChild(iflychat_popup); 10 12 } -
iflychat/trunk/js/iflychat.js
r1974773 r2085546 6 6 } 7 7 else if(iflychat_chatcamp_check === "1") { 8 iflychat_bundle.src = "//"+iflychat_external_cdn_host+"/ js/chatcamp-ui.min.js";8 iflychat_bundle.src = "//"+iflychat_external_cdn_host+"/2.x/js/chatcamp-ui.min.js"; 9 9 iflychat_bundle.async="async"; 10 10 document.body.appendChild(iflychat_bundle); … … 13 13 'action': 'iflychat-get' 14 14 }; 15 jQuery.post(iflychat_auth_url, data, function(response) { 16 console.log("RE", response); 17 // Initialize ChatCamp 18 window.ChatCampUi.init({ 19 appId: iflychat_app_id, 20 user: { 15 if(typeof iflychat_auth_url!=="undefined") { 16 jQuery.post(iflychat_auth_url, data, function(response) { 17 console.log("RE", response); 18 iflychat_load_cc_init({ 21 19 id: response.user.id, 22 20 accessToken: response.user.access_token // optional 23 }, 24 ui: { 25 theme: { 26 primaryBackground: "#3f45ad", 27 primaryText: "#ffffff", 28 secondaryBackground: "#ffffff", 29 secondaryText: "#000000", 30 tertiaryBackground: "#f4f7f9", 31 tertiaryText: "#263238" 32 }, 33 roster: { 34 tabs: ['recent', 'rooms', 'users'], 35 render: true, 36 defaultMode: 'open', // other possible values are minimize, hidden 37 showUserAvatarUpload: true 38 }, 39 channel: { 40 showAttachFile: true, 41 showVideoCall: true, 42 showVoiceRecording: true 43 } 44 } 45 }) 46 }); 21 }) 22 }); 23 } 24 else { 25 jQuery.getScript(iflychat_bundle.src, function(response) { 26 iflychat_load_cc_init({}); 27 }); 28 } 47 29 }); 48 30 } 31 32 function iflychat_load_cc_init(user) { 33 // Initialize ChatCamp 34 window.ChatCampUi.init({ 35 appId: iflychat_app_id, 36 user: user, 37 ui: { 38 theme: { 39 primaryBackground: "#3f45ad", 40 primaryText: "#ffffff", 41 secondaryBackground: "#ffffff", 42 secondaryText: "#000000", 43 tertiaryBackground: "#f4f7f9", 44 tertiaryText: "#263238" 45 }, 46 roster: { 47 tabs: ['users', 'recent', 'publicrooms'], 48 render: true, 49 defaultMode: 'open', // other possible values are minimize, hidden 50 displayStartNewChatButton: true // can be either true or false 51 }, 52 channel: { 53 showAttachFile: true, 54 showVideoCall: true, 55 showVoiceRecording: true 56 } 57 } 58 }) 59 } -
iflychat/trunk/readme.txt
r2051427 r2085546 3 3 Contributors: darklrd, shubhamgupta 4 4 Requires at least: 3.0 5 Tested up to: 5. 06 Stable tag: 4.6. 15 Tested up to: 5.3 6 Stable tag: 4.6.2 7 7 Tags: buddypress, chat, chat room, community, embed chat, friends, group chat, html5 chat, one to one chat, live chat, popup chat, mobile chat, multisite, wordpress chat, wp chat, ultimate member 8 8 License: GPLv2 or later … … 138 138 == Changelog == 139 139 140 = 4.6.2 = 141 142 10/05/2019: Support WordPress 5.2. 143 140 144 = 4.6.1 = 141 145 … … 437 441 == Upgrade Notice == 438 442 443 = 4.6.2 = 444 After updating, go to iFlyChat Settings page and click on Update button. 445 439 446 = 4.6.1 = 440 447 After updating, go to iFlyChat Settings page and click on Update button. … … 461 468 After updating, go to iFlyChat Settings page and click on Update button. 462 469 463 = 4.2.4 = 464 After updating, go to iFlyChat Settings page and click on Update button. 465 466 470
Note: See TracChangeset
for help on using the changeset viewer.