WP Live Chat Support - Version 4.2.0

Version Description

2014-11-20 - Medium priority = * Chat UI Improvements * Small bug fixes

Download this release

Release Info

Developer WP-LiveChat
Plugin Icon 128x128 WP Live Chat Support
Version 4.2.0
Comparing to
See all releases

Code changes from version 4.1.10 to 4.2.0

css/chat-style.css ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #admin_chat_box {
2
+ display:block;
3
+ overflow:auto;
4
+ clear:both;
5
+ padding:20px;
6
+ -webkit-border-radius: 5px;
7
+ -moz-border-radius: 5px;
8
+ border-radius: 5px;
9
+ border: 1px solid #ccc;
10
+ background-color:#fff;
11
+ width:85%;
12
+ min-width:675px;
13
+
14
+
15
+
16
+ }
17
+ .admin_chat_box {
18
+ -webkit-border-radius: 5px;
19
+ -moz-border-radius: 5px;
20
+ border-radius: 5px;
21
+ border: 1px solid #ccc;
22
+ float:left;
23
+ display:block;
24
+ background-color:white;
25
+ width: 50%;
26
+ min-width:300px;
27
+ height:300px;
28
+ background-color: #ffffff;
29
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#FFF));
30
+ background-image: -webkit-linear-gradient(top, #CCC, #FFF);
31
+ background-image: -moz-linear-gradient(top, #CCC, #FFF);
32
+ background-image: -o-linear-gradient(top, #CCC, #FFF);
33
+ background-image: linear-gradient(to bottom, #CCC, #FFF);
34
+ }
35
+ .chat_response_box {
36
+
37
+ }
38
+ .admin_chat_box_inner {
39
+ height:210px;
40
+ padding:10px;
41
+ overflow:scroll;
42
+ overflow-x: hidden;
43
+ background-color:#FFF;
44
+
45
+
46
+ }
47
+
48
+ .admin_chat_box_inner_bottom {
49
+ height:60px;
50
+ width:100%;
51
+ border-top:1px solid #ccc;
52
+
53
+
54
+
55
+
56
+ }
57
+ .admin_chat_quick_controls {
58
+ clear:left;
59
+ padding-left:10px;
60
+
61
+ }
62
+
63
+ .admin_visitor_info {
64
+ float:left;
65
+ width: 47%;
66
+ padding-left:15px;
67
+ min-width:250px;
68
+
69
+
70
+ }
71
+ #wplc_admin_chatmsg {
72
+ width:95%;
73
+ margin:0 auto;
74
+ margin-top:10px;
75
+ display:block;
76
+ height:50px;
77
+ padding:10px;
78
+ -webkit-border-radius: 5px;
79
+ -moz-border-radius: 5px;
80
+ border-radius: 5px;
81
+ border: 1px solid #ccc;
82
+ }
83
+
84
+ .admin_chat_img {
85
+ -webkit-border-radius: 5px;
86
+ -moz-border-radius: 5px;
87
+ border-radius: 5px;
88
+ }
89
+
90
+
91
+ .wplc-admin-message {
92
+
93
+ padding:10px;
94
+ -webkit-border-radius: 2px;
95
+ -moz-border-radius: 2px;
96
+ border-radius: 2px;
97
+ border: 1px solid #ccc;
98
+ margin-top:2px;
99
+ background-color:#EEE;
100
+ display: inline-block;
101
+ float: left;
102
+ clear:both;
103
+ margin-bottom: 3px;
104
+
105
+
106
+ }
107
+
108
+ .wplc-user-message {
109
+
110
+ padding:10px;
111
+ -webkit-border-radius: 2px;
112
+ -moz-border-radius: 2px;
113
+ border-radius: 2px;
114
+ border: 1px solid #ffdb99;
115
+ margin-top:2px;
116
+ background-color:#fff6ef;
117
+ color:#000;
118
+ display: inline-block;
119
+ float: right;
120
+ clear:both;
121
+ margin-bottom: 3px;
122
+
123
+ }
124
+
125
+ .chat_time {
126
+ display:block;
127
+ width:100%;
128
+ text-align:center;
129
+ font-size:0.8em;
130
+ color:#ccc;
131
+ clear:both;
132
+
133
+ }
134
+ .admin_visitor_advanced_info {
135
+ clear:both;
136
+ font-size:0.9em;
137
+ margin-top:20px;
138
+
139
+ }
140
+ .admin_visitor_advanced_info .part1 {
141
+ color:#3b3b3b;
142
+ }
143
+ .admin_visitor_advanced_info .part2 {
144
+ color:#949494;
145
+ }
146
+ .admin_chat_name { font-size:1.3em; display:block; clear:right; font-weight:bold; margin-bottom:5px; }
147
+ .admin_chat_email { font-size:1em; display:block; clear:right; }
148
+
149
+
150
+ .end_chat_div {
151
+ display:block;
152
+ clear:both;
153
+ text-align:right;
154
+ font-size:10px;
155
+ width:85%;
156
+ margin-left: 40px;
157
+ margin-bottom:20px;
158
+ }
css/wplcstyle.css CHANGED
@@ -64,7 +64,7 @@
64
  box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
65
  border-radius: 5px 5px 0 0 ;
66
  color:#999;
67
- max-width: 250px;
68
  max-height: 400px;
69
  z-index: 9999;
70
  }
@@ -147,16 +147,23 @@
147
  }
148
  #wp-live-chat-image{
149
  position: absolute;
150
- padding: 5px;
151
  width: 40px;
 
152
  max-height: 40px;
153
  background: #fff;
 
 
154
  border-radius: 3px;
155
  top: -35px;
156
- left: 10px;
157
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
158
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
159
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
 
 
 
 
 
160
  }
161
  #wp-live-chat-2 {
162
  padding:5px;
@@ -173,34 +180,11 @@
173
  filter:none;
174
  text-shadow: none;
175
  }
176
- .wplc-user-message{
177
- display: inline-block;
178
- padding: 5px;
179
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
180
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
181
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
182
- border-radius: 5px;
183
- float: right;
184
- margin-bottom: 5px;
185
- }
186
- .wplc-user-message hr , .wplc-admin-message hr{
187
- margin:0;
188
- height: 1px;
189
- }
190
  .wplc-clear-float-message{
191
  clear: both;
192
  }
193
 
194
- .wplc-admin-message{
195
- display: inline-block;
196
- padding: 5px;
197
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
198
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
199
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
200
- border-radius: 5px;
201
- float: left;
202
- margin-bottom: 5px;
203
- }
204
  #wplc_message_div{
205
  text-align: center;
206
  }
@@ -302,4 +286,51 @@
302
  left: initial;
303
  right: 38px;
304
  top: initial;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  }
64
  box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
65
  border-radius: 5px 5px 0 0 ;
66
  color:#999;
67
+ max-width: 280px;
68
  max-height: 400px;
69
  z-index: 9999;
70
  }
147
  }
148
  #wp-live-chat-image{
149
  position: absolute;
 
150
  width: 40px;
151
+ padding:4px;
152
  max-height: 40px;
153
  background: #fff;
154
+ -webkit-border-radius: 3px;
155
+ -moz-border-radius: 3px;
156
  border-radius: 3px;
157
  top: -35px;
158
+ left: 20px;
159
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
160
+ -moz-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
161
+ box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
162
+ }
163
+ #wp-live-chat-image img {
164
+ -webkit-border-radius: 3px;
165
+ -moz-border-radius: 3px;
166
+ border-radius: 3px;
167
  }
168
  #wp-live-chat-2 {
169
  padding:5px;
180
  filter:none;
181
  text-shadow: none;
182
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  .wplc-clear-float-message{
184
  clear: both;
185
  }
186
 
187
+
 
 
 
 
 
 
 
 
 
188
  #wplc_message_div{
189
  text-align: center;
190
  }
286
  left: initial;
287
  right: 38px;
288
  top: initial;
289
+ }
290
+
291
+
292
+
293
+
294
+ .wplc-admin-message {
295
+
296
+ padding:10px;
297
+ -webkit-border-radius: 2px;
298
+ -moz-border-radius: 2px;
299
+ border-radius: 2px;
300
+ border: 1px solid #ccc;
301
+ margin-top:2px;
302
+ background-color:#EEE;
303
+ display: inline-block;
304
+ float: left;
305
+ clear:both;
306
+ margin-bottom: 3px;
307
+
308
+
309
+ }
310
+
311
+ .wplc-user-message {
312
+
313
+ padding:10px;
314
+ -webkit-border-radius: 2px;
315
+ -moz-border-radius: 2px;
316
+ border-radius: 2px;
317
+ border: 1px solid #ffdb99;
318
+ margin-top:2px;
319
+ background-color:#fff6ef;
320
+ color:#000;
321
+ display: inline-block;
322
+ float: right;
323
+ clear:both;
324
+ margin-bottom: 3px;
325
+
326
+ }
327
+
328
+ .chat_time {
329
+ display:block;
330
+ width:100%;
331
+ text-align:center;
332
+ font-size:0.8em;
333
+ color:#ccc;
334
+ clear:both;
335
+
336
  }
functions.php CHANGED
@@ -253,7 +253,7 @@ function wplc_return_user_chat_messages($cid) {
253
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
254
  }
255
  }
256
- $msg_hist .= "<span class='wplc-admin-message'>$image <strong>$from</strong>:<hr/> $msg</span><br /><div class='wplc-clear-float-message'></div>";
257
 
258
  }
259
 
@@ -292,11 +292,24 @@ function wplc_return_chat_messages($cid) {
292
  "
293
  );
294
  $msg_hist = "";
 
 
295
  foreach ($results as $result) {
296
  $from = $result->from;
297
  $msg = $result->msg;
298
  $timestamp = strtotime($result->timestamp);
299
- $timeshow = date("H:i:s",$timestamp);
 
 
 
 
 
 
 
 
 
 
 
300
  $image = "";
301
  if($result->originates == 1){
302
  $class = "wplc-admin-message";
@@ -313,7 +326,7 @@ function wplc_return_chat_messages($cid) {
313
 
314
 
315
 
316
- $msg_hist .= "<span class='$class'>$image <strong>$from</strong>:<hr/> $msg</span><br /><div class='wplc-clear-float-message'></div>";
317
 
318
  }
319
  return $msg_hist;
@@ -375,7 +388,7 @@ function wplc_return_admin_chat_messages($cid) {
375
  $msg = stripslashes($result->msg);
376
  //$timestamp = strtotime($result->timestamp);
377
  //$timeshow = date("H:i",$timestamp);
378
- $msg_hist .= "<span class='wplc-user-message'><strong>$from</strong>:<hr/> $msg</span><br /><div class='wplc-clear-float-message'></div>";
379
 
380
  }
381
 
253
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
254
  }
255
  }
256
+ $msg_hist .= "<span class='wplc-admin-message'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
257
 
258
  }
259
 
292
  "
293
  );
294
  $msg_hist = "";
295
+ $previous_time = "";
296
+ $previous_timestamp = 0;
297
  foreach ($results as $result) {
298
  $from = $result->from;
299
  $msg = $result->msg;
300
  $timestamp = strtotime($result->timestamp);
301
+
302
+ $time_diff = $timestamp - $previous_timestamp;
303
+ if ($time_diff > 60) { $show_time = true; } else { $show_time = false; }
304
+
305
+ $date = new DateTime($timestamp);
306
+ $timeshow = date('l, F d Y h:i A',$timestamp);
307
+
308
+ if ($previous_time == $timeshow || !$show_time) { $timeshow = ""; }
309
+ $previous_time = $timeshow;
310
+ $previous_timestamp = $timestamp;
311
+
312
+
313
  $image = "";
314
  if($result->originates == 1){
315
  $class = "wplc-admin-message";
326
 
327
 
328
 
329
+ $msg_hist .= "<span class='chat_time'>$timeshow</span><span class='$class'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
330
 
331
  }
332
  return $msg_hist;
388
  $msg = stripslashes($result->msg);
389
  //$timestamp = strtotime($result->timestamp);
390
  //$timeshow = date("H:i",$timestamp);
391
+ $msg_hist .= "<span class='wplc-user-message'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
392
 
393
  }
394
 
js/wplc_u.js CHANGED
@@ -457,7 +457,7 @@ jQuery(document).ready(function() {
457
  wplc_name = jQuery.cookie('wplc_name');
458
  }
459
  jQuery("#wplc_chatmsg").val('');
460
- jQuery("#wplc_chatbox").append("<span class='wplc-user-message'><strong>"+wplc_name+"</strong>:<hr/> "+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
461
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
462
  jQuery('#wplc_chatbox').scrollTop(height);
463
 
457
  wplc_name = jQuery.cookie('wplc_name');
458
  }
459
  jQuery("#wplc_chatmsg").val('');
460
+ jQuery("#wplc_chatbox").append("<span class='wplc-user-message'>"+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
461
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
462
  jQuery('#wplc_chatbox').scrollTop(height);
463
 
readme.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  === WP Live Chat Support ===
2
  Contributors: WP-LiveChat
3
  Donate link: http://www.wp-livechat.com
@@ -124,6 +125,10 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.1.4
124
 
125
  == Changelog ==
126
 
 
 
 
 
127
  = 4.1.10 2014-10-29 - Low priority =
128
  * Code Improvements: (Checks for DONOTCACHE)
129
  * New Pro Feature: You can now include or exclude the live chat window on certain pages
1
+
2
  === WP Live Chat Support ===
3
  Contributors: WP-LiveChat
4
  Donate link: http://www.wp-livechat.com
125
 
126
  == Changelog ==
127
 
128
+ = 4.2.0 2014-11-20 - Medium priority =
129
+ * Chat UI Improvements
130
+ * Small bug fixes
131
+
132
  = 4.1.10 2014-10-29 - Low priority =
133
  * Code Improvements: (Checks for DONOTCACHE)
134
  * New Pro Feature: You can now include or exclude the live chat window on certain pages
screenshot-2.jpg CHANGED
Binary file
wp-live-chat-support.php CHANGED
@@ -3,13 +3,17 @@
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
- Version: 4.1.10
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  */
10
 
11
 
12
- /* 4.1.10 2014-10-29 - Low priority
 
 
 
 
13
  * Code Improvements: (Checks for DONOTCACHE)
14
  * New Pro Feature: You can now include or exclude the chat window on certain pages
15
  *
@@ -76,7 +80,7 @@ global $wplc_tblname_chats;
76
  global $wplc_tblname_msgs;
77
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
78
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
79
- $wplc_version = "4.1.10";
80
 
81
  define('WPLC_BASIC_PLUGIN_DIR',dirname(__FILE__));
82
  define('WPLC_BASIC_PLUGIN_URL',plugins_url()."/wp-live-chat-support/");
@@ -557,7 +561,7 @@ function wplc_admin_javascript() {
557
  } else {
558
  event.returnValue = false;
559
  }
560
- window.open(jQuery(this).attr("href"), jQuery(this).attr("window-title" ), "width=600,height=600,scrollbars=yes", false);
561
  }
562
  });
563
 
@@ -662,33 +666,12 @@ function wplc_draw_chat_area($cid) {
662
  "
663
  );?>
664
  <style>
665
- .wplc-user-message{
666
- display: inline-block;
667
- padding: 5px;
668
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
669
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
670
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
671
- border-radius: 5px;
672
- float: left;
673
- margin-bottom: 5px;
674
- }
675
- .wplc-user-message hr , .wplc-admin-message hr{
676
- margin:0;
677
- }
678
  .wplc-clear-float-message{
679
  clear: both;
680
  }
681
 
682
- .wplc-admin-message{
683
- display: inline-block;
684
- padding: 5px;
685
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
686
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
687
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
688
- border-radius: 5px;
689
- float: right;
690
- margin-bottom: 5px;
691
- }
692
  </style>
693
  <?php
694
 
@@ -703,44 +686,59 @@ function wplc_draw_chat_area($cid) {
703
 
704
  echo "<h2>$status Chat with ".$result->name."</h2>";
705
  echo "<style>#adminmenuwrap { display:none; } #adminmenuback { display:none; } #wpadminbar { display:none; } #wpfooter { display:none; } .update-nag { display:none; }</style>";
706
- echo "<div style='display:block;'>";
707
- echo "<div style='float:left; width:100px;'><img src=\"http://www.gravatar.com/avatar/".md5($result->email)."\" /></div>";
708
- echo "<div id=\"wplc_sound_update\"></div>";
709
- echo "<div style='float:left; width:350px;'>";
710
- echo "<table>";
711
- echo "<tr><td><i class=\"fa fa-envelope\"> </i></td><td><a href='mailto:".$result->email."' title='".$result->email."'>".$result->email."</a></td></tr>";
712
- echo "<tr><td valign='top'><i class=\"fa fa-user\"> </i></td><td>";
713
- echo "<img src='".$wplc_basic_plugin_url."/images/$browser_image' alt='$browser' title='$browser' /> ";
714
- echo "<a href='http://www.ip-adress.com/ip_tracer/".$user_ip."' title='Whois for ".$user_ip."'>".$user_ip."</a>";
715
- echo "</td></tr>";
716
- echo "<tr><td><i class=\"fa fa-link\"> </i></td><td>".$result->url. " (<a href='".$result->url."' target='_BLANK'>open</a>)"."</td></tr>";
717
- echo "<tr><td><i class=\"fa fa-clock-o\"> </i></td><td>".$result->timestamp."</td></tr>";
718
- echo "</table><br />";
719
- echo "</div>";
 
 
 
 
 
 
720
  echo "</div>";
721
 
722
- echo "
723
- <div style=\"display:block; clear:both; width:99%; text-align:right; font-size:10px;\"><a href=\"javascript:void(0);\" class=\"wplc_admin_close_chat button\" id=\"wplc_admin_close_chat\">".__("End chat","wplivechat")."</a></div>
724
- <div id='admin_chat_box'>
725
- <div id='admin_chat_box_area_".$result->id."' style='height:200px; width:95%; border:1px solid #ccc; overflow:auto; background-color:#FFF; padding:2%;'>".wplc_return_chat_messages($cid)."</div>
726
- <p>
727
- ";
 
 
 
 
728
  if ($result->status != 1) {
729
- echo "
730
- <p style=\"text-align:left; font-size:11px;\">Press ENTER to send your message</p>
731
- <input type='text' name='wplc_admin_chatmsg' id='wplc_admin_chatmsg' value='' style=\"border:1px solid #666; width:98%;\" />
732
- <input id='wplc_admin_cid' type='hidden' value='".$_GET['cid']."' />
733
- <input id='wplc_admin_send_msg' type='button' value='".__("Send","wplivechat")."' style=\"display:none;\" />
734
- </p>
735
- ".__("Assign Quick Response","wplivechat")." <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>".__('Select','wplivechat')."</option></select> <a href='http://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=quick_resposnes' title='".__('Add Quick Responses to your Live Chat','wplivechat')."' target='_BLANK'>".__("Pro version only","wplivechat")."</a>
736
-
737
- </div>
738
- ";
739
  //echo wplc_return_admin_chat_javascript($_GET['cid']);
740
  }
741
 
742
  }
743
  }
 
 
 
 
 
 
 
 
 
744
 
745
  function wplc_return_admin_chat_javascript($cid) {
746
  $ajax_nonce = wp_create_nonce("wplc");
@@ -929,7 +927,7 @@ function wplc_return_admin_chat_javascript($cid) {
929
  jQuery("#wplc_admin_chatmsg").val('');
930
 
931
 
932
- jQuery("#admin_chat_box_area_"+wplc_cid).append("<span class='wplc-admin-message'>"+wplc_image+" <strong>"+wplc_name+"</strong>:<hr/>"+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
933
  var height = jQuery('#admin_chat_box_area_'+wplc_cid)[0].scrollHeight;
934
  jQuery('#admin_chat_box_area_'+wplc_cid).scrollTop(height);
935
 
@@ -1041,9 +1039,12 @@ function wplc_add_admin_stylesheet() {
1041
  if (isset($_GET['page']) && ($_GET['page'] == 'wplivechat-menu' || $_GET['page'] == 'wplivechat-menu-settings')) {
1042
  wp_register_style( 'wplc-admin-style', 'http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css' );
1043
  wp_enqueue_style( 'wplc-admin-style' );
 
 
1044
  wp_register_style( 'wplc-font-awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
1045
  wp_enqueue_style( 'wplc-font-awesome' );
1046
  }
 
1047
  }
1048
 
1049
  if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu-settings') {
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
+ Version: 4.2.0
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  */
10
 
11
 
12
+ /* 4.2.0 2014-11-20 - Medium priority
13
+ * Chat UI Improvements
14
+ * Small bug fixes
15
+ *
16
+ * 4.1.10 2014-10-29 - Low priority
17
  * Code Improvements: (Checks for DONOTCACHE)
18
  * New Pro Feature: You can now include or exclude the chat window on certain pages
19
  *
80
  global $wplc_tblname_msgs;
81
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
82
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
83
+ $wplc_version = "4.2.0";
84
 
85
  define('WPLC_BASIC_PLUGIN_DIR',dirname(__FILE__));
86
  define('WPLC_BASIC_PLUGIN_URL',plugins_url()."/wp-live-chat-support/");
561
  } else {
562
  event.returnValue = false;
563
  }
564
+ window.open(jQuery(this).attr("href"), jQuery(this).attr("window-title" ), "width=800,height=600,scrollbars=yes", false);
565
  }
566
  });
567
 
666
  "
667
  );?>
668
  <style>
669
+
 
 
 
 
 
 
 
 
 
 
 
 
670
  .wplc-clear-float-message{
671
  clear: both;
672
  }
673
 
674
+
 
 
 
 
 
 
 
 
 
675
  </style>
676
  <?php
677
 
686
 
687
  echo "<h2>$status Chat with ".$result->name."</h2>";
688
  echo "<style>#adminmenuwrap { display:none; } #adminmenuback { display:none; } #wpadminbar { display:none; } #wpfooter { display:none; } .update-nag { display:none; }</style>";
689
+
690
+ echo "<div class=\"end_chat_div\"><a href=\"javascript:void(0);\" class=\"wplc_admin_close_chat button\" id=\"wplc_admin_close_chat\">".__("End chat","wplivechat")."</a></div>";
691
+
692
+ echo "<div id='admin_chat_box'>";
693
+
694
+ echo"<div class='admin_chat_box'><div class='admin_chat_box_inner' id='admin_chat_box_area_".$result->id."'>".wplc_return_chat_messages($cid)."</div><div class='admin_chat_box_inner_bottom'>".wplc_return_chat_response_box($cid)."</div></div>";
695
+ echo "<div class='admin_visitor_info'>";
696
+ echo " <div style='float:left; width:100px;'><img src=\"http://www.gravatar.com/avatar/".md5($result->email)."\" class=\"admin_chat_img\" /></div>";
697
+ echo " <div style='float:left;'>";
698
+
699
+ echo " <div class='admin_visitor_info_box1'>";
700
+ echo " <span class='admin_chat_name'>".$result->name."</span>";
701
+ echo " <span class='admin_chat_email'>".$result->email."</span>";
702
+ echo " </div>";
703
+ echo " </div>";
704
+
705
+ echo "<div class='admin_visitor_advanced_info'>";
706
+ echo " <strong>".__("Site Info","wplivechat")."</strong>";
707
+ echo " <hr />";
708
+ echo " <span class='part1'>".__("Chat initiated on:","wplivechat")."</span> <span class='part2'>".$result->url. "</span>";
709
  echo "</div>";
710
 
711
+ echo "<div class='admin_visitor_advanced_info'>";
712
+ echo " <strong>".__("Advanced Info","wplivechat")."</strong>";
713
+ echo " <hr />";
714
+ echo " <span class='part1'>".__("Browser:","wplivechat")."</span><span class='part2'> $browser <img src='".$wplc_basic_plugin_url."/images/$browser_image' alt='$browser' title='$browser' /><br />";
715
+ echo " <span class='part1'>".__("IP Address:","wplivechat")."</span><span class='part2'> <a href='http://www.ip-adress.com/ip_tracer/".$user_ip."' title='Whois for ".$user_ip."'>".$user_ip."</a>";
716
+ echo "</div>";
717
+
718
+ echo " <div id=\"wplc_sound_update\"></div>";
719
+ echo "</div>";
720
+
721
  if ($result->status != 1) {
722
+ echo "<div class='admin_chat_quick_controls'>";
723
+ echo " <p style=\"text-align:left; font-size:11px;\">Press ENTER to send your message</p>";
724
+ echo " ".__("Assign Quick Response","wplivechat")." <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>".__('Select','wplivechat')."</option></select> <a href='http://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=quick_resposnes' title='".__('Add Quick Responses to your Live Chat','wplivechat')."' target='_BLANK'>".__("Pro version only","wplivechat")."</a>";
725
+ echo " </div>";
726
+ echo "</div>";
727
+
 
 
 
 
728
  //echo wplc_return_admin_chat_javascript($_GET['cid']);
729
  }
730
 
731
  }
732
  }
733
+ function wplc_return_chat_response_box($cid) {
734
+ $ret = "<div class=\"chat_response_box\">";
735
+ $ret .= "<input type='text' name='wplc_admin_chatmsg' id='wplc_admin_chatmsg' value='' placeholder='".__("type here...","wplivechat")."' />";
736
+ $ret .= "<input id='wplc_admin_cid' type='hidden' value='$cid' />";
737
+ $ret .= "<input id='wplc_admin_send_msg' type='button' value='".__("Send","wplivechat")."' style=\"display:none;\" />";
738
+ $ret .= "</div>";
739
+ return $ret;
740
+
741
+ }
742
 
743
  function wplc_return_admin_chat_javascript($cid) {
744
  $ajax_nonce = wp_create_nonce("wplc");
927
  jQuery("#wplc_admin_chatmsg").val('');
928
 
929
 
930
+ jQuery("#admin_chat_box_area_"+wplc_cid).append("<span class='wplc-admin-message'>"+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
931
  var height = jQuery('#admin_chat_box_area_'+wplc_cid)[0].scrollHeight;
932
  jQuery('#admin_chat_box_area_'+wplc_cid).scrollTop(height);
933
 
1039
  if (isset($_GET['page']) && ($_GET['page'] == 'wplivechat-menu' || $_GET['page'] == 'wplivechat-menu-settings')) {
1040
  wp_register_style( 'wplc-admin-style', 'http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css' );
1041
  wp_enqueue_style( 'wplc-admin-style' );
1042
+ wp_register_style( 'wplc-chat-style', plugins_url('/css/chat-style.css', __FILE__) );
1043
+ wp_enqueue_style( 'wplc-chat-style' );
1044
  wp_register_style( 'wplc-font-awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
1045
  wp_enqueue_style( 'wplc-font-awesome' );
1046
  }
1047
+
1048
  }
1049
 
1050
  if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu-settings') {