Zendesk Chat - Version 1.0.3

Version Description

  • Maintenance update: New line bugfixes.
Download this release

Release Info

Developer bencxr
Plugin Icon 128x128 Zendesk Chat
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

Files changed (2) hide show
  1. readme.txt +4 -1
  2. zopim.php +10 -2
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: bencxr
3
Tags: widget, plugin, sidebar, page, admin, enhancement, livechat, chat, widget
4
Requires at least: 2.7
5
Tested up to: 2.9.2
6
- Stable tag: 1.0.2
7
8
Visitors can chat with you directly by clicking on the Zopim Chat Bar.
9
@@ -30,6 +30,9 @@ Great for improving interaction with your users and increasing the time they spe
30
31
== Changelog ==
32
33
= 1.0.2 =
34
* Maintenance update: More curl robustness enhancements.
35
3
Tags: widget, plugin, sidebar, page, admin, enhancement, livechat, chat, widget
4
Requires at least: 2.7
5
Tested up to: 2.9.2
6
+ Stable tag: 1.0.3
7
8
Visitors can chat with you directly by clicking on the Zopim Chat Bar.
9
30
31
== Changelog ==
32
33
+ = 1.0.3 =
34
+ * Maintenance update: New line bugfixes.
35
+
36
= 1.0.2 =
37
* Maintenance update: More curl robustness enhancements.
38
zopim.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Zopim Widget
5
Plugin URI: http://www.zopim.org
6
Description: Zopim embeds a chatbar on your website, so that any visitor can chat with you directly by clicking on the chatbar.
7
Author: Isidore
8
- Version: 1.0.2
9
Author URI: http://www.isidorechan.com/
10
*/
11
@@ -95,6 +95,11 @@ document.write(unescape(\"%3Cscript src='\" + document.location.protocol + \"//"
95
}
96
if (get_option('zopimGreetings') != "") {
97
$greetings = json_to_array(get_option('zopimGreetings'));
98
echo "\n\$zopim.livechat.setGreetings({
99
'online': ['".addslashes($greetings->online->bar)."', '".addslashes($greetings->online->window)."'],
100
'offline': ['".addslashes($greetings->offline->bar)."', '".addslashes($greetings->offline->window)."'],
@@ -203,13 +208,16 @@ function do_post_request($url, $_data, $optional_headers = null)
203
$url = str_replace("https", "http", $url);
204
}
205
206
- $data = array();
207
while(list($n,$v) = each($_data)){
208
$data[] = urlencode($n)."=".urlencode($v);
209
}
210
211
$data = implode('&', $data);
212
$ch = curl_init();
213
curl_setopt($ch, CURLOPT_URL, $url);
214
curl_setopt($ch, CURLOPT_POST, true);
215
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
5
Plugin URI: http://www.zopim.org
6
Description: Zopim embeds a chatbar on your website, so that any visitor can chat with you directly by clicking on the chatbar.
7
Author: Isidore
8
+ Version: 1.0.3
9
Author URI: http://www.isidorechan.com/
10
*/
11
95
}
96
if (get_option('zopimGreetings') != "") {
97
$greetings = json_to_array(get_option('zopimGreetings'));
98
+ foreach ($greetings as $i => $v) {
99
+ foreach ($v as $j => $k) {
100
+ $greetings->$i->$j = str_replace("\r\n", "\\n", $greetings->$i->$j);
101
+ }
102
+ }
103
echo "\n\$zopim.livechat.setGreetings({
104
'online': ['".addslashes($greetings->online->bar)."', '".addslashes($greetings->online->window)."'],
105
'offline': ['".addslashes($greetings->offline->bar)."', '".addslashes($greetings->offline->window)."'],
208
$url = str_replace("https", "http", $url);
209
}
210
211
+ $data = array();
212
+
213
while(list($n,$v) = each($_data)){
214
$data[] = urlencode($n)."=".urlencode($v);
215
}
216
217
$data = implode('&', $data);
218
+
219
$ch = curl_init();
220
+
221
curl_setopt($ch, CURLOPT_URL, $url);
222
curl_setopt($ch, CURLOPT_POST, true);
223
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);