Version Description
- Fixed
Skill
parameter - Updated monitoring and chat button codes (for improved performance)
- Updated skills tutorial link
Download this release
Release Info
Developer | livechat |
Plugin | LiveChat – WP live chat plugin for WordPress |
Version | 2.1.7 |
Comparing to | |
See all releases |
Code changes from version 2.1.6 to 2.1.7
- livechat.php +198 -198
- plugin_files/chat_button.php +56 -56
- plugin_files/monitoring_code.php +22 -17
- plugin_files/settings.php +212 -212
- readme.txt +8 -1
livechat.php
CHANGED
@@ -1,198 +1,198 @@
|
|
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.
|
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+)
|
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 ('
|
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: 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.7
|
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');
|
plugin_files/chat_button.php
CHANGED
@@ -1,56 +1,56 @@
|
|
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 |
-
<!--
|
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; ?>&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; ?>'+'&lang=<?php echo $lang; ?>&dc='+escape(document.cookie+';l='+document.location+';r='+document.referer+';s='+typeof lc_session),'
|
11 |
-
<!--
|
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&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; ?>&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; ?>'+'&lang=<?php echo $lang; ?>&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 |
-
|
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; ?>&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; ?>'+'&lang=<?php echo $lang; ?>&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&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; ?>&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; ?>'+'&lang=<?php echo $lang; ?>&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/monitoring_code.php
CHANGED
@@ -1,18 +1,23 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function _livechat_monitoring_code($license_number, $lang, $groups, $params)
|
4 |
-
{
|
5 |
-
if (LIVECHAT_LICENSE_INSTALLED == false) return;
|
6 |
-
?>
|
7 |
-
|
8 |
-
<!--
|
9 |
-
<script type="text/javascript">
|
10 |
-
|
11 |
-
var
|
12 |
-
|
13 |
-
document.
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
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 == '') ? '' : '¶ms='+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
CHANGED
@@ -1,213 +1,213 @@
|
|
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/download/LiveChat/LiveChat.exe">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/download/LiveChat/LiveChat.exe" 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/
|
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 |
}
|
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/download/LiveChat/LiveChat.exe">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/download/LiveChat/LiveChat.exe" 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
@@ -2,7 +2,7 @@
|
|
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:
|
6 |
|
7 |
This plugin integrates your Wordpress with LiveChat - an application for online customer service and support.
|
8 |
|
@@ -10,6 +10,8 @@ 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 |
* Increase sales conversion rate and customer satisfaction level.
|
14 |
* Allow customers to chat live with the sales person.
|
15 |
* Increase number of successful transactions.
|
@@ -217,6 +219,11 @@ This add-on allows agents to use Skype account to call back the customers in the
|
|
217 |
|
218 |
== Changelog ==
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
= 2.1.6 =
|
221 |
* Added LiveChat icon in menu bar
|
222 |
|
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.0
|
6 |
|
7 |
This plugin integrates your Wordpress with LiveChat - an application for online customer service and support.
|
8 |
|
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.
|
219 |
|
220 |
== Changelog ==
|
221 |
|
222 |
+
= 2.1.7 =
|
223 |
+
* Fixed `Skill` parameter
|
224 |
+
* Updated monitoring and chat button codes (for improved performance)
|
225 |
+
* Updated skills tutorial link
|
226 |
+
|
227 |
= 2.1.6 =
|
228 |
* Added LiveChat icon in menu bar
|
229 |
|