LiveChat – WP live chat plugin for WordPress - Version 3.0.0

Version Description

  • Rewritten whole plugin code
  • Fixed creating licenses
  • Improved look and feel
Download this release

Release Info

Developer livechat
Plugin Icon 128x128 LiveChat – WP live chat plugin for WordPress
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.1.8 to 3.0.0

livechat.php CHANGED
@@ -1,198 +1,21 @@
1
  <?php
2
  /*
3
- Plugin Name: Live Chat Software for Wordpress
4
- Plugin URI: http://www.livechatinc.com
5
- Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install the live chat button and monitoring code on any WordPress website.
6
- Author: LIVECHAT Software
7
  Author URI: http://www.livechatinc.com
8
- Version: 2.1.8
9
  */
10
 
11
-
12
- //
13
- // Admin panel
14
- //
15
-
16
- /**
17
- * Loads CSS styles for admin panel styling
18
- */
19
-
20
- define ('LIVECHAT_PLUGIN_URL', WP_PLUGIN_URL . str_replace('\\', '/', strrchr(dirname(__FILE__), DIRECTORY_SEPARATOR)) . '/plugin_files');
21
- define ('LIVECHAT_LICENSE_INSTALLED', (bool)(strlen(get_option('livechat_license_number') > 0)));
22
-
23
- function livechat_admin_head()
24
- {
25
- echo '<style type="text/css">';
26
- echo '@import url('.LIVECHAT_PLUGIN_URL.'/css/styles.css);';
27
- echo '</style>';
28
- }
29
-
30
- /**
31
- * Loads jQuery scripts in admin panel
32
- */
33
- function livechat_admin_footer()
34
  {
35
- echo '<script type="text/javascript" src="'.LIVECHAT_PLUGIN_URL.'/js/scripts.js?v=2010-06-23"></script>';
36
- echo '<script type="text/javascript" src="'.LIVECHAT_PLUGIN_URL.'/js/signup.js?v=2010-06-23"></script>';
37
  }
38
-
39
- /**
40
- * Registers livechat settings variables
41
- */
42
- function livechat_sanitize_license_number ($license_number)
43
  {
44
- $license_number = trim($license_number);
45
- if (intval($license_number) > 0) return intval($license_number);
46
- if (preg_match('/^\d{2,}$/', $license_number)) return $license_number;
47
-
48
- return '';;
49
  }
50
 
51
- function livechat_sanitize_lang ($lang)
52
- {
53
- $lang = trim($lang);
54
- if (preg_match('/^[a-z]{2}$/', $lang)) return $lang;
55
-
56
- return 'en';
57
- }
58
-
59
- function livechat_sanitize_groups ($groups)
60
- {
61
- $groups = trim($groups);
62
- if (preg_match('/^(\d+)$/', $groups)) return $groups;
63
-
64
- return '0';
65
- }
66
-
67
- function livechat_admin_register_settings()
68
- {
69
- register_setting ('livechat_license_information', 'livechat_license_not_installed');
70
- register_setting ('livechat_license_information', 'livechat_license_number', 'livechat_sanitize_license_number');
71
- register_setting ('livechat_license_information', 'livechat_lang', 'livechat_sanitize_lang');
72
- register_setting ('livechat_license_information', 'livechat_groups', 'livechat_sanitize_groups');
73
- register_setting ('livechat_license_information', 'livechat_params');
74
- register_setting ('livechat_license_information', 'livechat_license_created_flag');
75
- }
76
-
77
- function livechat_read_options()
78
- {
79
- $license_number = get_option('livechat_license_number');
80
-
81
- $lang = get_option('livechat_lang');
82
- if (empty ($lang)) $lang = 'en';
83
-
84
- $groups = get_option('livechat_groups');
85
- if (empty ($groups)) $groups = '0';
86
-
87
- $params = get_option('livechat_params');
88
-
89
- return array ($license_number, $lang, $groups, $params);
90
- }
91
-
92
- /**
93
- * Creates new admin menu
94
- */
95
- function livechat_settings_link($links)
96
- {
97
- $settings_link = sprintf( '<a href="admin.php?page=livechat_settings">%s</a>', __('Settings'));
98
- array_unshift ($links, $settings_link);
99
- return $links;
100
- }
101
-
102
- function livechat_admin_menu()
103
- {
104
- global $wp_registered_sidebars;
105
- define('LIVECHAT_WIDGETS_ENABLED', (bool)(sizeof($wp_registered_sidebars) > 0));
106
-
107
-
108
- add_menu_page ('Live chat settings', 'Live chat', 'administrator', 'livechat_settings', 'livechat_settings', LIVECHAT_PLUGIN_URL.'/images/favicon.png');
109
- add_submenu_page ('livechat_settings', 'Live chat settings', 'Settings', 'administrator', 'livechat_settings', 'livechat_settings');
110
- if (LIVECHAT_LICENSE_INSTALLED && LIVECHAT_WIDGETS_ENABLED == false) add_submenu_page ('livechat_settings', 'Chat button', 'Chat button', 'administrator', 'livechat_chat_button', 'livechat_chat_button');
111
- add_submenu_page ('livechat_settings', 'Control Panel', 'Control Panel', 'administrator', 'livechat_control_panel', 'livechat_control_panel');
112
-
113
- // Settings link
114
- $plugin = plugin_basename(__FILE__);
115
- add_filter( 'plugin_action_links_'.$plugin, 'livechat_settings_link');
116
- }
117
-
118
- add_action ('admin_head', 'livechat_admin_head');
119
- add_action ('admin_footer', 'livechat_admin_footer');
120
- add_action ('admin_menu', 'livechat_admin_menu');
121
- add_action ('admin_init', 'livechat_admin_register_settings');
122
-
123
- //
124
- // Main settings page
125
- //
126
-
127
- function livechat_settings()
128
- {
129
- require_once (dirname(__FILE__).'/plugin_files/settings.php');
130
-
131
- _livechat_settings();
132
- }
133
-
134
- //
135
- // Control panel page
136
- //
137
-
138
- function livechat_control_panel()
139
- {
140
- echo '<iframe id="control_panel" src="https://panel.livechatinc.com/" frameborder="0"></iframe>';
141
- echo '<p>Optionally, open the Control Panel in <a href="https://panel.livechatinc.com/" target="_blank">external window</a>.</p>';
142
- }
143
-
144
-
145
- //
146
- // Monitoring code installation
147
- //
148
-
149
- function livechat_monitoring_code()
150
- {
151
- require_once (dirname(__FILE__).'/plugin_files/monitoring_code.php');
152
-
153
- list ($license_number, $lang, $groups, $params) = livechat_read_options();
154
-
155
- _livechat_monitoring_code ($license_number, $lang, $groups, $params);
156
- }
157
-
158
- add_action ('wp_head', 'livechat_monitoring_code');
159
-
160
-
161
- //
162
- // Chat button info page
163
- //
164
-
165
- function livechat_chat_button()
166
- {
167
- require_once (dirname(__FILE__).'/plugin_files/chat_button.php');
168
-
169
- list ($license_number, $lang, $groups, $params) = livechat_read_options();
170
-
171
- _livechat_chat_button_code ($license_number, $lang, $groups);
172
- }
173
-
174
- //
175
- // Chat button Widget
176
- //
177
-
178
- function livechat_chat_button_widget()
179
- {
180
- require_once (dirname(__FILE__).'/plugin_files/chat_button.php');
181
-
182
- list ($license_number, $lang, $groups, $params) = livechat_read_options();
183
-
184
- _livechat_chat_button_widget ($license_number, $lang, $groups);
185
- }
186
-
187
- function livechat_chat_button_widget_control()
188
- {
189
- require_once (dirname(__FILE__).'/plugin_files/chat_button.php');
190
-
191
- list ($license_number, $lang, $groups, $params) = livechat_read_options();
192
-
193
- _livechat_chat_button_widget_control ($license_number, $lang, $groups);
194
- }
195
-
196
-
197
- wp_register_sidebar_widget ('livechat_widget', 'Live chat for Wordpress', 'livechat_chat_button_widget');
198
- wp_register_widget_control ('livechat_widget', 'Live chat for Wordpress', 'livechat_chat_button_widget_control');
1
  <?php
2
  /*
3
+ Plugin Name: LiveChat
4
+ Plugin URI: http://www.livechatinc.com/addons/wordpress/
5
+ Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install the live chat button and tracking code on any WordPress website.
6
+ Author: LiveChat
7
  Author URI: http://www.livechatinc.com
8
+ Version: 3.0
9
  */
10
 
11
+ if (is_admin())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  {
13
+ require_once(dirname(__FILE__).'/plugin_files/LiveChatAdmin.class.php');
14
+ LiveChatAdmin::get_instance();
15
  }
16
+ else
 
 
 
 
17
  {
18
+ require_once(dirname(__FILE__).'/plugin_files/LiveChat.class.php');
19
+ LiveChat::get_instance();
 
 
 
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/LiveChat.class.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChat.widget.php');
4
+
5
+ class LiveChat
6
+ {
7
+ // singleton pattern
8
+ protected static $instance;
9
+
10
+ /**
11
+ * Absolute path to plugin files
12
+ */
13
+ protected $plugin_url = null;
14
+
15
+ /**
16
+ * LiveChat license parameters
17
+ */
18
+ protected $login = null;
19
+ protected $license_number = null;
20
+ protected $lang = null;
21
+ protected $skill = null;
22
+
23
+ /**
24
+ * Remembers if LiveChat license number is set
25
+ */
26
+ protected static $license_installed = false;
27
+
28
+ /**
29
+ * Starts the plugin
30
+ */
31
+ protected function __construct()
32
+ {
33
+ add_action ('wp_head', array($this, 'tracking_code'));
34
+ add_action('widgets_init', create_function('', 'return register_widget("LiveChatWidget");'));
35
+ }
36
+
37
+ public static function get_instance()
38
+ {
39
+ if (!isset(self::$instance))
40
+ {
41
+ $c = __CLASS__;
42
+ self::$instance = new $c;
43
+ }
44
+
45
+ return self::$instance;
46
+ }
47
+
48
+ /**
49
+ * Returns plugin files absolute path
50
+ *
51
+ * @return string
52
+ */
53
+ public function get_plugin_url()
54
+ {
55
+ if (is_null($this->plugin_url))
56
+ {
57
+ $this->plugin_url = WP_PLUGIN_URL.'/wp-live-chat-software-for-wordpress/plugin_files';
58
+ }
59
+
60
+ return $this->plugin_url;
61
+ }
62
+
63
+ /**
64
+ * Returns true if current Wordpress theme supports widgets,
65
+ * false otherwise
66
+ *
67
+ * @return bool
68
+ */
69
+ public function widgets_enabled()
70
+ {
71
+ global $wp_registered_sidebars;
72
+
73
+ return (bool)(sizeof($wp_registered_sidebars) > 0);
74
+ }
75
+
76
+ public function livechat_sanitize_lang ($lang)
77
+ {
78
+ $lang = trim($lang);
79
+ if (preg_match('/^[a-z]{2}$/', $lang)) return $lang;
80
+
81
+ return 'en';
82
+ }
83
+
84
+ /**
85
+ * Returns true if LiveChat license is set properly,
86
+ * false otherwise
87
+ *
88
+ * @return bool
89
+ */
90
+ public function is_installed()
91
+ {
92
+ return ($this->get_license_number() > 0);
93
+ }
94
+
95
+ /**
96
+ * Returns LiveChat license number
97
+ *
98
+ * @return int
99
+ */
100
+ public function get_license_number()
101
+ {
102
+ if (is_null($this->license_number))
103
+ {
104
+ $this->license_number = get_option('livechat_license_number');
105
+ }
106
+
107
+ // license_number must be >= 0
108
+ // also, this prevents from NaN values
109
+ $this->license_number = max(0, $this->license_number);
110
+
111
+ return $this->license_number;
112
+ }
113
+
114
+ /**
115
+ * Returns LiveChat login
116
+ */
117
+ public function get_login()
118
+ {
119
+ if (is_null($this->login))
120
+ {
121
+ $this->login = get_option('login');
122
+ }
123
+
124
+ return $this->login;
125
+ }
126
+
127
+ /**
128
+ * Returns LiveChat language code
129
+ *
130
+ * @return string
131
+ */
132
+ public function get_lang()
133
+ {
134
+ if (is_null($this->lang))
135
+ {
136
+ $this->lang = get_option('livechat_lang');
137
+ }
138
+
139
+ return $this->lang;
140
+ }
141
+
142
+ /**
143
+ * Returns LiveChat skill number
144
+ *
145
+ * @return int
146
+ */
147
+ public function get_skill()
148
+ {
149
+ if (is_null($this->skill))
150
+ {
151
+ $this->skill = (int)get_option('livechat_groups');
152
+ }
153
+
154
+ // skill must be >= 0
155
+ $this->skill = max(0, $this->skill);
156
+
157
+ return $this->skill;
158
+ }
159
+
160
+ /**
161
+ * Injects tracking code
162
+ */
163
+ public function tracking_code()
164
+ {
165
+ $this->get_helper('TrackingCode');
166
+ }
167
+
168
+ /**
169
+ * Echoes given helper
170
+ */
171
+ public static function get_helper($class, $echo=true)
172
+ {
173
+ $class .= 'Helper';
174
+
175
+ if (class_exists($class) == false)
176
+ {
177
+ $path = dirname(__FILE__).'/helpers/'.$class.'.class.php';
178
+ if (file_exists($path) !== true)
179
+ {
180
+ return false;
181
+ }
182
+
183
+ require_once($path);
184
+ }
185
+
186
+ $c = new $class;
187
+
188
+ if ($echo)
189
+ {
190
+ echo $c->render();
191
+ return true;
192
+ }
193
+ else
194
+ {
195
+ return $c->render();
196
+ }
197
+ }
198
+ }
plugin_files/LiveChat.widget.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * LiveChat "click-to-chat" button widget
5
+ */
6
+
7
+ class LiveChatWidget extends WP_Widget
8
+ {
9
+ private static $my_id_base = 'livechat_widget';
10
+
11
+ static public function get_id_base()
12
+ {
13
+ return self::$my_id_base;
14
+ }
15
+
16
+ function LiveChatWidget()
17
+ {
18
+ $this->WP_Widget('livechat_widget', 'LiveChat', array(
19
+ 'classname' => 'LiveChatWidget',
20
+ 'description' => 'Install "click-to-chat" button to let your visitors start a chat with you.'
21
+ ), array(
22
+ 'id_base' => self::$my_id_base
23
+ ));
24
+ }
25
+
26
+ function form($instance)
27
+ {
28
+ if (LiveChat::get_instance()->is_installed())
29
+ {
30
+ echo <<<HTML
31
+ <p><strong>Everything is all right!</strong></p>
32
+ <p>To configure LiveChat, go to <a href="admin.php?page=livechat_settings">Settings</a>.</p>
33
+ HTML;
34
+ }
35
+ else
36
+ {
37
+ echo <<<HTML
38
+ <p>Your live chat button <strong>is not working yet</strong>.</p>
39
+ <p>You need to <a href="admin.php?page=livechat_settings">set up your LiveChat account</a> first.</p>
40
+ HTML;
41
+ }
42
+ }
43
+
44
+ function widget($args, $instance)
45
+ {
46
+ // Do not try to display click-to-chat button
47
+ // if LiveChat plugin is not configured properly
48
+ if (LiveChat::get_instance()->is_installed() == false) return;
49
+
50
+ $url = LiveChat::get_instance()->get_plugin_url();
51
+
52
+ $time = time();
53
+ $license = LiveChat::get_instance()->get_license_number();
54
+ $lang = LiveChat::get_instance()->get_lang();
55
+ $skill = LiveChat::get_instance()->get_skill();
56
+
57
+ echo <<<CODE
58
+ <div id="LiveChat_{$time}"><a href="http://www.livechatinc.com/?partner=lc_{$license}">live chat software</a></div>
59
+
60
+ <script type="text/javascript">
61
+ var __lc_buttons = __lc_buttons || [];
62
+ __lc_buttons.push({
63
+ elementId: 'LiveChat_{$time}',
64
+ language: '{$lang}',
65
+ skill: '{$skill}'
66
+ });
67
+ </script>
68
+ CODE;
69
+ }
70
+ }
plugin_files/LiveChatAdmin.class.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChat.class.php');
4
+
5
+ final class LiveChatAdmin extends LiveChat
6
+ {
7
+ /**
8
+ * Plugin's version
9
+ */
10
+ protected $plugin_version = null;
11
+
12
+ /**
13
+ * Returns true if "Advanced settings" form has just been submitted,
14
+ * false otherwise
15
+ *
16
+ * @return bool
17
+ */
18
+ protected $changes_saved = false;
19
+
20
+ /**
21
+ * Starts the plugin
22
+ */
23
+ protected function __construct()
24
+ {
25
+ parent::__construct();
26
+
27
+ wp_enqueue_script('livechat', $this->get_plugin_url().'/js/livechat.js', 'jquery', $this->get_plugin_version(), true);
28
+ wp_enqueue_style('livechat', $this->get_plugin_url().'/css/livechat.css', false, $this->get_plugin_version());
29
+
30
+ add_action('admin_menu', array($this, 'admin_menu'));
31
+
32
+ // tricky error reporting
33
+ if (defined('WP_DEBUG') && WP_DEBUG == true)
34
+ {
35
+ add_action('init', array($this, 'error_reporting'));
36
+ }
37
+
38
+ if (isset($_GET['reset']) && $_GET['reset'] == '1')
39
+ {
40
+ $this->reset_options();
41
+ }
42
+ elseif ($_SERVER['REQUEST_METHOD'] == 'POST')
43
+ {
44
+ $this->update_options($_POST);
45
+ }
46
+ }
47
+
48
+ public static function get_instance()
49
+ {
50
+ if (!isset(self::$instance))
51
+ {
52
+ $c = __CLASS__;
53
+ self::$instance = new $c;
54
+ }
55
+
56
+ return self::$instance;
57
+ }
58
+
59
+ /**
60
+ * Set error reporting for debugging purposes
61
+ */
62
+ public function error_reporting()
63
+ {
64
+ error_reporting(E_ALL & ~E_USER_NOTICE);
65
+ }
66
+
67
+ /**
68
+ * Returns this plugin's version
69
+ *
70
+ * @return string
71
+ */
72
+ public function get_plugin_version()
73
+ {
74
+ if (is_null($this->plugin_version))
75
+ {
76
+ if (!function_exists('get_plugins'))
77
+ {
78
+ require_once(ABSPATH.'wp-admin/includes/plugin.php');
79
+ }
80
+
81
+ $plugin_folder = get_plugins('/'.plugin_basename(dirname(__FILE__).'/..'));
82
+ $this->plugin_version = $plugin_folder['livechat.php']['Version'];
83
+ }
84
+
85
+ return $this->plugin_version;
86
+ }
87
+
88
+ public function admin_menu()
89
+ {
90
+ add_menu_page(
91
+ 'LiveChat',
92
+ 'LiveChat',
93
+ 'administrator',
94
+ 'livechat',
95
+ array($this, 'livechat_settings_page'),
96
+ $this->get_plugin_url().'/images/favicon.png'
97
+ );
98
+
99
+ add_submenu_page(
100
+ 'livechat',
101
+ 'Settings',
102
+ 'Settings',
103
+ 'administrator',
104
+ 'livechat_settings',
105
+ array($this, 'livechat_settings_page')
106
+ );
107
+
108
+ add_submenu_page(
109
+ 'livechat',
110
+ 'Control panel',
111
+ 'Control panel',
112
+ 'administrator',
113
+ 'livechat_control_panel',
114
+ array($this, 'control_panel_page')
115
+ );
116
+
117
+ // remove the submenu that is automatically added
118
+ if (function_exists('remove_submenu_page'))
119
+ {
120
+ remove_submenu_page('livechat', 'livechat');
121
+ }
122
+
123
+ // Settings link
124
+ add_filter('plugin_action_links', array($this, 'livechat_settings_link'));
125
+ }
126
+
127
+ /**
128
+ * Displays settings page
129
+ */
130
+ public function livechat_settings_page()
131
+ {
132
+ $this->get_helper('Settings');
133
+ }
134
+
135
+ /**
136
+ * Displays control panel page
137
+ */
138
+ public function control_panel_page()
139
+ {
140
+ $this->get_helper('ControlPanel');
141
+ }
142
+
143
+ public function chat_button_page()
144
+ {
145
+ $this->get_helper('ChatButton');
146
+ }
147
+
148
+
149
+ public function changes_saved()
150
+ {
151
+ return $this->changes_saved;
152
+ }
153
+
154
+ public function livechat_settings_link($links)
155
+ {
156
+ $settings_link = sprintf('<a href="admin.php?page=livechat_settings">%s</a>', __('Settings'));
157
+ array_unshift ($links, $settings_link);
158
+ return $links;
159
+ }
160
+
161
+ protected function reset_options()
162
+ {
163
+ delete_option('livechat_license_number');
164
+ delete_option('livechat_lang');
165
+ delete_option('livechat_groups');
166
+ }
167
+
168
+ protected function update_options($data)
169
+ {
170
+ // check if we are handling LiveChat settings form
171
+ if (isset($data['settings_form']) == false && isset($data['new_license_form']) == false)
172
+ {
173
+ return false;
174
+ }
175
+
176
+ $license_number = isset($data['license_number']) ? (int)$data['license_number'] : 0;
177
+ $skill = isset($data['skill']) ? (int)$data['skill'] : 0;
178
+
179
+ // skill must be >= 0
180
+ $skill = max(0, $skill);
181
+
182
+
183
+ $lang = 'en';
184
+ if (isset($data['lang']) && preg_match('/^[a-z]{2}$/', $data['lang']))
185
+ {
186
+ $lang = $data['lang'];
187
+ }
188
+
189
+ update_option('livechat_license_number', $license_number);
190
+ update_option('livechat_lang', $lang);
191
+ update_option('livechat_groups', $skill);
192
+
193
+ if (isset($data['changes_saved']) && $data['changes_saved'] == '1')
194
+ {
195
+ $this->changes_saved = true;
196
+ }
197
+ }
198
+ }
plugin_files/chat_button.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
-
3
- // Chat button Widget
4
- function _livechat_chat_button_widget ($license_number, $lang, $groups, $use_ssl = false)
5
- {
6
- if (LIVECHAT_LICENSE_INSTALLED == false) return;
7
- ?>
8
-
9
- <!-- Begin LiveChat button tag. See also www.livechatinc.com -->
10
- <div style="text-align:center"><a id="LivechatButton" href="http<?php echo $use_ssl ? 's' : ''; ?>://chat.livechatinc.net/licence/<?php echo $license_number; ?>/open_chat.cgi?groups=<?php echo $groups; ?>&amp;lang=<?php echo $lang; ?>" target="chat_<?php echo $license_number; ?>" onclick="window.open('http<?php echo $use_ssl ? 's' : ''; ?>://chat.livechatinc.net/licence/<?php echo $license_number; ?>/open_chat.cgi?groups=<?php echo $groups; ?>'+'&amp;lang=<?php echo $lang; ?>&amp;dc='+escape(document.cookie+';l='+document.location+';r='+document.referer+';s='+typeof lc_session),'chat_<?php echo $license_number; ?>','width=529,height=520,resizable=yes,scrollbars=no,status=1');return false;"></a><script type='text/javascript'>var img=new Image();img.style.border='0';img.src=(("https:" == document.location.protocol) ? "https://" : "http://")+'chat.livechatinc.net/licence/<?php echo $license_number; ?>/button.cgi?lang=<?php echo $lang; ?>&groups=<?php echo $groups; ?>'+'&d='+((new Date()).getTime());var _livechat_button=document.getElementById('LivechatButton');if(_livechat_button!=null){_livechat_button.appendChild(img);}</script><br><span style="font-family:Tahoma,sans-serif;font-size:10px;color:#333"><a href="http://www.livechatinc.com" style="font-size:10px;text-decoration:none" target="_blank">Live Chat</a> <span style="color: #475780">Software for Business</span></span></div>
11
- <!-- End LiveChatbutton tag. See also www.livechatinc.com -->
12
-
13
- <?php
14
- }
15
-
16
- // Chat button Widget controls
17
- function _livechat_chat_button_widget_control ($license_number, $lang, $groups, $use_ssl = false)
18
- {
19
- if (LIVECHAT_LICENSE_INSTALLED):
20
- ?>
21
- <p>Your live chat button is installed properly!</p>
22
- <hr class="livechat">
23
- <p>License number: <strong><?php echo $license_number; ?></strong><br>
24
- Language: <strong><?php echo $lang; ?></strong><br>
25
- Skill: <strong><?php echo $groups; ?></strong></p>
26
- <hr class="livechat">
27
- <p>To change these settings, go to <a href="?page=livechat_settings">Live chat plugin settings page</a>.</p>
28
- <?php else: ?>
29
- <p>Your live chat button <strong>is not working yet</strong>.</p>
30
- <p>You need to <a href="?page=livechat_settings">set up your live chat account</a> first.</p>
31
- <?php endif; ?>
32
- <?php
33
- }
34
-
35
-
36
- // Chat button info page
37
- function _livechat_chat_button_code ($license_number, $lang, $groups, $use_ssl = false)
38
- {
39
- ?>
40
- <div class="wrap">
41
- <h2>Live chat software for Wordpress</h2>
42
- <p>Your theme <strong>does not</strong> support Widgets <a class="help" href="http://codex.wordpress.org/WordPress_Widgets">(read more)</a>. Thus, you can't easily drag&amp;drop the Widget in your Wordpress admin page.</p>
43
- <hr class="livechat">
44
- <p>To install live chat button on your page, you need to <strong>put the following code in a visible place of your website</strong>:</p>
45
-
46
- <textarea id="chat_button" cols="80" rows="12" readonly="readonly" onclick="this.select()">
47
- <!-- BEGIN LIVECHAT button tag. See also www.livechatinc.com -->
48
- <div style="text-align:center"><a id="LivechatButton" href="http<?php echo $use_ssl ? 's' : ''; ?>://chat.livechatinc.net/licence/<?php echo $license_number; ?>/open_chat.cgi?groups=<?php echo $groups; ?>&amp;lang=<?php echo $lang; ?>" target="chat_<?php echo $license_number; ?>" onclick="window.open('http<?php echo $use_ssl ? 's' : ''; ?>://chat.livechatinc.net/licence/<?php echo $license_number; ?>/open_chat.cgi?groups=<?php echo $groups; ?>'+'&amp;lang=<?php echo $lang; ?>&amp;dc='+escape(document.cookie+';l='+document.location+';r='+document.referer+';s='+typeof lc_session),'Czat_<?php echo $license_number; ?>','width=529,height=520,resizable=yes,scrollbars=no,status=1');return false;"></a><script type='text/javascript'>var img=new Image();img.style.border='0';img.src=(("https:" == document.location.protocol) ? "https://" : "http://")+'chat.livechatinc.net/licence/<?php echo $license_number; ?>/button.cgi?lang=<?php echo $lang; ?>&groups=<?php echo $groups; ?>'+'&d='+((new Date()).getTime());var _livechat_button=document.getElementById('LivechatButton');if(_livechat_button!=null){_livechat_button.appendChild(img);}</script><br><span style="font-family:Tahoma,sans-serif;font-size:10px;color:#333"><a href="http://www.livechatinc.com" style="font-size:10px;text-decoration:none" target="_blank">Live Chat</a> <span style="color: #475780">Software for Business</span></span></div>
49
- <!-- END LIVECHAT button tag. See also www.livechatinc.com -->
50
- </textarea>
51
-
52
- <p>Need help? Read more about <a href="http://www.livechatinc.com/en/support/manual/chat_button.htm" target="_blank">live chat buttons</a>.</p>
53
- </div>
54
- <?php
55
- }
56
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/css/livechat.css ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #livechat {
2
+ padding-top: 20px;
3
+ }
4
+ #lc_logo {
5
+ float: left;
6
+ width: 100%;
7
+ height: 120px;
8
+ }
9
+ #lc_logo img {
10
+ display: block;
11
+ float: left;
12
+ }
13
+ #lc_logo span {
14
+ display: block;
15
+ margin-left: 200px;
16
+
17
+ /**
18
+ * inheriting "h2" element styles
19
+ * - could not use actual <h2> element
20
+ * due to some problems with "updated" divs
21
+ */
22
+ color: #464646;
23
+ font: italic normal normal 24px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
24
+ line-height: 80px;
25
+ text-shadow: rgba(255, 255, 255, 1) 0 1px 0;
26
+ }
27
+
28
+ .clear {
29
+ clear: both;
30
+ }
31
+
32
+ #livechat div.installed_ok { background-color: #e1fdc5; border-color: #6ac611; }
33
+ .postbox h3 { cursor: default; }
34
+ .postbox_content { padding: 0 10px; }
35
+ .postbox_content ul { margin-top: 5px; }
36
+ .postbox label { line-height: 1.5em; }
37
+ .postbox .asterisk { color: red; }
38
+ .explanation { color: #999; padding-left: 5px; }
39
+ a.help,
40
+ span.help a { color: #999; }
41
+ #wpbody-content a.help:hover,
42
+ #wpbody-content .help a:hover { color: #222; }
43
+ .installed_ok a.help,
44
+ .installed_ok .help a,
45
+ .info a.help,
46
+ .info .help a { color: #666; }
47
+ .installed_ok a.help,
48
+ .info a.help,
49
+ .installed_ok span.help,
50
+ .info span.help { font-weight: normal; color: #666; font-size: 85%; }
51
+ h3.no-radius { -moz-border-radius: 0; }
52
+ hr.livechat { margin-bottom: 1em; height: 1px; border: 0; color: #999; background: #ccc; }
53
+
54
+ .ajax_message { display: none; background: url(../images/ajax_loader.gif) no-repeat 5px 60%; font-size: 85%; padding: 0; }
55
+ .ajax_message.wait,
56
+ .ajax_message.message { display: block; }
57
+ .ajax_message.wait { text-indent: 28px; }
58
+ .ajax_message.message { background-image: none; text-indent: 0px; }
59
+
60
+ #control_panel { width: 99%; border: 0; }
61
+ #chat_button_code { font-family: "Courier New", Courier, monospace; width: 650px; height: 200px; font-size: 85%; }
62
+
63
+ #reset_settings {
64
+ font-size: 85%;
65
+ }
66
+ #reset_settings, #reset_settings a {
67
+ color: #999;
68
+ }
69
+
70
+
71
+ #livechat .back {
72
+ margin-top: 20px;
73
+ }
74
+
75
+ a.toggle {
76
+ padding: 2px 0 3px 20px;
77
+ background: url(../images/plusminus.png) no-repeat 0 2px;
78
+ }
79
+ a.toggle.unfolded {
80
+ background-position: 0 -32px;
81
+ }
82
+
83
+ p.img {
84
+ }
85
+ p.img img {
86
+ padding: 1px;
87
+ background: white;
88
+ border: 1px solid #bbb;
89
+
90
+ -moz-border-radius: 5px;
91
+ -webkit-border-radius: 5px;
92
+ border-radius: 5px;
93
+ }
94
+
95
+ .btn a {
96
+ display: inline-block;
97
+ padding: 3px 10px;
98
+ color: white;
99
+
100
+ text-decoration: none;
101
+ font-weight: normal;
102
+ -moz-border-radius: 3px;
103
+ -webkit-border-radius: 3px;
104
+ border-radius: 3px;
105
+
106
+ text-shadow: 1px 1px 0 #06a;
107
+ border-top: 1px solid #4bf;
108
+ border-bottom: 1px solid #39f;
109
+
110
+ -moz-box-shadow: 0 1px 0 #39d, 0 -1px 0 #39d, 1px 0 0 #39d, -1px 0 0 #39d;
111
+ -webkit-box-shadow: 0 1px 0 #39d, 0 -1px 0 #39d, 1px 0 0 #39d, -1px 0 0 #39d;
112
+ box-shadow: 0 1px 0 #39d, 0 -1px 0 #39d, 1px 0 0 #39d, -1px 0 0 #39d;
113
+
114
+ background: #4ae;
115
+ background: -moz-linear-gradient(top, #4ae, #28d);
116
+ background: -webkit-gradient(linear, left top, left bottom, from(#4ae), to(#28d));
117
+
118
+ }
119
+ .btn a:hover {
120
+ text-decoration: none;
121
+ border-top-color: #5cf;
122
+ border-bottom-color: #3af;
123
+ color: white;
124
+
125
+ -moz-box-shadow: 0 1px 0 #4ae, 0 -1px 0 #4ae, 1px 0 0 #4ae, -1px 0 0 #4ae;
126
+ -webkit-box-shadow: 0 1px 0 #4ae, 0 -1px 0 #4ae, 1px 0 0 #4ae, -1px 0 0 #4ae;
127
+ box-shadow: 0 1px 0 #4ae, 0 -1px 0 #4ae, 1px 0 0 #4ae, -1px 0 0 #4ae;
128
+
129
+ background: #4bf;
130
+ background: -moz-linear-gradient(top, #4bf, #39d);
131
+ background: -webkit-gradient(linear, left top, left bottom, from(#4bf), to(#39d));
132
+ }
133
+ .btn a:active,
134
+ .btn a:focus {
135
+ /* margin-top: 1px did not work as intended under Chrome */
136
+ position: relative;
137
+ top: 1px;
138
+ }
plugin_files/css/styles.css DELETED
@@ -1,38 +0,0 @@
1
- .installed_ok { background-color: #e1fdc5; border-color: #6ac611; }
2
- .postbox h3 { cursor: default; }
3
- .postbox_content { padding: 0 10px; }
4
- .postbox_content ul { margin-top: 5px; }
5
- .postbox label { line-height: 1.5em; }
6
- .postbox .asterisk { color: red; }
7
- .explanation { display: block; margin-top: 3px; padding-left: 5px; }
8
- a.help,
9
- span.help a { color: #bbb; }
10
- #wpbody-content a.help:hover,
11
- #wpbody-content .help a:hover { color: #222; }
12
- .installed_ok a.help,
13
- .installed_ok .help a,
14
- .info a.help,
15
- .info .help a { color: #666; }
16
- .installed_ok a.help,
17
- .info a.help,
18
- .installed_ok span.help,
19
- .info span.help { font-weight: normal; color: #666; font-size: 85%; }
20
- h3.no-radius { -moz-border-radius: 0; }
21
- hr.livechat { margin-bottom: 1em; height: 1px; border: 0; color: #999; background: #ccc; }
22
- #ajax_message { display: none; background: url(../images/ajax_loader.gif) no-repeat 5px 60%; font-size: 85%; padding: 0; }
23
- #ajax_message.wait,
24
- #ajax_message.message { display: block; }
25
- #ajax_message.wait { text-indent: 28px; }
26
- #ajax_message.message { background-image: none; text-indent: 0px; }
27
-
28
- #control_panel { width: 99%; border: 0; }
29
- #chat_button { font-family: "Courier New", Courier, monospace; width: 650px; height: 300px; font-size: 85%; }
30
-
31
- .awesome, .awesome:visited { background: #222 url(../images/awesome_button_overlay.png) repeat-x; display: inline-block; padding: 5px 10px 6px; color: #fff; text-decoration: none; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); border-bottom: 1px solid rgba(0,0,0,0.25); position: relative; cursor: pointer; }
32
- .awesome:hover { background-color: #111; color: #fff; }
33
- .awesome:active { top: 1px; }
34
- .awesome, .awesome:visited { font-size: 13px; font-weight: bold; line-height: 1; text-shadow: 0 -1px 1px rgba(0,0,0,0.25); }
35
- .blue.awesome, .blue.awesome:visited { background-color: #2daebf; }
36
- .blue.awesome:hover { background-color: #007d9a; }
37
- .red.awesome, .red.awesome:visited { background-color: #e33100; }
38
- .red.awesome:hover { background-color: #872300; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/helpers/ChangesSavedHelper.class.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class ChangesSavedHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ if (LiveChat::get_instance()->changes_saved())
10
+ {
11
+ return '<div id="changes_saved_info" class="updated installed_ok"><p>Advanced settings saved successfully.</p></div>';
12
+ }
13
+
14
+ return '';
15
+ }
16
+ }
plugin_files/helpers/ChatButtonHelper.class.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class ChatButtonHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ $url = LiveChat::get_instance()->get_plugin_url();
10
+
11
+ $time = time();
12
+ $license = LiveChat::get_instance()->get_license_number();
13
+ $lang = LiveChat::get_instance()->get_lang();
14
+ $skill = LiveChat::get_instance()->get_skill();
15
+
16
+ $code = <<<CODE
17
+ <div id="LiveChat_{$time}"><a href="http://www.livechatinc.com/?partner=lc_{$license}">live chat software</a></div>
18
+
19
+ <script type="text/javascript">
20
+ var __lc_buttons = __lc_buttons || [];
21
+ __lc_buttons.push({
22
+ elementId: 'LiveChat_{$time}',
23
+ language: '{$lang}',
24
+ skill: '{$skill}'
25
+ });
26
+ </script>
27
+ CODE;
28
+
29
+ return <<<HTML
30
+ <p>Your theme <strong>does not</strong> support Widgets <a class="help" href="http://codex.wordpress.org/Widgetizing_Themes">(read more)</a>. Thus, you can't easily drag &amp; drop the Widget in your Wordpress admin page.</p>
31
+ <hr class="livechat">
32
+ <p>To install "click-to-chat" button you need to put the following code <strong>in a visible place of your website</strong>:</p>
33
+ <textarea id="chat_button_code" cols="80" rows="12" readonly="readonly" onclick="this.select()">{$code}</textarea>
34
+
35
+ <p><a href="#button_placement" class="toggle">What is the best place for my button?</a></p>
36
+ <div id="button_placement" style="display:none">
37
+ <p class="img"><img src="{$url}/images/button_placement.png" alt="" /></p>
38
+ </div>
39
+
40
+ <p class="back"><a href="?page=livechat_settings">&laquo; go back to Settings</a></p>
41
+ HTML;
42
+ }
43
+ }
plugin_files/helpers/ChatButtonInfoHelper.class.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class ChatButtonInfoHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ if (LiveChat::get_instance()->is_installed())
10
+ {
11
+ if (is_active_widget (false, false, LiveChatWidget::get_id_base()))
12
+ {
13
+ return '<div class="updated info installed_ok"><p>"Click-to-chat" button installed properly. <span class="help">(<a href="widgets.php">manage widgets</a>)</span></p></div>';
14
+ }
15
+ else
16
+ {
17
+ // Check if theme supports Widgets
18
+ if (LiveChat::get_instance()->widgets_enabled())
19
+ {
20
+ return '<div class="updated info"><p>To install your "click-to-chat" button, go to <a href="widgets.php">Widgets</a> page.</p></div>';
21
+ }
22
+ else
23
+ {
24
+ return '<div class="updated info"><p>To install your "click-to-chat" button, <a href="?page=livechat_settings&amp;chat_button=1">click here</a>.</p></div>';
25
+ }
26
+ }
27
+ }
28
+
29
+ return '';
30
+ }
31
+ }
plugin_files/helpers/ControlPanelHelper.class.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class ControlPanelHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ return <<<HTML
10
+ <iframe id="control_panel" src="https://panel.livechatinc.com/" frameborder="0"></iframe>
11
+ <p>Optionally, open the Control panel in an <a href="https://panel.livechatinc.com/" target="_blank">external window</a>.</p>
12
+ HTML;
13
+ }
14
+ }
plugin_files/helpers/LiveChatHelper.class.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ abstract class LiveChatHelper
4
+ {
5
+ abstract public function render();
6
+ }
plugin_files/helpers/SettingsHelper.class.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class SettingsHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ ?>
10
+ <div id="livechat">
11
+ <div class="wrap">
12
+
13
+ <div id="lc_logo">
14
+ <img src="<?php echo LiveChat::get_instance()->get_plugin_url(); ?>/images/logo.png" />
15
+ <span>for Wordpress</span>
16
+ </div>
17
+ <div class="clear"></div>
18
+
19
+ <?php
20
+ if (isset($_GET['chat_button']))
21
+ {
22
+ LiveChat::get_instance()->get_helper('ChatButton');
23
+ }
24
+ else
25
+ {
26
+ LiveChat::get_instance()->get_helper('ChangesSaved');
27
+ LiveChat::get_instance()->get_helper('TrackingCodeInfo');
28
+ LiveChat::get_instance()->get_helper('ChatButtonInfo');
29
+ ?>
30
+
31
+ <?php if (LiveChat::get_instance()->is_installed() == false) { ?>
32
+ <div class="metabox-holder">
33
+ <div class="postbox">
34
+ <h3>Do you already have a LiveChat account?</h3>
35
+ <div class="postbox_content">
36
+ <ul id="choice_account">
37
+ <li><input type="radio" name="choice_account" id="choice_account_1" checked="checked"> <label for="choice_account_1">Yes, I already have a LiveChat account</label></li>
38
+ <li><input type="radio" name="choice_account" id="choice_account_0"> <label for="choice_account_0">No, I want to create one</label></li>
39
+ </ul>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <?php } ?>
44
+
45
+ <!-- Already have an account -->
46
+ <div class="metabox-holder" id="livechat_already_have" style="display:none">
47
+
48
+ <?php if (LiveChat::get_instance()->is_installed()): ?>
49
+ <div class="postbox">
50
+ <h3><?php echo _e('Download application'); ?></h3>
51
+ <div class="postbox_content">
52
+ <p><?php echo _e('Download LiveChat for your desktop/mobile and start chatting with your customers!'); ?></p>
53
+ <p class="btn"><a href="http://www.livechatinc.com/download/" target="_blank"><?php _e('Download application'); ?></a></p>
54
+ </div>
55
+ </div>
56
+ <?php endif; ?>
57
+
58
+ <div class="postbox">
59
+ <form method="post" action="?page=livechat_settings">
60
+
61
+ <?php if (LiveChat::get_instance()->is_installed() == false) { ?>
62
+ <h3>LiveChat account</h3>
63
+ <div class="postbox_content">
64
+ <table class="form-table">
65
+ <tr>
66
+ <th scope="row"><label for="login">My LiveChat login is:</label></th>
67
+ <td><input type="text" name="login" id="login" value="<?php echo LiveChat::get_instance()->get_login(); ?>" size="40" /></td>
68
+ </tr>
69
+ </table>
70
+
71
+ <p class="ajax_message"></p>
72
+ <p class="submit">
73
+ <input type="hidden" name="license_number" value="<?php echo LiveChat::get_instance()->get_license_number(); ?>" id="license_number">
74
+ <input type="hidden" name="settings_form" value="1">
75
+ <input type="submit" class="button-primary" value="<?php _e('Save changes') ?>" />
76
+ </p>
77
+ </div>
78
+ </form>
79
+
80
+ <?php } else { ?>
81
+
82
+ <h3>Advanced settings</h3>
83
+ <div class="postbox_content">
84
+ <table class="form-table">
85
+ <tr>
86
+ <th scope="row"><label for="lang">Language:</label></th>
87
+ <td><input type="text" name="lang" id="lang" value="<?php echo LiveChat::get_instance()->get_lang(); ?>" /> <span class="explanation">Chat window translation. <strong>en</strong> for English (default). <a href="http://support.livechatinc.com/entries/20161073-what-languages-are-supported-in-livechat" class="help">More info&hellip;</a></span></td>
88
+ </tr>
89
+ <tr>
90
+ <th scope="row"><label for="skill">Skill:</label></th>
91
+ <td><input type="text" name="skill" id="skill" value="<?php echo LiveChat::get_instance()->get_skill(); ?>" /> <span class="explanation">Used for skill-based routing. <strong>0</strong> for default skill (recommended).</span></td>
92
+ </tr>
93
+ </table>
94
+ <p class="submit">
95
+ <input type="hidden" name="license_number" value="<?php echo LiveChat::get_instance()->get_license_number(); ?>" id="license_number">
96
+ <input type="hidden" name="changes_saved" value="1">
97
+ <input type="hidden" name="settings_form" value="1">
98
+ <input type="submit" class="button-primary" value="<?php _e('Save changes') ?>" />
99
+ </p>
100
+ </div>
101
+ </form>
102
+ <?php } ?>
103
+ </div>
104
+
105
+ <?php if (LiveChat::get_instance()->is_installed()) { ?>
106
+ <p id="reset_settings">Something went wrong? <a href="?page=livechat_settings&amp;reset=1">Reset your settings</a>.</p>
107
+ <?php } ?>
108
+ </div>
109
+
110
+ <!-- New account form -->
111
+ <div class="metabox-holder" id="livechat_new_account" style="display:none">
112
+ <div class="postbox">
113
+ <form method="post" action="?page=livechat_settings">
114
+ <h3>Create new LiveChat account</h3>
115
+ <div class="postbox_content">
116
+
117
+ <?php
118
+ global $current_user;
119
+ get_currentuserinfo();
120
+
121
+ $fullname = $current_user->user_firstname.' '.$current_user->user_lastname;
122
+ $fullname = trim($fullname);
123
+ ?>
124
+ <table class="form-table">
125
+ <tr>
126
+ <th scope="row"><label for="name">Full name:</label></th>
127
+ <td><input type="text" name="name" id="name" maxlength="60" value="<?php echo $fullname; ?>" size="40" /></td>
128
+ </tr>
129
+ <tr>
130
+ <th scope="row"><label for="email">E-mail:</label></th>
131
+ <td><input type="text" name="email" id="email" maxlength="100" value="<?php echo $current_user->user_email; ?>" size="40" /></td>
132
+ </tr>
133
+ <tr>
134
+ <th scope="row"><label for="password">Password:</label></th>
135
+ <td><input type="password" name="password" id="password" maxlength="100" value="" size="40" /></td>
136
+ </tr>
137
+ <tr>
138
+ <th scope="row"><label for="password_retype">Retype password:</label></th>
139
+ <td><input type="password" name="password_retype" id="password_retype" maxlength="100" value="" size="40" /></td>
140
+ </tr>
141
+ </table>
142
+
143
+ <p class="ajax_message"></p>
144
+ <p class="submit">
145
+ <input type="hidden" name="website" value="<?php echo bloginfo('url'); ?>">
146
+ <input type="submit" value="Create account" id="submit" class="button-primary">
147
+ </p>
148
+ </div>
149
+ </form>
150
+
151
+ <form method="post" action="?page=livechat_settings" id="save_new_license">
152
+ <p>
153
+ <input type="hidden" name="new_license_form" value="1">
154
+ <input type="hidden" name="lang" value="en">
155
+ <input type="hidden" name="skill" value="0">
156
+ <input type="hidden" name="license_number" value="0" id="new_license_number">
157
+ </p>
158
+ </form>
159
+ </div>
160
+ </div>
161
+ <?php
162
+ }
163
+ ?>
164
+ </div>
165
+ </div>
166
+ <?php
167
+ }
168
+ }
plugin_files/helpers/TrackingCodeHelper.class.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class TrackingCodeHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ if (LiveChat::get_instance()->is_installed())
10
+ {
11
+ $lang = LiveChat::get_instance()->get_lang();
12
+ $skill = LiveChat::get_instance()->get_skill();
13
+ $license_number = LiveChat::get_instance()->get_license_number();
14
+
15
+ return <<<HTML
16
+ <script type="text/javascript">
17
+
18
+ (function() {
19
+ var lc_params = '';
20
+ var lc_lang = '{$lang}';
21
+ var lc_skill = '{$skill}';
22
+
23
+ var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
24
+ var lc_src = ('https:' == document.location.protocol ? 'https://' : 'http://');
25
+ lc_src += 'chat.livechatinc.net/licence/{$license_number}/script.cgi?lang='+lc_lang+unescape('%26')+'groups='+lc_skill;
26
+ lc_src += ((lc_params == '') ? '' : unescape('%26')+'params='+encodeURIComponent(encodeURIComponent(lc_params))); lc.src = lc_src;
27
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
28
+ })();
29
+
30
+ </script>
31
+ HTML;
32
+ }
33
+
34
+ return '';
35
+ }
36
+ }
plugin_files/helpers/TrackingCodeInfoHelper.class.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('LiveChatHelper.class.php');
4
+
5
+ class TrackingCodeInfoHelper extends LiveChatHelper
6
+ {
7
+ public function render()
8
+ {
9
+ if (LiveChat::get_instance()->is_installed())
10
+ {
11
+ return '<div class="updated installed_ok"><p>Tracking code installed properly.</p></div>';
12
+ }
13
+
14
+ return '';
15
+ }
16
+ }
plugin_files/images/awesome_button_overlay.png DELETED
Binary file
plugin_files/images/button_placement.png ADDED
Binary file
plugin_files/images/favicon.png CHANGED
Binary file
plugin_files/images/logo.png ADDED
Binary file
plugin_files/images/plusminus.png ADDED
Binary file
plugin_files/js/livechat.js ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($)
2
+ {
3
+ var LiveChat =
4
+ {
5
+ init: function()
6
+ {
7
+ this.externalLinks();
8
+ this.toggleLinks();
9
+ this.resetLink();
10
+ this.toggleForms();
11
+ this.alreadyHaveAccountForm();
12
+ this.newLicenseForm();
13
+ this.controlPanelIframe();
14
+ this.fadeChangesSaved();
15
+ },
16
+
17
+ externalLinks: function()
18
+ {
19
+ $('a.help').attr('target', '_blank');
20
+ },
21
+
22
+ toggleLinks: function()
23
+ {
24
+ $('a.toggle').toggle(function()
25
+ {
26
+ $($(this).attr('href')).slideToggle();
27
+ $(this).toggleClass('unfolded');
28
+ return false;
29
+ },
30
+ function(){
31
+ $($(this).attr('href')).slideToggle();
32
+ $(this).toggleClass('unfolded');
33
+ return false;
34
+ });
35
+ },
36
+
37
+ resetLink: function()
38
+ {
39
+ $('#reset_settings a').click(function()
40
+ {
41
+ return confirm('This will reset your LiveChat plugin settings. Continue?');
42
+ })
43
+ },
44
+
45
+ toggleForms: function()
46
+ {
47
+ var toggleForms = function()
48
+ {
49
+ // display account details page if license number is already known
50
+ if ($('#choice_account').length == 0 || $('#choice_account_1').is(':checked'))
51
+ {
52
+ $('#livechat_new_account').hide();
53
+ $('#livechat_already_have').show();
54
+ $('#login').focus();
55
+ }
56
+ else if ($('#choice_account_0').is(':checked'))
57
+ {
58
+ $('#livechat_already_have').hide();
59
+ $('#livechat_new_account').show();
60
+
61
+ if ($.trim($('#name').val()).length == 0)
62
+ {
63
+ $('#name').focus();
64
+ }
65
+ else
66
+ {
67
+ $('#password').focus();
68
+ }
69
+ }
70
+ };
71
+
72
+ toggleForms();
73
+ $('#choice_account input').click(toggleForms);
74
+ },
75
+
76
+ alreadyHaveAccountForm: function()
77
+ {
78
+ $('#livechat_already_have form').submit(function()
79
+ {
80
+ if (parseInt($('#license_number').val()) == 0)
81
+ {
82
+ var login = $.trim($('#login').val());
83
+ if (!login.length)
84
+ {
85
+ $('#login').focus();
86
+ return false;
87
+ }
88
+
89
+ $('#livechat_already_have .ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
90
+
91
+ $.getJSON('https://api.livechatinc.com/license/number/'+login+'?callback=?', function(response)
92
+ {
93
+ if (response.error)
94
+ {
95
+ $('#livechat_already_have .ajax_message').removeClass('wait').addClass('message').html('Incorrect LiveChat login.');
96
+ $('#login').focus();
97
+ return false;
98
+ }
99
+ else
100
+ {
101
+ $('#license_number').val(response.number);
102
+ $('#livechat_already_have form').submit();
103
+ }
104
+ });
105
+
106
+ return false;
107
+ }
108
+ });
109
+ },
110
+
111
+ newLicenseForm: function()
112
+ {
113
+ $('#livechat_new_account form').submit(function()
114
+ {
115
+ if (parseInt($('#new_license_number').val()) > 0)
116
+ {
117
+ return true;
118
+ }
119
+
120
+ if (LiveChat.validateNewLicenseForm())
121
+ {
122
+ $('#livechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
123
+
124
+ // Check if email address is available
125
+ $.getJSON('http://www.livechatinc.com/php/licence_info.php?email='+$('#email').val()+'&jsoncallback=?',
126
+ function(response)
127
+ {
128
+ if (response.response == 'true')
129
+ {
130
+ LiveChat.createLicense();
131
+ }
132
+ else if (response.response == 'false')
133
+ {
134
+ $('#livechat_new_account .ajax_message').removeClass('wait').addClass('message').html('This email address is already in use. Please choose another e-mail address.');
135
+ }
136
+ else
137
+ {
138
+ $('#livechat_new_account .ajax_message').removeClass('wait').addClass('message').html('Could not create account. Please try again later.');
139
+ }
140
+ });
141
+ }
142
+
143
+ return false;
144
+ });
145
+ },
146
+
147
+ createLicense: function()
148
+ {
149
+ var url;
150
+
151
+ $('#livechat_new_account .ajax_message').removeClass('message').addClass('wait').html('Creating new account&hellip;');
152
+
153
+ url = 'https://www.livechatinc.com/signup/';
154
+ url += '?name='+encodeURIComponent($('#name').val());
155
+ url += '&email='+encodeURIComponent($('#email').val());
156
+ url += '&password='+encodeURIComponent($('#password').val());
157
+ url += '&website='+encodeURIComponent($('#website').val());
158
+ url += '&timezone_gmt='+encodeURIComponent(this.calculateGMT());
159
+ url += '&action=wordpress_signup';
160
+ url += '&jsoncallback=?';
161
+
162
+ $.getJSON(url, function(data)
163
+ {
164
+ data = parseInt(data.response);
165
+ if (data == 0)
166
+ {
167
+ $('#livechat_new_account .ajax_message').html('Could not create account. Please try again later.').addClass('message').removeClass('wait');
168
+ return false;
169
+ }
170
+
171
+ // save new licence number
172
+ $('#new_license_number').val(data);
173
+ $('#save_new_license').submit();
174
+ });
175
+ },
176
+
177
+ validateNewLicenseForm: function()
178
+ {
179
+ if ($('#name').val().length < 1)
180
+ {
181
+ alert ('Please enter your name.');
182
+ $('#name').focus();
183
+ return false;
184
+ }
185
+
186
+ if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#email').val()) == false)
187
+ {
188
+ alert ('Please enter a valid email address.');
189
+ $('#email').focus();
190
+ return false;
191
+ }
192
+
193
+ if ($.trim($('#password').val()).length < 6)
194
+ {
195
+ alert('Password must be at least 6 characters long');
196
+ $('#password').focus();
197
+ return false;
198
+ }
199
+
200
+ if ($('#password').val() !== $('#password_retype').val())
201
+ {
202
+ alert('Both passwords do not match.');
203
+ $('#password').val('');
204
+ $('#password_retype').val('');
205
+ $('#password').focus();
206
+ return false;
207
+ }
208
+
209
+ return true;
210
+ },
211
+
212
+ calculateGMT: function()
213
+ {
214
+ var date, dateGMTString, date2, gmt;
215
+
216
+ date = new Date((new Date()).getFullYear(), 0, 1, 0, 0, 0, 0);
217
+ dateGMTString = date.toGMTString();
218
+ date2 = new Date(dateGMTString.substring(0, dateGMTString.lastIndexOf(" ")-1));
219
+ gmt = ((date - date2) / (1000 * 60 * 60)).toString();
220
+
221
+ return gmt;
222
+ },
223
+
224
+ controlPanelIframe: function()
225
+ {
226
+ var cp = $('#control_panel');
227
+ if (cp.length)
228
+ {
229
+ var cp_resize = function()
230
+ {
231
+ var cp_height = window.innerHeight ? window.innerHeight : $(window).height();
232
+ cp_height -= $('#wphead').height();
233
+ cp_height -= $('#updated-nag').height();
234
+ cp_height -= $('#control_panel + p').height();
235
+ cp_height -= $('#footer').height();
236
+ cp_height -= 70;
237
+
238
+ cp.attr('height', cp_height);
239
+ }
240
+ cp_resize();
241
+ $(window).resize(cp_resize);
242
+ }
243
+ },
244
+
245
+ fadeChangesSaved: function()
246
+ {
247
+ $cs = $('#changes_saved_info');
248
+
249
+ if ($cs.length)
250
+ {
251
+ setTimeout(function()
252
+ {
253
+ $cs.slideUp();
254
+ }, 1000);
255
+ }
256
+ }
257
+ };
258
+
259
+ $(document).ready(function()
260
+ {
261
+ LiveChat.init();
262
+ });
263
+ })(jQuery);
plugin_files/js/scripts.js DELETED
@@ -1,40 +0,0 @@
1
- if (!$) $ = jQuery;
2
- $(document).ready(function()
3
- {
4
- var show_form = function()
5
- {
6
- if ($('#choice_account_0').is(':checked'))
7
- {
8
- $('#livechat_already_have').hide();
9
- $('#livechat_new_account').show();
10
- }
11
- else if ($('#choice_account_1').is(':checked'))
12
- {
13
- $('#livechat_new_account').hide();
14
- $('#livechat_already_have').show();
15
- }
16
- }
17
-
18
- show_form();
19
- $('#choice_account input').click(show_form);
20
-
21
- // Control Panel iframe height
22
- var cp = $('#control_panel');
23
- if (cp.length)
24
- {
25
- var cp_resize = function()
26
- {
27
- var cp_height = window.innerHeight ? window.innerHeight : $(window).height();
28
- cp_height -= $('#wphead').height();
29
- cp_height -= $('#updated-nag').height();
30
- cp_height -= $('#control_panel + p').height();
31
- cp_height -= $('#footer').height();
32
- cp_height -= 70;
33
-
34
- cp.attr('height', cp_height);
35
- }
36
- cp_resize();
37
- $(window).resize(cp_resize);
38
- }
39
-
40
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/js/signup.js DELETED
@@ -1,214 +0,0 @@
1
- $(document).ready(function()
2
- {
3
- var timezones = {
4
- 'Pacific/Kwajalein': '(GMT-12:00) International Date Line West',
5
- 'Pacific/Samoa': '(GMT-11:00) Midway Island, Samoa',
6
- 'US/Hawaii': '(GMT-10:00) Hawaii',
7
- 'US/Alaska': '(GMT-09:00) Alaska',
8
- 'US/Pacific': '(GMT-08:00) Pacific Time (US & Canada)',
9
- 'America/Tijuana': '(GMT-08:00) Tijuana, Baja California',
10
- 'US/Arizona': '(GMT-07:00) Arizona',
11
- 'America/Chihuahua': '(GMT-07:00) Chihuahua, La Paz, Mazatlan',
12
- 'US/Mountain': '(GMT-07:00) Mountain Time (US & Canada)',
13
- 'America/Chicago': '(GMT-06:00) Central America',
14
- 'US/Central': '(GMT-06:00) Central Time (US & Canada)',
15
- 'America/Mexico_City': '(GMT-06:00) Guadalajara, Mexico City, Monterrey',
16
- 'Canada/Saskatchewan': '(GMT-06:00) Saskatchewan',
17
- 'America/Bogota': '(GMT-05:00) Bogota, Lima, Quito, Rio Branco',
18
- 'US/Eastern': '(GMT-05:00) Eastern Time (US & Canada)',
19
- 'US/East-Indiana': '(GMT-05:00) Indiana (East)',
20
- 'America/Caracas': '(GMT-04:30) Caracas',
21
- 'Canada/Atlantic': '(GMT-04:00) Atlantic Time (Canada)',
22
- 'America/La_Paz': '(GMT-04:00) La Paz',
23
- 'America/Manaus': '(GMT-04:00) Manaus',
24
- 'America/Santiago': '(GMT-04:00) Santiago',
25
- 'Canada/Newfoundland': '(GMT-03:30) Newfoundland',
26
- 'America/Sao_Paulo': '(GMT-03:00) Brasilia',
27
- 'America/Buenos_Aires': '(GMT-03:00) Buenos Aires',
28
- 'America/Buenos_Aires': '(GMT-03:00) Georgetown',
29
- 'America/Godthab': '(GMT-03:00) Greenland',
30
- 'America/Montevideo': '(GMT-03:00) Montevideo',
31
- 'Atlantic/South_Georgia': '(GMT-02:00) Mid-Atlantic',
32
- 'Atlantic/Azores': '(GMT-01:00) Azores',
33
- 'Atlantic/Cape_Verde': '(GMT-01:00) Cape Verde Is.',
34
- 'Europe/London': '(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London',
35
- 'Africa/Casablanca': '(GMT) Casablanca',
36
- 'Atlantic/Reykjavik': '(GMT) Monrovia, Reykjavik',
37
- 'Europe/Berlin': '(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',
38
- 'Europe/Prague': '(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague',
39
- 'Europe/Paris': '(GMT+01:00) Brussels, Copenhagen, Madrid, Paris',
40
- 'Europe/Warsaw': '(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb',
41
- 'Africa/Lagos': '(GMT+01:00) West Central Africa',
42
- 'Asia/Amman': '(GMT+02:00) Amman',
43
- 'Europe/Athens': '(GMT+02:00) Athens, Bucharest, Istanbul',
44
- 'Asia/Beirut': '(GMT+02:00) Beirut',
45
- 'Africa/Cairo': '(GMT+02:00) Cairo',
46
- 'Africa/Harare': '(GMT+02:00) Harare, Pretoria',
47
- 'Europe/Helsinki': '(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius',
48
- 'Asia/Jerusalem': '(GMT+02:00) Jerusalem',
49
- 'Europe/Minsk': '(GMT+02:00) Minsk',
50
- 'Africa/Windhoek': '(GMT+02:00) Windhoek',
51
- 'Asia/Baghdad': '(GMT+03:00) Baghdad',
52
- 'Asia/Kuwait': '(GMT+03:00) Kuwait, Riyadh',
53
- 'Europe/Moscow': '(GMT+03:00) Moscow, St. Petersburg, Volgograd',
54
- 'Africa/Nairobi': '(GMT+03:00) Nairobi',
55
- 'Asia/Tbilisi': '(GMT+03:00) Tbilisi',
56
- 'Asia/Tehran': '(GMT+03:30) Tehran',
57
- 'Asia/Muscat': '(GMT+04:00) Abu Dhabi, Muscat',
58
- 'Asia/Baku': '(GMT+04:00) Baku',
59
- 'Indian/Mauritius': '(GMT+04:00) Port Louis',
60
- 'Asia/Yerevan': '(GMT+04:00) Yerevan',
61
- 'Asia/Kabul': '(GMT+04:30) Kabul',
62
- 'Asia/Yekaterinburg': '(GMT+05:00) Ekaterinburg',
63
- 'Asia/Karachi': '(GMT+05:00) Islamabad, Karachi',
64
- 'Asia/Tashkent': '(GMT+05:00) Tashkent',
65
- 'Asia/Calcutta': '(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi',
66
- 'Asia/Calcutta': '(GMT+05:30) Sri Jayawardenepura',
67
- 'Asia/Katmandu': '(GMT+05:45) Kathmandu',
68
- 'Asia/Novosibirsk': '(GMT+06:00) Almaty, Novosibirsk',
69
- 'Asia/Dhaka': '(GMT+06:00) Astana, Dhaka',
70
- 'Asia/Rangoon': '(GMT+06:30) Yangon (Rangoon)',
71
- 'Asia/Bangkok': '(GMT+07:00) Bangkok, Hanoi, Jakarta',
72
- 'Asia/Krasnoyarsk': '(GMT+07:00) Krasnoyarsk',
73
- 'Asia/Hong_Kong': '(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi',
74
- 'Asia/Irkutsk': '(GMT+08:00) Irkutsk, Ulaan Bataar',
75
- 'Asia/Kuala_Lumpur': '(GMT+08:00) Kuala Lumpur, Singapore',
76
- 'Australia/Perth': '(GMT+08:00) Perth',
77
- 'Asia/Taipei': '(GMT+08:00) Taipei',
78
- 'Asia/Tokyo': '(GMT+09:00) Osaka, Sapporo, Tokyo',
79
- 'Asia/Seoul': '(GMT+09:00) Seoul',
80
- 'Asia/Yakutsk': '(GMT+09:00) Yakutsk',
81
- 'Australia/Adelaide': '(GMT+09:30) Adelaide',
82
- 'Australia/Darwin': '(GMT+09:30) Darwin',
83
- 'Australia/Brisbane': '(GMT+10:00) Brisbane',
84
- 'Australia/Canberra': '(GMT+10:00) Canberra, Melbourne, Sydney',
85
- 'Pacific/Guam': '(GMT+10:00) Guam, Port Moresby',
86
- 'Australia/Hobart': '(GMT+10:00) Hobart',
87
- 'Asia/Vladivostok': '(GMT+10:00) Vladivostok',
88
- 'Asia/Magadan': '(GMT+11:00) Magadan, Solomon Is., New Caledonia',
89
- 'Pacific/Auckland': '(GMT+12:00) Auckland, Wellington',
90
- 'Pacific/Fiji': '(GMT+12:00) Fiji, Kamchatka, Marshall Is.',
91
- 'Pacific/Tongatapu': '(GMT+13:00) Nuku\'alofa'
92
- };
93
-
94
- var date = new Date((new Date()).getFullYear(), 0, 1, 0, 0, 0, 0);
95
- var dateGMTString = date.toGMTString();
96
- var date2 = new Date(dateGMTString.substring(0, dateGMTString.lastIndexOf(" ")-1));
97
- var GMT = ((date - date2) / (1000 * 60 * 60)).toString();
98
-
99
- // Add leading 0
100
- if (/^\-?(\d)$/.test(GMT)) GMT = GMT.replace(/\d/, function(match, value) { return '0'+match; });
101
-
102
- // Select timezone based on GMT
103
- var re;
104
-
105
- if (GMT == '00') {
106
- re = new RegExp('\(GMT'+GMT+':00\)');
107
- } else if (parseInt(GMT) > 0) {
108
- re = new RegExp('\(GMT\\+'+GMT+':00\)');
109
- } else {
110
- re = new RegExp('\(GMT'+GMT+':00\)');
111
- }
112
-
113
- for (var i in timezones)
114
- {
115
- if (re.exec(timezones[i]))
116
- {
117
- $('input[name=livechat_account_timezone]').val(i);
118
- break;
119
- }
120
- };
121
-
122
- var validate = function(use_alert)
123
- {
124
- if ($('#livechat_account_first_name').val().length < 1)
125
- {
126
- if (use_alert) alert ('Please enter your first name.');
127
- return false;
128
- }
129
-
130
- if ($('#livechat_account_first_name').val().length < 1)
131
- {
132
- if (use_alert) alert ('Please enter your last name.');
133
- return false;
134
- }
135
-
136
- if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#livechat_account_email').val()) == false)
137
- {
138
- if (use_alert) alert ('Please enter a valid email address.');
139
- return false;
140
- }
141
-
142
- return true;
143
- }
144
-
145
- $('#livechat_new_account form').submit(function()
146
- {
147
- if (validate(true))
148
- {
149
- $('#ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
150
-
151
- var create_licence = function()
152
- {
153
- $('#ajax_message').removeClass('message').addClass('wait').html('Creating new licence&hellip;');
154
-
155
- var url = 'http://www.livechatinc.com/en/signup/';
156
- url += '?account_first_name='+encodeURIComponent($('#livechat_account_first_name').val());
157
- url += '&account_last_name='+encodeURIComponent($('#livechat_account_last_name').val());
158
- url += '&account_email='+encodeURIComponent($('#livechat_account_email').val());
159
- url += '&account_company='+encodeURIComponent($('#livechat_account_company').val());
160
- url += '&account_phone='+encodeURIComponent($('#livechat_account_phone').val());
161
- url += '&account_website='+encodeURIComponent($('#livechat_account_website').val());
162
- url += '&account_timezone='+encodeURIComponent($('#livechat_account_timezone').val());
163
- url += '&action=wordpress_signup';
164
- url += '&recaptcha_ip='+$('input[name=recaptcha_ip]').val();
165
- url += '&recaptcha_challenge_field='+$('input[name=recaptcha_challenge_field]').val();
166
- url += '&recaptcha_response_field='+$('input[name=recaptcha_response_field]').val();
167
- url += '&jsoncallback=?';
168
-
169
- $.getJSON(url,
170
- function(data)
171
- {
172
- data = parseInt(data.response);
173
- if (data == -1)
174
- {
175
- // Wrong captcha
176
- $('#ajax_message').html('Confirmation code is incorrect. Please try again.').addClass('message').removeClass('wait');
177
- return false;
178
- }
179
- if (data == 0)
180
- {
181
- $('#ajax_message').html('Could not create licence. Please try again later.').addClass('message').removeClass('wait');
182
- return false;
183
- }
184
-
185
- // Save new licence number
186
- $('#livechat_license_number').val(data);
187
- $('#livechat_license_created_flag').val('1');
188
- $('#livechat_already_have form')
189
- .unbind('submit')
190
- .submit();
191
- });
192
- }
193
-
194
- // Check if email address is available
195
- $.getJSON('http://www.livechatinc.com/php/licence_info.php?email='+$('#livechat_new_account form input[name=livechat_account_email]').val()+'&jsoncallback=?',
196
- function(response)
197
- {
198
- if (response.response == 'true')
199
- {
200
- create_licence();
201
- }
202
- else if (response.response == 'false')
203
- {
204
- $('#ajax_message').removeClass('wait').addClass('message').html('This email address is already in use. Please choose another e-mail address.');
205
- }
206
- else
207
- {
208
- $('#ajax_message').removeClass('wait').addClass('message').html('Could not create licence. Please try again later.');
209
- }
210
- });
211
- }
212
- return false;
213
- });
214
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/monitoring_code.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- function _livechat_monitoring_code($license_number, $lang, $groups, $params)
4
- {
5
- if (LIVECHAT_LICENSE_INSTALLED == false) return;
6
- ?>
7
-
8
- <!-- Begin LiveChat track tag. See also www.livechatinc.com -->
9
- <script type="text/javascript">
10
- (function() {
11
- var livechat_params = '<?php echo $params; ?>';
12
-
13
- var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
14
- var lc_src = ('https:' == document.location.protocol ? 'https://' : 'http://');
15
- lc_src += 'chat.livechatinc.net/licence/<?php echo $license_number; ?>/script.cgi?lang=<?php echo $lang; ?>&groups=<?php echo $groups; ?>';
16
- lc_src += ((livechat_params == '') ? '' : '&params='+encodeURIComponent(encodeURIComponent(livechat_params)));
17
- lc.src = lc_src;
18
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
19
- })();
20
- </script>
21
- <!-- End LiveChat track tag. See also www.livechatinc.com -->
22
- <?php
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin_files/settings.php DELETED
@@ -1,213 +0,0 @@
1
- <?php
2
-
3
- function _livechat_helper_license_created_info()
4
- {
5
- echo '<div class="updated installed_ok"><p><strong>Your live chat license has been created! Please install the <a href="http://www.livechatinc.com/en/download/" target="_blank">live chat application</a> and start chatting!</strong></p></div>';
6
- }
7
-
8
- function _livechat_helper_monitoring_code_info()
9
- {
10
- if (LIVECHAT_LICENSE_INSTALLED)
11
- {
12
- echo '<div class="updated installed_ok"><p><strong>Your live chat monitoring code is installed properly. <a class="help" href="http://www.livechatinc.com/en/support/manual/monitoring_code.htm">(what is a monitoring code?)</a> </strong></p></div>';
13
- }
14
- }
15
-
16
- function _livechat_helper_chat_button_info()
17
- {
18
- if (LIVECHAT_LICENSE_INSTALLED)
19
- {
20
- if (is_active_widget (null, 'livechat_widget', true))
21
- {
22
- echo '<div class="updated info installed_ok"><p><strong>Your live chat button is installed properly. <span class="help">(<a href="widgets.php">manage widgets</a> | <a href="http://www.livechatinc.com/en/support/manual/chat_button.htm" target="_blank">what is a chat button?</a>)</span> </strong></p></div>';
23
- }
24
- else
25
- {
26
- // Check if theme supports Widgets
27
- if (LIVECHAT_WIDGETS_ENABLED)
28
- {
29
- echo '<div class="updated info"><p><strong>To install your live chat button, go to <a href="widgets.php">Widgets</a> page. <a class="help" href="http://www.livechatinc.com/en/support/manual/chat_button.htm" target="_blank">(what is a chat button?)</a> </strong></p></div>';
30
- }
31
- else
32
- {
33
- echo '<div class="updated info"><p><strong>To install your live chat button, <a href="?page=livechat_chat_button">click here</a>. <a class="help" href="http://www.livechatinc.com/en/support/manual/chat_button.htm" target="_blank">(what is a chat button?)</a> </strong></p></div>';
34
- }
35
- }
36
- }
37
- }
38
-
39
- function _livechat_helper_saved_info()
40
- {
41
- if (isset($_GET['updated']))
42
- {
43
- echo '<div class="updated"><p><strong>Settings saved.</strong></p></div>';
44
- }
45
- }
46
-
47
- function _livechat_settings()
48
- {
49
- ?>
50
- <div class="wrap">
51
- <h2>Live chat software for Wordpress</h2>
52
-
53
- <?php
54
- if (get_option('livechat_license_created_flag') == '1')
55
- {
56
- delete_option('livechat_license_created_flag');
57
- _livechat_helper_license_created_info();
58
- _livechat_helper_monitoring_code_info();
59
- _livechat_helper_chat_button_info();
60
- }
61
- else
62
- {
63
- _livechat_helper_monitoring_code_info();
64
- _livechat_helper_chat_button_info();
65
- _livechat_helper_saved_info();
66
- }
67
- ?>
68
-
69
- <div class="metabox-holder">
70
- <div class="postbox">
71
- <h3>Do you already have a live chat account?</h3>
72
- <div class="postbox_content">
73
- <ul id="choice_account">
74
- <li><input type="radio" name="choice_account" id="choice_account_1" checked="checked"> <label for="choice_account_1">Yes, I already have a live chat account</label></li>
75
- <li><input type="radio" name="choice_account" id="choice_account_0"> <label for="choice_account_0">No, I want to create one</label></li>
76
- </ul>
77
- </div>
78
- </div>
79
- </div>
80
-
81
- <!-- Already have an account -->
82
- <div class="metabox-holder" id="livechat_already_have" style="display:none">
83
-
84
- <?php if (LIVECHAT_LICENSE_INSTALLED): ?>
85
- <div class="postbox">
86
- <h3>Download application</h3>
87
- <div class="postbox_content">
88
- <p>Download the live chat application and start chatting with your customers!</p>
89
- <p><a href="http://www.livechatinc.com/en/download/" target="_blank" class="awesome blue">Download application</a></p>
90
- </div>
91
- </div>
92
- <?php endif; ?>
93
-
94
- <div class="postbox">
95
- <form method="post" action="options.php">
96
- <?php settings_fields('livechat_license_information'); ?>
97
-
98
- <h3>Live chat account</h3>
99
- <div class="postbox_content">
100
- <table class="form-table">
101
- <tr>
102
- <th scope="row"><label for="livechat_license_number">My license number is:</label></th>
103
- <td><input type="text" name="livechat_license_number" id="livechat_license_number" value="<?php echo get_option('livechat_license_number'); ?>" /><?php if (LIVECHAT_LICENSE_INSTALLED == false): ?> <span class="explanation">You will find your license number in the <a href="?page=livechat_control_panel">Control Panel</a>.</span><?php endif; ?></td>
104
- </tr>
105
-
106
- <?php if (LIVECHAT_LICENSE_INSTALLED): ?>
107
- <?php
108
- $lang = get_option('livechat_lang');
109
- if (empty($lang)) $lang = 'en';
110
- ?>
111
- <tr>
112
- <th scope="row"><label for="livechat_lang">Language:</label></th>
113
- <td><input type="text" name="livechat_lang" id="livechat_lang" value="<?php echo $lang; ?>" /> <a class="help" href="http://www.livechatinc.com/en/support/documentation/customizing_web_agent_.htm" target="_blank">supported languages list</a> <span class="explanation"><strong>en</strong> for English (default)</span></td>
114
- </tr>
115
-
116
- <?php
117
- $groups = get_option('livechat_groups');
118
- if (empty($groups)) $groups = '0';
119
- ?>
120
- <tr>
121
- <th scope="row"><label for="livechat_groups">Skill:</label></th>
122
- <td><input type="text" name="livechat_groups" id="livechat_groups" value="<?php echo $groups; ?>" /> <a class="help" href="http://www.livechatinc.com/en/resources/tutorials/skills_based_routing/" target="_blank">what is that?</a> <span class="explanation"><strong>0</strong> for default skill (recommended)</span></td>
123
- </tr>
124
-
125
- <?php
126
- $params = get_option('livechat_params');
127
- ?>
128
- <tr>
129
- <th scope="row"><label for="livechat_params">Params:</label></th>
130
- <td><input type="text" name="livechat_params" id="livechat_params" value="<?php echo $params; ?>" /> <a class="help" href="http://www.livechatinc.com/en/support/documentation/customizing_web_agent_.htm" target="_blank">advanced help</a></td>
131
- </tr>
132
- <?php else: ?>
133
- <?php endif; ?>
134
- </table>
135
-
136
- <p class="submit">
137
- <input type="hidden" name="livechat_license_created_flag" value="0" id="livechat_license_created_flag">
138
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
139
- </p>
140
-
141
- </div>
142
- </form>
143
- </div>
144
- </div>
145
-
146
- <!-- New account form -->
147
- <div class="metabox-holder" id="livechat_new_account" style="display:none">
148
- <div class="postbox">
149
- <form method="post" action="options.php">
150
- <h3>Create new live chat account</h3>
151
- <div class="postbox_content">
152
-
153
- <?php settings_fields('livechat_license_created'); ?>
154
- <p>Fields marked with <span class="asterisk">*</span> are required.</p>
155
- <table class="form-table">
156
- <tr>
157
- <th scope="row"><label for="livechat_account_first_name"><span class="asterisk">*</span>First name:</label></th>
158
- <td><input type="text" name="livechat_account_first_name" id="livechat_account_first_name" maxlength="30" /></td>
159
- </tr>
160
- <tr>
161
- <th scope="row"><label for="livechat_account_last_name"><span class="asterisk">*</span>Last name:</label></th>
162
- <td><input type="text" name="livechat_account_last_name" id="livechat_account_last_name" maxlength="30" /></td>
163
- </tr>
164
- <tr>
165
- <th scope="row"><label for="livechat_account_email"><span class="asterisk">*</span>E-mail:</label></th>
166
- <td><input type="text" name="livechat_account_email" id="livechat_account_email" maxlength="70" /></td>
167
- </tr>
168
- <tr>
169
- <th scope="row"><label for="livechat_account_company">Company name:</label></th>
170
- <td><input type="text" name="livechat_account_company" id="livechat_account_company" maxlength="70" /></td>
171
- </tr>
172
- <tr>
173
- <th scope="row"><label for="livechat_account_phone">Phone number:</label></th>
174
- <td><input type="text" name="livechat_account_phone" id="livechat_account_phone" maxlength="70" /></td>
175
- </tr>
176
- <tr>
177
- <th scope="row"><label for="livechat_account_website">Website:</label></th>
178
- <td><input type="text" name="livechat_account_website" id="livechat_account_website" maxlength="70" value="<?php echo bloginfo('url'); ?>" /></td>
179
- </tr>
180
- <tr>
181
- <th scope="row"><label><span class="asterisk">*</span>Confirmation code:</label></th>
182
- <td>
183
- <!-- ReCaptcha -->
184
- <input type="hidden" name="recaptcha_ip" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>">
185
- <script type="text/javascript" src="https://api-secure.recaptcha.net/challenge?k=6LcqygsAAAAAAF5zKDVwo5Mfvc4DarPQIcc_lxTn"></script>
186
- <noscript><iframe src="https://api-secure.recaptcha.net/noscript?k=6LcqygsAAAAAAF5zKDVwo5Mfvc4DarPQIcc_lxTn" height="300" width="500" frameborder="0"></iframe><br>
187
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea><input type="hidden" name="recaptcha_response_field" value="manual_challenge"></noscript>
188
- <!-- end ReCaptcha -->
189
- </td>
190
- </tr>
191
- </table>
192
-
193
- <p id="ajax_message"></p>
194
-
195
- <table class="form-table">
196
- <tr>
197
- <td class="submit">
198
- <input type="hidden" name="livechat_account_timezone" value="US/Pacific" id="livechat_account_timezone">
199
- <input type="submit" value="Create account" id="submit" class="button-primary">
200
- </td>
201
- </tr>
202
- </table>
203
-
204
- </div>
205
- </form>
206
- </div>
207
- </div>
208
-
209
-
210
-
211
-
212
- <?php
213
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,8 +1,9 @@
1
- === Live Chat Software for Wordpress ===
2
- Contributors: LIVECHAT Software
3
- Tags: live support, live chat, live chat software, online support, customer help, customer support, livechat, help desk, helpdesk, live support, customer service, plugin, chat
4
- Stable tag: trunk
5
- Tested up to: 3.1
 
6
 
7
  This plugin integrates your Wordpress with LiveChat - an application for online customer service and support.
8
 
@@ -10,215 +11,28 @@ This plugin integrates your Wordpress with LiveChat - an application for online
10
 
11
  LiveChat is a fast and intuitive live chat software to enable your sales representatives contact customers on the website. Help online visitors find what they need before they leave your site.
12
 
13
- For LiveChat pricing, visit the online store: http://www.livechatinc.com/en/store/
14
 
15
- * Increase sales conversion rate and customer satisfaction level.
16
- * Allow customers to chat live with the sales person.
17
- * Increase number of successful transactions.
18
- * Secure and reliable communication channel.
19
-
20
- = Web communicator =
21
- Easy to customize and rebrand chat window. Out-of-the-box chat window templates.
22
-
23
- = Traffic monitoring =
24
- Track visitors in real time. Invite them to chat if they abandon an order or shopping cart.
25
-
26
- = Analytics & Reporting =
27
- Generate reports for each agent with the number of chats, invitations or time spent with the customer.
28
-
29
- = Multiple languages support =
30
-
31
- LiveChat works with:
32
-
33
- * Chinese
34
- * Český
35
- * Deutsch
36
- * Ελληνικά
37
- * English
38
- * Espańol
39
- * Français
40
- * Italiano
41
- * Polski
42
- * Русский Язык
43
- * Svenska
44
- * Slovenský
45
-
46
- = Compatible with all browsers =
47
-
48
- * Internet Explorer (even with IE 6)
49
- * Firefox
50
- * Google Chrome
51
- * Opera
52
- * Safari
53
- * iPhone
54
-
55
- = Features list =
56
-
57
- *Agent application:*
58
-
59
- * Supervise chats held by other agents
60
- * Request and manage your customer’s desktop with Remote Desktop functionality
61
- * Proactively invite your customers to chat with both Standard and Personal Invitations
62
- * Whisper to other agents and help them with sales process
63
- * Browse history of previous chats with particular customer
64
- * Transfer the customer to another agent
65
- * Organise conference and invite other available agents to chat
66
- * Get notifications about incoming chats and conferences
67
- * See your customers’ details, including current page and geolocalization
68
- * Talk with unlimited customers at a time
69
- * Enable customers queue and start chats on your own with specific clients
70
- * Ban intrusive visitors from chatting
71
- * Spell check in real-time with suggestions and custom dictionaries support
72
-
73
- *Customer web application:*
74
-
75
- * Chat using your desktop browser or mobile device
76
- * Know when an agent replies thanks to thetyping indicator
77
- * Request a callback from an agent
78
- * Print the chat log
79
- * Send the chat log to your e-mail address
80
- * Save the chat log to your local drive
81
- * Assess an agent and fill the Post-chat Survey
82
- * Leave a message when all agents are offline
83
- * Be notified about agent’s reply with a sound alert
84
-
85
- *Website monitoring:*
86
-
87
- * Monitor your website visitors in real-time
88
- * See your visitors’ status: Online, Invited, Chatting, Offline and more
89
- * Analyse referrers – pages your customers came from
90
- * Monitor keywords your visitors entered in search engines
91
- * Check users’ visit history
92
- * Retrieve customer’s browser, language, accepted/refused invites and more
93
- * Get notifications about your new visitors
94
- * Install monitoring code on as many websites as you want
95
-
96
- *Customization:*
97
-
98
- * Choose one of available Chat Window templates
99
- * Brand your chat window with your company logo
100
- * Play with custom color themes generator
101
- * Browse Chat Buttons, Standard Invitations and Personal Invitations galleries
102
- * Upload custom Chat Buttons, Standard Invitations and Personal Invitations graphics
103
- * Easily customize your Pre-chat Surveys, Post-chat Surveys and Offline Message forms
104
- * Share common Canned Responses, URL Addresses and Aliases with other agents
105
- * Integrate your Live Chat software with CRM system
106
- * Install new features with Add-ons Manager
107
-
108
- *Statistics*:
109
-
110
- * Pre-Chat and Post-Chat Surveys
111
- * Your agents availability
112
- * Average Talk Time, Invites and Chats Traffic Density
113
- * Average Speed of Answer, Average Queue Waiting time
114
- * Google Analytics integration
115
 
116
  == Installation ==
117
 
118
  1. Upload `wp-live-chat-software-for-wordpress` directory to Wordpress plugins directory (`/wp-content/plugins/`)
119
  2. Activate the plugin through the 'Plugins' menu in WordPress
120
- 3. Click the 'Live Chat' menu on the left.
121
  4. Follow the instructions.
122
 
123
- == Frequently Asked Questions ==
124
-
125
- = All the plans presented at your website are monthly ones. Do you offer annual subscriptions? If yes, are there any discounts involved? =
126
-
127
- Yes, you can pay up to one year in advance and save up to 20%.
128
-
129
- = My subscription expired. What do I do to renew it? =
130
-
131
- Go to online store, select the product and most suitable plan, log in using your account details and finish your order.
132
-
133
- = How can I buy additional operators to my existing license? =
134
-
135
- Visit our online online store, select your product and current plan, log in using your account details and finish your order.
136
-
137
- = Do I get all features with the basic version? =
138
-
139
- Yes, we provide all features in every plan we offer. The only limitation is the number of accounts and subscription period.
140
-
141
- = We have a privacy policy in our company. What version do you recommend for the highest safety and communication confidentiality? =
142
-
143
- You should read more about the Enterprise edition of our product.
144
-
145
- = Do you offer a solution that I could host myself? =
146
-
147
- Yes, we do. Please read more about the Enterprise edition of our product.
148
-
149
- = What are the benefits of having your Enterprise version? =
150
-
151
- With Enterprise version of our software you get full control over the application. You can deploy the software on the dedicated server and integrate the service with other systems in your company. Secure and control you data (chat history, activity reports, etc.) according to your policy.
152
-
153
- = What are the server requirements for Enterprise version? =
154
-
155
- The required server configuration includes just a dedicated computer with Pentium IV 3GHz processor and 2GB RAM. More specific system requirements are listed here.
156
-
157
- = How long does it take and how is the Enterprise version implemented? =
158
-
159
- Enterprise version requires remote installation and setup of our software on customer’s hardware. Regular implementations take up to one day – including preparing proper environment, actual implementation and tests.
160
-
161
- = What technology is your software developed in? =
162
-
163
- Web communicator is a JavaScript application. Server side software is developed in native C++. Agent application is developed in Visual C++. Read more about the technology here.
164
-
165
- = Where can we find references from your clients? =
166
-
167
- Please visit our Customers section for case studies and recommendation letters from our customers.
168
-
169
- = What uptime can you guarantee with your hosted solution? =
170
-
171
- Our uptime is 99,9% guaranteed. We offer the service since 2002.
172
-
173
- = What payment options do I have? Do you accept checks? =
174
-
175
- We accept credit cards and Paypal payments.
176
-
177
- = We already have a live chat service at our website but we are looking for a cheaper solution. Can you offer us competitive prices? =
178
-
179
- Of course we can always work on a better deal. Just click on the live chat button on the top of the page and let our agents know about your needs.
180
-
181
- = How to put live chat button on my website? =
182
-
183
- If you are logged in the application, click on the Control Panel button. Go to Settings -> Chat button. Copy the button code and paste it into the source code of your website.
184
-
185
- = Do I have to put both monitoring code and button code on my website? =
186
-
187
- In most of the cases – yes, you should. Monitoring code is responsible for real-time traffic monitoring visible in the application. Chat button code allows customers to ask for help anytime they want.
188
-
189
- = How to change my picture? =
190
-
191
- Click on the application logo in top left corner of the screen and select Edit Your Profile.
192
-
193
- = How to change live chat button? =
194
-
195
- Go to Control Panel and Settings > Chat button section. There you can upload your own button image or select one from the buttons gallery.
196
-
197
- = What is my password? =
198
-
199
- We do not know your password, because we do not keep it. If you forgot your password, you can ask for a password reminder in the Control panel.
200
-
201
- = What is the desktop sharing add-on? =
202
-
203
- This feature allows agents to take over the customer desktop or to present their desktop to the customer.
204
-
205
- = What is the Skype add-on? =
206
-
207
- This add-on allows agents to use Skype account to call back the customers in the CallBack mode.
208
-
209
  == Screenshots ==
210
 
211
- 1. Website integration: Put the chat button and monitoring code to successfully integrate live chat with your website. Let your sales force get in touch with your customers and identify their needs.
212
- 2. Chat window: A direct chat with an agent using the web communicator.
213
- 3. Agent window
214
- 4. Website monitoring: Track your visitors in real time and see what pages they are watching now. Invite them to chat in response to your marketing campaigns and initiatives.
215
- 5. Dashboard: Be up-to-date with your company activity. Dashboard gives you many information presented in concise and pleasant way.
216
- 6. One of the chat buttons available in our buttons gallery
217
- 7. One of the chat invitations available in our invitations gallery
218
- 8. One of the personal invitations available in our invitations gallery
219
 
220
  == Changelog ==
221
 
 
 
 
 
 
222
  = 2.1.8 =
223
  * Updated desktop application download link
224
 
1
+ === LiveChat ===
2
+ Contributors: LiveChat
3
+ Tags: live support, live chat, live chat software, online support, ecommerce, increase sales, customer help, customer support, livechat, live support, customer service, plugin, chat
4
+ Stable tag: 3.0.0
5
+ Requires at least: 2.8
6
+ Tested up to: 3.1.3
7
 
8
  This plugin integrates your Wordpress with LiveChat - an application for online customer service and support.
9
 
11
 
12
  LiveChat is a fast and intuitive live chat software to enable your sales representatives contact customers on the website. Help online visitors find what they need before they leave your site.
13
 
14
+ Try LiveChat free for 14 days! Sign up here: https://www.livechatinc.com/signup/
15
 
16
+ Take a tour to see why you need LiveChat on your website: http://www.livechatinc.com/tour/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  == Installation ==
19
 
20
  1. Upload `wp-live-chat-software-for-wordpress` directory to Wordpress plugins directory (`/wp-content/plugins/`)
21
  2. Activate the plugin through the 'Plugins' menu in WordPress
22
+ 3. Click the 'LiveChat' menu on the left.
23
  4. Follow the instructions.
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  == Screenshots ==
26
 
27
+ 1. Chat window: A chat with a LiveChat operator.
 
 
 
 
 
 
 
28
 
29
  == Changelog ==
30
 
31
+ = 3.0.0 =
32
+ * Rewritten whole plugin code
33
+ * Fixed creating licenses
34
+ * Improved look and feel
35
+
36
  = 2.1.8 =
37
  * Updated desktop application download link
38
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
screenshot-8.png DELETED
Binary file