WP Live Chat Support - Version 6.1.00

Version Description

  • 2016-03-18 - Medium priority =
  • Fixed a bug that caused the chat agent to be nullified if you saved the settings
  • NEW: Introduced a new modern theme
  • Fixed the bug that caused the chat box to not open again if you minimized it while in chat
  • Fixed a style bug on the admin chat box
  • Performance improvements for the basic version - there are no longer regular longpoll requests when using the basic version. Long polling only starts once a chat has been started
  • Fixed a styling bug in the settings page
  • Longpoll requests no longer run when you're offline - this will introduce significant performance imporvements
  • We have removed the "X" on the chat box and it will now only show up when there is an active chat on the user's side. This avoids the confusion when the user presses "X" and the chat hides for 24 hours.
  • Images of the chat agent and user now show up correctly in the chat box
  • Fixed a bug that added slashes to apostrophes in the chat window
  • Fixed a bug that caused an error when trying to load the chat box when a banned user visited the site
  • Fixed a bug that still displayed the offline message window even if the setting was set to false
Download this release

Release Info

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

Code changes from version 6.0.07 to 6.1.00

ajax_new.php CHANGED
@@ -142,6 +142,7 @@ function wplc_init_ajax_callback() {
142
  if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
143
  $i = 1;
144
  $array = array("check" => false);
 
145
 
146
  while($i <= $iterations){
147
  if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){
@@ -197,7 +198,19 @@ function wplc_init_ajax_callback() {
197
  }
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
200
  } else { // statuses do not match
 
201
  $array['status'] = $new_status;
202
  if($new_status == 1){ // completed
203
  wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 8, sanitize_text_field($_POST['wplcsession']));
@@ -240,6 +253,17 @@ function wplc_init_ajax_callback() {
240
  }
241
  }
242
  }
 
 
 
 
 
 
 
 
 
 
 
243
  $array = apply_filters("wplc_filter_wplc_call_to_server_visitor_new_status_check",$array);
244
 
245
  }
142
  if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
143
  $i = 1;
144
  $array = array("check" => false);
145
+ $array['debug'] = "";
146
 
147
  while($i <= $iterations){
148
  if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){
198
  }
199
  }
200
 
201
+ /* check if this is part of the first run */
202
+ if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == 1) {
203
+ /* if yes, then send data now and dont wait for all iterations to complete */
204
+ if (!isset($array['status'])) { $array['status'] = $new_status; }
205
+ $array['check'] = true;
206
+ }
207
+ else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
208
+ /* if yes, then send data now and dont wait for all iterations to complete */
209
+ if (!isset($array['status'])) { $array['status'] = $new_status; }
210
+ $array['check'] = true;
211
+ }
212
  } else { // statuses do not match
213
+ $array['debug'] = $array['debug']. " ". "Doesnt match $new_status ".$_POST['status'];
214
  $array['status'] = $new_status;
215
  if($new_status == 1){ // completed
216
  wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 8, sanitize_text_field($_POST['wplcsession']));
253
  }
254
  }
255
  }
256
+ /* check if this is part of the first run */
257
+ if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == "1") {
258
+ /* if yes, then send data now and dont wait for all iterations to complete */
259
+ if (!isset($array['status'])) { $array['status'] = $new_status; }
260
+ $array['check'] = true;
261
+ }
262
+ else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
263
+ /* if yes, then send data now and dont wait for all iterations to complete */
264
+ if (!isset($array['status'])) { $array['status'] = $new_status; }
265
+ $array['check'] = true;
266
+ }
267
  $array = apply_filters("wplc_filter_wplc_call_to_server_visitor_new_status_check",$array);
268
 
269
  }
css/admin-chat-box-style.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ #wpcontent {
2
+ margin-left:10px;
3
+ }
css/chat-style.css CHANGED
@@ -1,3 +1,4 @@
 
1
  #admin_chat_box {
2
  display:block;
3
  overflow:auto;
@@ -117,6 +118,8 @@
117
  float: left;
118
  clear:both;
119
  margin-bottom: 3px;
 
 
120
 
121
 
122
  }
@@ -135,6 +138,9 @@
135
  float: right;
136
  clear:both;
137
  margin-bottom: 3px;
 
 
 
138
 
139
  }
140
  .wplc-user-message hr, .wplc-admin-message hr{
@@ -154,7 +160,7 @@
154
  .wplc-extension {
155
 
156
  float: left;
157
- margin: 0 15px 15px 0;
158
  background: #fff;
159
  border: 1px solid #ccc;
160
  width: 320px;
@@ -168,10 +174,7 @@
168
  font-size: 13px;
169
 
170
  }
171
- .wplc-extension .wp-post-image {
172
- width: 100%;
173
- height: auto;
174
- }
175
  .wplc-extension .button-secondary {
176
  position: absolute;
177
  bottom: 14px;
@@ -609,16 +612,131 @@
609
  margin-bottom:2px;
610
  }
611
  .relevant_extension {
612
- width: 30% !important;
613
- height: 105px !important;
614
  opacity:0.5;
615
  }
616
  .relevant_extension:hover {
617
  opacity:1.0;
618
  }
619
 
 
620
  .relevant_extension .button-secondary {
621
  right:10px !important;
622
  left: initial !important;
623
 
624
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  #admin_chat_box {
3
  display:block;
4
  overflow:auto;
118
  float: left;
119
  clear:both;
120
  margin-bottom: 3px;
121
+ word-wrap: break-word;
122
+ max-width:96%;
123
 
124
 
125
  }
138
  float: right;
139
  clear:both;
140
  margin-bottom: 3px;
141
+ word-wrap: break-word;
142
+ max-width:96%;
143
+
144
 
145
  }
146
  .wplc-user-message hr, .wplc-admin-message hr{
160
  .wplc-extension {
161
 
162
  float: left;
163
+ margin: 0 1% 1% 0;
164
  background: #fff;
165
  border: 1px solid #ccc;
166
  width: 320px;
174
  font-size: 13px;
175
 
176
  }
177
+
 
 
 
178
  .wplc-extension .button-secondary {
179
  position: absolute;
180
  bottom: 14px;
612
  margin-bottom:2px;
613
  }
614
  .relevant_extension {
615
+ width: 28% !important;
616
+ height: 125px !important;
617
  opacity:0.5;
618
  }
619
  .relevant_extension:hover {
620
  opacity:1.0;
621
  }
622
 
623
+
624
  .relevant_extension .button-secondary {
625
  right:10px !important;
626
  left: initial !important;
627
 
628
+ }
629
+
630
+
631
+ .relevant_extension img {
632
+ margin-right:10px;
633
+ }
634
+
635
+ @media (min-width:320px) {
636
+ /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
637
+ .relevant_extension {
638
+ width: 85% !important;
639
+ height: 145px !important;
640
+ opacity:0.5;
641
+ }
642
+ .relevant_extension img {
643
+ width:105px;
644
+ }
645
+ .wplc-extension .wp-post-image {
646
+ height: auto;
647
+ }
648
+ }
649
+ @media (min-width:480px) {
650
+ /* smartphones, Android phones, landscape iPhone */
651
+ .relevant_extension {
652
+ width: 94% !important;
653
+ height: 125px !important;
654
+ opacity:0.5;
655
+ }
656
+ .relevant_extension img {
657
+ width:105px;
658
+ }
659
+ .wplc-extension .wp-post-image {
660
+ height: auto;
661
+ }
662
+ }
663
+ @media (min-width:600px) {
664
+ /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
665
+ .relevant_extension {
666
+ width: 94% !important;
667
+ height: 125px !important;
668
+ opacity:0.5;
669
+ }
670
+ .relevant_extension img {
671
+ width:105px;
672
+ }
673
+ .wplc-extension .wp-post-image {
674
+ height: auto;
675
+ }
676
+ }
677
+ @media (min-width:801px) {
678
+ /* tablet, landscape iPad, lo-res laptops ands desktops */
679
+ .relevant_extension {
680
+ width: 43% !important;
681
+ height: 145px !important;
682
+ opacity:0.5;
683
+ }
684
+ .relevant_extension img {
685
+ width:95px;
686
+ }
687
+ .wplc-extension .wp-post-image {
688
+ height: auto;
689
+ }
690
+ }
691
+ @media (min-width:1025px) {
692
+ /* big landscape tablets, laptops, and desktops */
693
+ .relevant_extension {
694
+ width: 44% !important;
695
+ height: 125px !important;
696
+ opacity:0.5;
697
+ }
698
+ .relevant_extension img {
699
+ width:125px;
700
+ }
701
+ .wplc-extension .wp-post-image {
702
+ height: auto;
703
+ }
704
+ }
705
+ @media (min-width:1281px) {
706
+ /* hi-res laptops and desktops */
707
+ .relevant_extension {
708
+ width: 28% !important;
709
+ height: 125px !important;
710
+ opacity:0.5;
711
+ }
712
+ .relevant_extension img {
713
+ width:110px;
714
+ }
715
+ .wplc-extension .wp-post-image {
716
+ height: auto;
717
+ }
718
+ }
719
+
720
+
721
+ .wplc-palette-selection {
722
+ border: 1px solid #CCC;
723
+ border-radius: 5px;
724
+ padding: 5px;
725
+ margin: 5px;
726
+ height:100%;
727
+
728
+ }
729
+
730
+ .wplc_palette_single {
731
+ margin: 5px;
732
+ margin-top: 15px;
733
+ width: 162px;
734
+ height: 122px;
735
+ text-align: center;
736
+ display: inline-block;
737
+ vertical-align: top;
738
+ cursor: pointer;
739
+
740
+ }
741
+ .wplc-palette-top { display:block; width:100%; height:25%; }
742
+
css/themes/classic.css ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wp-live-chat textarea {
2
+ width: 100%;
3
+ height: 100px;
4
+ }
5
+ #wp-live-chat input, #wp-live-chat textarea {
6
+ border: 1px solid rgba(0, 0, 0, 0.1);
7
+ border-radius: 2px;
8
+ color: #2b2b2b;
9
+ padding: 8px 10px 7px;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ height: inherit;
14
+ }
15
+ #wplc_chatbox {
16
+ padding: 5px;
17
+ height: 200px;
18
+ overflow-y: auto;
19
+ overflow-x:hidden;
20
+ -webkit-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
21
+ -moz-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
22
+ box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
23
+ }
24
+
25
+
26
+ #wp-live-chat td {
27
+ padding: 5px;
28
+ padding-left: 10px;
29
+ }
30
+
31
+ #wp-live-chat table {
32
+ border: 0 !important;
33
+ }
34
+
35
+ #wp-live-chat table td {
36
+ border: 0 !important;
37
+ }
38
+
39
+ #wp-live-chat h4 {
40
+ font-size: 20px;
41
+ margin: 3px;
42
+ }
43
+
44
+ #wp-live-chat p {
45
+ font-size: 14px;
46
+ margin: 3px;
47
+ }
48
+
49
+ #wp-live-chat #wplc-sb {
50
+ font-size: 14px;
51
+ font-weight: 700;
52
+ }
53
+
54
+ #wp-live-chat-4 {
55
+ }
56
+ #wp-live-chat-3 {
57
+ padding: 10px;
58
+ text-align: center;
59
+ }
60
+
61
+ #wp-live-chat {
62
+ position: fixed;
63
+ z-index: 105;
64
+ display: block;
65
+ background: #fff;
66
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
67
+ -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
68
+ box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
69
+ border-radius: 5px 5px 0 0 ;
70
+ color:#999;
71
+ max-width: 280px;
72
+ max-height: 400px;
73
+ z-index: 9999;
74
+ }
75
+
76
+ #wp-live-chat-1 {
77
+ cursor: pointer;
78
+ padding: 5px;
79
+ padding-left: 20px;
80
+ padding-right: 20px;
81
+ font-size: 14px;
82
+ color: #FFF;
83
+ }
84
+
85
+ #wp-live-chat-minimize {
86
+ position: absolute;
87
+ right: 6px;
88
+ top: 4px;
89
+ cursor: pointer;
90
+ height: 14px;
91
+ padding: 0 3px;
92
+ border-radius: 2px;
93
+ background-color: rgba(0, 0, 0, 0.4);
94
+ font-size: 10px;
95
+ -webkit-box-sizing: border-box;
96
+ -moz-box-sizing: border-box;
97
+ box-sizing: border-box;
98
+ width: 14px;
99
+ padding-top: 6px;
100
+ }
101
+
102
+ #wp-live-chat-close {
103
+ position: absolute;
104
+ right: 5px;
105
+ top: 4px;
106
+ cursor: pointer;
107
+ border-radius: 2px;
108
+ background-color: rgba(0, 0, 0, 0.4);
109
+ font-size: 12px;
110
+ vertical-align: middle;
111
+ height: 14px;
112
+ width: 14px;
113
+ text-align: center;
114
+ vertical-align: bottom;
115
+ padding-top: 1px;
116
+ -webkit-box-sizing: border-box;
117
+ -moz-box-sizing: border-box;
118
+ box-sizing: border-box;
119
+ }
120
+
121
+
122
+ #wp-live-chat-2-info {
123
+ font-size: 13px;
124
+ display: block;
125
+ width: 212px;
126
+ overflow: hidden;
127
+ text-align: center;
128
+ margin: 0 auto;
129
+ }
130
+
131
+ #wp-live-chat-2-img {
132
+ padding-bottom: 5px;
133
+ }
134
+
135
+ #wplc_chatmsg {
136
+ width: 100%;
137
+ }
138
+
139
+ .wplc_offline {
140
+ font-size: 12px;
141
+ font-weight: 700;
142
+ }
143
+
144
+ .wplc_logo_class {
145
+ max-width: 250px;
146
+ padding-top: 5px;
147
+
148
+ }
149
+ #wp-live-chat-header{
150
+ padding: 10px 0 0;
151
+ border-radius: 5px 5px 0 0;
152
+ position:relative;
153
+
154
+ }
155
+ #wp-live-chat-image{
156
+ position: absolute;
157
+ width: 40px;
158
+ padding:4px;
159
+ max-height: 40px;
160
+ background: #fff;
161
+ -webkit-border-radius: 3px;
162
+ -moz-border-radius: 3px;
163
+ border-radius: 3px;
164
+ top: -35px;
165
+ left: 20px;
166
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
167
+ -moz-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
168
+ box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
169
+ }
170
+ #wp-live-chat-image img {
171
+ -webkit-border-radius: 3px;
172
+ -moz-border-radius: 3px;
173
+ border-radius: 3px;
174
+ }
175
+ #wp-live-chat-2 {
176
+
177
+
178
+
179
+ padding:5px;
180
+ }
181
+ #wp-live-chat-2 input{
182
+ display:block;
183
+ margin:5px 0;
184
+ width:100%;
185
+ -webkit-box-sizing: border-box;
186
+ -moz-box-sizing: border-box;
187
+ box-sizing: border-box;
188
+ height: inherit;
189
+ background-image: none;
190
+ filter:none;
191
+ text-shadow: none;
192
+ }
193
+ .wplc-clear-float-message{
194
+ clear: both;
195
+ }
196
+
197
+
198
+ #wplc_message_div{
199
+ text-align: center;
200
+ }
201
+ #wp-live-chat-inner-image-div{
202
+ overflow: hidden;
203
+ height: 32px;
204
+ }
205
+
206
+ .wplc_close.wplc_left #wp-live-chat-1{
207
+ -ms-transform: rotate(90deg);
208
+ -moz-transform: rotate(90deg);
209
+ -webkit-transform: rotate(90deg);
210
+ transform: rotate(90deg);
211
+ -ms-transform-origin: left top 0;
212
+ -moz-transform-origin: left top 0;
213
+ -webkit-transform-origin: left top 0;
214
+ transform-origin: left top 0;
215
+ float: left;
216
+ width: 195px;
217
+ position: absolute;
218
+ top: 27px;
219
+ padding-left: 0;
220
+ left: 39px;
221
+ }
222
+ .wplc_left #wp-live-chat-header{
223
+ border-radius: 0px 5px 5px 0;
224
+ }
225
+ .wplc_close.wplc_left #wp-live-chat-header{
226
+ position: absolute;
227
+ top: 0;
228
+ width: 45px;
229
+ bottom: 0;
230
+ right: 0;
231
+ }
232
+ .wplc_open.wplc_left #wp-live-chat-header{
233
+ border-radius: 0px 5px 0px 0;
234
+ }
235
+
236
+ .wplc_close.wplc_left .wp-live-chat-wrapper, .wplc_close.wplc_right .wp-live-chat-wrapper{
237
+ position: relative;
238
+ height: 250px;
239
+ }
240
+ .wplc_left{
241
+ border-radius: 0px 5px 5px 0 !important;
242
+ }
243
+ .wplc_close.wplc_left{
244
+ padding-right: 45px;
245
+ height: 220px;
246
+ }
247
+
248
+ .wplc_left #wplc_chatbox, .wplc_right #wplc_chatbox{
249
+ height: 330px !important;
250
+ width: 240px;
251
+ }
252
+
253
+ .wplc_close.wplc_right #wp-live-chat-1{
254
+ -ms-transform: rotate(-90deg);
255
+ -moz-transform: rotate(-90deg);
256
+ -webkit-transform: rotate(-90deg);
257
+ transform: rotate(-90deg);
258
+ -ms-transform-origin: 0 0 0;
259
+ -moz-transform-origin: 0 0 0;
260
+ -webkit-transform-origin: 0 0 0;
261
+ transform-origin: 0 0 0;
262
+ float: left;
263
+ width: 180px;
264
+ padding:0 !important;
265
+ bottom: 0;
266
+ position: absolute;
267
+ left: 8px;
268
+ }
269
+
270
+ .wplc_close.wplc_right #wp-live-chat-header{
271
+ position: absolute;
272
+ top: 0;
273
+ width: 45px;
274
+ bottom: 0;
275
+ left: 0;
276
+ border-radius: 5px 0px 0px 5px;
277
+ }
278
+
279
+ .wplc_close.wplc_right{
280
+ padding-left: 45px;
281
+ height: 220px;
282
+ border-radius: 5px 0px 0px 5px !important;
283
+ }
284
+ .wplc_open.wplc_right #wp-live-chat-header{
285
+ border-radius: 5px 0px 0px 0;
286
+ }
287
+ .wplc_right{
288
+ border-radius: 5px 0px 0px 5px !important;
289
+ }
290
+ .wplc_close.wplc_left #wp-live-chat-image{
291
+ top: 25px;
292
+ left: 35px;
293
+ }
294
+ .wplc_close.wplc_right #wp-live-chat-image {
295
+ bottom: 18px;
296
+ left: initial;
297
+ right: 38px;
298
+ top: initial;
299
+ }
300
+
301
+
302
+
303
+
304
+ .wplc-admin-message {
305
+
306
+ padding:10px;
307
+ -webkit-border-radius: 2px;
308
+ -moz-border-radius: 2px;
309
+ border-radius: 2px;
310
+ border: 1px solid #ccc;
311
+ margin-top:2px;
312
+ background-color:#EEE;
313
+ display: inline-block;
314
+ float: left;
315
+ clear:both;
316
+ margin-bottom: 3px;
317
+ word-wrap: break-word;
318
+
319
+ }
320
+
321
+ .wplc-user-message {
322
+
323
+ padding:10px;
324
+ -webkit-border-radius: 2px;
325
+ -moz-border-radius: 2px;
326
+ border-radius: 2px;
327
+ border: 1px solid #ffdb99;
328
+ margin-top:2px;
329
+ background-color:#fff6ef;
330
+ color:#000;
331
+ display: inline-block;
332
+ float: right;
333
+ clear:both;
334
+ margin-bottom: 3px;
335
+ word-wrap: break-word;
336
+
337
+
338
+ }
339
+
340
+ .chat_time {
341
+ display:block;
342
+ width:100%;
343
+ text-align:center;
344
+ font-size:0.8em;
345
+ color:#ccc;
346
+ clear:both;
347
+
348
+ }
349
+
350
+ .wplc-user-message hr, .wplc-admin-message hr{
351
+ margin-bottom: 0px !important;
352
+ }
353
+
354
+
355
+ #wplc_first_message {
356
+ display:block;
357
+ }
358
+
359
+ #wp-live-chat-2-inner #wplc_start_chat_btn {
360
+ width:100%;
361
+ }
css/themes/modern.css ADDED
@@ -0,0 +1,566 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wp-live-chat textarea {
2
+ width: 100%;
3
+ height: 100px;
4
+ }
5
+ #wp-live-chat input, #wp-live-chat textarea {
6
+ border: 1px solid rgba(0, 0, 0, 0.1);
7
+ border-radius: 2px;
8
+ color: #2b2b2b;
9
+ padding: 8px 10px 7px;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+
14
+ }
15
+ #wplc_chatbox {
16
+ top: 35px;
17
+ bottom: 103px;
18
+ /* height: 100%; */
19
+ z-index: 99999;
20
+ position: absolute;
21
+ overflow-y: auto;
22
+ padding:10px;
23
+ width:100%;
24
+ }
25
+ #wp-live-chat-inner-container {
26
+ padding:16px;
27
+
28
+ }
29
+
30
+ #wp-live-chat td {
31
+ padding: 5px;
32
+ padding-left: 10px;
33
+ }
34
+
35
+ #wp-live-chat table {
36
+ border: 0 !important;
37
+ }
38
+
39
+ #wp-live-chat table td {
40
+ border: 0 !important;
41
+ }
42
+ #wplc_user_message_div {
43
+ min-height: 100px;
44
+ position: absolute;
45
+ bottom: 0;
46
+ left: 0;
47
+ width: 100%;
48
+ padding: 10px;
49
+ border-top:1px solid #eee;
50
+ }
51
+ }
52
+
53
+ #wp-live-chat h4 {
54
+ font-size: 20px;
55
+ margin: 3px;
56
+ }
57
+
58
+ #wp-live-chat p {
59
+ font-size: 14px;
60
+ margin: 3px;
61
+ }
62
+
63
+ #wp-live-chat #wplc-sb {
64
+ font-size: 14px;
65
+ font-weight: 700;
66
+ }
67
+
68
+ #wp-live-chat-4 {
69
+ position: fixed;
70
+ top: 0;
71
+ right: 0;
72
+ height: 100%;
73
+ width: 368px;
74
+ }
75
+ #wp-live-chat-3 {
76
+ padding: 10px;
77
+ text-align: center;
78
+ }
79
+
80
+ #wp-live-chat {
81
+ position: fixed;
82
+ z-index: 28000000;
83
+ display: block;
84
+ border-radius: 5px 5px 0 0 ;
85
+ color:#999;
86
+ }
87
+
88
+ #wp-live-chat-1 {
89
+ padding: 5px;
90
+ padding-left: 20px;
91
+ padding-right: 20px;
92
+ color: #000;
93
+ text-align:center;
94
+ }
95
+
96
+ #wp-live-chat-minimize {
97
+ position: absolute;
98
+ right: 3px;
99
+ top: 7px;
100
+ cursor: pointer;
101
+ height: 20px;
102
+ padding: 2px 3px;
103
+ border-radius: 2px;
104
+ background-color: rgba(0, 0, 0, 0.4);
105
+ font-size: 17px;
106
+ -webkit-box-sizing: border-box;
107
+ -moz-box-sizing: border-box;
108
+ box-sizing: border-box;
109
+ width: 20px;
110
+ padding-top: 6px;
111
+ color: #FFF;
112
+ font-weight: normal;
113
+ z-index: 92354389047593475893475;
114
+ }
115
+
116
+ #wp-live-chat-close {
117
+ position: absolute;
118
+ right: 5px;
119
+ top: 4px;
120
+ cursor: pointer;
121
+ border-radius: 2px;
122
+ background-color: rgba(0, 0, 0, 0.4);
123
+ font-size: 12px;
124
+ vertical-align: middle;
125
+ height: 14px;
126
+ width: 14px;
127
+ text-align: center;
128
+ vertical-align: bottom;
129
+ padding-top: 1px;
130
+ -webkit-box-sizing: border-box;
131
+ -moz-box-sizing: border-box;
132
+ box-sizing: border-box;
133
+ }
134
+
135
+
136
+ #wp-live-chat-2-info {
137
+ font-size: 1em;
138
+ display: block;
139
+ width: 80%;
140
+ overflow: hidden;
141
+ text-align: center;
142
+ margin: 0 auto;
143
+ padding-bottom:10px;
144
+ }
145
+ #wp-live-chat-2-inner {
146
+ padding: 20px 12px 26px;
147
+ background-color: #fff;
148
+ overflow: hidden;
149
+ box-shadow: 0 0 3px rgba(0,0,0,.2);
150
+ border-radius: 5px;
151
+ }
152
+
153
+ #wp-live-chat-2-img {
154
+ padding-bottom: 5px;
155
+ }
156
+
157
+ #wplc_chatmsg {
158
+ width: 100%;
159
+ }
160
+
161
+ .wplc_offline {
162
+ font-size: 1.1em;
163
+ font-weight: 700;
164
+ }
165
+
166
+ .wplc_logo_class {
167
+ max-width: 250px;
168
+ max-height:180px;
169
+ }
170
+ #wplc_logo {
171
+ position: absolute;
172
+ width: 100%;
173
+ top: 41px;
174
+ }
175
+ #wp-live-chat-header{
176
+ padding: 10px 0 0;
177
+ margin-bottom:25px;
178
+ border-radius: 25px 25px;
179
+ position:relative;
180
+ width:50px;
181
+ height:50px;
182
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
183
+ -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
184
+ box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
185
+ cursor:pointer;
186
+ }
187
+
188
+ #wp-live-chat-2 {
189
+
190
+ z-index: 2147483000;
191
+ position: fixed;
192
+ height: 100%;
193
+ width: 368px;
194
+ bottom: 0;
195
+ right: 0;
196
+ background: #fafafb;
197
+ background: rgba(250,250,251,.98);
198
+ border-left: 1px solid #dadee2;
199
+ box-shadow: 0 0 4px 1px rgba(0,0,0,.07);
200
+
201
+
202
+
203
+ }
204
+ #wp-live-chat-2 input{
205
+ font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
206
+ font-size: 15px;
207
+ line-height: 32px;
208
+ color: #60686e;
209
+ width: 100%;
210
+ border: 1px solid #e4e5e7;
211
+ border-radius: 2px;
212
+ background-color: #fff;
213
+ margin-bottom:5px;
214
+ }
215
+ .wplc-clear-float-message{
216
+ clear: both;
217
+ }
218
+
219
+ #wplc_message {
220
+ background: #fff;
221
+ font-weight: 400;
222
+ color: #455a64;
223
+ resize: none;
224
+ border: none;
225
+ margin-bottom:10px;
226
+ }
227
+
228
+
229
+ #wplc_message_div{
230
+ text-align: center;
231
+ }
232
+ #wp-live-chat-inner-image-div{
233
+ overflow: hidden;
234
+ height: 32px;
235
+ }
236
+
237
+ .wplc_close.wplc_left #wp-live-chat-1{
238
+ -ms-transform: rotate(90deg);
239
+ -moz-transform: rotate(90deg);
240
+ -webkit-transform: rotate(90deg);
241
+ transform: rotate(90deg);
242
+ -ms-transform-origin: left top 0;
243
+ -moz-transform-origin: left top 0;
244
+ -webkit-transform-origin: left top 0;
245
+ transform-origin: left top 0;
246
+ float: left;
247
+ width: 195px;
248
+ position: absolute;
249
+ top: 27px;
250
+ padding-left: 0;
251
+ left: 39px;
252
+ }
253
+ .wplc_left #wp-live-chat-header{
254
+ border-radius: 25px 25px;
255
+ }
256
+ .wplc_close.wplc_left #wp-live-chat-header{
257
+ position: absolute;
258
+ top: 0;
259
+ width: 50px;
260
+ bottom: 0;
261
+ right: 0;
262
+ left: 15px;
263
+ }
264
+ .wplc_open.wplc_left #wp-live-chat-header{
265
+ border-radius: 0px 5px 0px 0;
266
+ }
267
+
268
+ .wplc_close.wplc_left .wp-live-chat-wrapper, .wplc_close.wplc_right .wp-live-chat-wrapper{
269
+ position: relative;
270
+ height: 250px;
271
+ }
272
+ .wplc_left{
273
+ border-radius: 0px 5px 5px 0 !important;
274
+ }
275
+ .wplc_close.wplc_left{
276
+ padding-right: 45px;
277
+ height: 220px;
278
+ }
279
+
280
+
281
+ .wplc_close.wplc_right #wp-live-chat-1{
282
+ -ms-transform: rotate(-90deg);
283
+ -moz-transform: rotate(-90deg);
284
+ -webkit-transform: rotate(-90deg);
285
+ transform: rotate(-90deg);
286
+ -ms-transform-origin: 0 0 0;
287
+ -moz-transform-origin: 0 0 0;
288
+ -webkit-transform-origin: 0 0 0;
289
+ transform-origin: 0 0 0;
290
+ float: left;
291
+ width: 180px;
292
+ padding:0 !important;
293
+ bottom: 0;
294
+ position: absolute;
295
+ left: 8px;
296
+ }
297
+
298
+ .wplc_close.wplc_right #wp-live-chat-header{
299
+ position: absolute;
300
+ top: 0;
301
+ bottom: 0;
302
+ left: 0;
303
+ }
304
+
305
+ .wplc_close.wplc_right{
306
+ padding-left: 75px;
307
+ height: 220px;
308
+ border-radius: 5px 0px 0px 5px !important;
309
+ }
310
+ .wplc_open.wplc_right #wp-live-chat-header{
311
+ border-radius: 5px 0px 0px 0;
312
+ }
313
+ .wplc_right{
314
+ border-radius: 5px 0px 0px 5px !important;
315
+ }
316
+ .wplc_close.wplc_left #wp-live-chat-image{
317
+ top: 25px;
318
+ left: 35px;
319
+ }
320
+ .wplc_close.wplc_right #wp-live-chat-image {
321
+ bottom: 18px;
322
+ left: initial;
323
+ right: 38px;
324
+ top: initial;
325
+ }
326
+
327
+
328
+
329
+
330
+ .wplc-admin-message {
331
+
332
+ padding:10px;
333
+ -webkit-border-radius: 2px;
334
+ -moz-border-radius: 2px;
335
+ border-radius: 2px;
336
+ border: 1px solid #666;
337
+ margin-top:2px;
338
+ background-color:#666;
339
+ display: inline-block;
340
+ float: left;
341
+ clear:both;
342
+ margin-bottom: 3px;
343
+ position:relative;
344
+ left:32px;
345
+ color:#FFF;
346
+ max-width:298px;
347
+ word-wrap: break-word;
348
+ }
349
+ .wplc-admin-message-avatar {
350
+ position: absolute;
351
+ left: -38px;
352
+ border-radius: 15px;
353
+ }
354
+ #wplc_chatbox_header {
355
+ position: absolute;
356
+ background-color: #FFF;
357
+ background: rgba(255,255,255,.98);
358
+ top: 0;
359
+ right: 0;
360
+ height: 35px;
361
+ width: 367px;
362
+ border-bottom: 1px solid #eee;
363
+ }
364
+ .wplc-admin-message:before {
365
+ display: block;
366
+ width: 0;
367
+ top: 20px;
368
+ bottom: auto;
369
+ left: auto;
370
+ left: -7px;
371
+ border-width: 6px 7px 6px 0;
372
+ border-color: transparent #666;
373
+ content: "";
374
+ position: absolute;
375
+ border-style: solid;
376
+ }
377
+
378
+ .wplc-user-message {
379
+
380
+ padding:10px;
381
+ -webkit-border-radius: 2px;
382
+ -moz-border-radius: 2px;
383
+ border-radius: 2px;
384
+ border: 1px solid #ffdb99;
385
+ margin-top:2px;
386
+ background-color:#ffdb99;
387
+ color:#000;
388
+ display: inline-block;
389
+ float: right;
390
+ clear:both;
391
+ margin-bottom: 3px;
392
+ position: relative;
393
+ right:30px;
394
+ max-width:300px;
395
+ word-wrap: break-word;
396
+
397
+ }
398
+
399
+ .chat_time {
400
+ display: block;
401
+ /* width: 100%; */
402
+ /* text-align: center; */
403
+ font-size: 0.8em;
404
+ color: #ccc;
405
+ clear: both;
406
+ position: relative;
407
+ right: 30px;
408
+ text-align: right;
409
+ }
410
+
411
+ .wplc-user-message hr, .wplc-admin-message hr{
412
+ margin-bottom: 0px !important;
413
+ }
414
+ .wplc-user-message-avatar {
415
+ position: absolute;
416
+ right: -40px;
417
+ border-radius: 15px;
418
+ }
419
+
420
+
421
+ .wplc-user-message:before {
422
+ display: block;
423
+ width: 0;
424
+ top: 20px;
425
+ bottom: auto;
426
+ left: auto;
427
+ right: -7px;
428
+ border-width: 6px 0 6px 7px;
429
+ border-color: transparent #ffdb99;
430
+ content: "";
431
+ position: absolute;
432
+ border-style: solid;
433
+ }
434
+
435
+ #wplc_hovercard {
436
+ position: fixed;
437
+ bottom: 96px;
438
+ right: 75px;
439
+ width: 300px;
440
+ height: 145px;
441
+ border: 1px solid #ccc ;
442
+ background-color: #FFF;
443
+ border-radius: 5px;
444
+ }
445
+
446
+ #wplc_hovercard:before {
447
+ content: "";
448
+ position: absolute;
449
+ bottom: -9px;
450
+ left: 240px;
451
+ border-width: 9px 9px 0;
452
+ border-style: solid;
453
+ border-color: #ccc transparent;
454
+ display: block;
455
+ width: 0;}
456
+ #wplc_hovercard:after {
457
+ content: "";
458
+ position: absolute;
459
+ bottom: -8px;
460
+ left: 241px;
461
+ border-width: 8px 8px 0;
462
+ border-style: solid;
463
+ border-color: #fafafb transparent;
464
+ display: block;
465
+ width: 0;
466
+ }
467
+
468
+ .wplc_button_standard {
469
+ border: 1px solid #ED832F;
470
+ background-color: #ED832F;
471
+ opacity:0.9;
472
+
473
+ }
474
+ .wplc_button_standard:hover {
475
+ border: 1px solid #ED832F;
476
+ background-color: #ED832F;
477
+ opacity:0.7;
478
+ }
479
+
480
+ .wplc_button_standard:focus {
481
+ border: 1px solid #ED832F;
482
+ background-color: #ED832F;
483
+ opacity:0.7;
484
+ }
485
+
486
+
487
+ #wplc_hovercard_min {
488
+ position: absolute;
489
+ width: 61px;
490
+ height: 18px;
491
+ right: 0px;
492
+ top: -25px;
493
+ font-size: 9px;
494
+ text-align: center;
495
+ border-radius: 9px;
496
+ color: #fff;
497
+ cursor: pointer;
498
+ }
499
+ #wplc_hovercard_bottom{
500
+ border-top: 1px solid #ccc;
501
+ padding-top: 10px;
502
+ height: 43px;
503
+ border-bottom-right-radius: 5px;
504
+ background-color: #fafafb;
505
+ border-bottom-left-radius: 5px;
506
+ }
507
+ #wplc_hovercard_content {
508
+ padding:15px;
509
+ height:100px;
510
+ box-shadow: 0 1px 1px #f0f0f1;
511
+ }
512
+
513
+ /* named after the famous words uttered by The Dylan at Code Cabin */
514
+ #speeching_button {
515
+ padding: 5px;
516
+ font-size: 12px;
517
+ text-transform: none;
518
+ float: right;
519
+ margin-right: 15px;
520
+ }
521
+
522
+ #wplc_first_message {
523
+ display:block;
524
+
525
+
526
+ }
527
+ #wplc_first_message strong {
528
+ display:block;
529
+ clear:right;
530
+ }
531
+
532
+ .wplc_hovercard_content_left {
533
+ float: left;
534
+ display: block;
535
+ height: 60px;
536
+ padding-left: 10px;
537
+ padding-right: 10px;
538
+ width: 80px;
539
+ }
540
+ .wplc_hovercard_content_right {
541
+ float: left;
542
+ display: block;
543
+ /* margin-left: 30px; */
544
+ /* padding-left: 20px; */
545
+ font-size: 0.8em;
546
+ word-wrap: break-word;
547
+ height: 70px;
548
+ width: 188px;
549
+ }
550
+ .wplc_left_logo {
551
+ width: 60px;
552
+ height: 60px;
553
+ border-radius: 30px;
554
+ }
555
+
556
+ .wplc_hovercard_content_right .wplc_offline {
557
+ font-size:0.9em;
558
+ font-weight:bold;
559
+ }
560
+
561
+ #wplc_message_div {
562
+ margin-top: 20px;
563
+ }
564
+ #wp-live-chat-2-inner #wplc_start_chat_btn {
565
+ width:100%;
566
+ }
css/themes/position-bottom-left.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wplc_hovercard.modern {
2
+ position: fixed;
3
+ bottom: 96px;
4
+ left: 75px;
5
+ width: 300px;
6
+ height: 145px;
7
+ border: 1px solid #ccc;
8
+ background-color: #FFF;
9
+ border-radius: 5px;
10
+ }
11
+
12
+ #wplc_hovercard:before {
13
+ left: 40px;
14
+ }
15
+ #wplc_hovercard:after {
16
+ left: 41px;
17
+ }
18
+ .modern #wp-live-chat-2 {
19
+ left:0 !important;
20
+ right:auto;
21
+ }
22
+
23
+ .modern #wp-live-chat-4 {
24
+ left:0 !important;
25
+ right:auto;
26
+ }
27
+
28
+
css/themes/position-bottom-right.css ADDED
File without changes
css/themes/position-left.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #wplc_hovercard.modern {
3
+ bottom: 300px;
4
+ left: 93px;
5
+ }
6
+
7
+
8
+
9
+ #wplc_hovercard:before {
10
+ content: "";
11
+ position: absolute;
12
+ left: -9px;
13
+ top: 40px;
14
+ border-width: 9px 9px 9px 0;
15
+ border-style: solid;
16
+ border-color: transparent #ccc;
17
+ display: block;
18
+ width: 0;
19
+ right:auto;
20
+ bottom:auto;
21
+ }
22
+ #wplc_hovercard:after {
23
+ content: "";
24
+ position: absolute;
25
+ left: -8px;
26
+ top: 41px;
27
+ border-width: 8px 8px 8px 0;
28
+ border-style: solid;
29
+ border-color: transparent #FFF;
30
+ display: block;
31
+ width: 0;
32
+ right:auto;
33
+ bottom:auto;
34
+ }
35
+
36
+ .modern #wp-live-chat-2 {
37
+ left:0 !important;
38
+ right:auto;
39
+ }
40
+
41
+ .modern #wp-live-chat-4 {
42
+ left:0 !important;
43
+ right:auto;
44
+ }
45
+
46
+
css/themes/position-right.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #wplc_hovercard.modern {
3
+ bottom: 300px;
4
+ right: 93px;
5
+
6
+ }
7
+
8
+
9
+
10
+ #wplc_hovercard:before {
11
+ content: "";
12
+ position: absolute;
13
+ right: -9px;
14
+ top: 40px;
15
+ border-width: 9px 0 9px 9px;
16
+ border-style: solid;
17
+ border-color: transparent #ccc;
18
+ display: block;
19
+ width: 0;
20
+ left:auto;
21
+ bottom:auto;
22
+ }
23
+ #wplc_hovercard:after {
24
+ content: "";
25
+ position: absolute;
26
+ right: -8px;
27
+ top: 41px;
28
+ border-width: 8px 0 8px 8px;
29
+ border-style: solid;
30
+ border-color: transparent #FFF;
31
+ display: block;
32
+ width: 0;
33
+ left:auto;
34
+ bottom:auto;
35
+ }
css/themes/theme-1.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wplc-color-1 { color: #DB0000 !important; }
2
+ .wplc-color-2 { color: #FFF !important; }
3
+ .wplc-color-3 { color: #000 !important; }
4
+ .wplc-color-4 { color: #666 !important; }
5
+ .wplc-color-bg-1 { background-color: #DB0000 !important; }
6
+ .wplc-color-bg-2 { background-color: #FFF !important; }
7
+ .wplc-color-bg-3 { background-color: #000 !important; }
8
+ .wplc-color-bg-4 { background-color: #666 !important; }
9
+ .wplc-color-border-1 { border-color: #DB0000 !important; }
10
+ .wplc-color-border-2 { border-color: #FFF !important; }
11
+ .wplc-color-border-3 { border-color: #000 !important; }
12
+ .wplc-color-border-4 { border-color: #666 !important; }
13
+ .wplc-color-border-1:before { border-color: transparent #DB0000 !important; }
14
+ .wplc-color-border-2:before { border-color: transparent #FFF !important; }
15
+ .wplc-color-border-3:before { border-color: transparent #000 !important; }
16
+ .wplc-color-border-4:before { border-color: transparent #666 !important; }
css/themes/theme-2.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wplc-color-1 { color: #000 !important; }
2
+ .wplc-color-2 { color: #FFF !important; }
3
+ .wplc-color-3 { color: #888 !important; }
4
+ .wplc-color-4 { color: #666 !important; }
5
+
6
+
7
+
8
+
9
+ .wplc-color-bg-1 { background-color: #000 !important; }
10
+ .wplc-color-bg-2 { background-color: #FFF !important; }
11
+ .wplc-color-bg-3 { background-color: #888 !important; }
12
+ .wplc-color-bg-4 { background-color: #666 !important; }
13
+
14
+
15
+
16
+
17
+ .wplc-color-border-1 { border-color: #000 !important; }
18
+ .wplc-color-border-2 { border-color: #FFF !important; }
19
+ .wplc-color-border-3 { border-color: #888 !important; }
20
+ .wplc-color-border-4 { border-color: #666 !important; }
21
+
22
+
23
+
24
+ .wplc-color-border-1:before { border-color: transparent #000 !important; }
25
+ .wplc-color-border-2:before { border-color: transparent #FFF !important; }
26
+ .wplc-color-border-3:before { border-color: transparent #888 !important; }
27
+ .wplc-color-border-4:before { border-color: transparent #666 !important; }
css/themes/theme-3.css ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+
4
+ .wplc-color-1 { color: #B97B9D !important; }
5
+ .wplc-color-2 { color: #FFF !important; }
6
+ .wplc-color-3 { color: #EEE !important; }
7
+ .wplc-color-4 { color: #5A0031 !important; }
8
+
9
+
10
+
11
+
12
+ .wplc-color-bg-1 { background-color: #B97B9D !important; }
13
+ .wplc-color-bg-2 { background-color: #FFF !important; }
14
+ .wplc-color-bg-3 { background-color: #EEE !important; }
15
+ .wplc-color-bg-4 { background-color: #5A0031 !important; }
16
+
17
+
18
+
19
+
20
+ .wplc-color-border-1 { border-color: #B97B9D !important; }
21
+ .wplc-color-border-2 { border-color: #FFF !important; }
22
+ .wplc-color-border-3 { border-color: #EEE !important; }
23
+ .wplc-color-border-4 { border-color: #5A0031 !important; }
24
+
25
+
26
+
27
+ .wplc-color-border-1:before { border-color: transparent #B97B9D !important; }
28
+ .wplc-color-border-2:before { border-color: transparent #FFF !important; }
29
+ .wplc-color-border-3:before { border-color: transparent #EEE !important; }
30
+ .wplc-color-border-4:before { border-color: transparent #5A0031 !important; }
css/themes/theme-4.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .wplc-color-1 { color: #1A14DB !important; }
3
+ .wplc-color-2 { color: #FDFDFF !important; }
4
+ .wplc-color-3 { color: #7F7FB3 !important; }
5
+ .wplc-color-4 { color: #666 !important; }
6
+
7
+
8
+
9
+
10
+ .wplc-color-bg-1 { background-color: #1A14DB !important; }
11
+ .wplc-color-bg-2 { background-color: #FDFDFF !important; }
12
+ .wplc-color-bg-3 { background-color: #7F7FB3 !important; }
13
+ .wplc-color-bg-4 { background-color: #666 !important; }
14
+
15
+
16
+
17
+
18
+ .wplc-color-border-1 { border-color: #1A14DB !important; }
19
+ .wplc-color-border-2 { border-color: #FDFDFF !important; }
20
+ .wplc-color-border-3 { border-color: #7F7FB3 !important; }
21
+ .wplc-color-border-4 { border-color: #666 !important; }
22
+
23
+
24
+
25
+ .wplc-color-border-1:before { border-color: transparent #1A14DB !important; }
26
+ .wplc-color-border-2:before { border-color: transparent #FDFDFF !important; }
27
+ .wplc-color-border-3:before { border-color: transparent #7F7FB3 !important; }
28
+ .wplc-color-border-4:before { border-color: transparent #666 !important; }
css/themes/theme-5.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .wplc-color-1 { color: #3DCC13 !important; }
3
+ .wplc-color-2 { color: #FDFDFF !important; }
4
+ .wplc-color-3 { color: #EEE !important; }
5
+ .wplc-color-4 { color: #666 !important; }
6
+
7
+
8
+
9
+
10
+ .wplc-color-bg-1 { background-color: #3DCC13 !important; }
11
+ .wplc-color-bg-2 { background-color: #FDFDFF !important; }
12
+ .wplc-color-bg-3 { background-color: #EEE !important; }
13
+ .wplc-color-bg-4 { background-color: #666 !important; }
14
+
15
+
16
+
17
+
18
+ .wplc-color-border-1 { border-color: #3DCC13 !important; }
19
+ .wplc-color-border-2 { border-color: #FDFDFF !important; }
20
+ .wplc-color-border-3 { border-color: #EEE !important; }
21
+ .wplc-color-border-4 { border-color: #666 !important; }
22
+
23
+
24
+
25
+ .wplc-color-border-1:before { border-color: transparent #3DCC13 !important; }
26
+ .wplc-color-border-2:before { border-color: transparent #FDFDFF !important; }
27
+ .wplc-color-border-3:before { border-color: transparent #EEE !important; }
28
+ .wplc-color-border-4:before { border-color: transparent #666 !important; }
css/themes/theme-default.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wplc-color-1 { color: #ED832F !important; }
2
+ .wplc-color-2 { color: #FFF !important; }
3
+ .wplc-color-3 { color: #EEE !important; }
4
+ .wplc-color-4 { color: #666 !important; }
5
+
6
+
7
+
8
+
9
+ .wplc-color-bg-1 { background-color: #ED832F !important; }
10
+ .wplc-color-bg-2 { background-color: #FFF !important; }
11
+ .wplc-color-bg-3 { background-color: #EEE !important; }
12
+ .wplc-color-bg-4 { background-color: #666 !important; }
13
+
14
+
15
+
16
+
17
+ .wplc-color-border-1 { border-color: #ED832F !important; }
18
+ .wplc-color-border-2 { border-color: #FFF !important; }
19
+ .wplc-color-border-3 { border-color: #EEE !important; }
20
+ .wplc-color-border-4 { border-color: #666 !important; }
21
+
22
+
23
+
24
+ .wplc-color-border-1:before { border-color: transparent #ED832F !important; }
25
+ .wplc-color-border-2:before { border-color: transparent #FFF !important; }
26
+ .wplc-color-border-3:before { border-color: transparent #EEE !important; }
27
+ .wplc-color-border-4:before { border-color: transparent #666 !important; }
css/wplcstyle.css CHANGED
@@ -1,347 +1,2 @@
1
- #wp-live-chat textarea {
2
- width: 100%;
3
- height: 100px;
4
- }
5
- #wp-live-chat input, #wp-live-chat textarea {
6
- border: 1px solid rgba(0, 0, 0, 0.1);
7
- border-radius: 2px;
8
- color: #2b2b2b;
9
- padding: 8px 10px 7px;
10
- -webkit-box-sizing: border-box;
11
- -moz-box-sizing: border-box;
12
- box-sizing: border-box;
13
- height: inherit;
14
- }
15
- #wplc_chatbox {
16
- padding: 5px;
17
- height: 200px;
18
- overflow-y: auto;
19
- overflow-x:hidden;
20
- -webkit-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
21
- -moz-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
22
- box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
23
- }
24
 
25
 
26
- #wp-live-chat td {
27
- padding: 5px;
28
- padding-left: 10px;
29
- }
30
-
31
- #wp-live-chat table {
32
- border: 0 !important;
33
- }
34
-
35
- #wp-live-chat table td {
36
- border: 0 !important;
37
- }
38
-
39
- #wp-live-chat h4 {
40
- font-size: 20px;
41
- margin: 3px;
42
- }
43
-
44
- #wp-live-chat p {
45
- font-size: 14px;
46
- margin: 3px;
47
- }
48
-
49
- #wp-live-chat #wplc-sb {
50
- font-size: 14px;
51
- font-weight: 700;
52
- }
53
-
54
- #wp-live-chat-4 {
55
- }
56
- #wp-live-chat-3 {
57
- padding: 10px;
58
- text-align: center;
59
- }
60
-
61
- #wp-live-chat {
62
- position: fixed;
63
- z-index: 105;
64
- display: block;
65
- background: #fff;
66
- -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
67
- -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
68
- box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
69
- border-radius: 5px 5px 0 0 ;
70
- color:#999;
71
- max-width: 280px;
72
- max-height: 400px;
73
- z-index: 9999;
74
- }
75
-
76
- #wp-live-chat-1 {
77
- cursor: pointer;
78
- padding: 5px;
79
- padding-left: 20px;
80
- padding-right: 20px;
81
- font-size: 14px;
82
- color: #FFF;
83
- }
84
-
85
- #wp-live-chat-minimize {
86
- position: absolute;
87
- right: 23px;
88
- top: 4px;
89
- cursor: pointer;
90
- height: 14px;
91
- padding: 0 3px;
92
- border-radius: 2px;
93
- background-color: rgba(0, 0, 0, 0.4);
94
- font-size: 10px;
95
- -webkit-box-sizing: border-box;
96
- -moz-box-sizing: border-box;
97
- box-sizing: border-box;
98
- width: 14px;
99
- padding-top: 6px;
100
- }
101
-
102
- #wp-live-chat-close {
103
- position: absolute;
104
- right: 5px;
105
- top: 4px;
106
- cursor: pointer;
107
- border-radius: 2px;
108
- background-color: rgba(0, 0, 0, 0.4);
109
- font-size: 12px;
110
- vertical-align: middle;
111
- height: 14px;
112
- width: 14px;
113
- text-align: center;
114
- vertical-align: bottom;
115
- padding-top: 1px;
116
- -webkit-box-sizing: border-box;
117
- -moz-box-sizing: border-box;
118
- box-sizing: border-box;
119
- }
120
-
121
-
122
- #wp-live-chat-2-info {
123
- font-size: 13px;
124
- display: block;
125
- width: 212px;
126
- overflow: hidden;
127
- text-align: center;
128
- margin: 0 auto;
129
- }
130
-
131
- #wp-live-chat-2-img {
132
- padding-bottom: 5px;
133
- }
134
-
135
- #wplc_chatmsg {
136
- width: 100%;
137
- }
138
-
139
- .wplc_offline {
140
- font-size: 12px;
141
- font-weight: 700;
142
- }
143
-
144
- .wplc_logo_class {
145
- max-width: 250px;
146
- }
147
- #wp-live-chat-header{
148
- padding: 10px 0 0;
149
- border-radius: 5px 5px 0 0;
150
- position:relative;
151
- }
152
- #wp-live-chat-image{
153
- position: absolute;
154
- width: 40px;
155
- padding:4px;
156
- max-height: 40px;
157
- background: #fff;
158
- -webkit-border-radius: 3px;
159
- -moz-border-radius: 3px;
160
- border-radius: 3px;
161
- top: -35px;
162
- left: 20px;
163
- -webkit-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
164
- -moz-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
165
- box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
166
- }
167
- #wp-live-chat-image img {
168
- -webkit-border-radius: 3px;
169
- -moz-border-radius: 3px;
170
- border-radius: 3px;
171
- }
172
- #wp-live-chat-2 {
173
- padding:5px;
174
- }
175
- #wp-live-chat-2 input{
176
- display:block;
177
- margin:5px 0;
178
- width:100%;
179
- -webkit-box-sizing: border-box;
180
- -moz-box-sizing: border-box;
181
- box-sizing: border-box;
182
- height: inherit;
183
- background-image: none;
184
- filter:none;
185
- text-shadow: none;
186
- }
187
- .wplc-clear-float-message{
188
- clear: both;
189
- }
190
-
191
-
192
- #wplc_message_div{
193
- text-align: center;
194
- }
195
- #wp-live-chat-inner-image-div{
196
- overflow: hidden;
197
- height: 32px;
198
- }
199
-
200
- .wplc_close.wplc_left #wp-live-chat-1{
201
- -ms-transform: rotate(90deg);
202
- -moz-transform: rotate(90deg);
203
- -webkit-transform: rotate(90deg);
204
- transform: rotate(90deg);
205
- -ms-transform-origin: left top 0;
206
- -moz-transform-origin: left top 0;
207
- -webkit-transform-origin: left top 0;
208
- transform-origin: left top 0;
209
- float: left;
210
- width: 195px;
211
- position: absolute;
212
- top: 27px;
213
- padding-left: 0;
214
- left: 39px;
215
- }
216
- .wplc_left #wp-live-chat-header{
217
- border-radius: 0px 5px 5px 0;
218
- }
219
- .wplc_close.wplc_left #wp-live-chat-header{
220
- position: absolute;
221
- top: 0;
222
- width: 45px;
223
- bottom: 0;
224
- right: 0;
225
- }
226
- .wplc_open.wplc_left #wp-live-chat-header{
227
- border-radius: 0px 5px 0px 0;
228
- }
229
-
230
- .wplc_close.wplc_left .wp-live-chat-wrapper, .wplc_close.wplc_right .wp-live-chat-wrapper{
231
- position: relative;
232
- height: 250px;
233
- }
234
- .wplc_left{
235
- border-radius: 0px 5px 5px 0 !important;
236
- }
237
- .wplc_close.wplc_left{
238
- padding-right: 45px;
239
- height: 220px;
240
- }
241
-
242
- .wplc_left #wplc_chatbox, .wplc_right #wplc_chatbox{
243
- height: 330px !important;
244
- width: 240px;
245
- }
246
-
247
- .wplc_close.wplc_right #wp-live-chat-1{
248
- -ms-transform: rotate(-90deg);
249
- -moz-transform: rotate(-90deg);
250
- -webkit-transform: rotate(-90deg);
251
- transform: rotate(-90deg);
252
- -ms-transform-origin: 0 0 0;
253
- -moz-transform-origin: 0 0 0;
254
- -webkit-transform-origin: 0 0 0;
255
- transform-origin: 0 0 0;
256
- float: left;
257
- width: 180px;
258
- padding:0 !important;
259
- bottom: 0;
260
- position: absolute;
261
- left: 8px;
262
- }
263
-
264
- .wplc_close.wplc_right #wp-live-chat-header{
265
- position: absolute;
266
- top: 0;
267
- width: 45px;
268
- bottom: 0;
269
- left: 0;
270
- border-radius: 5px 0px 0px 5px;
271
- }
272
-
273
- .wplc_close.wplc_right{
274
- padding-left: 45px;
275
- height: 220px;
276
- border-radius: 5px 0px 0px 5px !important;
277
- }
278
- .wplc_open.wplc_right #wp-live-chat-header{
279
- border-radius: 5px 0px 0px 0;
280
- }
281
- .wplc_right{
282
- border-radius: 5px 0px 0px 5px !important;
283
- }
284
- .wplc_close.wplc_left #wp-live-chat-image{
285
- top: 25px;
286
- left: 35px;
287
- }
288
- .wplc_close.wplc_right #wp-live-chat-image {
289
- bottom: 18px;
290
- left: initial;
291
- right: 38px;
292
- top: initial;
293
- }
294
-
295
-
296
-
297
-
298
- .wplc-admin-message {
299
-
300
- padding:10px;
301
- -webkit-border-radius: 2px;
302
- -moz-border-radius: 2px;
303
- border-radius: 2px;
304
- border: 1px solid #ccc;
305
- margin-top:2px;
306
- background-color:#EEE;
307
- display: inline-block;
308
- float: left;
309
- clear:both;
310
- margin-bottom: 3px;
311
-
312
-
313
- }
314
-
315
- .wplc-user-message {
316
-
317
- padding:10px;
318
- -webkit-border-radius: 2px;
319
- -moz-border-radius: 2px;
320
- border-radius: 2px;
321
- border: 1px solid #ffdb99;
322
- margin-top:2px;
323
- background-color:#fff6ef;
324
- color:#000;
325
- display: inline-block;
326
- float: right;
327
- clear:both;
328
- margin-bottom: 3px;
329
-
330
- }
331
-
332
- .chat_time {
333
- display:block;
334
- width:100%;
335
- text-align:center;
336
- font-size:0.8em;
337
- color:#ccc;
338
- clear:both;
339
-
340
- }
341
-
342
- .wplc-user-message hr, .wplc-admin-message hr{
343
- margin-bottom: 0px !important;
344
- }
345
-
346
- /* MOVE TO CHAT EXPERIENCE PLUGIN */
347
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/wplcstyle_old.css ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wp-live-chat textarea {
2
+ width: 100%;
3
+ height: 100px;
4
+ }
5
+ #wp-live-chat input, #wp-live-chat textarea {
6
+ border: 1px solid rgba(0, 0, 0, 0.1);
7
+ border-radius: 2px;
8
+ color: #2b2b2b;
9
+ padding: 8px 10px 7px;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ height: inherit;
14
+ }
15
+ #wplc_chatbox {
16
+ padding: 5px;
17
+ height: 200px;
18
+ overflow-y: auto;
19
+ overflow-x:hidden;
20
+ -webkit-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
21
+ -moz-box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
22
+ box-shadow: inset 0px 5px 5px -4px rgba(50, 50, 50, 0.5);
23
+ }
24
+
25
+
26
+ #wp-live-chat td {
27
+ padding: 5px;
28
+ padding-left: 10px;
29
+ }
30
+
31
+ #wp-live-chat table {
32
+ border: 0 !important;
33
+ }
34
+
35
+ #wp-live-chat table td {
36
+ border: 0 !important;
37
+ }
38
+
39
+ #wp-live-chat h4 {
40
+ font-size: 20px;
41
+ margin: 3px;
42
+ }
43
+
44
+ #wp-live-chat p {
45
+ font-size: 14px;
46
+ margin: 3px;
47
+ }
48
+
49
+ #wp-live-chat #wplc-sb {
50
+ font-size: 14px;
51
+ font-weight: 700;
52
+ }
53
+
54
+ #wp-live-chat-4 {
55
+ }
56
+ #wp-live-chat-3 {
57
+ padding: 10px;
58
+ text-align: center;
59
+ }
60
+
61
+ #wp-live-chat {
62
+ position: fixed;
63
+ z-index: 105;
64
+ display: block;
65
+ background: #fff;
66
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
67
+ -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
68
+ box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.5);
69
+ border-radius: 5px 5px 0 0 ;
70
+ color:#999;
71
+ max-width: 280px;
72
+ max-height: 400px;
73
+ z-index: 9999;
74
+ }
75
+
76
+ #wp-live-chat-1 {
77
+ cursor: pointer;
78
+ padding: 5px;
79
+ padding-left: 20px;
80
+ padding-right: 20px;
81
+ font-size: 14px;
82
+ color: #FFF;
83
+ }
84
+
85
+ #wp-live-chat-minimize {
86
+ position: absolute;
87
+ right: 23px;
88
+ top: 4px;
89
+ cursor: pointer;
90
+ height: 14px;
91
+ padding: 0 3px;
92
+ border-radius: 2px;
93
+ background-color: rgba(0, 0, 0, 0.4);
94
+ font-size: 10px;
95
+ -webkit-box-sizing: border-box;
96
+ -moz-box-sizing: border-box;
97
+ box-sizing: border-box;
98
+ width: 14px;
99
+ padding-top: 6px;
100
+ }
101
+
102
+ #wp-live-chat-close {
103
+ position: absolute;
104
+ right: 5px;
105
+ top: 4px;
106
+ cursor: pointer;
107
+ border-radius: 2px;
108
+ background-color: rgba(0, 0, 0, 0.4);
109
+ font-size: 12px;
110
+ vertical-align: middle;
111
+ height: 14px;
112
+ width: 14px;
113
+ text-align: center;
114
+ vertical-align: bottom;
115
+ padding-top: 1px;
116
+ -webkit-box-sizing: border-box;
117
+ -moz-box-sizing: border-box;
118
+ box-sizing: border-box;
119
+ }
120
+
121
+
122
+ #wp-live-chat-2-info {
123
+ font-size: 13px;
124
+ display: block;
125
+ width: 212px;
126
+ overflow: hidden;
127
+ text-align: center;
128
+ margin: 0 auto;
129
+ }
130
+
131
+ #wp-live-chat-2-img {
132
+ padding-bottom: 5px;
133
+ }
134
+
135
+ #wplc_chatmsg {
136
+ width: 100%;
137
+ }
138
+
139
+ .wplc_offline {
140
+ font-size: 12px;
141
+ font-weight: 700;
142
+ }
143
+
144
+ .wplc_logo_class {
145
+ max-width: 250px;
146
+ }
147
+ #wp-live-chat-header{
148
+ padding: 10px 0 0;
149
+ border-radius: 5px 5px 0 0;
150
+ position:relative;
151
+ }
152
+ #wp-live-chat-image{
153
+ position: absolute;
154
+ width: 40px;
155
+ padding:4px;
156
+ max-height: 40px;
157
+ background: #fff;
158
+ -webkit-border-radius: 3px;
159
+ -moz-border-radius: 3px;
160
+ border-radius: 3px;
161
+ top: -35px;
162
+ left: 20px;
163
+ -webkit-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
164
+ -moz-box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
165
+ box-shadow: 0px 0px 5px 0px rgba(100, 100, 100, 0.7);
166
+ }
167
+ #wp-live-chat-image img {
168
+ -webkit-border-radius: 3px;
169
+ -moz-border-radius: 3px;
170
+ border-radius: 3px;
171
+ }
172
+ #wp-live-chat-2 {
173
+ padding:5px;
174
+ }
175
+ #wp-live-chat-2 input{
176
+ display:block;
177
+ margin:5px 0;
178
+ width:100%;
179
+ -webkit-box-sizing: border-box;
180
+ -moz-box-sizing: border-box;
181
+ box-sizing: border-box;
182
+ height: inherit;
183
+ background-image: none;
184
+ filter:none;
185
+ text-shadow: none;
186
+ }
187
+ .wplc-clear-float-message{
188
+ clear: both;
189
+ }
190
+
191
+
192
+ #wplc_message_div{
193
+ text-align: center;
194
+ }
195
+ #wp-live-chat-inner-image-div{
196
+ overflow: hidden;
197
+ height: 32px;
198
+ }
199
+
200
+ .wplc_close.wplc_left #wp-live-chat-1{
201
+ -ms-transform: rotate(90deg);
202
+ -moz-transform: rotate(90deg);
203
+ -webkit-transform: rotate(90deg);
204
+ transform: rotate(90deg);
205
+ -ms-transform-origin: left top 0;
206
+ -moz-transform-origin: left top 0;
207
+ -webkit-transform-origin: left top 0;
208
+ transform-origin: left top 0;
209
+ float: left;
210
+ width: 195px;
211
+ position: absolute;
212
+ top: 27px;
213
+ padding-left: 0;
214
+ left: 39px;
215
+ }
216
+ .wplc_left #wp-live-chat-header{
217
+ border-radius: 0px 5px 5px 0;
218
+ }
219
+ .wplc_close.wplc_left #wp-live-chat-header{
220
+ position: absolute;
221
+ top: 0;
222
+ width: 45px;
223
+ bottom: 0;
224
+ right: 0;
225
+ }
226
+ .wplc_open.wplc_left #wp-live-chat-header{
227
+ border-radius: 0px 5px 0px 0;
228
+ }
229
+
230
+ .wplc_close.wplc_left .wp-live-chat-wrapper, .wplc_close.wplc_right .wp-live-chat-wrapper{
231
+ position: relative;
232
+ height: 250px;
233
+ }
234
+ .wplc_left{
235
+ border-radius: 0px 5px 5px 0 !important;
236
+ }
237
+ .wplc_close.wplc_left{
238
+ padding-right: 45px;
239
+ height: 220px;
240
+ }
241
+
242
+ .wplc_left #wplc_chatbox, .wplc_right #wplc_chatbox{
243
+ height: 330px !important;
244
+ width: 240px;
245
+ }
246
+
247
+ .wplc_close.wplc_right #wp-live-chat-1{
248
+ -ms-transform: rotate(-90deg);
249
+ -moz-transform: rotate(-90deg);
250
+ -webkit-transform: rotate(-90deg);
251
+ transform: rotate(-90deg);
252
+ -ms-transform-origin: 0 0 0;
253
+ -moz-transform-origin: 0 0 0;
254
+ -webkit-transform-origin: 0 0 0;
255
+ transform-origin: 0 0 0;
256
+ float: left;
257
+ width: 180px;
258
+ padding:0 !important;
259
+ bottom: 0;
260
+ position: absolute;
261
+ left: 8px;
262
+ }
263
+
264
+ .wplc_close.wplc_right #wp-live-chat-header{
265
+ position: absolute;
266
+ top: 0;
267
+ width: 45px;
268
+ bottom: 0;
269
+ left: 0;
270
+ border-radius: 5px 0px 0px 5px;
271
+ }
272
+
273
+ .wplc_close.wplc_right{
274
+ padding-left: 45px;
275
+ height: 220px;
276
+ border-radius: 5px 0px 0px 5px !important;
277
+ }
278
+ .wplc_open.wplc_right #wp-live-chat-header{
279
+ border-radius: 5px 0px 0px 0;
280
+ }
281
+ .wplc_right{
282
+ border-radius: 5px 0px 0px 5px !important;
283
+ }
284
+ .wplc_close.wplc_left #wp-live-chat-image{
285
+ top: 25px;
286
+ left: 35px;
287
+ }
288
+ .wplc_close.wplc_right #wp-live-chat-image {
289
+ bottom: 18px;
290
+ left: initial;
291
+ right: 38px;
292
+ top: initial;
293
+ }
294
+
295
+
296
+
297
+
298
+ .wplc-admin-message {
299
+
300
+ padding:10px;
301
+ -webkit-border-radius: 2px;
302
+ -moz-border-radius: 2px;
303
+ border-radius: 2px;
304
+ border: 1px solid #ccc;
305
+ margin-top:2px;
306
+ background-color:#EEE;
307
+ display: inline-block;
308
+ float: left;
309
+ clear:both;
310
+ margin-bottom: 3px;
311
+
312
+
313
+ }
314
+
315
+ .wplc-user-message {
316
+
317
+ padding:10px;
318
+ -webkit-border-radius: 2px;
319
+ -moz-border-radius: 2px;
320
+ border-radius: 2px;
321
+ border: 1px solid #ffdb99;
322
+ margin-top:2px;
323
+ background-color:#fff6ef;
324
+ color:#000;
325
+ display: inline-block;
326
+ float: right;
327
+ clear:both;
328
+ margin-bottom: 3px;
329
+
330
+ }
331
+
332
+ .chat_time {
333
+ display:block;
334
+ width:100%;
335
+ text-align:center;
336
+ font-size:0.8em;
337
+ color:#ccc;
338
+ clear:both;
339
+
340
+ }
341
+
342
+ .wplc-user-message hr, .wplc-admin-message hr{
343
+ margin-bottom: 0px !important;
344
+ }
345
+
346
+ /* MOVE TO CHAT EXPERIENCE PLUGIN */
347
+
348
+ #wplc_star_rating{
349
+ text-align: center;
350
+ padding: 10px;
351
+ }
352
+
functions.php CHANGED
@@ -501,7 +501,7 @@ function wplc_list_chats_new($post_data) {
501
  $data_array[$result->id]['type'] = __("Returning","wplivechat");
502
  }
503
 
504
- $data_array[$result->id]['image'] = "<img src=\"//www.gravatar.com/avatar/".md5($result->email)."?s=20&d=mm\" />";
505
  $data_array[$result->id]['data']['browsing'] = $result->url;
506
  $path = parse_url($result->url, PHP_URL_PATH);
507
 
@@ -523,6 +523,7 @@ function wplc_list_chats_new($post_data) {
523
 
524
 
525
  function wplc_return_user_chat_messages($cid) {
 
526
  global $wpdb;
527
  global $wplc_tblname_msgs;
528
 
@@ -540,16 +541,18 @@ function wplc_return_user_chat_messages($cid) {
540
 
541
  "
542
  );
 
543
  $msg_hist = "";
544
  foreach ($results as $result) {
545
  $id = $result->id;
546
  $from = $result->msgfrom;
547
 
 
548
  $msg = $result->msg;
549
  //$timestamp = strtotime($result->timestamp);
550
  //$timeshow = date("H:i",$timestamp);
551
  if($result->originates == 1){
552
- $class = "wplc-admin-message";
553
  if(function_exists("wplc_pro_get_admin_picture")){
554
  $src = wplc_pro_get_admin_picture();
555
  if($src){
@@ -558,15 +561,31 @@ function wplc_return_user_chat_messages($cid) {
558
  $image = "";
559
  }
560
  } else {
561
- $image = "";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  }
563
  } else {
564
- $class = "wplc-user-message";
565
 
566
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim(sanitize_text_field($_COOKIE['wplc_email'])))); } else { $wplc_user_gravatar = ""; }
567
 
568
  if($wplc_user_gravatar != ""){
569
- $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' />";
570
  } else {
571
  $image = "";
572
  }
@@ -579,9 +598,9 @@ function wplc_return_user_chat_messages($cid) {
579
 
580
 
581
  if($display_name){
582
- $msg_hist .= "<span class='wplc-admin-message'>$image <strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
583
  } else {
584
- $msg_hist .= "<span class='wplc-admin-message'>$msg</span><div class='wplc-clear-float-message'></div>";
585
  }
586
 
587
 
@@ -595,26 +614,69 @@ function wplc_return_user_chat_messages($cid) {
595
  }
596
 
597
 
598
- function wplc_change_chat_status($id,$status) {
599
  global $wpdb;
600
  global $wplc_tblname_chats;
601
- $results = $wpdb->get_results(
602
- "
603
- UPDATE $wplc_tblname_chats
604
- SET `status` = '$status'
605
- WHERE `id` = '$id'
606
- LIMIT 1
607
- "
608
- );
609
- $wpdb->update(
610
- $wplc_tblname_chats,
611
- array(
612
- 'status' => $status
613
- ),
614
- array('id' => $id),
615
- array('%d'),
616
- array('%d')
617
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
618
  return true;
619
 
620
  }
@@ -631,7 +693,7 @@ function wplc_return_chat_messages($cid,$transcript = false,$html = true) {
631
  $results = wplc_get_chat_messages($cid);
632
  if (!$results) { return; }
633
 
634
-
635
  $msg_hist = "";
636
  $previous_time = "";
637
  $previous_timestamp = 0;
@@ -652,20 +714,41 @@ function wplc_return_chat_messages($cid,$transcript = false,$html = true) {
652
 
653
  $image = "";
654
  if($result->originates == 1){
655
- $class = "wplc-admin-message";
 
 
 
656
  if(function_exists("wplc_pro_get_admin_picture")){
657
  $src = wplc_pro_get_admin_picture();
658
  if($src){
659
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
660
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
  }
662
  } else {
663
- $class = "wplc-user-message";
664
 
665
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim(sanitize_text_field($_COOKIE['wplc_email'])))); } else { $wplc_user_gravatar = ""; }
666
 
667
  if($wplc_user_gravatar != ""){
668
- $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' />";
669
  } else {
670
  $image = "";
671
  }
@@ -679,13 +762,13 @@ function wplc_return_chat_messages($cid,$transcript = false,$html = true) {
679
 
680
  if($display_name){
681
  if ($html) {
682
- $msg_hist .= "<span class='chat_time'>$timeshow</span> <span class='$class'>$image <strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
683
  } else {
684
  $msg_hist .= "($timeshow) $from: $msg\r\n";
685
  }
686
  } else {
687
  if ($html) {
688
- $msg_hist .= "<span class='chat_time'>$timeshow</span> <span class='$class'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
689
  } else {
690
  $msg_hist .= "($timeshow) $from: $msg\r\n";
691
  }
@@ -779,20 +862,23 @@ function wplc_return_admin_chat_messages($cid) {
779
  //$timeshow = date("H:i",$timestamp);
780
  $image = "";
781
  if($result->originates == 1){
782
- $class = "wplc-admin-message";
783
  if(function_exists("wplc_pro_get_admin_picture")){
784
  $src = wplc_pro_get_admin_picture();
785
  if($src){
786
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
787
  }
 
 
 
788
  }
789
  } else {
790
- $class = "wplc-user-message";
791
 
792
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim($_COOKIE['wplc_email']))); } else { $wplc_user_gravatar = ""; }
793
 
794
  if($wplc_user_gravatar != ""){
795
- $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' />";
796
  } else {
797
  $image = "";
798
  }
@@ -805,9 +891,9 @@ function wplc_return_admin_chat_messages($cid) {
805
  $msg = apply_filters("wplc_filter_message_control_out",$msg);
806
 
807
  if($display_name){
808
- $msg_hist .= "<span class='wplc-user-message'>".$image."<strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
809
  } else {
810
- $msg_hist .= "<span class='wplc-user-message'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
811
  }
812
  }
813
 
@@ -1179,8 +1265,7 @@ function wplc_user_initiate_chat($name,$email,$cid = null,$session) {
1179
  }
1180
 
1181
  if ($cid != null) { /* change from a visitor to a chat */
1182
-
1183
-
1184
  $wpdb->update(
1185
  $wplc_tblname_chats,
1186
  array(
@@ -1206,16 +1291,14 @@ function wplc_user_initiate_chat($name,$email,$cid = null,$session) {
1206
  ),
1207
  array('%d')
1208
  );
1209
-
1210
  return $cid;
1211
  }
1212
  else {
1213
 
1214
-
1215
  $wpdb->insert(
1216
  $wplc_tblname_chats,
1217
  array(
1218
- 'status' => '2',
1219
  'timestamp' => current_time('mysql'),
1220
  'name' => $name,
1221
  'email' => $email,
@@ -1498,7 +1581,7 @@ function wplc_admin_display_missed_chats() {
1498
  foreach ($results as $result) {
1499
  echo "<tr id=\"record_" . $result->id . "\">";
1500
  echo "<td class='chat_id column-chat_d'>" . $result->timestamp . "</td>";
1501
- echo "<td class='chat_name column_chat_name' id='chat_name_" . $result->id . "'><img src=\"//www.gravatar.com/avatar/" . md5($result->email) . "?s=30\" /> " . $result->name . "</td>";
1502
  echo "<td class='chat_email column_chat_email' id='chat_email_" . $result->id . "'><a href='mailto:" . $result->email . "' title='Email " . ".$result->email." . "'>" . $result->email . "</a></td>";
1503
  echo "<td class='chat_name column_chat_url' id='chat_url_" . $result->id . "'>" . $result->url . "</td>";
1504
  echo "</tr>";
501
  $data_array[$result->id]['type'] = __("Returning","wplivechat");
502
  }
503
 
504
+ $data_array[$result->id]['image'] = "<img src=\"//www.gravatar.com/avatar/".md5($result->email)."?s=30&d=mm\" class='wplc-user-message-avatar' />";
505
  $data_array[$result->id]['data']['browsing'] = $result->url;
506
  $path = parse_url($result->url, PHP_URL_PATH);
507
 
523
 
524
 
525
  function wplc_return_user_chat_messages($cid) {
526
+
527
  global $wpdb;
528
  global $wplc_tblname_msgs;
529
 
541
 
542
  "
543
  );
544
+ $cdata = wplc_get_chat_data($cid);
545
  $msg_hist = "";
546
  foreach ($results as $result) {
547
  $id = $result->id;
548
  $from = $result->msgfrom;
549
 
550
+
551
  $msg = $result->msg;
552
  //$timestamp = strtotime($result->timestamp);
553
  //$timeshow = date("H:i",$timestamp);
554
  if($result->originates == 1){
555
+ $class = "wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4";
556
  if(function_exists("wplc_pro_get_admin_picture")){
557
  $src = wplc_pro_get_admin_picture();
558
  if($src){
561
  $image = "";
562
  }
563
  } else {
564
+ $other = maybe_unserialize($cdata->other);
565
+ if (isset($other['aid'])) {
566
+ $user_info = get_userdata(intval($other['aid']));
567
+ /* get agent id */
568
+ $image = "<img src='//www.gravatar.com/avatar/".$user_info->email."?s=30' class='wplc-admin-message-avatar' />";
569
+ } else {
570
+
571
+ /* get default setting in the notifications tab */
572
+ $image = "";
573
+ if(1 == 1) {
574
+
575
+ } else {
576
+ /* there's nothing Jim.. */
577
+ $image = "";
578
+ }
579
+ }
580
+
581
  }
582
  } else {
583
+ $class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
584
 
585
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim(sanitize_text_field($_COOKIE['wplc_email'])))); } else { $wplc_user_gravatar = ""; }
586
 
587
  if($wplc_user_gravatar != ""){
588
+ $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";
589
  } else {
590
  $image = "";
591
  }
598
 
599
 
600
  if($display_name){
601
+ $msg_hist .= "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$image <strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
602
  } else {
603
+ $msg_hist .= "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$msg</span><div class='wplc-clear-float-message'></div>";
604
  }
605
 
606
 
614
  }
615
 
616
 
617
+ function wplc_change_chat_status($id,$status,$aid = 0) {
618
  global $wpdb;
619
  global $wplc_tblname_chats;
620
+
621
+
622
+
623
+
624
+ if ($aid > 0) {
625
+ /* only run when accepting a chat */
626
+ $results = $wpdb->get_results("SELECT * FROM ".$wplc_tblname_chats." WHERE `id` = '".$id."' LIMIT 1");
627
+ foreach ($results as $result) {
628
+ $other = maybe_unserialize($result->other);
629
+ if (isset($other['aid']) && $other['aid'] > 0) {
630
+ /* we have recorded this already */
631
+
632
+ } else {
633
+ /* first time answering the chat! */
634
+
635
+
636
+ /* send welcome note */
637
+ $wplc_settings = get_option("WPLC_SETTINGS");
638
+ $wplc_welcome = __('Welcome. How may I help you?', 'wplivechat');
639
+ if(isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1){ $wplc_using_locale = true; } else { $wplc_using_locale = false; }
640
+ if (!isset($wplc_settings['wplc_user_welcome_chat']) || $wplc_settings['wplc_user_welcome_chat'] == "") { $wplc_settings['wplc_user_welcome_chat'] = $wplc_welcome; }
641
+ $text2 = ($wplc_using_locale ? $wplc_welcome : stripslashes($wplc_settings['wplc_user_welcome_chat']));
642
+
643
+ $chat_id = sanitize_text_field($id);
644
+ $chat_msg = sanitize_text_field($text2);
645
+ $wplc_rec_msg = wplc_record_chat_msg("2",$chat_id,$chat_msg);
646
+ }
647
+
648
+ $other['aid'] = $aid;
649
+ }
650
+ }
651
+
652
+
653
+
654
+
655
+ if ($aid > 0) {
656
+ $wpdb->update(
657
+ $wplc_tblname_chats,
658
+ array(
659
+ 'status' => $status,
660
+ 'other' => maybe_serialize($other)
661
+ ),
662
+ array('id' => $id),
663
+ array(
664
+ '%d',
665
+ '%s'
666
+ ),
667
+ array('%d')
668
+ );
669
+ } else {
670
+ $wpdb->update(
671
+ $wplc_tblname_chats,
672
+ array(
673
+ 'status' => $status
674
+ ),
675
+ array('id' => $id),
676
+ array('%d'),
677
+ array('%d')
678
+ );
679
+ }
680
  return true;
681
 
682
  }
693
  $results = wplc_get_chat_messages($cid);
694
  if (!$results) { return; }
695
 
696
+ $cdata = wplc_get_chat_data($cid);
697
  $msg_hist = "";
698
  $previous_time = "";
699
  $previous_timestamp = 0;
714
 
715
  $image = "";
716
  if($result->originates == 1){
717
+
718
+
719
+
720
+ $class = "wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4";
721
  if(function_exists("wplc_pro_get_admin_picture")){
722
  $src = wplc_pro_get_admin_picture();
723
  if($src){
724
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
725
  }
726
+ } else {
727
+ $other = maybe_unserialize($cdata->other);
728
+ if (isset($other['aid'])) {
729
+ $user_info = get_userdata(intval($other['aid']));
730
+ /* get agent id */
731
+ $image = "<img src='//www.gravatar.com/avatar/".$user_info->email."?s=30' class='wplc-admin-message-avatar' />";
732
+ } else {
733
+
734
+ /* get default setting in the notifications tab */
735
+ $image = "";
736
+ if(1 == 1) {
737
+
738
+ } else {
739
+ /* there's nothing Jim.. */
740
+ $image = "";
741
+ }
742
+ }
743
+
744
  }
745
  } else {
746
+ $class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
747
 
748
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim(sanitize_text_field($_COOKIE['wplc_email'])))); } else { $wplc_user_gravatar = ""; }
749
 
750
  if($wplc_user_gravatar != ""){
751
+ $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";
752
  } else {
753
  $image = "";
754
  }
762
 
763
  if($display_name){
764
  if ($html) {
765
+ $msg_hist .= "<span class='chat_time wplc-color-4'>$timeshow</span> <span class='$class'>$image <strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
766
  } else {
767
  $msg_hist .= "($timeshow) $from: $msg\r\n";
768
  }
769
  } else {
770
  if ($html) {
771
+ $msg_hist .= "<span class='chat_time wplc-color-4'>$timeshow</span> <span class='$class'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
772
  } else {
773
  $msg_hist .= "($timeshow) $from: $msg\r\n";
774
  }
862
  //$timeshow = date("H:i",$timestamp);
863
  $image = "";
864
  if($result->originates == 1){
865
+ $class = "wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4";
866
  if(function_exists("wplc_pro_get_admin_picture")){
867
  $src = wplc_pro_get_admin_picture();
868
  if($src){
869
  $image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
870
  }
871
+ } else {
872
+ /* HERE */
873
+ $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' class='wplc-admin-message-avatar' />";
874
  }
875
  } else {
876
+ $class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
877
 
878
  if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim($_COOKIE['wplc_email']))); } else { $wplc_user_gravatar = ""; }
879
 
880
  if($wplc_user_gravatar != ""){
881
+ $image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' class='wplc-user-message-avatar' />";
882
  } else {
883
  $image = "";
884
  }
891
  $msg = apply_filters("wplc_filter_message_control_out",$msg);
892
 
893
  if($display_name){
894
+ $msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>".$image."<strong>$from</strong>: $msg</span><br /><div class='wplc-clear-float-message'></div>";
895
  } else {
896
+ $msg_hist .= "<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>$msg</span><br /><div class='wplc-clear-float-message'></div>";
897
  }
898
  }
899
 
1265
  }
1266
 
1267
  if ($cid != null) { /* change from a visitor to a chat */
1268
+
 
1269
  $wpdb->update(
1270
  $wplc_tblname_chats,
1271
  array(
1291
  ),
1292
  array('%d')
1293
  );
 
1294
  return $cid;
1295
  }
1296
  else {
1297
 
 
1298
  $wpdb->insert(
1299
  $wplc_tblname_chats,
1300
  array(
1301
+ 'status' => 2,
1302
  'timestamp' => current_time('mysql'),
1303
  'name' => $name,
1304
  'email' => $email,
1581
  foreach ($results as $result) {
1582
  echo "<tr id=\"record_" . $result->id . "\">";
1583
  echo "<td class='chat_id column-chat_d'>" . $result->timestamp . "</td>";
1584
+ echo "<td class='chat_name column_chat_name' id='chat_name_" . $result->id . "'><img src=\"//www.gravatar.com/avatar/" . md5($result->email) . "?s=30\" class='wplc-user-message-avatar' /> " . $result->name . "</td>";
1585
  echo "<td class='chat_email column_chat_email' id='chat_email_" . $result->id . "'><a href='mailto:" . $result->email . "' title='Email " . ".$result->email." . "'>" . $result->email . "</a></td>";
1586
  echo "<td class='chat_name column_chat_url' id='chat_url_" . $result->id . "'>" . $result->url . "</td>";
1587
  echo "</tr>";
images/chaticon.png ADDED
Binary file
images/iconmicro.png ADDED
Binary file
images/themes/newtheme-1.jpg ADDED
Binary file
images/themes/newtheme-2.jpg ADDED
Binary file
includes/deprecated.php CHANGED
@@ -2,6 +2,7 @@
2
  /* will soon become deprecated */
3
  function wplc_output_box_ajax() {
4
 
 
5
  if(function_exists('wplc_display_chat_contents')){
6
  $display_contents = wplc_display_chat_contents();
7
  } else {
@@ -81,12 +82,12 @@ function wplc_output_box_ajax() {
81
  $wplc_class = "wplc_right";
82
  }
83
 
84
- if ($wplc_settings["wplc_settings_fill"]) {
85
  $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
86
  } else {
87
  $wplc_settings_fill = "#ed832f";
88
  }
89
- if ($wplc_settings["wplc_settings_font"]) {
90
  $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
91
  } else {
92
  $wplc_settings_font = "#FFFFFF";
2
  /* will soon become deprecated */
3
  function wplc_output_box_ajax() {
4
 
5
+
6
  if(function_exists('wplc_display_chat_contents')){
7
  $display_contents = wplc_display_chat_contents();
8
  } else {
82
  $wplc_class = "wplc_right";
83
  }
84
 
85
+ if (isset($wplc_settings["wplc_settings_fill"])) {
86
  $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
87
  } else {
88
  $wplc_settings_fill = "#ed832f";
89
  }
90
+ if (isset($wplc_settings["wplc_settings_font"])) {
91
  $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
92
  } else {
93
  $wplc_settings_font = "#FFFFFF";
includes/settings_page.php CHANGED
@@ -1,4 +1,10 @@
1
- <?php wplc_stats("settings"); ?>
 
 
 
 
 
 
2
 
3
  <?php
4
  if (get_option("WPLC_HIDE_CHAT") == true) {
@@ -19,14 +25,19 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
19
  </div>
20
  <h2><?php _e("WP Live Chat Support Settings","wplivechat")?></h2>
21
  <?php
22
- $wplc_settings = get_option("WPLC_SETTINGS");
23
 
24
  $wplc_mail_type = get_option("wplc_mail_type");
25
  if (!isset($wplc_mail_type) || $wplc_mail_type == "" || !$wplc_mail_type) { $wplc_mail_type = "wp_mail"; }
26
  if ($wplc_settings["wplc_settings_align"]) { $wplc_settings_align[intval($wplc_settings["wplc_settings_align"])] = "SELECTED"; }
27
  if ($wplc_settings["wplc_settings_enabled"]) { $wplc_settings_enabled[intval($wplc_settings["wplc_settings_enabled"])] = "SELECTED"; }
28
- if ($wplc_settings["wplc_settings_fill"]) { $wplc_settings_fill = $wplc_settings["wplc_settings_fill"]; } else { $wplc_settings_fill = "ed832f"; }
29
- if ($wplc_settings["wplc_settings_font"]) { $wplc_settings_font = $wplc_settings["wplc_settings_font"]; } else { $wplc_settings_font = "FFFFFF"; }
 
 
 
 
 
 
30
  if(get_option("WPLC_HIDE_CHAT") == true) { $wplc_hide_chat = "checked"; } else { $wplc_hide_chat = ""; };
31
 
32
  ?>
@@ -88,6 +99,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
88
  </select>
89
  </td>
90
  </tr>
 
91
  <tr>
92
  <td width='400' valign='top'>
93
  <?php _e("Hide Chat", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Hides chat for 24hrs when user clicks X", "wplivechat") ?>"></i>
@@ -96,6 +108,7 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
96
  <input type="checkbox" name="wplc_hide_chat" value="true" <?php echo $wplc_hide_chat ?>/>
97
  </td>
98
  </tr>
 
99
  <tr>
100
  <td width='200' valign='top'>
101
  <?php _e("Require Name And Email","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Users will have to enter their Name and Email Address when starting a chat", "wplivechat") ?>"></i>
@@ -144,6 +157,40 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
144
  <input type="checkbox" value="1" name="wplc_enable_msg_sound" <?php if(isset($wplc_settings['wplc_enable_msg_sound']) && $wplc_settings['wplc_enable_msg_sound'] == 1 ) { echo "checked"; } ?> />
145
  </td>
146
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
 
149
  </table>
@@ -172,6 +219,90 @@ if (get_option("WPLC_HIDE_CHAT") == true) {
172
  </td>
173
  </tr>
174
  <tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
  <tr>
177
  <td>
@@ -344,84 +475,135 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
344
  <h3><?php _e("Styling",'wplivechat')?></h3>
345
  <table class='form-table' width='700'>
346
 
347
- <tr style='margin-bottom: 10px;'>
348
- <td><label for=""><?php _e('Choose a theme', 'sola_t'); ?></label></td>
349
- <td>
350
- <div class='wplc_theme_block'>
351
- <div class='wplc_theme_image' id=''>
352
- <div class='wplc_theme_single'>
353
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-1.png'; ?>' title="<?php _e('Theme 1', 'wplivechat'); ?>" alt="<?php _e('Theme 1', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') {
354
- echo 'wplc_theme_active';
355
- } ?>' id='wplc_theme_1'/>
356
- <?php _e('Theme 1', 'wplivechat'); ?>
357
- </div>
358
- <div class='wplc_theme_single'>
359
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-2.png'; ?>' title="<?php _e('Theme 2', 'wplivechat'); ?>" alt="<?php _e('Theme 2', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') {
360
- echo 'wplc_theme_active';
361
- } ?>' id='wplc_theme_2'/>
362
- <?php _e('Theme 2', 'wplivechat'); ?>
363
- </div>
364
- <div class='wplc_theme_single'>
365
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-3.png'; ?>' title="<?php _e('Theme 3', 'wplivechat'); ?>" alt="<?php _e('Theme 3', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') {
366
- echo 'wplc_theme_active';
367
- } ?>' id='wplc_theme_3'/>
368
- <?php _e('Theme 3', 'wplivechat'); ?>
369
- </div>
370
- <div class='wplc_theme_single'>
371
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-4.png'; ?>' title="<?php _e('Theme 4', 'wplivechat'); ?>" alt="<?php _e('Theme 4', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') {
372
- echo 'wplc_theme_active';
373
- } ?>' id='wplc_theme_4'/>
374
- <?php _e('Theme 4', 'wplivechat'); ?>
375
- </div>
376
- <div class='wplc_theme_single'>
377
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-5.png'; ?>' title="<?php _e('Theme 5', 'wplivechat'); ?>" alt="<?php _e('Theme 5', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') {
378
- echo 'wplc_theme_active';
379
- } ?>' id='wplc_theme_5'/>
380
- <?php _e('Theme 5', 'wplivechat'); ?>
381
- </div>
382
- <div class='wplc_theme_single'>
383
- <img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/theme-6.png'; ?>' title="<?php _e('Theme 6', 'wplivechat'); ?>" alt="<?php _e('Theme 6', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') {
384
- echo 'wplc_theme_active';
385
- } ?>' id='wplc_theme_6'/>
386
- <?php _e('Custom. Enter Colour Values Below', 'wplivechat'); ?>
387
- </div>
388
  </div>
389
  </div>
390
- <input type="radio" name="wplc_theme" value="theme-1" class="wplc_hide_input" id="wplc_rb_theme_1" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') {
391
- echo 'checked';
392
- } ?>/>
393
- <input type="radio" name="wplc_theme" value="theme-2" class="wplc_hide_input" id="wplc_rb_theme_2" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') {
394
- echo 'checked';
395
- } ?>/>
396
- <input type="radio" name="wplc_theme" value="theme-3" class="wplc_hide_input" id="wplc_rb_theme_3" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') {
397
- echo 'checked';
398
- } ?>/>
399
- <input type="radio" name="wplc_theme" value="theme-4" class="wplc_hide_input" id="wplc_rb_theme_4" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') {
400
- echo 'checked';
401
- } ?>/>
402
- <input type="radio" name="wplc_theme" value="theme-5" class="wplc_hide_input" id="wplc_rb_theme_5" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') {
403
- echo 'checked';
404
- } ?>/>
405
- <input type="radio" name="wplc_theme" value="theme-6" class="wplc_hide_input" id="wplc_rb_theme_6" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-6') {
406
- echo 'checked';
407
- } ?>/>
408
 
409
- </td>
410
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  <tr height="30">
412
  <td>&nbsp;</td>
413
  <td>&nbsp;</td>
414
  </tr>
415
  <tr>
416
- <td width='200' valign='top'><?php _e("Chat box fill color","wplivechat")?>:</td>
 
 
 
 
 
 
 
 
 
 
 
 
417
  <td>
418
- <input id="wplc_settings_fill" name="wplc_settings_fill" type="text" class="color" value="<?php echo $wplc_settings_fill;?>" />
419
  </td>
420
  </tr>
421
  <tr>
422
- <td width='200' valign='top'><?php _e("Chat box font color","wplivechat")?>:</td>
423
  <td>
424
- <input id="wplc_settings_font" name="wplc_settings_font" type="text" class="color" value="<?php echo $wplc_settings_font;?>" />
425
  </td>
426
  </tr>
427
 
@@ -498,7 +680,7 @@ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide
498
  }
499
  </style>
500
  <tr>
501
- <th><label for=""><?php _e('Choose an animation', 'sola_t'); ?></label></th>
502
 
503
  <td>
504
  <div class='wplc_animation_block'>
1
+ <?php wplc_stats("settings");
2
+
3
+
4
+ if (function_exists("wplc_string_check")) { wplc_string_check(); }
5
+ $wplc_settings = get_option("WPLC_SETTINGS");
6
+
7
+ ?>
8
 
9
  <?php
10
  if (get_option("WPLC_HIDE_CHAT") == true) {
25
  </div>
26
  <h2><?php _e("WP Live Chat Support Settings","wplivechat")?></h2>
27
  <?php
 
28
 
29
  $wplc_mail_type = get_option("wplc_mail_type");
30
  if (!isset($wplc_mail_type) || $wplc_mail_type == "" || !$wplc_mail_type) { $wplc_mail_type = "wp_mail"; }
31
  if ($wplc_settings["wplc_settings_align"]) { $wplc_settings_align[intval($wplc_settings["wplc_settings_align"])] = "SELECTED"; }
32
  if ($wplc_settings["wplc_settings_enabled"]) { $wplc_settings_enabled[intval($wplc_settings["wplc_settings_enabled"])] = "SELECTED"; }
33
+ if (isset($wplc_settings["wplc_settings_fill"])) { $wplc_settings_fill = $wplc_settings["wplc_settings_fill"]; } else { $wplc_settings_fill = "ed832f"; }
34
+ if (isset($wplc_settings["wplc_settings_font"])) { $wplc_settings_font = $wplc_settings["wplc_settings_font"]; } else { $wplc_settings_font = "FFFFFF"; }
35
+ if (isset($wplc_settings["wplc_settings_color1"])) { $wplc_settings_color1 = $wplc_settings["wplc_settings_color1"]; } else { $wplc_settings_color1 = "ED832F"; }
36
+ if (isset($wplc_settings["wplc_settings_color2"])) { $wplc_settings_color2 = $wplc_settings["wplc_settings_color2"]; } else { $wplc_settings_color2 = "FFFFFF"; }
37
+ if (isset($wplc_settings["wplc_settings_color3"])) { $wplc_settings_color3 = $wplc_settings["wplc_settings_color3"]; } else { $wplc_settings_color3 = "EEEEEE"; }
38
+ if (isset($wplc_settings["wplc_settings_color4"])) { $wplc_settings_color4 = $wplc_settings["wplc_settings_color4"]; } else { $wplc_settings_color4 = "666666"; }
39
+
40
+
41
  if(get_option("WPLC_HIDE_CHAT") == true) { $wplc_hide_chat = "checked"; } else { $wplc_hide_chat = ""; };
42
 
43
  ?>
99
  </select>
100
  </td>
101
  </tr>
102
+ <!--
103
  <tr>
104
  <td width='400' valign='top'>
105
  <?php _e("Hide Chat", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Hides chat for 24hrs when user clicks X", "wplivechat") ?>"></i>
108
  <input type="checkbox" name="wplc_hide_chat" value="true" <?php echo $wplc_hide_chat ?>/>
109
  </td>
110
  </tr>
111
+ -->
112
  <tr>
113
  <td width='200' valign='top'>
114
  <?php _e("Require Name And Email","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Users will have to enter their Name and Email Address when starting a chat", "wplivechat") ?>"></i>
157
  <input type="checkbox" value="1" name="wplc_enable_msg_sound" <?php if(isset($wplc_settings['wplc_enable_msg_sound']) && $wplc_settings['wplc_enable_msg_sound'] == 1 ) { echo "checked"; } ?> />
158
  </td>
159
  </tr>
160
+ <?php if (!function_exists("wplc_pro_activate")) { ?>
161
+
162
+ <tr>
163
+ <td width='200' valign='top'>
164
+ <?php _e("Include chat window on the following pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Show the chat window on the following pages. Leave blank to show on all. (Use comma-separated Page ID's)", "wplivechat") ?>"></i>
165
+ </td>
166
+ <td valign='top'>
167
+ <input type="text" readonly="readonly" />
168
+ <small>
169
+ <i>
170
+ <?php _e("available in the","wplivechat")?>
171
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=include_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
172
+ <?php _e("only","wplivechat")?>
173
+ </i>
174
+ </small>
175
+ </td>
176
+ </tr>
177
+ <tr>
178
+ <td width='200' valign='top'>
179
+ <?php _e("Exclude chat window on the following pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Do not show the chat window on the following pages. Leave blank to show on all. (Use comma-separated Page ID's)", "wplivechat") ?>"></i>
180
+ </td>
181
+ <td valign='top'>
182
+ <input type="text" readonly="readonly"/>
183
+ <small>
184
+ <i>
185
+ <?php _e("available in the","wplivechat")?>
186
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
187
+ <?php _e("only","wplivechat")?>
188
+ </i>
189
+ </small>
190
+ </td>
191
+ </tr>
192
+ <?php } ?>
193
+
194
 
195
 
196
  </table>
219
  </td>
220
  </tr>
221
  <tr>
222
+
223
+ <?php if (!function_exists("wplc_pro_activate")) { ?>
224
+ <tr>
225
+ <!-- Chat Name-->
226
+ <td width='200' valign='top'>
227
+ <?php _e("Name","wplivechat")?>:
228
+ </td>
229
+ <td>
230
+ <input type='text' size='50' maxlength='50' disabled readonly value='admin' />
231
+ <small>
232
+ <i>
233
+ <?php _e("available in the","wplivechat")?>
234
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=name" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
235
+ <?php _e("only","wplivechat")?>
236
+ </i>
237
+ </small>
238
+ </td>
239
+ </tr>
240
+ <!-- Chat Pic-->
241
+ <tr>
242
+ <td width='200' valign='top'>
243
+ <?php _e("Picture","wplivechat")?>:
244
+ </td>
245
+ <td>
246
+ <input id="wplc_pro_pic_button" type="button" value="<?php _e("Upload Image","wplivechat")?>" readonly disabled />
247
+ <small>
248
+ <i>
249
+ <?php _e("available in the","wplivechat")?>
250
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
251
+ <?php _e("only","wplivechat")?>
252
+ </i>
253
+ </small>
254
+ </td>
255
+ </tr>
256
+ <!-- Chat Logo-->
257
+ <tr>
258
+ <td width='200' valign='top'>
259
+ <?php _e("Logo","wplivechat")?>:
260
+ </td>
261
+ <td>
262
+ <input id="wplc_pro_logo_button" type="button" value="<?php _e("Upload Image","wplivechat")?>" readonly disabled />
263
+ <small>
264
+ <i>
265
+ <?php _e("available in the","wplivechat")?>
266
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
267
+ <?php _e("only","wplivechat")?>
268
+ </i>
269
+ </small>
270
+ </td>
271
+ </tr>
272
+ <!-- Chat Delay-->
273
+ <tr>
274
+ <td width='200' valign='top'>
275
+ <?php _e("Chat delay (seconds)","wplivechat")?>:
276
+ </td>
277
+ <td>
278
+ <input type='text' size='50' maxlength='50' disabled readonly value='10' />
279
+ <small>
280
+ <i>
281
+ <?php _e("available in the","wplivechat")?>
282
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=delay" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
283
+ <?php _e("only","wplivechat")?>
284
+ </i>
285
+ </small>
286
+ </td>
287
+ </tr>
288
+ <!-- Chat Notification if want to chat-->
289
+ <tr>
290
+ <td width='200' valign='top'>
291
+ <?php _e("Chat notifications", "wplivechat") ?>:
292
+ </td>
293
+ <td>
294
+ <input id='wplc_pro_chat_notification' name='wplc_pro_chat_notification' type='checkbox' value='yes' disabled="disabled" readonly/>
295
+ <?php _e("Alert me via email as soon as someone wants to chat", "wplivechat") ?>
296
+ <small>
297
+ <i>
298
+ <?php _e("available in the", "wplivechat") ?>
299
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=alert" title="<?php _e("Pro Add-on", "wplivechat") ?>" target="_BLANK"><?php _e("Pro Add-on", "wplivechat") ?></a>
300
+ <?php _e("only", "wplivechat") ?>
301
+ </i>
302
+ </small>
303
+ </td>
304
+ </tr>
305
+ <?php } ?>
306
 
307
  <tr>
308
  <td>
475
  <h3><?php _e("Styling",'wplivechat')?></h3>
476
  <table class='form-table' width='700'>
477
 
478
+
479
+ <tr style='margin-bottom: 10px;'>
480
+ <td><label for=""><?php _e('Choose a theme', 'wplivechat'); ?></label></td>
481
+ <td>
482
+ <div class='wplc_theme_block'>
483
+ <div class='wplc_theme_image' id=''>
484
+ <div class='wplc_theme_single'>
485
+ <img style='width:162px;' src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/newtheme-1.jpg'; ?>' title="<?php _e('Classic', 'wplivechat'); ?>" alt="<?php _e('Classic', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-1') { echo 'wplc_theme_active'; } ?>' id='wplc_newtheme_1'/>
486
+ <?php _e('Classic', 'wplivechat'); ?>
487
+ </div>
488
+ <div class='wplc_theme_single'>
489
+ <img style='width:162px;' src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/newtheme-2.jpg'; ?>' title="<?php _e('Modern', 'wplivechat'); ?>" alt="<?php _e('Modern', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-2') { echo 'wplc_theme_active'; } ?>' id='wplc_newtheme_2'/>
490
+ <?php _e('Modern', 'wplivechat'); ?>
491
+ </div>
492
+
493
+ </div>
494
+ </div>
495
+ <input type="radio" name="wplc_newtheme" value="theme-1" class="wplc_hide_input" id="wplc_new_rb_theme_1" <?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-1') { echo 'checked'; } ?>/>
496
+ <input type="radio" name="wplc_newtheme" value="theme-2" class="wplc_hide_input" id="wplc_new_rb_theme_2" <?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-2') { echo 'checked'; } ?>/>
497
+
498
+ </td>
499
+ </tr>
500
+ <tr height="30">
501
+ <td>&nbsp;</td>
502
+ <td>&nbsp;</td>
503
+ </tr>
504
+
505
+ <tr style='margin-bottom: 10px;'>
506
+ <td><label for=""><?php _e('Colour Scheme', 'wplivechat'); ?></label></td>
507
+ <td>
508
+ <div class='wplc_theme_block'>
509
+ <div class='wplc_palette'>
510
+ <div class='wplc_palette_single'>
511
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-default') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_default'>
512
+ <div class='wplc-palette-top' style='background-color:#ED832F;'></div>
513
+ <div class='wplc-palette-top' style='background-color:#FFF;'></div>
514
+ <div class='wplc-palette-top' style='background-color:#EEE;'></div>
515
+ <div class='wplc-palette-top' style='background-color:#666;'></div>
 
 
 
516
  </div>
517
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
 
519
+ <div class='wplc_palette_single'>
520
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_1'>
521
+ <div class='wplc-palette-top' style='background-color:#DB0000;'></div>
522
+ <div class='wplc-palette-top' style='background-color:#FFF;'></div>
523
+ <div class='wplc-palette-top' style='background-color:#000;'></div>
524
+ <div class='wplc-palette-top' style='background-color:#666;'></div>
525
+ </div>
526
+ </div>
527
+ <div class='wplc_palette_single'>
528
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_2'>
529
+ <div class='wplc-palette-top' style='background-color:#000;'></div>
530
+ <div class='wplc-palette-top' style='background-color:#FFF;'></div>
531
+ <div class='wplc-palette-top' style='background-color:#888;'></div>
532
+ <div class='wplc-palette-top' style='background-color:#666;'></div>
533
+ </div>
534
+ </div>
535
+ <div class='wplc_palette_single'>
536
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_3'>
537
+ <div class='wplc-palette-top' style='background-color:#B97B9D;'></div>
538
+ <div class='wplc-palette-top' style='background-color:#FFF;'></div>
539
+ <div class='wplc-palette-top' style='background-color:#EEE;'></div>
540
+ <div class='wplc-palette-top' style='background-color:#5A0031;'></div>
541
+ </div>
542
+ </div>
543
+ <div class='wplc_palette_single'>
544
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_4'>
545
+ <div class='wplc-palette-top' style='background-color:#1A14DB;'></div>
546
+ <div class='wplc-palette-top' style='background-color:#FDFDFF;'></div>
547
+ <div class='wplc-palette-top' style='background-color:#7F7FB3;'></div>
548
+ <div class='wplc-palette-top' style='background-color:#666;'></div>
549
+ </div>
550
+ </div>
551
+ <div class='wplc_palette_single'>
552
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_5'>
553
+ <div class='wplc-palette-top' style='background-color:#3DCC13;'></div>
554
+ <div class='wplc-palette-top' style='background-color:#FDFDFF;'></div>
555
+ <div class='wplc-palette-top' style='background-color:#EEE;'></div>
556
+ <div class='wplc-palette-top' style='background-color:#666;'></div>
557
+ </div>
558
+ </div>
559
+ <div class='wplc_palette_single'>
560
+ <div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-6') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_6'>
561
+ <div class='wplc-palette-top' style='padding-top:3px'><?php _e("Choose","wplivechat"); ?></div>
562
+ <div class='wplc-palette-top' style='padding-top:3px'><?php _e("Your","wplivechat"); ?></div>
563
+ <div class='wplc-palette-top' style='padding-top:3px'><?php _e("Colors","wplivechat"); ?></div>
564
+ <div class='wplc-palette-top' style='padding-top:3px'><?php _e("Below","wplivechat"); ?></div>
565
+ </div>
566
+ </div>
567
+
568
+
569
+ </div>
570
+ </div>
571
+ <input type="radio" name="wplc_theme" value="theme-default" class="wplc_hide_input" id="wplc_rb_theme_default" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-default') { echo 'checked'; } ?>/>
572
+ <input type="radio" name="wplc_theme" value="theme-1" class="wplc_hide_input" id="wplc_rb_theme_1" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') { echo 'checked'; } ?>/>
573
+ <input type="radio" name="wplc_theme" value="theme-2" class="wplc_hide_input" id="wplc_rb_theme_2" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') { echo 'checked'; } ?>/>
574
+ <input type="radio" name="wplc_theme" value="theme-3" class="wplc_hide_input" id="wplc_rb_theme_3" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') { echo 'checked'; } ?>/>
575
+ <input type="radio" name="wplc_theme" value="theme-4" class="wplc_hide_input" id="wplc_rb_theme_4" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') { echo 'checked'; } ?>/>
576
+ <input type="radio" name="wplc_theme" value="theme-5" class="wplc_hide_input" id="wplc_rb_theme_5" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') { echo 'checked'; } ?>/>
577
+ <input type="radio" name="wplc_theme" value="theme-6" class="wplc_hide_input" id="wplc_rb_theme_6" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-6') { echo 'checked'; } ?>/>
578
+
579
+ </td>
580
+ </tr>
581
  <tr height="30">
582
  <td>&nbsp;</td>
583
  <td>&nbsp;</td>
584
  </tr>
585
  <tr>
586
+ <td width='200' valign='top'><?php _e("Palette Color 1","wplivechat")?>:</td>
587
+ <td>
588
+ <input id="wplc_settings_color1" name="wplc_settings_color1" type="text" class="color" value="<?php if (isset($wplc_settings_color1)) { echo $wplc_settings_color1; } else { echo 'ED832F'; } ?>" />
589
+ </td>
590
+ </tr>
591
+ <tr>
592
+ <td width='200' valign='top'><?php _e("Palette Color 2","wplivechat")?>:</td>
593
+ <td>
594
+ <input id="wplc_settings_color2" name="wplc_settings_color2" type="text" class="color" value="<?php if (isset($wplc_settings_color2)) { echo $wplc_settings_color2; } else { echo 'FFFFFF'; } ?>" />
595
+ </td>
596
+ </tr>
597
+ <tr>
598
+ <td width='200' valign='top'><?php _e("Palette Color 3","wplivechat")?>:</td>
599
  <td>
600
+ <input id="wplc_settings_color3" name="wplc_settings_color3" type="text" class="color" value="<?php if (isset($wplc_settings_color3)) { echo $wplc_settings_color3; } else { echo 'EEEEEE'; } ?>" />
601
  </td>
602
  </tr>
603
  <tr>
604
+ <td width='200' valign='top'><?php _e("Palette Color 4","wplivechat")?>:</td>
605
  <td>
606
+ <input id="wplc_settings_color4" name="wplc_settings_color4" type="text" class="color" value="<?php if (isset($wplc_settings_color4)) { echo $wplc_settings_color4; } else { echo '666666'; } ?>" />
607
  </td>
608
  </tr>
609
 
680
  }
681
  </style>
682
  <tr>
683
+ <th><label for=""><?php _e('Choose an animation', 'wplivechat'); ?></label></th>
684
 
685
  <td>
686
  <div class='wplc_animation_block'>
includes/update_control.class.php CHANGED
@@ -24,6 +24,10 @@ final class wplc_update_control {
24
  public function set_api($api) {
25
  $this->wplc_api_key = $api;
26
  }
 
 
 
 
27
  public function set_path($path) {
28
  $this->wplc_path = $path;
29
  }
@@ -38,6 +42,9 @@ final class wplc_update_control {
38
  // Unserializing instances of the class is forbidden
39
  exit();
40
  }
 
 
 
41
 
42
  public function activate() {
43
  $this->wplc_extension_string = $this->wplc_title;
@@ -62,6 +69,7 @@ final class wplc_update_control {
62
  'slug' => $this->wplc_api_slug,
63
  'version' => $checked_data->checked[$this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php'],
64
  );
 
65
  $request_string = array(
66
  'body' => array(
67
  'action' => 'basic_check',
@@ -72,7 +80,6 @@ final class wplc_update_control {
72
  ),
73
  'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
74
  );
75
-
76
  // Start checking for an update
77
  $raw_response = wp_remote_post($this->wplc_api_url, $request_string);
78
 
@@ -155,6 +162,8 @@ final class wplc_update_control {
155
  "is_valid" => $this->wplc_option_is_valid
156
 
157
  );
 
 
158
  if (function_exists("wplc_build_api_check")) { return wplc_build_api_check($page_content,$data_array); }
159
  return $page_content;
160
 
24
  public function set_api($api) {
25
  $this->wplc_api_key = $api;
26
  }
27
+ public function set_custom_option($option) {
28
+ $this->wplc_option = $option;
29
+ }
30
+
31
  public function set_path($path) {
32
  $this->wplc_path = $path;
33
  }
42
  // Unserializing instances of the class is forbidden
43
  exit();
44
  }
45
+ public function set_api_url($url) {
46
+ $this->wplc_api_url = $url;
47
+ }
48
 
49
  public function activate() {
50
  $this->wplc_extension_string = $this->wplc_title;
69
  'slug' => $this->wplc_api_slug,
70
  'version' => $checked_data->checked[$this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php'],
71
  );
72
+
73
  $request_string = array(
74
  'body' => array(
75
  'action' => 'basic_check',
80
  ),
81
  'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
82
  );
 
83
  // Start checking for an update
84
  $raw_response = wp_remote_post($this->wplc_api_url, $request_string);
85
 
162
  "is_valid" => $this->wplc_option_is_valid
163
 
164
  );
165
+
166
+
167
  if (function_exists("wplc_build_api_check")) { return wplc_build_api_check($page_content,$data_array); }
168
  return $page_content;
169
 
js/md5.js ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function md5cycle(x, k) {
2
+ var a = x[0], b = x[1], c = x[2], d = x[3];
3
+
4
+ a = ff(a, b, c, d, k[0], 7, -680876936);
5
+ d = ff(d, a, b, c, k[1], 12, -389564586);
6
+ c = ff(c, d, a, b, k[2], 17, 606105819);
7
+ b = ff(b, c, d, a, k[3], 22, -1044525330);
8
+ a = ff(a, b, c, d, k[4], 7, -176418897);
9
+ d = ff(d, a, b, c, k[5], 12, 1200080426);
10
+ c = ff(c, d, a, b, k[6], 17, -1473231341);
11
+ b = ff(b, c, d, a, k[7], 22, -45705983);
12
+ a = ff(a, b, c, d, k[8], 7, 1770035416);
13
+ d = ff(d, a, b, c, k[9], 12, -1958414417);
14
+ c = ff(c, d, a, b, k[10], 17, -42063);
15
+ b = ff(b, c, d, a, k[11], 22, -1990404162);
16
+ a = ff(a, b, c, d, k[12], 7, 1804603682);
17
+ d = ff(d, a, b, c, k[13], 12, -40341101);
18
+ c = ff(c, d, a, b, k[14], 17, -1502002290);
19
+ b = ff(b, c, d, a, k[15], 22, 1236535329);
20
+
21
+ a = gg(a, b, c, d, k[1], 5, -165796510);
22
+ d = gg(d, a, b, c, k[6], 9, -1069501632);
23
+ c = gg(c, d, a, b, k[11], 14, 643717713);
24
+ b = gg(b, c, d, a, k[0], 20, -373897302);
25
+ a = gg(a, b, c, d, k[5], 5, -701558691);
26
+ d = gg(d, a, b, c, k[10], 9, 38016083);
27
+ c = gg(c, d, a, b, k[15], 14, -660478335);
28
+ b = gg(b, c, d, a, k[4], 20, -405537848);
29
+ a = gg(a, b, c, d, k[9], 5, 568446438);
30
+ d = gg(d, a, b, c, k[14], 9, -1019803690);
31
+ c = gg(c, d, a, b, k[3], 14, -187363961);
32
+ b = gg(b, c, d, a, k[8], 20, 1163531501);
33
+ a = gg(a, b, c, d, k[13], 5, -1444681467);
34
+ d = gg(d, a, b, c, k[2], 9, -51403784);
35
+ c = gg(c, d, a, b, k[7], 14, 1735328473);
36
+ b = gg(b, c, d, a, k[12], 20, -1926607734);
37
+
38
+ a = hh(a, b, c, d, k[5], 4, -378558);
39
+ d = hh(d, a, b, c, k[8], 11, -2022574463);
40
+ c = hh(c, d, a, b, k[11], 16, 1839030562);
41
+ b = hh(b, c, d, a, k[14], 23, -35309556);
42
+ a = hh(a, b, c, d, k[1], 4, -1530992060);
43
+ d = hh(d, a, b, c, k[4], 11, 1272893353);
44
+ c = hh(c, d, a, b, k[7], 16, -155497632);
45
+ b = hh(b, c, d, a, k[10], 23, -1094730640);
46
+ a = hh(a, b, c, d, k[13], 4, 681279174);
47
+ d = hh(d, a, b, c, k[0], 11, -358537222);
48
+ c = hh(c, d, a, b, k[3], 16, -722521979);
49
+ b = hh(b, c, d, a, k[6], 23, 76029189);
50
+ a = hh(a, b, c, d, k[9], 4, -640364487);
51
+ d = hh(d, a, b, c, k[12], 11, -421815835);
52
+ c = hh(c, d, a, b, k[15], 16, 530742520);
53
+ b = hh(b, c, d, a, k[2], 23, -995338651);
54
+
55
+ a = ii(a, b, c, d, k[0], 6, -198630844);
56
+ d = ii(d, a, b, c, k[7], 10, 1126891415);
57
+ c = ii(c, d, a, b, k[14], 15, -1416354905);
58
+ b = ii(b, c, d, a, k[5], 21, -57434055);
59
+ a = ii(a, b, c, d, k[12], 6, 1700485571);
60
+ d = ii(d, a, b, c, k[3], 10, -1894986606);
61
+ c = ii(c, d, a, b, k[10], 15, -1051523);
62
+ b = ii(b, c, d, a, k[1], 21, -2054922799);
63
+ a = ii(a, b, c, d, k[8], 6, 1873313359);
64
+ d = ii(d, a, b, c, k[15], 10, -30611744);
65
+ c = ii(c, d, a, b, k[6], 15, -1560198380);
66
+ b = ii(b, c, d, a, k[13], 21, 1309151649);
67
+ a = ii(a, b, c, d, k[4], 6, -145523070);
68
+ d = ii(d, a, b, c, k[11], 10, -1120210379);
69
+ c = ii(c, d, a, b, k[2], 15, 718787259);
70
+ b = ii(b, c, d, a, k[9], 21, -343485551);
71
+
72
+ x[0] = add32(a, x[0]);
73
+ x[1] = add32(b, x[1]);
74
+ x[2] = add32(c, x[2]);
75
+ x[3] = add32(d, x[3]);
76
+
77
+ }
78
+
79
+ function cmn(q, a, b, x, s, t) {
80
+ a = add32(add32(a, q), add32(x, t));
81
+ return add32((a << s) | (a >>> (32 - s)), b);
82
+ }
83
+
84
+ function ff(a, b, c, d, x, s, t) {
85
+ return cmn((b & c) | ((~b) & d), a, b, x, s, t);
86
+ }
87
+
88
+ function gg(a, b, c, d, x, s, t) {
89
+ return cmn((b & d) | (c & (~d)), a, b, x, s, t);
90
+ }
91
+
92
+ function hh(a, b, c, d, x, s, t) {
93
+ return cmn(b ^ c ^ d, a, b, x, s, t);
94
+ }
95
+
96
+ function ii(a, b, c, d, x, s, t) {
97
+ return cmn(c ^ (b | (~d)), a, b, x, s, t);
98
+ }
99
+
100
+ function md51(s) {
101
+ txt = '';
102
+ var n = s.length,
103
+ state = [1732584193, -271733879, -1732584194, 271733878], i;
104
+ for (i=64; i<=s.length; i+=64) {
105
+ md5cycle(state, md5blk(s.substring(i-64, i)));
106
+ }
107
+ s = s.substring(i-64);
108
+ var tail = [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0];
109
+ for (i=0; i<s.length; i++)
110
+ tail[i>>2] |= s.charCodeAt(i) << ((i%4) << 3);
111
+ tail[i>>2] |= 0x80 << ((i%4) << 3);
112
+ if (i > 55) {
113
+ md5cycle(state, tail);
114
+ for (i=0; i<16; i++) tail[i] = 0;
115
+ }
116
+ tail[14] = n*8;
117
+ md5cycle(state, tail);
118
+ return state;
119
+ }
120
+
121
+ /* there needs to be support for Unicode here,
122
+ * unless we pretend that we can redefine the MD-5
123
+ * algorithm for multi-byte characters (perhaps
124
+ * by adding every four 16-bit characters and
125
+ * shortening the sum to 32 bits). Otherwise
126
+ * I suggest performing MD-5 as if every character
127
+ * was two bytes--e.g., 0040 0025 = @%--but then
128
+ * how will an ordinary MD-5 sum be matched?
129
+ * There is no way to standardize text to something
130
+ * like UTF-8 before transformation; speed cost is
131
+ * utterly prohibitive. The JavaScript standard
132
+ * itself needs to look at this: it should start
133
+ * providing access to strings as preformed UTF-8
134
+ * 8-bit unsigned value arrays.
135
+ */
136
+ function md5blk(s) { /* I figured global was faster. */
137
+ var md5blks = [], i; /* Andy King said do it this way. */
138
+ for (i=0; i<64; i+=4) {
139
+ md5blks[i>>2] = s.charCodeAt(i)
140
+ + (s.charCodeAt(i+1) << 8)
141
+ + (s.charCodeAt(i+2) << 16)
142
+ + (s.charCodeAt(i+3) << 24);
143
+ }
144
+ return md5blks;
145
+ }
146
+
147
+ var hex_chr = '0123456789abcdef'.split('');
148
+
149
+ function rhex(n)
150
+ {
151
+ var s='', j=0;
152
+ for(; j<4; j++)
153
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0F]
154
+ + hex_chr[(n >> (j * 8)) & 0x0F];
155
+ return s;
156
+ }
157
+
158
+ function hex(x) {
159
+ for (var i=0; i<x.length; i++)
160
+ x[i] = rhex(x[i]);
161
+ return x.join('');
162
+ }
163
+
164
+ function md5(s) {
165
+ return hex(md51(s));
166
+ }
167
+
168
+ /* this function is much faster,
169
+ so if possible we use it. Some IEs
170
+ are the only ones I know of that
171
+ need the idiotic second function,
172
+ generated by an if clause. */
173
+
174
+ function add32(a, b) {
175
+ return (a + b) & 0xFFFFFFFF;
176
+ }
177
+
178
+ if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
179
+ function add32(x, y) {
180
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF),
181
+ msw = (x >> 16) + (y >> 16) + (lsw >> 16);
182
+ return (msw << 16) | (lsw & 0xFFFF);
183
+ }
184
+ }
js/themes/classic.js ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).on("wplc_minimize_chat", function( e ) {
2
+ jQuery('#wp-live-chat').height("");
3
+ if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
4
+ jQuery("#wp-live-chat").css("left", "");
5
+ jQuery("#wp-live-chat").css("bottom", "0");
6
+ jQuery("#wp-live-chat").css("right", "100px");
7
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
8
+ jQuery("#wp-live-chat").css("left", "100px");
9
+ jQuery("#wp-live-chat").css("bottom", "0");
10
+ jQuery("#wp-live-chat").css("right", "");
11
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
12
+ jQuery("#wp-live-chat").css("left", "0");
13
+ jQuery("#wp-live-chat").css("bottom", "100px");
14
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
15
+ jQuery("#wp-live-chat").css("left", "");
16
+ jQuery("#wp-live-chat").css("right", "0");
17
+ jQuery("#wp-live-chat").css("bottom", "100px");
18
+ jQuery("#wp-live-chat").css("width", "");
19
+ }
20
+ jQuery('#wp-live-chat').addClass("wplc_close");
21
+ jQuery('#wp-live-chat').removeClass("wplc_open");
22
+ //jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
23
+ jQuery("#wp-live-chat").css("top", "");
24
+ jQuery("#wp-live-chat-1").show();
25
+ jQuery("#wp-live-chat-1").css('cursor', 'pointer');
26
+ jQuery("#wp-live-chat-2").hide();
27
+ jQuery("#wp-live-chat-3").hide();
28
+ jQuery("#wp-live-chat-4").hide();
29
+ jQuery("#wp-live-chat-react").hide();
30
+ jQuery("#wp-live-chat-minimize").hide();
31
+
32
+
33
+
34
+
35
+ });
36
+
37
+ jQuery(document).on("wplc_start_chat", function( e ) {
38
+ jQuery("#wp-live-chat-2").hide();
39
+ jQuery("#wp-live-chat-3").show();
40
+ });
41
+ jQuery(document).on( "wplc_open_chat_1", function( e ) {
42
+
43
+
44
+ jQuery('#wp-live-chat').removeClass("wplc_close");
45
+ jQuery('#wp-live-chat').addClass("wplc_open");
46
+ //jQuery("#wp-live-chat-1").hide();
47
+ jQuery("#wp-live-chat-react").hide();
48
+ jQuery("#wp-live-chat-header").css('cursor', 'all-scroll');
49
+ //jQuery("#wp-live-chat-1").css('cursor', 'all-scroll');
50
+ Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
51
+ jQuery("#wp-live-chat-minimize").show();
52
+
53
+ jQuery(function() {
54
+ jQuery( "#wp-live-chat" ).draggable({
55
+ handle: "#wp-live-chat-header",
56
+ drag: function( event, ui ) {
57
+ jQuery(this).css("right","");
58
+ jQuery(this).css("bottom","inherit");
59
+ }
60
+ });
61
+ });
62
+
63
+
64
+ });
65
+
66
+ jQuery(document).on( "wplc_open_chat_2", function( e ) {
67
+
68
+ jQuery("#wp-live-chat-2").hide();
69
+
70
+ wplc_chat_status = Cookies.get('wplc_chat_status');
71
+ if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
72
+ jQuery("#wp-live-chat-4").show();
73
+ jQuery("#wplc_chatmsg").focus();
74
+ jQuery("#wp-live-chat-1").css("cursor","pointer");
75
+ } else if (e.wplc_online === false) {
76
+ jQuery("#wp-live-chat-2").show();
77
+ jQuery("#wp-live-chat-4").hide();
78
+ jQuery("#wplc_chatmsg").focus();
79
+ jQuery("#wp-live-chat-1").css("cursor","pointer");
80
+ }
81
+
82
+ jQuery("#wp-live-chat-3").hide();
83
+ jQuery("#wp-live-chat-close").hide();
84
+ //jQuery("#wp-live-chat-minimize").css("right","23px");
85
+ Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
86
+ });
87
+
88
+ jQuery(document).ready(function() {
89
+ //opens chat when clicked on top bar
90
+ jQuery("body").on("click", "#wp-live-chat-1", function() {
91
+ jQuery.event.trigger({type: "wplc_open_chat"});
92
+ });
93
+ });
js/themes/modern.js ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).on("wplc_minimize_chat", function( e ) {
2
+ wplc_is_chat_open = false;
3
+ jQuery('#wp-live-chat').height("");
4
+ if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
5
+ jQuery("#wp-live-chat").css("left", "");
6
+ jQuery("#wp-live-chat").css("bottom", "0");
7
+ jQuery("#wp-live-chat").css("right", "100px");
8
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
9
+ jQuery("#wp-live-chat").css("left", "100px");
10
+ jQuery("#wp-live-chat").css("bottom", "0");
11
+ jQuery("#wp-live-chat").css("right", "");
12
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
13
+ jQuery("#wp-live-chat").css("left", "0");
14
+ jQuery("#wp-live-chat").css("bottom", "100px");
15
+ } else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
16
+ jQuery("#wp-live-chat").css("left", "");
17
+ jQuery("#wp-live-chat").css("right", "0");
18
+ jQuery("#wp-live-chat").css("bottom", "100px");
19
+ jQuery("#wp-live-chat").css("width", "");
20
+ }
21
+ jQuery('#wp-live-chat').addClass("wplc_close");
22
+ jQuery('#wp-live-chat').removeClass("wplc_open");
23
+ //jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
24
+ jQuery("#wp-live-chat").css("top", "");
25
+ jQuery("#wp-live-chat-1").show();
26
+ jQuery("#wp-live-chat-1").css('cursor', 'pointer');
27
+ jQuery("#wp-live-chat-2").hide();
28
+ jQuery("#wp-live-chat-3").hide();
29
+ jQuery("#wp-live-chat-4").hide();
30
+ jQuery("#wp-live-chat-react").hide();
31
+ jQuery("#wp-live-chat-minimize").hide();
32
+
33
+ jQuery("#wp-live-chat-header").show();
34
+
35
+ });
36
+
37
+ jQuery(document).on("wplc_start_chat", function( e ) {
38
+ jQuery("#wp-live-chat-2-inner").hide("slow");
39
+ jQuery("#wp-live-chat-3").show();
40
+ });
41
+
42
+ jQuery(document).on( "wplc_open_chat_1", function( e ) {
43
+ jQuery('#wp-live-chat').removeClass("wplc_close");
44
+ jQuery('#wp-live-chat').addClass("wplc_open");
45
+ jQuery("#wp-live-chat-react").hide();
46
+ jQuery("#wp-live-chat-header").hide();
47
+ Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
48
+ jQuery("#wp-live-chat-minimize").show();
49
+
50
+
51
+
52
+
53
+ });
54
+
55
+
56
+ jQuery(document).on("wplc_animation_done", function(e) {
57
+ jQuery("#wplc_chatbox").css("top",
58
+ 35+jQuery("#wplc_logo").height()+"px"
59
+ );
60
+
61
+ });
62
+ jQuery(document).on( "wplc_open_chat_2", function( e ) {
63
+ jQuery("#wp-live-chat-1").hide();
64
+ jQuery("#wp-live-chat-2-inner").hide();
65
+
66
+ jQuery("#wp-live-chat-2").show();
67
+
68
+ wplc_chat_status = Cookies.get('wplc_chat_status');
69
+ if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
70
+ jQuery("#wp-live-chat-4").show();
71
+ jQuery("#wplc_chatmsg").focus();
72
+ }
73
+
74
+ jQuery("#wp-live-chat-3").hide();
75
+
76
+ jQuery("#wp-live-chat-minimize").css("right","23px");
77
+ Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
78
+
79
+
80
+
81
+ });
82
+
83
+
84
+ jQuery(document).ready(function() {
85
+
86
+
87
+
88
+ //opens chat when clicked on top bar
89
+ jQuery("body").on("click", "#wp-live-chat-header", function() {
90
+ jQuery("#wplc_hovercard").fadeOut("fast");
91
+ wplc_is_chat_open = true;
92
+ jQuery.event.trigger({type: "wplc_open_chat"});
93
+ });
94
+
95
+ jQuery("body").on("hover", "#wp-live-chat-header", function(){
96
+ if (!wplc_is_chat_open) {
97
+ jQuery("#wplc_hovercard").fadeIn('fast');
98
+ }
99
+ });
100
+ jQuery("body").on("click", "#wplc_hovercard_min", function() {
101
+ jQuery("#wplc_hovercard").fadeOut('fast');
102
+ });
103
+ jQuery("body").on("click", "#speeching_button", function() {
104
+ jQuery("#wp-live-chat-header").click();
105
+ });
106
+
107
+
108
+
109
+
110
+
111
+ });
js/wplc_tabs.js CHANGED
@@ -66,14 +66,49 @@ jQuery("document").ready(function() {
66
 
67
 
68
  /* Themes */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  jQuery("#wplc_theme_1").click(function() {
 
71
  jQuery("#wplc_rb_theme_1").attr('checked', true);
72
  jQuery("#wplc_rb_theme_2").attr('checked', false);
73
  jQuery("#wplc_rb_theme_3").attr('checked', false);
74
  jQuery("#wplc_rb_theme_4").attr('checked', false);
75
  jQuery("#wplc_rb_theme_5").attr('checked', false);
76
  jQuery("#wplc_rb_theme_6").attr('checked', false);
 
77
  jQuery("#wplc_theme_1").addClass("wplc_theme_active");
78
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
79
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
@@ -83,12 +118,14 @@ jQuery("document").ready(function() {
83
  });
84
 
85
  jQuery("#wplc_theme_2").click(function() {
 
86
  jQuery("#wplc_rb_theme_1").attr('checked', false);
87
  jQuery("#wplc_rb_theme_2").attr('checked', true);
88
  jQuery("#wplc_rb_theme_3").attr('checked', false);
89
  jQuery("#wplc_rb_theme_4").attr('checked', false);
90
  jQuery("#wplc_rb_theme_5").attr('checked', false);
91
  jQuery("#wplc_rb_theme_6").attr('checked', false);
 
92
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
93
  jQuery("#wplc_theme_2").addClass("wplc_theme_active");
94
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
@@ -98,12 +135,14 @@ jQuery("document").ready(function() {
98
  });
99
 
100
  jQuery("#wplc_theme_3").click(function() {
 
101
  jQuery("#wplc_rb_theme_1").attr('checked', false);
102
  jQuery("#wplc_rb_theme_2").attr('checked', false);
103
  jQuery("#wplc_rb_theme_3").attr('checked', true);
104
  jQuery("#wplc_rb_theme_4").attr('checked', false);
105
  jQuery("#wplc_rb_theme_5").attr('checked', false);
106
  jQuery("#wplc_rb_theme_6").attr('checked', false);
 
107
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
108
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
109
  jQuery("#wplc_theme_3").addClass("wplc_theme_active");
@@ -113,12 +152,14 @@ jQuery("document").ready(function() {
113
  });
114
 
115
  jQuery("#wplc_theme_4").click(function() {
 
116
  jQuery("#wplc_rb_theme_1").attr('checked', false);
117
  jQuery("#wplc_rb_theme_2").attr('checked', false);
118
  jQuery("#wplc_rb_theme_3").attr('checked', false);
119
  jQuery("#wplc_rb_theme_4").attr('checked', true);
120
  jQuery("#wplc_rb_theme_5").attr('checked', false);
121
  jQuery("#wplc_rb_theme_6").attr('checked', false);
 
122
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
123
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
124
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
@@ -128,12 +169,14 @@ jQuery("document").ready(function() {
128
  });
129
 
130
  jQuery("#wplc_theme_5").click(function() {
 
131
  jQuery("#wplc_rb_theme_1").attr('checked', false);
132
  jQuery("#wplc_rb_theme_2").attr('checked', false);
133
  jQuery("#wplc_rb_theme_3").attr('checked', false);
134
  jQuery("#wplc_rb_theme_4").attr('checked', false);
135
  jQuery("#wplc_rb_theme_5").attr('checked', true);
136
  jQuery("#wplc_rb_theme_6").attr('checked', false);
 
137
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
138
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
139
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
@@ -143,12 +186,14 @@ jQuery("document").ready(function() {
143
  });
144
 
145
  jQuery("#wplc_theme_6").click(function() {
 
146
  jQuery("#wplc_rb_theme_1").attr('checked', false);
147
  jQuery("#wplc_rb_theme_2").attr('checked', false);
148
  jQuery("#wplc_rb_theme_3").attr('checked', false);
149
  jQuery("#wplc_rb_theme_4").attr('checked', false);
150
  jQuery("#wplc_rb_theme_5").attr('checked', false);
151
  jQuery("#wplc_rb_theme_6").attr('checked', true);
 
152
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
153
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
154
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
66
 
67
 
68
  /* Themes */
69
+ jQuery("#wplc_newtheme_1").click(function() {
70
+ jQuery("#wplc_new_rb_theme_1").attr('checked', true);
71
+ jQuery("#wplc_new_rb_theme_2").attr('checked', false);
72
+ jQuery("#wplc_newtheme_1").addClass("wplc_theme_active");
73
+ jQuery("#wplc_newtheme_2").removeClass("wplc_theme_active");
74
+ });
75
+
76
+ jQuery("#wplc_newtheme_2").click(function() {
77
+ jQuery("#wplc_new_rb_theme_1").attr('checked', false);
78
+ jQuery("#wplc_new_rb_theme_2").attr('checked', true);
79
+ jQuery("#wplc_newtheme_1").removeClass("wplc_theme_active");
80
+ jQuery("#wplc_newtheme_2").addClass("wplc_theme_active");
81
+ });
82
+
83
+
84
+ /* Colour Schemes */
85
+
86
+ jQuery("#wplc_theme_default").click(function() {
87
+ jQuery("#wplc_rb_theme_default").attr('checked', true);
88
+ jQuery("#wplc_rb_theme_1").attr('checked', false);
89
+ jQuery("#wplc_rb_theme_2").attr('checked', false);
90
+ jQuery("#wplc_rb_theme_3").attr('checked', false);
91
+ jQuery("#wplc_rb_theme_4").attr('checked', false);
92
+ jQuery("#wplc_rb_theme_5").attr('checked', false);
93
+ jQuery("#wplc_rb_theme_6").attr('checked', false);
94
+ jQuery("#wplc_theme_default").addClass("wplc_theme_active");
95
+ jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
96
+ jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
97
+ jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
98
+ jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
99
+ jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
100
+ jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
101
+ });
102
 
103
  jQuery("#wplc_theme_1").click(function() {
104
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
105
  jQuery("#wplc_rb_theme_1").attr('checked', true);
106
  jQuery("#wplc_rb_theme_2").attr('checked', false);
107
  jQuery("#wplc_rb_theme_3").attr('checked', false);
108
  jQuery("#wplc_rb_theme_4").attr('checked', false);
109
  jQuery("#wplc_rb_theme_5").attr('checked', false);
110
  jQuery("#wplc_rb_theme_6").attr('checked', false);
111
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
112
  jQuery("#wplc_theme_1").addClass("wplc_theme_active");
113
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
114
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
118
  });
119
 
120
  jQuery("#wplc_theme_2").click(function() {
121
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
122
  jQuery("#wplc_rb_theme_1").attr('checked', false);
123
  jQuery("#wplc_rb_theme_2").attr('checked', true);
124
  jQuery("#wplc_rb_theme_3").attr('checked', false);
125
  jQuery("#wplc_rb_theme_4").attr('checked', false);
126
  jQuery("#wplc_rb_theme_5").attr('checked', false);
127
  jQuery("#wplc_rb_theme_6").attr('checked', false);
128
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
129
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
130
  jQuery("#wplc_theme_2").addClass("wplc_theme_active");
131
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
135
  });
136
 
137
  jQuery("#wplc_theme_3").click(function() {
138
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
139
  jQuery("#wplc_rb_theme_1").attr('checked', false);
140
  jQuery("#wplc_rb_theme_2").attr('checked', false);
141
  jQuery("#wplc_rb_theme_3").attr('checked', true);
142
  jQuery("#wplc_rb_theme_4").attr('checked', false);
143
  jQuery("#wplc_rb_theme_5").attr('checked', false);
144
  jQuery("#wplc_rb_theme_6").attr('checked', false);
145
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
146
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
147
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
148
  jQuery("#wplc_theme_3").addClass("wplc_theme_active");
152
  });
153
 
154
  jQuery("#wplc_theme_4").click(function() {
155
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
156
  jQuery("#wplc_rb_theme_1").attr('checked', false);
157
  jQuery("#wplc_rb_theme_2").attr('checked', false);
158
  jQuery("#wplc_rb_theme_3").attr('checked', false);
159
  jQuery("#wplc_rb_theme_4").attr('checked', true);
160
  jQuery("#wplc_rb_theme_5").attr('checked', false);
161
  jQuery("#wplc_rb_theme_6").attr('checked', false);
162
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
163
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
164
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
165
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
169
  });
170
 
171
  jQuery("#wplc_theme_5").click(function() {
172
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
173
  jQuery("#wplc_rb_theme_1").attr('checked', false);
174
  jQuery("#wplc_rb_theme_2").attr('checked', false);
175
  jQuery("#wplc_rb_theme_3").attr('checked', false);
176
  jQuery("#wplc_rb_theme_4").attr('checked', false);
177
  jQuery("#wplc_rb_theme_5").attr('checked', true);
178
  jQuery("#wplc_rb_theme_6").attr('checked', false);
179
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
180
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
181
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
182
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
186
  });
187
 
188
  jQuery("#wplc_theme_6").click(function() {
189
+ jQuery("#wplc_rb_theme_default").attr('checked', false);
190
  jQuery("#wplc_rb_theme_1").attr('checked', false);
191
  jQuery("#wplc_rb_theme_2").attr('checked', false);
192
  jQuery("#wplc_rb_theme_3").attr('checked', false);
193
  jQuery("#wplc_rb_theme_4").attr('checked', false);
194
  jQuery("#wplc_rb_theme_5").attr('checked', false);
195
  jQuery("#wplc_rb_theme_6").attr('checked', true);
196
+ jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
197
  jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
198
  jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
199
  jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
js/wplc_u.js CHANGED
@@ -14,7 +14,7 @@
14
  * 11 - user moved on to another page (session variable is different)
15
  *
16
  */
17
-
18
  jQuery(document).ready(function() {
19
  var wplc_session_variable = new Date().getTime();
20
  var wplc_cid;
@@ -24,7 +24,11 @@ jQuery(document).ready(function() {
24
  var wplc_cookie_email = "";
25
  var wplc_init_chat_box_check = true;
26
  var wplc_cid = null;
27
-
 
 
 
 
28
  wplc_cid = Cookies.get('wplc_cid');
29
 
30
  if(typeof wplc_cid === 'undefined'){
@@ -59,9 +63,18 @@ jQuery(document).ready(function() {
59
  if(response){
60
  response = JSON.parse(response);
61
 
62
- jQuery( "body" ).append( response);
63
 
64
 
 
 
 
 
 
 
 
 
 
65
  /* start long polling */
66
  var data = {
67
  action: 'wplc_call_to_server_visitor',
@@ -73,8 +86,14 @@ jQuery(document).ready(function() {
73
  wplcsession:wplc_session_variable,
74
  wplc_extra_data:wplc_extra_data
75
  };
 
76
  // ajax long polling function
77
- wplc_call_to_server_chat(data);
 
 
 
 
 
78
  if(wplc_cid !== null && wplc_init_chat_box_check == true && wplc_init_chat_box !== false){
79
  wplc_init_chat_box(wplc_cid,wplc_chat_status);
80
  }
@@ -88,7 +107,11 @@ jQuery(document).ready(function() {
88
 
89
 
90
 
91
- function wplc_call_to_server_chat(data) {
 
 
 
 
92
  jQuery.ajax({
93
  url: wplc_ajaxurl,
94
  data:data,
@@ -102,21 +125,26 @@ jQuery(document).ready(function() {
102
  data['wplc_email'] = response['wplc_email'];
103
  data['action_2'] = "";
104
  data['cid'] = response['cid'];
 
105
  Cookies.set('wplc_cid', response['cid'], { expires: 1, path: '/' });
106
  Cookies.set('wplc_name', response['wplc_name'], { expires: 1, path: '/' });
107
  Cookies.set('wplc_email', response['wplc_email'], { expires: 1, path: '/' });
108
 
 
 
109
  wplc_cid = jQuery.trim(response['cid']);
110
  wplc_chat_status = response['status'];
111
  Cookies.set('wplc_chat_status', null, { path: '/' });
112
  Cookies.set('wplc_chat_status', wplc_chat_status, { expires: 1, path: '/' });
113
  // handle response
114
  if(data['status'] == response['status']){
115
- if(data['status'] == 5 && wplc_init_chat_box_check == true){ // open chat box on load
116
  wplc_init_chat_box(data['cid'], data['status']);
117
  }
118
  if(response['status'] == 3 && response['data'] != null){ // if active and data is returned
119
- jQuery("#wplc_chatbox").append(response['data']);
 
 
120
  if(response['data']){
121
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
122
  jQuery('#wplc_chatbox').scrollTop(height);
@@ -136,7 +164,7 @@ jQuery(document).ready(function() {
136
  else if(response['status'] == 8){ // chat has been ended by admin
137
  wplc_run = false;
138
 
139
- jQuery("#wp-live-chat-minimize").hide();
140
  document.getElementById('wplc_chatmsg').disabled = true;
141
  jQuery("#wplc_chatbox").append("<em>"+response['data']+"</em><br />");
142
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
@@ -146,19 +174,21 @@ jQuery(document).ready(function() {
146
  wplc_run = false;
147
  }
148
  else if(parseInt(response['status']) == 3 || parseInt(response['status']) == 10){ // re-initialize chat
 
149
  jQuery("#wplc_cid").val(wplc_cid);
150
  if(parseInt(response['status']) == 3) { // only if not minimized open aswell
151
- open_chat();
152
  if(jQuery('#wp-live-chat').hasClass('wplc_left') === true || jQuery('#wp-live-chat').hasClass('wplc_right') === true){
153
  jQuery('#wp-live-chat').height("400px");
154
  }
155
  }
156
  if(parseInt(response['status']) == 10) { // only if not minimized open aswell
157
- open_chat();
 
158
 
159
  }
160
  if(response['data'] != null){ // append messages to chat area
161
- jQuery("#wplc_chatbox").append(response['data']);
162
  if(response['data']){
163
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
164
  jQuery('#wplc_chatbox').scrollTop(height);
@@ -192,7 +222,7 @@ jQuery(document).ready(function() {
192
  },
193
  complete: function(response){
194
  if (wplc_run) {
195
- setTimeout(function() { wplc_call_to_server_chat(data); }, 1500);
196
 
197
  }
198
  },
@@ -255,15 +285,10 @@ jQuery(document).ready(function() {
255
 
256
  //jQuery("#wp-live-chat").css({ "display" : "block" });
257
  if(jQuery("#wp-live-chat").attr('wplc-auto-pop-up') === "1"){
258
-
259
- open_chat();
260
-
261
- /*jQuery("#wp-live-chat-2").css({ "display" : "block" });
262
- jQuery("#wp-live-chat-minimize").show();
263
- jQuery("#wp-live-chat-close").show();
264
- jQuery('#wp-live-chat').removeClass("wplc_close");
265
- jQuery('#wp-live-chat').addClass("wplc_open");*/
266
  }
 
 
267
  }, parseInt(window.wplc_delay));
268
  }
269
  }
@@ -327,37 +352,11 @@ jQuery(document).ready(function() {
327
 
328
  /* minimize chat window */
329
  jQuery("body").on("click", "#wp-live-chat-minimize", function() {
330
- jQuery('#wp-live-chat').height("");
331
- if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
332
- jQuery("#wp-live-chat").css("left", "");
333
- jQuery("#wp-live-chat").css("bottom", "0");
334
- jQuery("#wp-live-chat").css("right", "100px");
335
- } else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
336
- jQuery("#wp-live-chat").css("left", "100px");
337
- jQuery("#wp-live-chat").css("bottom", "0");
338
- jQuery("#wp-live-chat").css("right", "");
339
- } else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
340
- jQuery("#wp-live-chat").css("left", "0");
341
- jQuery("#wp-live-chat").css("bottom", "100px");
342
- } else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
343
- jQuery("#wp-live-chat").css("left", "");
344
- jQuery("#wp-live-chat").css("right", "0");
345
- jQuery("#wp-live-chat").css("bottom", "100px");
346
- jQuery("#wp-live-chat").css("width", "");
347
- }
348
- jQuery('#wp-live-chat').addClass("wplc_close");
349
- jQuery('#wp-live-chat').removeClass("wplc_open");
350
- //jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
351
- jQuery("#wp-live-chat").css("top", "");
352
- wplc_chat_status = Cookies.get('wplc_chat_status');
353
- jQuery("#wp-live-chat-1").show();
354
- jQuery("#wp-live-chat-1").css('cursor', 'pointer');
355
- jQuery("#wp-live-chat-2").hide();
356
- jQuery("#wp-live-chat-3").hide();
357
- jQuery("#wp-live-chat-4").hide();
358
- jQuery("#wp-live-chat-react").hide();
359
- jQuery("#wp-live-chat-minimize").hide();
360
  Cookies.set('wplc_minimize', "yes", { expires: 1, path: '/' });
 
361
  if(wplc_chat_status != 5 && wplc_chat_status != 10 && wplc_chat_status != 9 && wplc_chat_status != 8){
362
  var data = {
363
  action: 'wplc_user_minimize_chat',
@@ -400,33 +399,15 @@ jQuery(document).ready(function() {
400
  });
401
  //open chat window function
402
 
403
- function open_chat(){
404
- jQuery('#wp-live-chat').removeClass("wplc_close");
405
- jQuery('#wp-live-chat').addClass("wplc_open");
406
- //jQuery("#wp-live-chat-1").hide();
407
- jQuery("#wp-live-chat-react").hide();
408
- jQuery("#wp-live-chat-header").css('cursor', 'all-scroll');
409
- jQuery("#wp-live-chat-1").css('cursor', 'all-scroll');
410
- Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
411
- jQuery("#wp-live-chat-minimize").show();
412
- jQuery("#wp-live-chat-close").show();
413
- jQuery(function() {
414
- jQuery( "#wp-live-chat" ).draggable({
415
- handle: "#wp-live-chat-header",
416
- drag: function( event, ui ) {
417
- jQuery(this).css("right","");
418
- jQuery(this).css("bottom","inherit");
419
- }
420
- });
421
- });
422
 
423
  wplc_chat_status = Cookies.get('wplc_chat_status');
424
  if (parseInt(wplc_chat_status) == 3) {
425
- jQuery("#wp-live-chat-4").show();
426
- jQuery("#wplc_chatmsg").focus();
427
- jQuery("#wp-live-chat-2").hide();
428
- jQuery("#wp-live-chat-3").hide();
429
- Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
430
 
431
  var data = {
432
  action: 'wplc_user_maximize_chat',
@@ -439,11 +420,11 @@ jQuery(document).ready(function() {
439
  });
440
  }
441
  else if (parseInt(wplc_chat_status) == 10) {
442
- jQuery("#wp-live-chat-minimize").trigger("click");
 
443
  }
444
 
445
  else if (wplc_chat_status == 5 || wplc_chat_status == 9 || wplc_chat_status == 8){
446
-
447
  if(jQuery("#wp-live-chat-2").is(":visible") === false && jQuery("#wp-live-chat-4").is(":visible") === false){
448
  jQuery("#wp-live-chat-2").show();
449
  var wplc_visitor_name = Cookies.get('wplc_name');
@@ -463,16 +444,14 @@ jQuery(document).ready(function() {
463
  jQuery('#wplc_chatbox').scrollTop(height);
464
  jQuery("#wp-live-chat-minimize").hide();
465
  document.getElementById('wplc_chatmsg').disabled = true;
466
- }
 
467
 
468
  }
469
- //opens chat when clicked on top bar
470
- jQuery("body").on("click", "#wp-live-chat-1", function() {
471
- open_chat();
472
- });
473
  //allows for a class to open chat window now
474
  jQuery("body").on("click", ".wp-live-chat-now", function() {
475
- open_chat();
476
  });
477
 
478
 
@@ -491,8 +470,19 @@ jQuery(document).ready(function() {
491
  alert("Please Enter a Valid Email Address"); return false;
492
  }
493
  }
494
- jQuery("#wp-live-chat-2").hide();
495
- jQuery("#wp-live-chat-3").show();
 
 
 
 
 
 
 
 
 
 
 
496
 
497
  var date = new Date();
498
  date.setTime(date.getTime() + (2 * 60 * 1000));
@@ -522,11 +512,10 @@ jQuery(document).ready(function() {
522
  //changed ajax url so wp_mail function will work and not stop plugin from alerting admin there is a pending chat
523
  jQuery.post(wplc_ajaxurl, data, function(response) {
524
  Cookies.set('wplc_chat_status', 2, { expires: date, path: '/' });
525
-
526
  Cookies.set('wplc_name', wplc_name, { path: '/' } );
527
  Cookies.set('wplc_email', wplc_email, { path: '/' } );
528
-
529
  wplc_cid = jQuery.trim(response);
 
530
  });
531
  });
532
 
@@ -597,12 +586,23 @@ jQuery(document).ready(function() {
597
  if (typeof wplc_name == "undefined" || wplc_name == null || wplc_name == "") {
598
  wplc_name = Cookies.get('wplc_name');
599
  }
 
 
 
 
 
 
 
600
  jQuery("#wplc_chatmsg").val('');
601
 
602
  if(wplc_display_name == 'display'){
603
- jQuery("#wplc_chatbox").append("<span class='wplc-user-message'>"+wplc_gravatar_image+" <strong>"+wplc_name+"</strong>: "+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
 
 
 
 
604
  } else {
605
- jQuery("#wplc_chatbox").append("<span class='wplc-user-message'>"+wplc_chat+"</span><div class='wplc-clear-float-message'></div>");
606
  }
607
 
608
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
@@ -619,6 +619,40 @@ jQuery(document).ready(function() {
619
 
620
  });
621
 
622
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
 
624
- });
14
  * 11 - user moved on to another page (session variable is different)
15
  *
16
  */
17
+ var wplc_is_chat_open = false;
18
  jQuery(document).ready(function() {
19
  var wplc_session_variable = new Date().getTime();
20
  var wplc_cid;
24
  var wplc_cookie_email = "";
25
  var wplc_init_chat_box_check = true;
26
  var wplc_cid = null;
27
+ var wplc_online = false;
28
+ var initial_data = {};
29
+ var wplc_fist_run = true;
30
+
31
+
32
  wplc_cid = Cookies.get('wplc_cid');
33
 
34
  if(typeof wplc_cid === 'undefined'){
63
  if(response){
64
  response = JSON.parse(response);
65
 
66
+ jQuery( "body" ).append( response['cbox']);
67
 
68
 
69
+ /* is an agent online? */
70
+ if (response['online'] === false) {
71
+ wplc_run = false;
72
+ wplc_online = false;
73
+ } else {
74
+ wplc_online = true;
75
+ }
76
+ if (wplc_filter_run_override === "0") { wplc_run = false; } else { /* we can run */ }
77
+
78
  /* start long polling */
79
  var data = {
80
  action: 'wplc_call_to_server_visitor',
86
  wplcsession:wplc_session_variable,
87
  wplc_extra_data:wplc_extra_data
88
  };
89
+ initial_data = data;
90
  // ajax long polling function
91
+ if (wplc_filter_run_override === "0") {
92
+ wplc_call_to_server_chat(data,true,true);
93
+ } else {
94
+ wplc_call_to_server_chat(data,true,false);
95
+ }
96
+
97
  if(wplc_cid !== null && wplc_init_chat_box_check == true && wplc_init_chat_box !== false){
98
  wplc_init_chat_box(wplc_cid,wplc_chat_status);
99
  }
107
 
108
 
109
 
110
+ function wplc_call_to_server_chat(data,first_run,short_poll) {
111
+ if (typeof first_run === "undefined") { first_run = false; };
112
+ if (typeof short_poll === "undefined") { short_poll = false; };
113
+ data.first_run = first_run;
114
+ data.short_poll = short_poll;
115
  jQuery.ajax({
116
  url: wplc_ajaxurl,
117
  data:data,
125
  data['wplc_email'] = response['wplc_email'];
126
  data['action_2'] = "";
127
  data['cid'] = response['cid'];
128
+
129
  Cookies.set('wplc_cid', response['cid'], { expires: 1, path: '/' });
130
  Cookies.set('wplc_name', response['wplc_name'], { expires: 1, path: '/' });
131
  Cookies.set('wplc_email', response['wplc_email'], { expires: 1, path: '/' });
132
 
133
+
134
+
135
  wplc_cid = jQuery.trim(response['cid']);
136
  wplc_chat_status = response['status'];
137
  Cookies.set('wplc_chat_status', null, { path: '/' });
138
  Cookies.set('wplc_chat_status', wplc_chat_status, { expires: 1, path: '/' });
139
  // handle response
140
  if(data['status'] == response['status']){
141
+ if(data['status'] == 5 && wplc_init_chat_box_check === true && wplc_init_chat_box !== false){ // open chat box on load
142
  wplc_init_chat_box(data['cid'], data['status']);
143
  }
144
  if(response['status'] == 3 && response['data'] != null){ // if active and data is returned
145
+ wplc_run = true;
146
+
147
+ jQuery("#wplc_chatbox").append(response['data'].wplcStripSlashes());
148
  if(response['data']){
149
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
150
  jQuery('#wplc_chatbox').scrollTop(height);
164
  else if(response['status'] == 8){ // chat has been ended by admin
165
  wplc_run = false;
166
 
167
+ jQuery("#wp-live-chat-minimize").show();
168
  document.getElementById('wplc_chatmsg').disabled = true;
169
  jQuery("#wplc_chatbox").append("<em>"+response['data']+"</em><br />");
170
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
174
  wplc_run = false;
175
  }
176
  else if(parseInt(response['status']) == 3 || parseInt(response['status']) == 10){ // re-initialize chat
177
+ wplc_run = true;
178
  jQuery("#wplc_cid").val(wplc_cid);
179
  if(parseInt(response['status']) == 3) { // only if not minimized open aswell
180
+ open_chat(0);
181
  if(jQuery('#wp-live-chat').hasClass('wplc_left') === true || jQuery('#wp-live-chat').hasClass('wplc_right') === true){
182
  jQuery('#wp-live-chat').height("400px");
183
  }
184
  }
185
  if(parseInt(response['status']) == 10) { // only if not minimized open aswell
186
+ wplc_run = true;
187
+ open_chat(0);
188
 
189
  }
190
  if(response['data'] != null){ // append messages to chat area
191
+ jQuery("#wplc_chatbox").append(response['data'].wplcStripSlashes());
192
  if(response['data']){
193
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
194
  jQuery('#wplc_chatbox').scrollTop(height);
222
  },
223
  complete: function(response){
224
  if (wplc_run) {
225
+ setTimeout(function() { wplc_call_to_server_chat(data,false,false); }, 1500);
226
 
227
  }
228
  },
285
 
286
  //jQuery("#wp-live-chat").css({ "display" : "block" });
287
  if(jQuery("#wp-live-chat").attr('wplc-auto-pop-up') === "1"){
288
+ open_chat(0);
 
 
 
 
 
 
 
289
  }
290
+
291
+ jQuery.event.trigger({type: "wplc_animation_done"});
292
  }, parseInt(window.wplc_delay));
293
  }
294
  }
352
 
353
  /* minimize chat window */
354
  jQuery("body").on("click", "#wp-live-chat-minimize", function() {
355
+ jQuery.event.trigger({type: "wplc_minimize_chat"});
356
+
357
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  Cookies.set('wplc_minimize', "yes", { expires: 1, path: '/' });
359
+ wplc_chat_status = Cookies.get('wplc_chat_status');
360
  if(wplc_chat_status != 5 && wplc_chat_status != 10 && wplc_chat_status != 9 && wplc_chat_status != 8){
361
  var data = {
362
  action: 'wplc_user_minimize_chat',
399
  });
400
  //open chat window function
401
 
402
+ function open_chat(force){
403
+ jQuery.event.trigger({type: "wplc_open_chat_1"});
404
+
405
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
  wplc_chat_status = Cookies.get('wplc_chat_status');
408
  if (parseInt(wplc_chat_status) == 3) {
409
+
410
+ jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online});
 
 
 
411
 
412
  var data = {
413
  action: 'wplc_user_maximize_chat',
420
  });
421
  }
422
  else if (parseInt(wplc_chat_status) == 10) {
423
+ jQuery("#wp-live-chat-minimize").trigger("click");
424
+
425
  }
426
 
427
  else if (wplc_chat_status == 5 || wplc_chat_status == 9 || wplc_chat_status == 8){
 
428
  if(jQuery("#wp-live-chat-2").is(":visible") === false && jQuery("#wp-live-chat-4").is(":visible") === false){
429
  jQuery("#wp-live-chat-2").show();
430
  var wplc_visitor_name = Cookies.get('wplc_name');
444
  jQuery('#wplc_chatbox').scrollTop(height);
445
  jQuery("#wp-live-chat-minimize").hide();
446
  document.getElementById('wplc_chatmsg').disabled = true;
447
+ }
448
+
449
 
450
  }
451
+
 
 
 
452
  //allows for a class to open chat window now
453
  jQuery("body").on("click", ".wp-live-chat-now", function() {
454
+ open_chat(0);
455
  });
456
 
457
 
470
  alert("Please Enter a Valid Email Address"); return false;
471
  }
472
  }
473
+
474
+ /* start the long polling */
475
+ wplc_run = true;
476
+
477
+ if (wplc_filter_run_override === "1") { } else {
478
+ initial_data.status = 2;
479
+
480
+ /* force the loop to start only now, as we are not using the initiate extension */
481
+ wplc_call_to_server_chat(initial_data,false,false);
482
+ }
483
+
484
+ jQuery.event.trigger({type: "wplc_start_chat"});
485
+
486
 
487
  var date = new Date();
488
  date.setTime(date.getTime() + (2 * 60 * 1000));
512
  //changed ajax url so wp_mail function will work and not stop plugin from alerting admin there is a pending chat
513
  jQuery.post(wplc_ajaxurl, data, function(response) {
514
  Cookies.set('wplc_chat_status', 2, { expires: date, path: '/' });
 
515
  Cookies.set('wplc_name', wplc_name, { path: '/' } );
516
  Cookies.set('wplc_email', wplc_email, { path: '/' } );
 
517
  wplc_cid = jQuery.trim(response);
518
+
519
  });
520
  });
521
 
586
  if (typeof wplc_name == "undefined" || wplc_name == null || wplc_name == "") {
587
  wplc_name = Cookies.get('wplc_name');
588
  }
589
+
590
+ var wplc_email = jQuery("#wplc_email").val();
591
+ if (typeof wplc_email == "undefined" || wplc_email == null || wplc_email == "") {
592
+ wplc_email = Cookies.get('wplc_email');
593
+ }
594
+
595
+
596
  jQuery("#wplc_chatmsg").val('');
597
 
598
  if(wplc_display_name == 'display'){
599
+ if (wplc_gravatar_image.length > 1) {
600
+ jQuery("#wplc_chatbox").append("<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>"+wplc_gravatar_image+" <strong>"+wplc_name+"</strong>: "+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
601
+ } else {
602
+ jQuery("#wplc_chatbox").append("<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'><img src='//www.gravatar.com/avatar/"+md5(wplc_email)+"?s=30' class='wplc-user-message-avatar' \/> <strong>"+wplc_name+"</strong>: "+wplc_chat+"</span><br /><div class='wplc-clear-float-message'></div>");
603
+ }
604
  } else {
605
+ jQuery("#wplc_chatbox").append("<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>"+wplc_chat+"</span><div class='wplc-clear-float-message'></div>");
606
  }
607
 
608
  var height = jQuery('#wplc_chatbox')[0].scrollHeight;
619
 
620
  });
621
 
622
+ });
623
+
624
+ jQuery(document).on("wplc_open_chat", function (event) {
625
+
626
+ /* what is the current status? */
627
+ wplc_chat_status = Cookies.get('wplc_chat_status');
628
+ var wplc_tmp_checker = wplc_pre_open_check_status(status, function() {
629
+ open_chat();
630
+ });
631
+
632
+
633
+ });
634
+
635
+ function wplc_pre_open_check_status(status, callback) {
636
+ if (wplc_chat_status.length > 0) {
637
+ if (parseInt(wplc_chat_status) === 10 || parseInt(wplc_chat_status) === 7) {
638
+ /* it was minimized or timedout, now we need to open it - set status to 3 (back to open chat) */
639
+ Cookies.set('wplc_chat_status', 3, { expires: 1, path: '/' });
640
+
641
+ }
642
+ if (parseInt(wplc_chat_status) === 0) {
643
+ /* no answer from agent previously */
644
+ Cookies.set('wplc_chat_status', 5, { expires: 1, path: '/' });
645
+ }
646
+ if (parseInt(wplc_chat_status) === 8) {
647
+ /* no answer from agent previously */
648
+ Cookies.set('wplc_chat_status', 5, { expires: 1, path: '/' });
649
+ }
650
+
651
+ }
652
+ callback();
653
+ }
654
+ String.prototype.wplcStripSlashes = function(){
655
+ return this.replace(/\\(.)/mg, "$1");
656
+ }
657
 
658
+ });
js/wplc_u_admin.js CHANGED
@@ -252,6 +252,7 @@ if (type === "Returning") {
252
  }
253
  }
254
 
 
255
  function wplc_create_chat_ul_element_after_eating_vindaloo(obj,key) {
256
 
257
  var v_img = obj[key]['image'];
252
  }
253
  }
254
 
255
+
256
  function wplc_create_chat_ul_element_after_eating_vindaloo(obj,key) {
257
 
258
  var v_img = obj[key]['image'];
readme.txt CHANGED
@@ -52,49 +52,28 @@ The most cost effective Live Chat plugin. Chat with your visitors for free! WP L
52
  * Enable/Disable the chat box on mobile devices
53
  * Enable/Disable the sound when a new live chat message is received
54
 
55
- = Extend the functionality of WP Live Chat Support with the following extensions =
56
 
57
- **Initiate Chats**
58
-
59
- Initiate live chats with people on your website through the click of a button with the [Initiate Chat Extension](http://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=ex_ic)
60
-
61
- **Multiple Chats Agents**
62
-
63
- Create as many live chat agents as you need with the [Multiple Agents Extension](http://wp-livechat.com/extensions/multiple-agents-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=ma_ic)
64
-
65
- **Android App**
66
-
67
- Coming soon. Answer and initiate live chats from anywhere using your mobile device with the [Mobile and Desktop App](http://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=mobile_ic)
68
-
69
- **Desktop App**
70
-
71
- Coming soon. Answer and initiate live chats from your desktop with the [Mobile and Desktop App](http://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=desktop_ic)
72
-
73
- **Cloud Server**
74
-
75
- Host all live chat functions on our cloud server and improve your site performance with the [Cloud Server Extension](http://wp-livechat.com/extensions/cloud-server-extension/?utm_source=readme&utm_medium=wordpress&utm_campaign=desktop_cloud)
76
-
77
- **Advanced Live Chat Box Control**
78
-
79
- Change your display name, add a company logo, add your avatar and control when the live chat box should be displayed with the [Advanced Chat Box Control Extension](http://wp-livechat.com/extensions/advanced-chat-box-control/?utm_source=readme&utm_medium=wordpress&utm_campaign=acbc_ic)
80
-
81
- **Encryption**
82
-
83
- Encrypt your live chat conversations with the [Chat Encryption Extension](http://wp-livechat.com/extensions/chat-encryption/?utm_source=readme&utm_medium=wordpress&utm_campaign=encrypt_ic)
84
-
85
- **Include and Exclude your live chat box on certain pages**
86
-
87
- Include and ex the live chat from appearing on certain pages with the [Include Exclude Extension](http://wp-livechat.com/extensions/include-exclude-chat/?utm_source=readme&utm_medium=wordpress&utm_campaign=inex_ic)
88
-
89
- **Choose When Online**
90
-
91
- Appear to be online or offline with the flick of a switch with the [Choose When Online Extension](http://wp-livechat.com/extensions/choose-when-online/?utm_source=readme&utm_medium=wordpress&utm_campaign=choose_ic)
92
-
93
- **World-class support**
94
 
95
- Need support? Get world-class support [here](http://wp-livechat.com/support/?utm_source=readme&utm_medium=wordpress&utm_campaign=support).
96
 
97
  = Coming soon =
 
98
  * Improvements - Better link and image handling within the live chat text area
99
  * New feature - Triggers - Build custom live chat triggers. For example, if a user has been idle for more than 2 minutes, initiate a live chat and send a response.
100
 
@@ -223,6 +202,20 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.1.4
223
 
224
  == Changelog ==
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  = 6.0.07 - 2016-03-11 - High priority =
227
  * Bug fix - agent status was lost when saving settings
228
 
52
  * Enable/Disable the chat box on mobile devices
53
  * Enable/Disable the sound when a new live chat message is received
54
 
55
+ = Extend the functionality of WP Live Chat Support with the WP Live Chat Support Pro =
56
 
57
+ * Unlimited live chat agents
58
+ * Initiate live chats with online visitors
59
+ * Quick Responses (insert a predefined response to your live chat box)
60
+ * Encrypt your live chat conversations
61
+ * Fully responsive admin chat dashboard
62
+ * Compatible with all caching plugins (live chat window loaded via Ajax)
63
+ * Desktop Notifications when receiving new live chats
64
+ * Set up your user profile
65
+ * Add your company logo to the live chat window
66
+ * Add your photo to the live chat window
67
+ * Edit all text fields shown on the live chat box
68
+ * Include/exclude the live chat from appearing on certain pages
69
+ * Fully customizable live chat experience
70
+ * Choose when to accept chats
71
+ * World-class support
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
+ Get the [WP Live Chat Support Pro Add-on](http://wp-livechat.com/purchase-pro/?utm_source=readme&utm_medium=wordpress&utm_campaign=buy) for a once off payment!
74
 
75
  = Coming soon =
76
+ * Mobile and desktop App - we are currently in beta stage with our mobile and desktop live chat app. If you would like to help test, please get in touch.
77
  * Improvements - Better link and image handling within the live chat text area
78
  * New feature - Triggers - Build custom live chat triggers. For example, if a user has been idle for more than 2 minutes, initiate a live chat and send a response.
79
 
202
 
203
  == Changelog ==
204
 
205
+ = 6.1.00 - 2016-03-18 - Medium priority =
206
+ * Fixed a bug that caused the chat agent to be nullified if you saved the settings
207
+ * NEW: Introduced a new modern theme
208
+ * Fixed the bug that caused the chat box to not open again if you minimized it while in chat
209
+ * Fixed a style bug on the admin chat box
210
+ * Performance improvements for the basic version - there are no longer regular longpoll requests when using the basic version. Long polling only starts once a chat has been started
211
+ * Fixed a styling bug in the settings page
212
+ * Longpoll requests no longer run when you're offline - this will introduce significant performance imporvements
213
+ * We have removed the "X" on the chat box and it will now only show up when there is an active chat on the user's side. This avoids the confusion when the user presses "X" and the chat hides for 24 hours.
214
+ * Images of the chat agent and user now show up correctly in the chat box
215
+ * Fixed a bug that added slashes to apostrophes in the chat window
216
+ * Fixed a bug that caused an error when trying to load the chat box when a banned user visited the site
217
+ * Fixed a bug that still displayed the offline message window even if the setting was set to false
218
+
219
  = 6.0.07 - 2016-03-11 - High priority =
220
  * Bug fix - agent status was lost when saving settings
221
 
wp-live-chat-support.php CHANGED
@@ -3,7 +3,7 @@
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: 6.0.07
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
@@ -11,9 +11,23 @@
11
  */
12
 
13
  /*
14
- * 6.0.07 - 2016-03-11 - High priority
15
- * Bug fix - agent status was lost when saving settings.
 
 
 
 
 
 
 
 
 
 
 
16
  *
 
 
 
17
  * 6.0.06 - 2016-03-04 - Medium priority
18
  * More stable fix for the menu item bug that has been experienced lately
19
  *
@@ -332,14 +346,18 @@ global $wplc_tblname_offline_msgs;
332
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
333
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
334
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
335
- $wplc_version = "6.0.07";
336
 
337
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
338
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
339
  global $wplc_basic_plugin_url;
340
  $wplc_basic_plugin_url = get_option('siteurl') . "/wp-content/plugins/wp-live-chat-support/";
341
 
342
- if(!function_exists('wplc_pro_activate')){
 
 
 
 
343
  require_once (plugin_dir_path(__FILE__) . "ajax_new.php");
344
  }
345
 
@@ -391,6 +409,7 @@ function wplc_init() {
391
  }
392
 
393
  function wplc_version_control() {
 
394
  global $wplc_version;
395
 
396
 
@@ -421,26 +440,58 @@ function wplc_version_control() {
421
  }
422
  */
423
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
 
425
  $wplc_settings = get_option("WPLC_SETTINGS");
426
 
427
 
428
- if (!isset($wplc_settings['wplc_pro_na'])) { $wplc_settings["wplc_pro_na"] = __("Chat offline. Leave a message", "wplivechat"); }
429
- if (!isset($wplc_settings['wplc_pro_intro'])) { $wplc_settings["wplc_pro_intro"] = __("Hello. Please input your details so that I may help you.", "wplivechat"); }
430
- if (!isset($wplc_settings['wplc_pro_offline1'])) { $wplc_settings["wplc_pro_offline1"] = __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"); }
431
- if (!isset($wplc_settings['wplc_pro_offline2'])) { $wplc_settings["wplc_pro_offline2"] = __("Sending message...", "wplivechat"); }
432
- if (!isset($wplc_settings['wplc_pro_offline3'])) { $wplc_settings["wplc_pro_offline3"] = __("Thank you for your message. We will be in contact soon.", "wplivechat"); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
 
434
- if (!isset($wplc_settings['wplc_pro_fst1'])) { $wplc_settings["wplc_pro_fst1"] = __("Questions?", "wplivechat"); }
435
- if (!isset($wplc_settings['wplc_pro_fst2'])) { $wplc_settings["wplc_pro_fst2"] = __("Chat with us", "wplivechat"); }
436
- if (!isset($wplc_settings['wplc_pro_fst3'])) { $wplc_settings["wplc_pro_fst3"] = __("Start live chat", "wplivechat"); }
437
- if (!isset($wplc_settings['wplc_pro_sst1'])) { $wplc_settings["wplc_pro_sst1"] = __("Start Chat", "wplivechat"); }
438
- if (!isset($wplc_settings['wplc_pro_sst2'])) { $wplc_settings["wplc_pro_sst2"] = __("Connecting. Please be patient...", "wplivechat"); }
439
- if (!isset($wplc_settings['wplc_pro_tst1'])) { $wplc_settings["wplc_pro_tst1"] = __("Reactivating your previous chat...", "wplivechat"); }
440
- if (!isset($wplc_settings['wplc_user_welcome_chat'])) { $wplc_settings["wplc_user_welcome_chat"] = __("Welcome. How may I help you?", "wplivechat"); }
441
- if (!isset($wplc_settings['wplc_user_enter'])) { $wplc_settings["wplc_user_enter"] = __("Press ENTER to send your message", "wplivechat"); }
442
 
443
- if (!isset($wplc_settings['wplc_settings_align'])) { $wplc_settings["wplc_settings_align"] = 1; }
 
 
 
 
 
 
 
444
 
445
  if (!isset($wplc_settings['wplc_settings_enabled'])) { $wplc_settings["wplc_settings_enabled"] = 1; }
446
 
@@ -475,7 +526,13 @@ function wplc_hook_control_set_transient() {
475
  $should_set_transient = apply_filters("wplc_filter_control_set_transient",true);
476
  if ($should_set_transient) {
477
  set_transient("wplc_is_admin_logged_in", "1", 70);
 
 
478
  }
 
 
 
 
479
  }
480
 
481
  add_action("wplc_hook_remove_transient","wplc_hook_control_remove_transient",10);
@@ -528,6 +585,7 @@ function wplc_feedback_page_include() {
528
  * @since 6.0.00
529
  * @author Nick Duncan <nick@codecabin.co.za>
530
  */
 
531
  function wplc_filter_control_menu_control() {
532
  $array = array(
533
  0 => 'read', /* main menu */
@@ -542,7 +600,7 @@ function wplc_filter_control_menu_control() {
542
 
543
  function wplc_admin_menu() {
544
 
545
- $cap = apply_filters("wplc_ma_filter_menu_control",wplc_filter_control_menu_control());
546
 
547
  $wplc_current_user = get_current_user_id();
548
 
@@ -574,6 +632,8 @@ function wplc_admin_menu() {
574
  add_submenu_page('wplivechat-menu', __('Offline Messages', 'wplivechat'), __('Offline Messages', 'wplivechat'), $cap[4], 'wplivechat-menu-offline-messages', 'wplc_admin_offline_messages');
575
 
576
  }
 
 
577
 
578
  add_submenu_page('wplivechat-menu', __('Feedback', 'wplivechat'), __('Feedback', 'wplivechat'), $cap[5], 'wplivechat-menu-feedback-page', 'wplc_feedback_page_include');
579
  add_submenu_page('wplivechat-menu', __('Support', 'wplivechat'), __('Support', 'wplivechat'), 'manage_options', 'wplivechat-menu-support-page', 'wplc_support_menu');
@@ -651,8 +711,8 @@ function wplc_load_user_js () {
651
  }
652
 
653
  if (function_exists("wplc_register_pro_version")) {
654
- if (function_exists('wplc_hide_chat_when_offline')) {
655
- $wplc_hide_chat = wplc_hide_chat_when_offline();
656
  if (!$wplc_hide_chat) {
657
  if (function_exists("wplc_push_js_to_front_pro")) {
658
  wplc_push_js_to_front_pro();
@@ -677,6 +737,7 @@ function wplc_load_user_js () {
677
 
678
  function wplc_push_js_to_front_basic() {
679
  global $wplc_is_mobile;
 
680
  wp_enqueue_script('jquery');
681
 
682
  $wplc_settings = get_option("WPLC_SETTINGS");
@@ -694,6 +755,8 @@ function wplc_push_js_to_front_basic() {
694
 
695
  if (isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1) {
696
  $wplc_display = 'display';
 
 
697
  } else {
698
  $wplc_display = 'hide';
699
  }
@@ -712,9 +775,28 @@ function wplc_push_js_to_front_basic() {
712
 
713
 
714
 
715
- global $wplc_version;
716
  wp_register_script('wplc-user-script', plugins_url('/js/wplc_u.js', __FILE__),array('jquery'),$wplc_version);
717
  wp_enqueue_script('wplc-user-script');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718
  wp_register_script('wplc-user-jquery-cookie', plugins_url('/js/jquery-cookie.js', __FILE__), array('wplc-user-script'),false, false);
719
  wp_enqueue_script('wplc-user-jquery-cookie');
720
 
@@ -731,6 +813,9 @@ function wplc_push_js_to_front_basic() {
731
  wp_localize_script('wplc-user-script', 'wplc_plugin_url', plugins_url());
732
  wp_localize_script('wplc-user-script', 'wplc_display_name', $wplc_display);
733
  wp_localize_script('wplc-user-script', 'wplc_enable_ding', $wplc_ding);
 
 
 
734
 
735
  if (!isset($wplc_settings['wplc_pro_offline1'])) { $wplc_settings["wplc_pro_offline1"] = __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"); }
736
  if (!isset($wplc_settings['wplc_pro_offline2'])) { $wplc_settings["wplc_pro_offline2"] = __("Sending message...", "wplivechat"); }
@@ -747,7 +832,7 @@ function wplc_push_js_to_front_basic() {
747
 
748
  if (isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != "") { $wplc_user_gravatar = sanitize_text_field(md5(strtolower(trim($_COOKIE['wplc_email'])))); } else {$wplc_user_gravatar = ""; }
749
 
750
- if ($wplc_user_gravatar != "") { $wplc_grav_image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=20' />";} else { $wplc_grav_image = "";}
751
  wp_localize_script('wplc-user-script', 'wplc_gravatar_image', $wplc_grav_image);
752
 
753
  $wplc_hide_chat = "";
@@ -797,7 +882,52 @@ function wplc_user_top_js() {
797
  <?php } ?>
798
  var wplc_nonce = '<?php echo $ajax_nonce; ?>';
799
  </script>
 
 
 
 
800
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
801
  }
802
  }
803
 
@@ -816,10 +946,9 @@ function wplc_hook_control_banned_users() {
816
  } else {
817
  $user_banned = 0;
818
  }
819
-
820
  if ($user_banned) {
821
- remove_action("wplc_hook_output_box_body");
822
- remove_action("wplc_hook_output_box_footer");
823
  }
824
  }
825
 
@@ -832,6 +961,8 @@ function wplc_hook_control_banned_users() {
832
  function wplc_hook_control_check_mobile() {
833
  $wplc_settings = get_option("WPLC_SETTINGS");
834
 
 
 
835
  if (!class_exists('Mobile_Detect')) {
836
  require_once (plugin_dir_path(__FILE__) . 'includes/Mobile_Detect.php');
837
  }
@@ -843,8 +974,8 @@ function wplc_hook_control_check_mobile() {
843
  return "";
844
  }
845
 
846
- if (function_exists('wplc_hide_chat_when_offline')) {
847
- $wplc_hide_chat = wplc_hide_chat_when_offline();
848
  if (!$wplc_hide_chat) {
849
  $draw_box = true;
850
  }
@@ -852,12 +983,18 @@ function wplc_hook_control_check_mobile() {
852
  $draw_box = true;
853
  }
854
  if (!$draw_box) {
855
- remove_action("wplc_hook_output_box_body");
856
- remove_action("wplc_hook_output_box_footer");
857
  }
858
 
859
  }
860
 
 
 
 
 
 
 
861
  /**
862
  * Decides whether or not to show the chat box based on the main setting in the settings page
863
  * @return void
@@ -866,8 +1003,8 @@ function wplc_hook_control_check_mobile() {
866
  function wplc_hook_control_is_chat_enabled() {
867
  $wplc_settings = get_option("WPLC_SETTINGS");
868
  if ($wplc_settings["wplc_settings_enabled"] == 2) {
869
- remove_action("wplc_hook_output_box_body");
870
- remove_action("wplc_hook_output_box_footer");
871
  }
872
  }
873
 
@@ -906,6 +1043,7 @@ add_action("wplc_hook_output_box_body","wplc_hook_control_show_chat_box");
906
  * @author Nick Duncan <nick@codecabin.co.za>
907
  */
908
  function wplc_output_box_5100() {
 
909
  do_action("wplc_hook_output_box_header");
910
  do_action("wplc_hook_output_box_body");
911
  do_action("wplc_hook_output_box_footer");
@@ -920,10 +1058,10 @@ function wplc_output_box_5100() {
920
  * @since 6.0.00
921
  * @author Nick Duncan <nick@codecabin.co.za>
922
  */
923
- function wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings) {
924
-
925
  $wplc_class = "";
926
- $wplc_settings = get_option("WPLC_SETTINGS");
927
 
928
  if ($wplc_settings["wplc_settings_align"] == 1) {
929
  $original_pos = "bottom_left";
@@ -966,11 +1104,41 @@ function wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings) {
966
 
967
  $wplc_extra_attr = apply_filters("wplc_filter_chat_header_extra_attr","");
968
 
969
- $ret_msg = "<div id=\"wp-live-chat\" wplc_animation=\"".$wplc_animation."\" style=\"".$wplc_starting_point." ".$wplc_box_align.";\" class=\"".$wplc_class." wplc_close\" original_pos=\"".$original_pos."\" ".$wplc_extra_attr." > ";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
970
  return $ret_msg;
971
  }
972
 
973
 
 
 
 
 
 
 
 
 
 
974
  /**
975
  * Filter to control the top HEADER DIV of the chat box
976
  * @param array $wplc_settings Live chat settings array
@@ -979,64 +1147,25 @@ function wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings) {
979
  * @author Nick Duncan <nick@codecabin.co.za>
980
  */
981
  function wplc_filter_control_live_chat_box_html_header_div_top($wplc_settings) {
982
- $wplc_settings = get_option('WPLC_SETTINGS');
983
- if (isset($wplc_settings['wplc_theme'])) { $wplc_theme = $wplc_settings['wplc_theme']; } else { }
984
- if (isset($wplc_theme)) {
985
- if($wplc_theme == 'theme-1') {
986
- $wplc_settings_fill = "#DB0000";
987
- $wplc_settings_font = "#FFFFFF";
988
- } else if ($wplc_theme == 'theme-2'){
989
- $wplc_settings_fill = "#000000";
990
- $wplc_settings_font = "#FFFFFF";
991
- } else if ($wplc_theme == 'theme-3'){
992
- $wplc_settings_fill = "#DB30B3";
993
- $wplc_settings_font = "#FFFFFF";
994
- } else if ($wplc_theme == 'theme-4'){
995
- $wplc_settings_fill = "#1A14DB";
996
- $wplc_settings_font = "#F7FF0F";
997
- } else if ($wplc_theme == 'theme-5'){
998
- $wplc_settings_fill = "#3DCC13";
999
- $wplc_settings_font = "#FF0808";
1000
- } else if ($wplc_theme == 'theme-6'){
1001
- if ($wplc_settings["wplc_settings_fill"]) {
1002
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1003
- } else {
1004
- $wplc_settings_fill = "#ec832d";
1005
- }
1006
- if ($wplc_settings["wplc_settings_font"]) {
1007
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1008
- } else {
1009
- $wplc_settings_font = "#FFFFFF";
1010
- }
1011
- } else {
1012
- if ($wplc_settings["wplc_settings_fill"]) {
1013
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1014
- } else {
1015
- $wplc_settings_fill = "#ec832d";
1016
- }
1017
- if ($wplc_settings["wplc_settings_font"]) {
1018
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1019
- } else {
1020
- $wplc_settings_font = "#FFFFFF";
1021
- }
1022
- }
1023
- } else {
1024
- if ($wplc_settings["wplc_settings_fill"]) {
1025
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1026
- } else {
1027
- $wplc_settings_fill = "#ec832d";
1028
- }
1029
- if ($wplc_settings["wplc_settings_font"]) {
1030
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1031
- } else {
1032
- $wplc_settings_font = "#FFFFFF";
1033
- }
1034
- }
1035
 
1036
 
1037
- $ret_msg = "<div id=\"wp-live-chat-header\" style=\"background-color: ".$wplc_settings_fill." !important; color: ".$wplc_settings_font." !important; \">";
1038
- $ret_msg .= apply_filters("wplc_filter_chat_header_under","");
 
 
 
 
 
 
 
 
 
 
 
 
 
1039
  return $ret_msg;
 
1040
  }
1041
 
1042
 
@@ -1110,65 +1239,33 @@ function wplc_filter_control_live_chat_box_html_ask_user_detail($wplc_settings)
1110
  * @author Nick Duncan <nick@codecabin.co.za>
1111
  */
1112
  function wplc_filter_control_live_chat_box_html_start_chat_button($wplc_settings,$wplc_using_locale ) {
1113
- $wplc_settings = get_option('WPLC_SETTINGS');
1114
- if (isset($wplc_settings['wplc_theme'])) { $wplc_theme = $wplc_settings['wplc_theme']; } else { }
1115
-
1116
- if (isset($wplc_theme)) {
1117
- if($wplc_theme == 'theme-1') {
1118
- $wplc_settings_fill = "#DB0000";
1119
- $wplc_settings_font = "#FFFFFF";
1120
- } else if ($wplc_theme == 'theme-2'){
1121
- $wplc_settings_fill = "#000000";
1122
- $wplc_settings_font = "#FFFFFF";
1123
- } else if ($wplc_theme == 'theme-3'){
1124
- $wplc_settings_fill = "#DB30B3";
1125
- $wplc_settings_font = "#FFFFFF";
1126
- } else if ($wplc_theme == 'theme-4'){
1127
- $wplc_settings_fill = "#1A14DB";
1128
- $wplc_settings_font = "#F7FF0F";
1129
- } else if ($wplc_theme == 'theme-5'){
1130
- $wplc_settings_fill = "#3DCC13";
1131
- $wplc_settings_font = "#FF0808";
1132
- } else if ($wplc_theme == 'theme-6'){
1133
- if ($wplc_settings["wplc_settings_fill"]) {
1134
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1135
- } else {
1136
- $wplc_settings_fill = "#ec832d";
1137
- }
1138
- if ($wplc_settings["wplc_settings_font"]) {
1139
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1140
- } else {
1141
- $wplc_settings_font = "#FFFFFF";
1142
- }
1143
- } else {
1144
- if ($wplc_settings["wplc_settings_fill"]) {
1145
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1146
- } else {
1147
- $wplc_settings_fill = "#ec832d";
1148
- }
1149
- if ($wplc_settings["wplc_settings_font"]) {
1150
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1151
- } else {
1152
- $wplc_settings_font = "#FFFFFF";
1153
- }
1154
- }
1155
- } else {
1156
- if ($wplc_settings["wplc_settings_fill"]) {
1157
- $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"];
1158
- } else {
1159
- $wplc_settings_fill = "#ec832d";
1160
- }
1161
- if ($wplc_settings["wplc_settings_font"]) {
1162
- $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"];
1163
- } else {
1164
- $wplc_settings_font = "#FFFFFF";
1165
- }
1166
- }
1167
-
1168
  $wplc_sst_1 = __('Start chat', 'wplivechat');
1169
  if (!isset($wplc_settings['wplc_pro_sst1']) || $wplc_settings['wplc_pro_sst1'] == "") { $wplc_settings['wplc_pro_sst1'] = $wplc_sst_1; }
1170
  $text = ($wplc_using_locale ? $wplc_sst_1 : stripslashes($wplc_settings['wplc_pro_sst1']));
1171
- return "<input id=\"wplc_start_chat_btn\" type=\"button\" value=\"$text\" style=\"background-color: ".$wplc_settings_fill." !important; color: ".$wplc_settings_font." !important;\"/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1172
  }
1173
 
1174
  /**
@@ -1253,11 +1350,13 @@ function wplc_filter_control_live_chat_box_html_2nd_layer($wplc_settings,$logged
1253
  if (!isset($wplc_settings['wplc_pro_intro']) || $wplc_settings['wplc_pro_intro'] == "") { $wplc_settings['wplc_pro_intro'] = $wplc_intro; }
1254
  $text = ($wplc_using_locale ? $wplc_intro : stripslashes($wplc_settings['wplc_pro_intro']));
1255
 
1256
- $ret_msg = "<div id=\"wp-live-chat-2-info\">";
1257
- $ret_msg .= "<strong>".$text."</strong>";
1258
- $ret_msg .= "</div>";
 
1259
  $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_ask_user_details",wplc_filter_control_live_chat_box_html_ask_user_detail($wplc_settings));
1260
  $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_start_chat_button",wplc_filter_control_live_chat_box_html_start_chat_button($wplc_settings,$wplc_using_locale));
 
1261
  } else {
1262
  /* admin not logged in, show offline messages */
1263
  $ret_msg = "<div id=\"wp-live-chat-2-info\">";
@@ -1298,10 +1397,19 @@ function wplc_filter_control_live_chat_box_html_3rd_layer($wplc_settings,$wplc_u
1298
  if (!isset($wplc_settings['wplc_pro_sst2']) || $wplc_settings['wplc_pro_sst2'] == "") { $wplc_settings['wplc_pro_sst2'] = $wplc_sst_2; }
1299
  $text = ($wplc_using_locale ? $wplc_sst_2 : stripslashes($wplc_settings['wplc_pro_sst2']));
1300
 
1301
- $ret_msg = "<p>".$text."</p>";
1302
  return $ret_msg;
1303
  }
1304
 
 
 
 
 
 
 
 
 
 
1305
  /**
1306
  * Filter to control the 4th layer of the chat window
1307
  * @param array $wplc_settings live chat settings array
@@ -1316,20 +1424,28 @@ function wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_u
1316
 
1317
  $wplc_welcome = __('Welcome. How may I help you?', 'wplivechat');
1318
  if (!isset($wplc_settings['wplc_user_welcome_chat']) || $wplc_settings['wplc_user_welcome_chat'] == "") { $wplc_settings['wplc_user_welcome_chat'] = $wplc_welcome; }
1319
- $text2 = ($wplc_using_locale ? $wplc_welcome : stripslashes($wplc_settings['wplc_user_welcome_chat']));
 
 
 
 
 
 
1320
 
1321
  $ret_msg = "<div id=\"wplc_sound_update\" style=\"height:0; width:0; display:none; border:0;\"></div>";
1322
 
1323
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_above_main_div","");
 
1324
 
1325
  $ret_msg .= "<div id=\"wplc_chatbox\">";
1326
- $ret_msg .= "<span class='wplc-admin-message'>";
1327
- $ret_msg .= $text2;
1328
- $ret_msg .= "</span>";
1329
- $ret_msg .= "<br />";
1330
- $ret_msg .= "<div class='wplc-clear-float-message'></div>";
1331
  $ret_msg .= "</div>";
1332
 
 
1333
  $ret_msg .= "<p style=\"text-align:center; font-size:11px;\">".$text."</p>";
1334
  $ret_msg .= "<p>";
1335
  $ret_msg .= "<input type=\"text\" name=\"wplc_chatmsg\" id=\"wplc_chatmsg\" value=\"\" />";
@@ -1337,6 +1453,7 @@ function wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_u
1337
  $ret_msg .= "<input id=\"wplc_send_msg\" type=\"button\" value=\"".__("Send", "wplivechat")."\" style=\"display:none;\" />";
1338
  $ret_msg .= "</p>";
1339
  $ret_msg .= "</div>";
 
1340
  return $ret_msg;
1341
  }
1342
 
@@ -1350,14 +1467,17 @@ function wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_u
1350
  * @author Nick Duncan <nick@codecabin.co.za>
1351
  */
1352
  function wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale) {
1353
- if ($wplc_settings["wplc_settings_fill"]) { $wplc_settings_fill = "#" . $wplc_settings["wplc_settings_fill"]; } else { $wplc_settings_fill = "#ed832f"; }
1354
- if ($wplc_settings["wplc_settings_font"]) { $wplc_settings_font = "#" . $wplc_settings["wplc_settings_font"]; } else { $wplc_settings_font = "#FFFFFF"; }
1355
 
1356
- $ret_msg = "<div style=\"display:block; \">";
1357
  if ($logged_in) {
1358
  $wplc_fst_1 = __('Questions?', 'wplivechat');
1359
  $wplc_fst_2 = __('Chat with us', 'wplivechat');
1360
- $wplc_tl_msg = "<div style=\"color: " . $wplc_settings_font . " !important;\"><strong>" . ($wplc_using_locale ? $wplc_fst_1 : stripslashes($wplc_settings['wplc_pro_fst1'])) . "</strong> " . ( $wplc_using_locale ? $wplc_fst_2 : stripslashes($wplc_settings['wplc_pro_fst2'])) ."</div>";
 
 
 
 
 
1361
 
1362
  $ret_msg .= $wplc_tl_msg;
1363
  } else {
@@ -1390,6 +1510,29 @@ function wplc_initiate_chat_button($actions,$result,$post_data) {
1390
  }
1391
 
1392
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1393
 
1394
  /**
1395
  * The function that builds the chat box
@@ -1400,7 +1543,7 @@ function wplc_initiate_chat_button($actions,$result,$post_data) {
1400
  function wplc_output_box_ajax_new() {
1401
 
1402
 
1403
- $ret_msg = "";
1404
  $logged_in = false;
1405
 
1406
  $wplc_settings = get_option("WPLC_SETTINGS");
@@ -1408,56 +1551,119 @@ function wplc_output_box_ajax_new() {
1408
  if(isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1){ $wplc_using_locale = true; } else { $wplc_using_locale = false; }
1409
 
1410
 
1411
- $wplc_is_admin_logged_in = get_transient("wplc_is_admin_logged_in");
 
1412
 
1413
 
1414
- if (!function_exists("wplc_register_pro_version") && $wplc_is_admin_logged_in != 1) {
1415
- $logged_in = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1416
  } else {
1417
- $logged_in = true;
1418
  }
1419
 
1420
 
 
1421
 
1422
 
1423
- $logged_in_checks = apply_filters("wplc_filter_is_admin_logged_in",array());
1424
- /* if we are logged in ANYWHERE, set this to true */
1425
- foreach($logged_in_checks as $key => $val) {
1426
- if ($val) { $logged_in = true; break; }
1427
- }
1428
 
1429
- $logged_in = apply_filters("wplc_final_loggedin_control",$logged_in);
1430
-
1431
- /* admin is using the basic version and is logged in */
1432
- if ($wplc_is_admin_logged_in) { $logged_in = true; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1433
 
1434
-
1435
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_main_div_top",wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings));
1436
- $ret_msg .= "<div class=\"wp-live-chat-wraper\">";
1437
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_header_div_top",wplc_filter_control_live_chat_box_html_header_div_top($wplc_settings));
1438
- $ret_msg .= " <i id=\"wp-live-chat-minimize\" class=\"fa fa-minus\" style=\"display:none;\" ></i>";
1439
- $ret_msg .= " <i id=\"wp-live-chat-close\" class=\"fa fa-times\" style=\"display:none;\" ></i>";
1440
- $ret_msg .= " <div id=\"wp-live-chat-1\" >";
1441
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_1st_layer",wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale));
1442
- $ret_msg .= " </div>";
1443
- $ret_msg .= " </div>";
1444
- $ret_msg .= " <div id=\"wp-live-chat-2\" style=\"display:none;\">";
1445
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_2nd_layer",wplc_filter_control_live_chat_box_html_2nd_layer($wplc_settings,$logged_in,$wplc_using_locale));
1446
- $ret_msg .= " </div>";
1447
- $ret_msg .= " <div id=\"wp-live-chat-3\" style=\"display:none;\">";
1448
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_3rd_layer",wplc_filter_control_live_chat_box_html_3rd_layer($wplc_settings,$wplc_using_locale));
1449
- $ret_msg .= " </div>";
1450
- $ret_msg .= " <div id=\"wp-live-chat-react\" style=\"display:none;\">";
1451
- $ret_msg .= " <p>".__("Reactivating your previous chat...", "wplivechat")."</p>";
1452
- $ret_msg .= " </div>";
1453
- $ret_msg .= " <div id=\"wp-live-chat-4\" style=\"display:none;\">";
1454
- $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_4th_layer",wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_using_locale));
1455
- $ret_msg .= "</div>";
1456
- $ret_msg .= "</div>";
1457
- return json_encode($ret_msg);
1458
 
 
1459
 
1460
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1461
  }
1462
 
1463
 
@@ -1511,8 +1717,8 @@ function wplc_display_box() {
1511
  if ($wplc_is_mobile && !isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] != 1) {
1512
  return;
1513
  }
1514
- if (function_exists('wplc_hide_chat_when_offline')) {
1515
- $wplc_hide_chat = wplc_hide_chat_when_offline();
1516
  if (!$wplc_hide_chat) {
1517
  wplc_pro_draw_user_box();
1518
  }
@@ -1565,8 +1771,8 @@ function wplc_display_box_ajax() {
1565
  if ($wplc_is_mobile && !isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] != 1) {
1566
  return;
1567
  }
1568
- if (function_exists('wplc_hide_chat_when_offline')) {
1569
- $wplc_hide_chat = wplc_hide_chat_when_offline();
1570
  if (!$wplc_hide_chat) {
1571
  wplc_pro_draw_user_box();
1572
  }
@@ -1600,7 +1806,8 @@ function wplc_admin_display_chat($cid) {
1600
  }
1601
 
1602
  function wplc_admin_accept_chat($cid) {
1603
- wplc_change_chat_status(sanitize_text_field($cid), 3);
 
1604
  return true;
1605
  }
1606
 
@@ -1836,16 +2043,17 @@ add_action("wplc_hook_chat_dashboard_bottom","wplc_hook_control_chat_dashboard_b
1836
  */
1837
  function wplc_hook_control_chat_dashboard_bottom() {
1838
  echo "<p>";
1839
- echo __("With the <strong>Initiate Chats</strong> Extension for WP Live Chat Support, you can", "wplivechat");
1840
- echo " <a href='https://wp-livechat.com/extensions/pro-bundle/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1'' title='".__("see who's online and initiate chats", "wplivechat")."' target='_BLANK'>";
1841
- echo __("initiate chats", "wplivechat");
1842
- echo "</a> ";
1843
- echo __("with your online visitors with the click of a button.", "wplivechat");
1844
- echo " <a href='https://wp-livechat.com/extensions/pro-bundle/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2' title='".__("Buy the Initiate Chats Extension now.", "wplivechat")."' target='_BLANK'>";
1845
- echo "<strong>";
1846
- echo __("Buy the Initiate Chats Extension now.", "wplivechat");
1847
- echo "</strong>";
1848
- echo "</a>";
 
1849
  echo "</p>";
1850
 
1851
 
@@ -1989,7 +2197,9 @@ function wplc_admin_menu_layout_display() {
1989
 
1990
  add_action("wplc_hook_change_status_on_answer","wplc_hook_control_change_status_on_answer",10,1);
1991
  function wplc_hook_control_change_status_on_answer($get_data) {
1992
- wplc_change_chat_status(sanitize_text_field($get_data['cid']), 3);
 
 
1993
  }
1994
 
1995
 
@@ -2104,18 +2314,27 @@ function wplc_draw_chat_area($cid) {
2104
  echo "<a href='".admin_url('admin.php?page=wplivechat-menu-extensions-page')."' class='button button-primary' target='_BLANK'>".__("Get more add-ons","wplivechat")."</a>";
2105
  echo "</div>";
2106
 
 
 
2107
  if ($result->status != 1) {
2108
- echo "<div class='admin_chat_quick_controls'>";
2109
- echo " <p style=\"text-align:left; font-size:11px;\">" . __('Press ENTER to send your message', 'wplivechat') . "</p>";
2110
- echo " " . __("Assign Quick Response", "wplivechat") . " <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>" . __('Select', 'wplivechat') . "</option></select> <a href='https://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>";
2111
- echo " </div>";
2112
- echo "</div>";
2113
 
2114
  //echo wplc_return_admin_chat_javascript($_GET['cid']);
2115
  }
2116
 
2117
  }
2118
 
 
 
 
 
 
 
 
 
 
 
2119
  function wplc_return_chat_response_box($cid) {
2120
  $ret = "<div class=\"chat_response_box\">";
2121
  $ret .= "<input type='text' name='wplc_admin_chatmsg' id='wplc_admin_chatmsg' value='' placeholder='" . __("type here...", "wplivechat") . "' />";
@@ -2212,18 +2431,48 @@ function wplc_activate() {
2212
  "wplc_settings_enabled" => "1",
2213
  "wplc_settings_fill" => "ed832f",
2214
  "wplc_settings_font" => "FFFFFF",
 
 
 
 
 
 
2215
  "wplc_require_user_info" => '1',
2216
  "wplc_loggedin_user_info" => '1',
2217
  "wplc_user_alternative_text" => $wplc_alt_text,
2218
  "wplc_enabled_on_mobile" => '1',
2219
  "wplc_display_name" => '1',
2220
- "wplc_record_ip_address" => '1'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2221
  ));
2222
  }
2223
 
2224
 
2225
 
2226
 
 
 
 
 
 
 
 
 
 
2227
  add_option("WPLC_HIDE_CHAT", "true");
2228
  add_option("WPLC_FIRST_TIME", true);
2229
  }
@@ -2317,6 +2566,104 @@ function wplc_add_user_stylesheet() {
2317
  wp_enqueue_style('wplc-font-awesome');
2318
  wp_register_style('wplc-style', plugins_url('/css/wplcstyle.css', __FILE__));
2319
  wp_enqueue_style('wplc-style');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2320
  }
2321
  if(function_exists('wplc_ce_activate')){
2322
  if(function_exists('wplc_ce_load_user_styles')){
@@ -2335,8 +2682,10 @@ function wplc_add_admin_stylesheet() {
2335
  wp_enqueue_style('wplc-font-awesome');
2336
  wp_enqueue_script('jquery-ui-core');
2337
  wp_enqueue_script('jquery-effects-core');
2338
-
2339
-
 
 
2340
 
2341
  }
2342
  if (isset($_GET['page']) && $_GET['page'] == "wplivechat-menu-support-page") {
@@ -2654,6 +3003,12 @@ function wplc_head_basic() {
2654
  if (isset($_POST['wplc_settings_align'])) { $wplc_data['wplc_settings_align'] = esc_attr($_POST['wplc_settings_align']); }
2655
  if (isset($_POST['wplc_settings_fill'])) { $wplc_data['wplc_settings_fill'] = esc_attr($_POST['wplc_settings_fill']); }
2656
  if (isset($_POST['wplc_settings_font'])) { $wplc_data['wplc_settings_font'] = esc_attr($_POST['wplc_settings_font']); }
 
 
 
 
 
 
2657
  if (isset($_POST['wplc_settings_enabled'])) { $wplc_data['wplc_settings_enabled'] = esc_attr($_POST['wplc_settings_enabled']); }
2658
  if (isset($_POST['wplc_auto_pop_up'])) { $wplc_data['wplc_auto_pop_up'] = esc_attr($_POST['wplc_auto_pop_up']); }
2659
  if (isset($_POST['wplc_require_user_info'])) { $wplc_data['wplc_require_user_info'] = esc_attr($_POST['wplc_require_user_info']); } else { $wplc_data['wplc_require_user_info'] = "0"; }
@@ -2688,6 +3043,7 @@ function wplc_head_basic() {
2688
 
2689
  if(isset($_POST['wplc_animation'])){ $wplc_data['wplc_animation'] = esc_attr($_POST['wplc_animation']); }
2690
  if(isset($_POST['wplc_theme'])){ $wplc_data['wplc_theme'] = esc_attr($_POST['wplc_theme']); }
 
2691
 
2692
  if(isset($_POST['wplc_agent_select']) && $_POST['wplc_agent_select'] != "") {
2693
  $user_array = get_users(array(
@@ -3023,10 +3379,10 @@ function wp_button_pointers_load_scripts($hook) {
3023
 
3024
 
3025
  $pointer_localize_strings = array(
3026
- "initiate" => "<h3>".__("Initiate Chats","wplivechat")."</h3><p>".__("With the <strong>Initiate Chats Extension</strong> of WP Live Chat Support, you can", "wplivechat")." <a href='https://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1_pointer' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='https://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2_pointer' title='".__("Buy the Initiate Chats Extension now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Initiate Chats Extension now (once off payment).", "wplivechat")."</strong></a></p>",
3027
- "chats" => "<h3>".__("Multiple Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='https://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=plugin&utm_medium=link&utm_campaign=morechats1_pointer' title='".__("accept and handle multiple chats.", "wplivechat")."' target=\"_BLANK\">".__("accept and handle multiple chats.", "wplivechat")."</a><br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=morechats2_pointer' title='".__("Buy the Initiate Chats Extension now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Initiate Chats Extension now (once off payment).", "wplivechat")."</strong></a></p>",
3028
- "agent_info" => "<h3>".__("Add unlimited agents","wplivechat")."</h3><p><a href='/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents1_pointer' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the <strong>Mutliple Agents Extension</strong> of WP Live Chat Support","wplivechat")." "."<a href='/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents2_pointer' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>"
3029
- );
3030
 
3031
 
3032
  wp_enqueue_style( 'wp-pointer' );
@@ -3148,7 +3504,7 @@ function wplc_hook_control_agents_settings() {
3148
  <p><i class='fa fa-plus-circle fa-4x' style='color:#ccc;' ></i></p>
3149
  <h3><?php _e("Add New Agent","wplivechat"); ?></h3>
3150
  <p><button class='button button-secondary' id='wplc_add_agent' disabled style=><?php _e("Add Agent","wplivechat"); ?></button></p>
3151
- <p style='font-size:0.8em'><?php _e("Add as many agents as you need with the ","wplivechat") ?> <a href="https://wp-livechat.com/extensions/multiple-agents-extension/?utm_source=plugin&utm_medium=link&utm_campaign=multipleAgents" target="_BLANK"><?php _e("Multiple Agents Extension.", "wplivechat") ?></a></p>
3152
  </li>
3153
  </ul>
3154
  <?php
@@ -3165,13 +3521,11 @@ function wplc_hook_control_agents_settings() {
3165
  <?php
3166
  }
3167
 
3168
-
3169
-
3170
  function wplc_get_chat_data($cid) {
3171
  global $wpdb;
3172
  global $wplc_tblname_chats;
3173
- $sql = "SELECT * FROM $wplc_tblname_chats WHERE `id` = '$cid' LIMIT 1";
3174
- $results = $wpdb->get_results();
3175
  if (isset($results[0])) { $result = $results[0]; } else { $result = null; }
3176
  $result = apply_filters("wplc_filter_get_chat_data",$result,$cid);
3177
  return $result;
@@ -3234,7 +3588,14 @@ function wplc_build_api_check($page_content, $data) {
3234
  if ($data['string'] == "Include Exclude Pages") {
3235
  $link = "";
3236
  $image = "https://ccplugins.co/api-wplc-extensions/images/IncludeAndExclude-Small.jpg";
3237
- }
 
 
 
 
 
 
 
3238
 
3239
 
3240
 
@@ -3283,21 +3644,20 @@ function wplc_build_api_check($page_content, $data) {
3283
 
3284
 
3285
 
3286
-
3287
- add_filter("wplc_filter_relevant_extensions_main","wplc_filter_control_relevant_extensions_main_initiate");
3288
- function wplc_filter_control_relevant_extensions_main_initiate($text) {
3289
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
3290
 
3291
- $rel_name = __("Initiate Chats","wplivechat");
3292
- $rel_image = "https://ccplugins.co/api-wplc-extensions/images/InitiateChat-Icon.jpg";
3293
- $rel_link = "https://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_initiate1";
3294
  $text .= '<div class="wplc-extension relevant_extension">';
3295
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3296
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3297
  $text .= '</a>';
3298
  $text .= '<div class="float:left; padding-left:10px;">';
3299
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3300
- $text .= '<p>'.__("Initiate a chat with any visitor at any time.","wplivechat").'</p>';
3301
  $text .= '</div>';
3302
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3303
  $text .= '</div>';
@@ -3305,6 +3665,7 @@ function wplc_filter_control_relevant_extensions_main_initiate($text) {
3305
  return $text;
3306
  }
3307
 
 
3308
  add_filter("wplc_filter_relevant_extensions_main","wplc_filter_control_relevant_extensions_main_mobile");
3309
  function wplc_filter_control_relevant_extensions_main_mobile($text) {
3310
  if (function_exists("wplc_mobile_check_if_logged_in")) { return $text; }
@@ -3314,7 +3675,7 @@ function wplc_filter_control_relevant_extensions_main_mobile($text) {
3314
  $rel_link = "https://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_mobile";
3315
  $text .= '<div class="wplc-extension relevant_extension">';
3316
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3317
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3318
  $text .= '</a>';
3319
  $text .= '<div class="float:left; padding-left:10px;">';
3320
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
@@ -3335,7 +3696,7 @@ function wplc_filter_control_relevant_extensions_main_cloud($text) {
3335
  $rel_link = "https://wp-livechat.com/extensions/cloud-server-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_cloud";
3336
  $text .= '<div class="wplc-extension relevant_extension">';
3337
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3338
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3339
  $text .= '</a>';
3340
  $text .= '<div class="float:left; padding-left:10px;">';
3341
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
@@ -3348,41 +3709,23 @@ function wplc_filter_control_relevant_extensions_main_cloud($text) {
3348
  }
3349
 
3350
 
3351
- add_filter("wplc_filter_relevant_extensions_chatbox","wplc_filter_control_relevant_extensions_chatbox_initiate");
3352
- function wplc_filter_control_relevant_extensions_chatbox_initiate($text) {
3353
- if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
3354
-
3355
- $rel_name = __("Initiate Chats","wplivechat");
3356
- $rel_image = "https://ccplugins.co/api-wplc-extensions/images/InitiateChat-Icon.jpg";
3357
- $rel_link = "https://wp-livechat.com/extensions/initiate-chat-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_initiate2";
3358
- $text .= '<div class="wplc-extension relevant_extension">';
3359
- $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3360
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3361
- $text .= '</a>';
3362
- $text .= '<div class="float:left; padding-left:10px;">';
3363
- $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3364
- $text .= '<p>'.__("Initiate a chat with any visitor at any time.","wplivechat").'</p>';
3365
- $text .= '</div>';
3366
- $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3367
- $text .= '</div>';
3368
 
3369
- return $text;
3370
- }
3371
 
3372
 
3373
- add_filter("wplc_filter_relevant_extensions_chatbox","wplc_filter_control_relevant_extensions_chatbox_acbc");
3374
- function wplc_filter_control_relevant_extensions_chatbox_acbc($text) {
3375
- if (function_exists("wplc_acbc_hook_control_settings_page")) { return $text; }
3376
- $rel_name = __("Advanced Chat Box Control","wplivechat");
3377
- $rel_image = "https://ccplugins.co/api-wplc-extensions/images/AdvancedChatBox-Icon.jpg";
3378
- $rel_link = "https://wp-livechat.com/extensions/advanced-chat-box-control/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_acbc";
 
3379
  $text .= '<div class="wplc-extension relevant_extension">';
3380
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3381
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3382
  $text .= '</a>';
3383
  $text .= '<div class="float:left; padding-left:10px;">';
3384
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3385
- $text .= '<p>'.__("Add your company logo, avatar and name to the chat box and add more advanced features.","wplivechat").'</p>';
3386
  $text .= '</div>';
3387
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3388
  $text .= '</div>';
@@ -3391,25 +3734,7 @@ function wplc_filter_control_relevant_extensions_chatbox_acbc($text) {
3391
  }
3392
 
3393
 
3394
- add_filter("wplc_filter_relevant_extensions_chatbox","wplc_filter_control_relevant_extensions_chatbox_include");
3395
- function wplc_filter_control_relevant_extensions_chatbox_include($text) {
3396
- if (function_exists("wplc_inex_filter_control_display_contents")) { return $text; }
3397
- $rel_name = __("Include and Exclude Pages","wplivechat");
3398
- $rel_image = "https://ccplugins.co/api-wplc-extensions/images/IncludeAndExclude-Icon.jpg";
3399
- $rel_link = "https://wp-livechat.com/extensions/include-exclude-chat/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_include";
3400
- $text .= '<div class="wplc-extension relevant_extension">';
3401
- $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3402
- $text .= '<img width="150" src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" style="width:140px; margin-right:10px;">';
3403
- $text .= '</a>';
3404
- $text .= '<div class="float:left; padding-left:10px;">';
3405
- $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3406
- $text .= '<p>'.__("Control where the chat box is displayed on your website. Choose which pages to include and/or exclude.","wplivechat").'</p>';
3407
- $text .= '</div>';
3408
- $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3409
- $text .= '</div>';
3410
 
3411
- return $text;
3412
- }
3413
 
3414
  /**
3415
  * Add to the chat box settings page
@@ -3529,4 +3854,42 @@ function wplc_plugin_row_invalid_api() {
3529
  echo '<tr class="active"><td>&nbsp;</td><td colspan="2" style="color:red;">
3530
  &nbsp; &nbsp; '.__('Your API Key is Invalid. You are not eligible for future updates. Please enter your API key <a href="admin.php?page=wplivechat-menu-api-keys-page">here</a>.','wplivechat').'
3531
  </td></tr>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3532
  }
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: 6.1.00
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  Text Domain: wplivechat
11
  */
12
 
13
  /*
14
+ * 6.1.00 - 2016-03-18 - Medium priority
15
+ * Fixed a bug that caused the chat agent to be nullified if you saved the settings
16
+ * NEW: Introduced a new modern theme
17
+ * Fixed the bug that caused the chat box to not open again if you minimized it while in chat
18
+ * Fixed a style bug on the admin chat box
19
+ * Performance improvements for the basic version - there are no longer regular longpoll requests when using the basic version. Long polling only starts once a chat has been started
20
+ * Fixed a styling bug in the settings page
21
+ * Longpoll requests no longer run when you're offline - this will introduce significant performance imporvements
22
+ * We have removed the "X" on the chat box and it will now only show up when there is an active chat on the user's side. This avoids the confusion when the user presses "X" and the chat hides for 24 hours.
23
+ * Images of the chat agent and user now show up correctly in the chat box
24
+ * Fixed a bug that added slashes to apostrophes in the chat window
25
+ * Fixed a bug that caused an error when trying to load the chat box when a banned user visited the site
26
+ * Fixed a bug that still displayed the offline message window even if the setting was set to false
27
  *
28
+ * 6.0.07 - 2016-03-11 - High priority
29
+ * Bug fix - agent status was lost when saving settings
30
+ *
31
  * 6.0.06 - 2016-03-04 - Medium priority
32
  * More stable fix for the menu item bug that has been experienced lately
33
  *
346
  $wplc_tblname_offline_msgs = $wpdb->prefix . "wplc_offline_messages";
347
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
348
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
349
+ $wplc_version = "6.1.00";
350
 
351
  define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
352
  define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
353
  global $wplc_basic_plugin_url;
354
  $wplc_basic_plugin_url = get_option('siteurl') . "/wp-content/plugins/wp-live-chat-support/";
355
 
356
+
357
+ global $wplc_pro_version;
358
+ $wplc_ver = str_replace('.', '', $wplc_pro_version);
359
+ $checker = intval($wplc_ver);
360
+ if(!function_exists('wplc_pro_activate') || $checker >= 6000){
361
  require_once (plugin_dir_path(__FILE__) . "ajax_new.php");
362
  }
363
 
409
  }
410
 
411
  function wplc_version_control() {
412
+
413
  global $wplc_version;
414
 
415
 
440
  }
441
  */
442
 
443
+
444
+ /* add caps to admin */
445
+ if (current_user_can('manage_options')) {
446
+ global $user_ID;
447
+ $user = new WP_User($user_ID);
448
+ foreach ($user->roles as $urole) {
449
+ if ($urole == "administrator") {
450
+ $admins = get_role('administrator');
451
+ $admins->add_cap('edit_wplc_quick_response');
452
+ $admins->add_cap('edit_wplc_quick_response');
453
+ $admins->add_cap('edit_other_wplc_quick_response');
454
+ $admins->add_cap('publish_wplc_quick_response');
455
+ $admins->add_cap('read_wplc_quick_response');
456
+ $admins->add_cap('read_private_wplc_quick_response');
457
+ $admins->add_cap('delete_wplc_quick_response');
458
+ }
459
+ }
460
+ }
461
 
462
  $wplc_settings = get_option("WPLC_SETTINGS");
463
 
464
 
465
+ if (!isset($wplc_settings['wplc_pro_na']) || (isset($wplc_settings['wplc_pro_na']) && $wplc_settings['wplc_pro_na'] == "")) { $wplc_settings["wplc_pro_na"] = __("Chat offline. Leave a message", "wplivechat"); }
466
+ if (!isset($wplc_settings['wplc_pro_intro']) || (isset($wplc_settings['wplc_pro_intro']) && $wplc_settings['wplc_pro_intro'] == "")) { $wplc_settings["wplc_pro_intro"] = __("Hello. Please input your details so that I may help you.", "wplivechat"); }
467
+ if (!isset($wplc_settings['wplc_pro_offline1']) || (isset($wplc_settings['wplc_pro_offline1']) && $wplc_settings['wplc_pro_offline1'] == "")) { $wplc_settings["wplc_pro_offline1"] = __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"); }
468
+ if (!isset($wplc_settings['wplc_pro_offline2']) || (isset($wplc_settings['wplc_pro_offline2']) && $wplc_settings['wplc_pro_offline2'] == "")) { $wplc_settings["wplc_pro_offline2"] = __("Sending message...", "wplivechat"); }
469
+ if (!isset($wplc_settings['wplc_pro_offline3']) || (isset($wplc_settings['wplc_pro_offline3']) && $wplc_settings['wplc_pro_offline3'] == "")) { $wplc_settings["wplc_pro_offline3"] = __("Thank you for your message. We will be in contact soon.", "wplivechat"); }
470
+ if (!isset($wplc_settings['wplc_pro_fst1']) || (isset($wplc_settings['wplc_pro_fst1']) && $wplc_settings['wplc_pro_fst1'] == "")) { $wplc_settings["wplc_pro_fst1"] = __("Questions?", "wplivechat"); }
471
+ if (!isset($wplc_settings['wplc_pro_fst2']) || (isset($wplc_settings['wplc_pro_fst2']) && $wplc_settings['wplc_pro_fst2'] == "")) { $wplc_settings["wplc_pro_fst2"] = __("Chat with us", "wplivechat"); }
472
+ if (!isset($wplc_settings['wplc_pro_fst3']) || (isset($wplc_settings['wplc_pro_fst3']) && $wplc_settings['wplc_pro_fst3'] == "")) { $wplc_settings["wplc_pro_fst3"] = __("Start live chat", "wplivechat"); }
473
+ if (!isset($wplc_settings['wplc_pro_sst1']) || (isset($wplc_settings['wplc_pro_sst1']) && $wplc_settings['wplc_pro_sst1'] == "")) { $wplc_settings["wplc_pro_sst1"] = __("Start Chat", "wplivechat"); }
474
+ if (!isset($wplc_settings['wplc_pro_sst2']) || (isset($wplc_settings['wplc_pro_sst2']) && $wplc_settings['wplc_pro_sst2'] == "")) { $wplc_settings["wplc_pro_sst2"] = __("Connecting. Please be patient...", "wplivechat"); }
475
+ if (!isset($wplc_settings['wplc_pro_tst1']) || (isset($wplc_settings['wplc_pro_tst1']) && $wplc_settings['wplc_pro_tst1'] == "")) { $wplc_settings["wplc_pro_tst1"] = __("Reactivating your previous chat...", "wplivechat"); }
476
+ if (!isset($wplc_settings['wplc_user_welcome_chat']) || (isset($wplc_settings['wplc_user_welcome_chat']) && $wplc_settings['wplc_user_welcome_chat'] == "")) { $wplc_settings["wplc_user_welcome_chat"] = __("Welcome. How may I help you?", "wplivechat"); }
477
+ if (!isset($wplc_settings['wplc_user_enter']) || (isset($wplc_settings['wplc_user_enter']) && $wplc_settings['wplc_user_enter'] == "")) { $wplc_settings["wplc_user_enter"] = __("Press ENTER to send your message", "wplivechat"); }
478
+
479
+
480
+
481
+ /* users who are updating will stay on the existing theme */
482
+ if (get_option("WPLC_FIRST_TIME")) {} else {
483
+ if (!isset($wplc_settings['wplc_newtheme'])) { $wplc_settings["wplc_newtheme"] = "theme-2"; }
484
+ }
485
 
 
 
 
 
 
 
 
 
486
 
487
+ if (!isset($wplc_settings['wplc_settings_color1'])) { $wplc_settings["wplc_settings_color1"] = "ED832F"; }
488
+ if (!isset($wplc_settings['wplc_settings_color2'])) { $wplc_settings["wplc_settings_color2"] = "FFFFFF"; }
489
+ if (!isset($wplc_settings['wplc_settings_color3'])) { $wplc_settings["wplc_settings_color3"] = "EEEEEE"; }
490
+ if (!isset($wplc_settings['wplc_settings_color4'])) { $wplc_settings["wplc_settings_color4"] = "666666"; }
491
+
492
+
493
+
494
+ if (!isset($wplc_settings['wplc_settings_align'])) { $wplc_settings["wplc_settings_align"] = 2; }
495
 
496
  if (!isset($wplc_settings['wplc_settings_enabled'])) { $wplc_settings["wplc_settings_enabled"] = 1; }
497
 
526
  $should_set_transient = apply_filters("wplc_filter_control_set_transient",true);
527
  if ($should_set_transient) {
528
  set_transient("wplc_is_admin_logged_in", "1", 70);
529
+
530
+
531
  }
532
+
533
+
534
+
535
+
536
  }
537
 
538
  add_action("wplc_hook_remove_transient","wplc_hook_control_remove_transient",10);
585
  * @since 6.0.00
586
  * @author Nick Duncan <nick@codecabin.co.za>
587
  */
588
+ add_filter("wplc_ma_filter_menu_control","wplc_filter_control_menu_control",10,1);
589
  function wplc_filter_control_menu_control() {
590
  $array = array(
591
  0 => 'read', /* main menu */
600
 
601
  function wplc_admin_menu() {
602
 
603
+ $cap = apply_filters("wplc_ma_filter_menu_control",array());
604
 
605
  $wplc_current_user = get_current_user_id();
606
 
632
  add_submenu_page('wplivechat-menu', __('Offline Messages', 'wplivechat'), __('Offline Messages', 'wplivechat'), $cap[4], 'wplivechat-menu-offline-messages', 'wplc_admin_offline_messages');
633
 
634
  }
635
+ do_action("wplc_hook_menu_mid",$cap);
636
+
637
 
638
  add_submenu_page('wplivechat-menu', __('Feedback', 'wplivechat'), __('Feedback', 'wplivechat'), $cap[5], 'wplivechat-menu-feedback-page', 'wplc_feedback_page_include');
639
  add_submenu_page('wplivechat-menu', __('Support', 'wplivechat'), __('Support', 'wplivechat'), 'manage_options', 'wplivechat-menu-support-page', 'wplc_support_menu');
711
  }
712
 
713
  if (function_exists("wplc_register_pro_version")) {
714
+ if (function_exists('wplc_basic_hide_chat_when_offline')) {
715
+ $wplc_hide_chat = wplc_basic_hide_chat_when_offline();
716
  if (!$wplc_hide_chat) {
717
  if (function_exists("wplc_push_js_to_front_pro")) {
718
  wplc_push_js_to_front_pro();
737
 
738
  function wplc_push_js_to_front_basic() {
739
  global $wplc_is_mobile;
740
+ global $wplc_version;
741
  wp_enqueue_script('jquery');
742
 
743
  $wplc_settings = get_option("WPLC_SETTINGS");
755
 
756
  if (isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1) {
757
  $wplc_display = 'display';
758
+ wp_register_script('wplc-md5', plugins_url('/js/md5.js', __FILE__),array('wplc-user-script'),$wplc_version);
759
+ wp_enqueue_script('wplc-md5');
760
  } else {
761
  $wplc_display = 'hide';
762
  }
775
 
776
 
777
 
778
+
779
  wp_register_script('wplc-user-script', plugins_url('/js/wplc_u.js', __FILE__),array('jquery'),$wplc_version);
780
  wp_enqueue_script('wplc-user-script');
781
+
782
+ if (isset($wplc_settings['wplc_newtheme'])) { $wplc_newtheme = $wplc_settings['wplc_newtheme']; } else { }
783
+ if (isset($wplc_newtheme)) {
784
+ if($wplc_newtheme == 'theme-1') {
785
+ wp_register_script('wplc-theme-classic', plugins_url('/js/themes/classic.js', __FILE__),array('wplc-user-script'),$wplc_version);
786
+ wp_enqueue_script('wplc-theme-classic');
787
+
788
+ }
789
+ else if($wplc_newtheme == 'theme-2') {
790
+ wp_register_script('wplc-theme-modern', plugins_url('/js/themes/modern.js', __FILE__),array('wplc-user-script'),$wplc_version);
791
+ wp_enqueue_script('wplc-theme-modern');
792
+
793
+ }
794
+ } else {
795
+ wp_register_script('wplc-theme-classic', plugins_url('/js/themes/classic.js', __FILE__),array('wplc-user-script'),$wplc_version);
796
+ wp_enqueue_script('wplc-theme-classic');
797
+ }
798
+
799
+
800
  wp_register_script('wplc-user-jquery-cookie', plugins_url('/js/jquery-cookie.js', __FILE__), array('wplc-user-script'),false, false);
801
  wp_enqueue_script('wplc-user-jquery-cookie');
802
 
813
  wp_localize_script('wplc-user-script', 'wplc_plugin_url', plugins_url());
814
  wp_localize_script('wplc-user-script', 'wplc_display_name', $wplc_display);
815
  wp_localize_script('wplc-user-script', 'wplc_enable_ding', $wplc_ding);
816
+ $wplc_run_override = "0";
817
+ $wplc_run_override = apply_filters("wplc_filter_run_override",$wplc_run_override);
818
+ wp_localize_script('wplc-user-script', 'wplc_filter_run_override', $wplc_run_override);
819
 
820
  if (!isset($wplc_settings['wplc_pro_offline1'])) { $wplc_settings["wplc_pro_offline1"] = __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"); }
821
  if (!isset($wplc_settings['wplc_pro_offline2'])) { $wplc_settings["wplc_pro_offline2"] = __("Sending message...", "wplivechat"); }
832
 
833
  if (isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != "") { $wplc_user_gravatar = sanitize_text_field(md5(strtolower(trim($_COOKIE['wplc_email'])))); } else {$wplc_user_gravatar = ""; }
834
 
835
+ if ($wplc_user_gravatar != "") { $wplc_grav_image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";} else { $wplc_grav_image = "";}
836
  wp_localize_script('wplc-user-script', 'wplc_gravatar_image', $wplc_grav_image);
837
 
838
  $wplc_hide_chat = "";
882
  <?php } ?>
883
  var wplc_nonce = '<?php echo $ajax_nonce; ?>';
884
  </script>
885
+
886
+
887
+
888
+
889
  <?php
890
+
891
+ $wplc_settings = get_option('WPLC_SETTINGS');
892
+ if (isset($wplc_settings['wplc_theme'])) { $wplc_theme = $wplc_settings['wplc_theme']; } else { $wplc_theme = "theme-default"; }
893
+ if (isset($wplc_theme)) {
894
+
895
+ if($wplc_theme == 'theme-6') {
896
+ /* custom */
897
+
898
+ if (isset($wplc_settings["wplc_settings_color1"])) { $wplc_settings_color1 = $wplc_settings["wplc_settings_color1"]; } else { $wplc_settings_color1 = "ED832F"; }
899
+ if (isset($wplc_settings["wplc_settings_color2"])) { $wplc_settings_color2 = $wplc_settings["wplc_settings_color2"]; } else { $wplc_settings_color2 = "FFFFFF"; }
900
+ if (isset($wplc_settings["wplc_settings_color3"])) { $wplc_settings_color3 = $wplc_settings["wplc_settings_color3"]; } else { $wplc_settings_color3 = "EEEEEE"; }
901
+ if (isset($wplc_settings["wplc_settings_color4"])) { $wplc_settings_color4 = $wplc_settings["wplc_settings_color4"]; } else { $wplc_settings_color4 = "666666"; }
902
+
903
+
904
+ ?>
905
+ <style>
906
+ .wplc-color-1 { color: #<?php echo $wplc_settings_color1; ?> !important; }
907
+ .wplc-color-2 { color: #<?php echo $wplc_settings_color2; ?> !important; }
908
+ .wplc-color-3 { color: #<?php echo $wplc_settings_color3; ?> !important; }
909
+ .wplc-color-4 { color: #<?php echo $wplc_settings_color4; ?> !important; }
910
+ .wplc-color-bg-1 { background-color: #<?php echo $wplc_settings_color1; ?> !important; }
911
+ .wplc-color-bg-2 { background-color: #<?php echo $wplc_settings_color2; ?> !important; }
912
+ .wplc-color-bg-3 { background-color: #<?php echo $wplc_settings_color3; ?> !important; }
913
+ .wplc-color-bg-4 { background-color: #<?php echo $wplc_settings_color4; ?> !important; }
914
+ .wplc-color-border-1 { border-color: #<?php echo $wplc_settings_color1; ?> !important; }
915
+ .wplc-color-border-2 { border-color: #<?php echo $wplc_settings_color2; ?> !important; }
916
+ .wplc-color-border-3 { border-color: #<?php echo $wplc_settings_color3; ?> !important; }
917
+ .wplc-color-border-4 { border-color: #<?php echo $wplc_settings_color4; ?> !important; }
918
+ .wplc-color-border-1:before { border-color: transparent #<?php echo $wplc_settings_color1; ?> !important; }
919
+ .wplc-color-border-2:before { border-color: transparent #<?php echo $wplc_settings_color2; ?> !important; }
920
+ .wplc-color-border-3:before { border-color: transparent #<?php echo $wplc_settings_color3; ?> !important; }
921
+ .wplc-color-border-4:before { border-color: transparent #<?php echo $wplc_settings_color4; ?> !important; }
922
+ </style>
923
+
924
+ <?php
925
+
926
+
927
+ }
928
+ }
929
+
930
+
931
  }
932
  }
933
 
946
  } else {
947
  $user_banned = 0;
948
  }
 
949
  if ($user_banned) {
950
+ remove_action("wplc_hook_output_box_body","wplc_hook_control_show_chat_box");
951
+ remove_action("wplc_hook_output_box_footer","wplc_action_control_hook_output_box_footer");
952
  }
953
  }
954
 
961
  function wplc_hook_control_check_mobile() {
962
  $wplc_settings = get_option("WPLC_SETTINGS");
963
 
964
+ $draw_box = false;
965
+
966
  if (!class_exists('Mobile_Detect')) {
967
  require_once (plugin_dir_path(__FILE__) . 'includes/Mobile_Detect.php');
968
  }
974
  return "";
975
  }
976
 
977
+ if (function_exists('wplc_basic_hide_chat_when_offline')) {
978
+ $wplc_hide_chat = wplc_basic_hide_chat_when_offline();
979
  if (!$wplc_hide_chat) {
980
  $draw_box = true;
981
  }
983
  $draw_box = true;
984
  }
985
  if (!$draw_box) {
986
+ remove_action("wplc_hook_output_box_body","wplc_hook_control_show_chat_box");
987
+ remove_action("wplc_hook_output_box_footer","wplc_action_control_hook_output_box_footer");
988
  }
989
 
990
  }
991
 
992
+
993
+ add_action("wplc_hook_output_box_footer","wplc_action_control_hook_output_box_footer",10,1);
994
+ function wplc_action_control_hook_output_box_footer() {
995
+ /* nothing here */
996
+ }
997
+
998
  /**
999
  * Decides whether or not to show the chat box based on the main setting in the settings page
1000
  * @return void
1003
  function wplc_hook_control_is_chat_enabled() {
1004
  $wplc_settings = get_option("WPLC_SETTINGS");
1005
  if ($wplc_settings["wplc_settings_enabled"] == 2) {
1006
+ remove_action("wplc_hook_output_box_body","wplc_hook_control_show_chat_box");
1007
+ remove_action("wplc_hook_output_box_footer","wplc_action_control_hook_output_box_footer");
1008
  }
1009
  }
1010
 
1043
  * @author Nick Duncan <nick@codecabin.co.za>
1044
  */
1045
  function wplc_output_box_5100() {
1046
+ wplc_string_check();
1047
  do_action("wplc_hook_output_box_header");
1048
  do_action("wplc_hook_output_box_body");
1049
  do_action("wplc_hook_output_box_footer");
1058
  * @since 6.0.00
1059
  * @author Nick Duncan <nick@codecabin.co.za>
1060
  */
1061
+ function wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings,$logged_in,$wplc_using_locale) {
1062
+ $ret_msg = "";
1063
  $wplc_class = "";
1064
+ // $wplc_settings = get_option("WPLC_SETTINGS");
1065
 
1066
  if ($wplc_settings["wplc_settings_align"] == 1) {
1067
  $original_pos = "bottom_left";
1104
 
1105
  $wplc_extra_attr = apply_filters("wplc_filter_chat_header_extra_attr","");
1106
 
1107
+ if (isset($wplc_settings['wplc_newtheme'])) { $wplc_newtheme = $wplc_settings['wplc_newtheme']; } else { }
1108
+ if (isset($wplc_newtheme)) {
1109
+ if($wplc_newtheme == 'theme-1') { $wplc_theme_type = "classic"; }
1110
+ else if($wplc_newtheme == 'theme-2') { $wplc_theme_type = "modern"; }
1111
+ else { $wplc_theme_type = "modern"; }
1112
+ }
1113
+
1114
+ if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == "theme-2") {
1115
+
1116
+
1117
+
1118
+ $ret_msg .= "<div id='wplc_hovercard' style='display:none' class='".$wplc_theme_type."'>";
1119
+ $ret_msg .= "<div id='wplc_hovercard_min' class='wplc_button_standard wplc-color-border-1 wplc-color-bg-1'>close</div>";
1120
+ $ret_msg .= "<div id='wplc_hovercard_content'><div class='wplc_hovercard_content_left'>".apply_filters("wplc_filter_modern_theme_hovercard_content_left","")."</div><div class='wplc_hovercard_content_right'>".apply_filters("wplc_filter_live_chat_box_html_1st_layer",wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale))."</div></div>";
1121
+ $ret_msg .= "<div id='wplc_hovercard_bottom'>".apply_filters("wplc_filter_live_chat_box_html_start_chat_button",wplc_filter_control_live_chat_box_html_hovercard_chat_button($wplc_settings,$logged_in,$wplc_using_locale))."</div>";
1122
+ $ret_msg .= "</div>";
1123
+
1124
+ }
1125
+
1126
+
1127
+
1128
+ $ret_msg .= "<div id=\"wp-live-chat\" wplc_animation=\"".$wplc_animation."\" style=\"".$wplc_starting_point." ".$wplc_box_align.";\" class=\"".$wplc_theme_type." ".$wplc_class." wplc_close\" original_pos=\"".$original_pos."\" ".$wplc_extra_attr." > ";
1129
  return $ret_msg;
1130
  }
1131
 
1132
 
1133
+
1134
+ add_filter("wplc_filter_modern_theme_hovercard_content_left","wplc_filter_control_modern_theme_hovercard_content_left",10,1);
1135
+ function wplc_filter_control_modern_theme_hovercard_content_left($msg) {
1136
+
1137
+ $msg .= "<div class='wplc_left_logo' style='background:url(".plugins_url('images/iconmicro.png', __FILE__).") no-repeat; background-size: cover;'></div>";
1138
+ $msg = apply_filters("wplc_filter_microicon",$msg);
1139
+ return $msg;
1140
+ }
1141
+
1142
  /**
1143
  * Filter to control the top HEADER DIV of the chat box
1144
  * @param array $wplc_settings Live chat settings array
1147
  * @author Nick Duncan <nick@codecabin.co.za>
1148
  */
1149
  function wplc_filter_control_live_chat_box_html_header_div_top($wplc_settings) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1150
 
1151
 
1152
+ $ret_msg = "<div id=\"wp-live-chat-header\" class='wplc-color-bg-1 wplc-color-2'>";
1153
+ $ret_msg .= apply_filters("wplc_filter_chat_header_under","",$wplc_settings);
1154
+ return $ret_msg;
1155
+ }
1156
+
1157
+
1158
+ add_filter("wplc_filter_chat_header_under","wplc_filter_control_chat_header_under",1,2);
1159
+ function wplc_filter_control_chat_header_under($ret_msg,$wplc_settings) {
1160
+ if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == "theme-2") {
1161
+ $ret_msg .= "<style>#wp-live-chat-header { background:url(".plugins_url('images/chaticon.png', __FILE__).") no-repeat; background-size: cover; }</style>";
1162
+ if (function_exists("wplc_acbc_filter_control_chat_header_under")) {
1163
+ remove_filter("wplc_filter_chat_header_under","wplc_acbc_filter_control_chat_header_under");
1164
+ }
1165
+
1166
+ }
1167
  return $ret_msg;
1168
+
1169
  }
1170
 
1171
 
1239
  * @author Nick Duncan <nick@codecabin.co.za>
1240
  */
1241
  function wplc_filter_control_live_chat_box_html_start_chat_button($wplc_settings,$wplc_using_locale ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1242
  $wplc_sst_1 = __('Start chat', 'wplivechat');
1243
  if (!isset($wplc_settings['wplc_pro_sst1']) || $wplc_settings['wplc_pro_sst1'] == "") { $wplc_settings['wplc_pro_sst1'] = $wplc_sst_1; }
1244
  $text = ($wplc_using_locale ? $wplc_sst_1 : stripslashes($wplc_settings['wplc_pro_sst1']));
1245
+ return "<button id=\"wplc_start_chat_btn\" type=\"button\" class='wplc-color-bg-1 wplc-color-2'>$text</button>";
1246
+ }
1247
+
1248
+
1249
+
1250
+
1251
+ /**
1252
+ * Filter to control the hover card start chat button
1253
+ * @param array $wplc_settings Live chat settings array
1254
+ * @return string
1255
+ * @since 6.1.00
1256
+ * @author Nick Duncan <nick@codecabin.co.za>
1257
+ */
1258
+ function wplc_filter_control_live_chat_box_html_hovercard_chat_button($wplc_settings,$logged_in,$wplc_using_locale ) {
1259
+ if ($logged_in) {
1260
+ $wplc_sst_1 = __('Start chat', 'wplivechat');
1261
+ if (!isset($wplc_settings['wplc_pro_sst1']) || $wplc_settings['wplc_pro_sst1'] == "") { $wplc_settings['wplc_pro_sst1'] = $wplc_sst_1; }
1262
+ $text = ($wplc_using_locale ? $wplc_sst_1 : stripslashes($wplc_settings['wplc_pro_sst1']));
1263
+ return "<button id=\"speeching_button\" type=\"button\" class='wplc-color-bg-1 wplc-color-2'>$text</button>";
1264
+ } else {
1265
+ $wplc_sst_1 = __('Leave a message', 'wplivechat');
1266
+ return "<button id=\"speeching_button\" type=\"button\" class='wplc-color-bg-1 wplc-color-2'>$wplc_sst_1</button>";
1267
+
1268
+ }
1269
  }
1270
 
1271
  /**
1350
  if (!isset($wplc_settings['wplc_pro_intro']) || $wplc_settings['wplc_pro_intro'] == "") { $wplc_settings['wplc_pro_intro'] = $wplc_intro; }
1351
  $text = ($wplc_using_locale ? $wplc_intro : stripslashes($wplc_settings['wplc_pro_intro']));
1352
 
1353
+ $ret_msg = "<div id=\"wp-live-chat-2-inner\">";
1354
+ $ret_msg .= " <div id=\"wp-live-chat-2-info\" class='wplc-color-bg-2 wplc-color-4'>";
1355
+ $ret_msg .= " <strong>".$text."</strong>";
1356
+ $ret_msg .= " </div>";
1357
  $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_ask_user_details",wplc_filter_control_live_chat_box_html_ask_user_detail($wplc_settings));
1358
  $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_start_chat_button",wplc_filter_control_live_chat_box_html_start_chat_button($wplc_settings,$wplc_using_locale));
1359
+ $ret_msg .= "</div>";
1360
  } else {
1361
  /* admin not logged in, show offline messages */
1362
  $ret_msg = "<div id=\"wp-live-chat-2-info\">";
1397
  if (!isset($wplc_settings['wplc_pro_sst2']) || $wplc_settings['wplc_pro_sst2'] == "") { $wplc_settings['wplc_pro_sst2'] = $wplc_sst_2; }
1398
  $text = ($wplc_using_locale ? $wplc_sst_2 : stripslashes($wplc_settings['wplc_pro_sst2']));
1399
 
1400
+ $ret_msg = "<p class=''wplc-color-4>".$text."</p>";
1401
  return $ret_msg;
1402
  }
1403
 
1404
+
1405
+ add_filter("wplc_filter_live_chat_box_above_main_div","wplc_filter_control_live_chat_box_above_main_div",10,2);
1406
+ function wplc_filter_control_live_chat_box_above_main_div($msg,$wplc_settings) {
1407
+ if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == "theme-2") {
1408
+ $msg .= "<div id='wplc_chatbox_header' class='wplc-color-bg-2 wplc-color-4'></div>";
1409
+ }
1410
+ return $msg;
1411
+ }
1412
+
1413
  /**
1414
  * Filter to control the 4th layer of the chat window
1415
  * @param array $wplc_settings live chat settings array
1424
 
1425
  $wplc_welcome = __('Welcome. How may I help you?', 'wplivechat');
1426
  if (!isset($wplc_settings['wplc_user_welcome_chat']) || $wplc_settings['wplc_user_welcome_chat'] == "") { $wplc_settings['wplc_user_welcome_chat'] = $wplc_welcome; }
1427
+ $text2 = ($wplc_using_locale ? $wplc_welcome : stripslashes($wplc_settings['wplc_user_welcome_chat']));
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
 
1435
  $ret_msg = "<div id=\"wplc_sound_update\" style=\"height:0; width:0; display:none; border:0;\"></div>";
1436
 
1437
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_above_main_div","",$wplc_settings);
1438
+
1439
 
1440
  $ret_msg .= "<div id=\"wplc_chatbox\">";
1441
+ // $ret_msg .= "<span class='wplc-admin-message'>";
1442
+ // $ret_msg .= $text2;
1443
+ // $ret_msg .= "</span>";
1444
+ // $ret_msg .= "<br />";
1445
+ // $ret_msg .= "<div class='wplc-clear-float-message'></div>";
1446
  $ret_msg .= "</div>";
1447
 
1448
+ $ret_msg .= "<div id='wplc_user_message_div'>";
1449
  $ret_msg .= "<p style=\"text-align:center; font-size:11px;\">".$text."</p>";
1450
  $ret_msg .= "<p>";
1451
  $ret_msg .= "<input type=\"text\" name=\"wplc_chatmsg\" id=\"wplc_chatmsg\" value=\"\" />";
1453
  $ret_msg .= "<input id=\"wplc_send_msg\" type=\"button\" value=\"".__("Send", "wplivechat")."\" style=\"display:none;\" />";
1454
  $ret_msg .= "</p>";
1455
  $ret_msg .= "</div>";
1456
+ $ret_msg .= "</div>";
1457
  return $ret_msg;
1458
  }
1459
 
1467
  * @author Nick Duncan <nick@codecabin.co.za>
1468
  */
1469
  function wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale) {
 
 
1470
 
1471
+ $ret_msg = "<div id='wplc_first_message'>";
1472
  if ($logged_in) {
1473
  $wplc_fst_1 = __('Questions?', 'wplivechat');
1474
  $wplc_fst_2 = __('Chat with us', 'wplivechat');
1475
+ if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == "theme-2") {
1476
+ $coltheme = "wplc-color-4";
1477
+ } else {
1478
+ $coltheme = "wplc-color-2";
1479
+ }
1480
+ $wplc_tl_msg = "<div class='$coltheme'><strong>" . ($wplc_using_locale ? $wplc_fst_1 : stripslashes($wplc_settings['wplc_pro_fst1'])) . "</strong> " . ( $wplc_using_locale ? $wplc_fst_2 : stripslashes($wplc_settings['wplc_pro_fst2'])) ."</div>";
1481
 
1482
  $ret_msg .= $wplc_tl_msg;
1483
  } else {
1510
  }
1511
 
1512
 
1513
+ add_filter("wplc_loggedin_filter","wplc_filter_control_loggedin",10,1);
1514
+ function wplc_filter_control_loggedin($logged_in) {
1515
+ $wplc_is_admin_logged_in = get_transient("wplc_is_admin_logged_in");
1516
+ if (!function_exists("wplc_register_pro_version") && $wplc_is_admin_logged_in != 1) {
1517
+ $logged_in = false;
1518
+ } else {
1519
+ $logged_in = true;
1520
+ }
1521
+ $logged_in_checks = apply_filters("wplc_filter_is_admin_logged_in",array());
1522
+ /* if we are logged in ANYWHERE, set this to true */
1523
+ foreach($logged_in_checks as $key => $val) {
1524
+ if ($val) { $logged_in = true; break; }
1525
+ }
1526
+ $logged_in_via_app = false;
1527
+ if (isset($logged_in_checks['app']) && $logged_in_checks['app'] == true) { $logged_in_via_app = true; }
1528
+ $logged_in = apply_filters("wplc_final_loggedin_control",$logged_in,$logged_in_via_app);
1529
+ /* admin is using the basic version and is logged in */
1530
+ if ($wplc_is_admin_logged_in) { $logged_in = true; }
1531
+
1532
+
1533
+ return $logged_in;
1534
+ }
1535
+
1536
 
1537
  /**
1538
  * The function that builds the chat box
1543
  function wplc_output_box_ajax_new() {
1544
 
1545
 
1546
+ $ret_msg = array();
1547
  $logged_in = false;
1548
 
1549
  $wplc_settings = get_option("WPLC_SETTINGS");
1551
  if(isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1){ $wplc_using_locale = true; } else { $wplc_using_locale = false; }
1552
 
1553
 
1554
+ $logged_in = apply_filters("wplc_loggedin_filter",false);
1555
+
1556
 
1557
 
1558
+ $wplc_settings = get_option('WPLC_SETTINGS');
1559
+ $ret_msg['cbox'] = apply_filters("wplc_theme_control",$wplc_settings,$logged_in,$wplc_using_locale);
1560
+ $ret_msg['online'] = $logged_in;
1561
+
1562
+ global $wplc_pro_version;
1563
+ $wplc_ver = str_replace('.', '', $wplc_pro_version);
1564
+ $checker = intval($wplc_ver);
1565
+
1566
+ if (function_exists("wplc_pro_version_control")) {
1567
+ if ($checker < 6000) {
1568
+ /* backwards compatibilitty for the old pro version */
1569
+ return json_encode($ret_msg['cbox']);
1570
+ } else {
1571
+ return json_encode($ret_msg);
1572
+ }
1573
+
1574
  } else {
1575
+ return json_encode($ret_msg);
1576
  }
1577
 
1578
 
1579
+
1580
 
1581
 
 
 
 
 
 
1582
 
1583
+ }
1584
+ function wplc_return_default_theme($wplc_settings,$logged_in,$wplc_using_locale) {
1585
+ $ret_msg = apply_filters("wplc_filter_live_chat_box_html_main_div_top",wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings,$logged_in,$wplc_using_locale));
1586
+ $ret_msg .= "<div class=\"wp-live-chat-wraper\">";
1587
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_header_div_top",wplc_filter_control_live_chat_box_html_header_div_top($wplc_settings));
1588
+ $ret_msg .= " <i id=\"wp-live-chat-minimize\" class=\"fa fa-minus wplc-color-bg-2 wplc-color-1\" style=\"display:none;\"></i>";
1589
+ $ret_msg .= " <i id=\"wp-live-chat-close\" class=\"fa fa-times\" style=\"display:none;\" ></i>";
1590
+
1591
+ $ret_msg .= " <div id=\"wp-live-chat-1\" >";
1592
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_1st_layer",wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale));
1593
+ $ret_msg .= " </div>";
1594
+ $ret_msg .= " </div>";
1595
+ $ret_msg .= " <div id=\"wp-live-chat-2\" style=\"display:none;\">";
1596
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_2nd_layer",wplc_filter_control_live_chat_box_html_2nd_layer($wplc_settings,$logged_in,$wplc_using_locale));
1597
+ $ret_msg .= " </div>";
1598
+ $ret_msg .= " <div id=\"wp-live-chat-3\" style=\"display:none;\">";
1599
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_3rd_layer",wplc_filter_control_live_chat_box_html_3rd_layer($wplc_settings,$wplc_using_locale));
1600
+ $ret_msg .= " </div>";
1601
+ $ret_msg .= " <div id=\"wp-live-chat-react\" style=\"display:none;\">";
1602
+ $ret_msg .= " <p>".__("Reactivating your previous chat...", "wplivechat")."</p>";
1603
+ $ret_msg .= " </div>";
1604
+ $ret_msg .= " <div id=\"wp-live-chat-4\" style=\"display:none;\">";
1605
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_4th_layer",wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_using_locale));
1606
+ $ret_msg .= "</div>";
1607
+ $ret_msg .= "</div>";
1608
+ return $ret_msg;
1609
+ }
1610
+
1611
+
1612
+ add_filter("wplc_theme_control","wplc_theme_control_function",10,3);
1613
+ function wplc_theme_control_function($wplc_settings,$logged_in,$wplc_using_locale) {
1614
+
1615
+ if (!$wplc_settings) { return ""; }
1616
+ if (isset($wplc_settings['wplc_newtheme'])) { $wplc_newtheme = $wplc_settings['wplc_newtheme']; } else { }
1617
+
1618
+ $default_theme = wplc_return_default_theme($wplc_settings,$logged_in,$wplc_using_locale);
1619
+ if (isset($wplc_newtheme)) {
1620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1621
 
1622
+
1623
 
1624
 
1625
+
1626
+
1627
+ if($wplc_newtheme == 'theme-1') {
1628
+ $ret_msg = $default_theme;
1629
+
1630
+ }
1631
+ else if($wplc_newtheme == 'theme-2') {
1632
+ $ret_msg = apply_filters("wplc_filter_live_chat_box_html_main_div_top",wplc_filter_control_live_chat_box_html_main_div_top($wplc_settings,$logged_in,$wplc_using_locale));
1633
+ $ret_msg .= "<div class=\"wp-live-chat-wraper\">";
1634
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_header_div_top",wplc_filter_control_live_chat_box_html_header_div_top($wplc_settings));
1635
+ $ret_msg .= " </div>";
1636
+ $ret_msg .= " <div id=\"wp-live-chat-2\" style=\"display:none;\">";
1637
+ $ret_msg .= " <i id=\"wp-live-chat-minimize\" class=\"fa fa-minus wplc-color-bg-1 wplc-color-2\" style=\"display:none;\" ></i>";
1638
+ $ret_msg .= " <i id=\"wp-live-chat-close\" class=\"fa fa-times\" style=\"display:none;\" ></i>";
1639
+ $ret_msg .= " <div id='wp-live-chat-inner-container'>";
1640
+ $ret_msg .= " <div id='wp-live-chat-inner'>";
1641
+ $ret_msg .= " <div id=\"wp-live-chat-1\" >";
1642
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_1st_layer",wplc_filter_control_live_chat_box_html_1st_layer($wplc_settings,$logged_in,$wplc_using_locale));
1643
+ $ret_msg .= " </div>";
1644
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_2nd_layer",wplc_filter_control_live_chat_box_html_2nd_layer($wplc_settings,$logged_in,$wplc_using_locale));
1645
+ $ret_msg .= " </div>";
1646
+ $ret_msg .= " <div id=\"wp-live-chat-react\" style=\"display:none;\">";
1647
+ $ret_msg .= " <p>".__("Reactivating your previous chat...", "wplivechat")."</p>";
1648
+ $ret_msg .= " </div>";
1649
+ $ret_msg .= " </div>";
1650
+ $ret_msg .= " <div id=\"wp-live-chat-3\" style=\"display:none;\">";
1651
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_3rd_layer",wplc_filter_control_live_chat_box_html_3rd_layer($wplc_settings,$wplc_using_locale));
1652
+ $ret_msg .= " </div>";
1653
+ $ret_msg .= " <div id=\"wp-live-chat-4\" style=\"display:none;\">";
1654
+ $ret_msg .= apply_filters("wplc_filter_live_chat_box_html_4th_layer",wplc_filter_control_live_chat_box_html_4th_layer($wplc_settings,$wplc_using_locale));
1655
+ $ret_msg .= " </div>";
1656
+ $ret_msg .= " </div>";
1657
+ $ret_msg .= "</div>";
1658
+
1659
+ } else {
1660
+ $ret_msg = $default_theme;
1661
+ }
1662
+ } else {
1663
+ $ret_msg = $default_theme;
1664
+ }
1665
+
1666
+ return $ret_msg;
1667
  }
1668
 
1669
 
1717
  if ($wplc_is_mobile && !isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] != 1) {
1718
  return;
1719
  }
1720
+ if (function_exists('wplc_basic_hide_chat_when_offline')) {
1721
+ $wplc_hide_chat = wplc_basic_hide_chat_when_offline();
1722
  if (!$wplc_hide_chat) {
1723
  wplc_pro_draw_user_box();
1724
  }
1771
  if ($wplc_is_mobile && !isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] != 1) {
1772
  return;
1773
  }
1774
+ if (function_exists('wplc_basic_hide_chat_when_offline')) {
1775
+ $wplc_hide_chat = wplc_basic_hide_chat_when_offline();
1776
  if (!$wplc_hide_chat) {
1777
  wplc_pro_draw_user_box();
1778
  }
1806
  }
1807
 
1808
  function wplc_admin_accept_chat($cid) {
1809
+ $user_ID = get_current_user_id();
1810
+ wplc_change_chat_status(sanitize_text_field($cid), 3,$user_ID);
1811
  return true;
1812
  }
1813
 
2043
  */
2044
  function wplc_hook_control_chat_dashboard_bottom() {
2045
  echo "<p>";
2046
+ ?>
2047
+ <?php _e("With the Pro add-on of WP Live Chat Support, you can", "wplivechat"); ?>
2048
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1" title="<?php _e("see who's online and initiate chats", "wplivechat"); ?>" target=\"_BLANK\">
2049
+ <?php _e("initiate chats", "wplivechat"); ?>
2050
+ </a> <?php _e("with your online visitors with the click of a button.", "wplivechat"); ?>
2051
+ <a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2" title="<?php _e("Buy the Pro add-on now.", "wplivechat"); ?>" target=\"_BLANK\">
2052
+ <strong>
2053
+ <?php _e("Buy the Pro add-on now.", "wplivechat"); ?>
2054
+ </strong>
2055
+ </a>
2056
+ <?php
2057
  echo "</p>";
2058
 
2059
 
2197
 
2198
  add_action("wplc_hook_change_status_on_answer","wplc_hook_control_change_status_on_answer",10,1);
2199
  function wplc_hook_control_change_status_on_answer($get_data) {
2200
+
2201
+ $user_ID = get_current_user_id();
2202
+ wplc_change_chat_status(sanitize_text_field($get_data['cid']), 3,$user_ID );
2203
  }
2204
 
2205
 
2314
  echo "<a href='".admin_url('admin.php?page=wplivechat-menu-extensions-page')."' class='button button-primary' target='_BLANK'>".__("Get more add-ons","wplivechat")."</a>";
2315
  echo "</div>";
2316
 
2317
+
2318
+
2319
  if ($result->status != 1) {
2320
+
2321
+ do_action("wplc_hook_admin_below_chat_box",$result);
 
 
 
2322
 
2323
  //echo wplc_return_admin_chat_javascript($_GET['cid']);
2324
  }
2325
 
2326
  }
2327
 
2328
+ add_action("wplc_hook_admin_below_chat_box","wplc_hook_control_admin_below_chat_box",10);
2329
+ function wplc_hook_control_admin_below_chat_box() {
2330
+ echo "<div class='admin_chat_quick_controls'>";
2331
+ echo " <p style=\"text-align:left; font-size:11px;\">" . __('Press ENTER to send your message', 'wplivechat') . "</p>";
2332
+ echo " " . __("Assign Quick Response", "wplivechat") . " <select name='wplc_macros_select' class='wplc_macros_select' disabled><option>" . __('Select', 'wplivechat') . "</option></select> <a href='https://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>";
2333
+ echo " </div>";
2334
+ echo "</div>";
2335
+
2336
+ }
2337
+
2338
  function wplc_return_chat_response_box($cid) {
2339
  $ret = "<div class=\"chat_response_box\">";
2340
  $ret .= "<input type='text' name='wplc_admin_chatmsg' id='wplc_admin_chatmsg' value='' placeholder='" . __("type here...", "wplivechat") . "' />";
2431
  "wplc_settings_enabled" => "1",
2432
  "wplc_settings_fill" => "ed832f",
2433
  "wplc_settings_font" => "FFFFFF",
2434
+ "wplc_settings_color1" => "ED832F",
2435
+ "wplc_settings_color2" => "FFFFFF",
2436
+ "wplc_settings_color3" => "EEEEEE",
2437
+ "wplc_settings_color4" => "666666",
2438
+ "wplc_theme" => "theme-default",
2439
+ "wplc_newtheme" => "theme-2",
2440
  "wplc_require_user_info" => '1',
2441
  "wplc_loggedin_user_info" => '1',
2442
  "wplc_user_alternative_text" => $wplc_alt_text,
2443
  "wplc_enabled_on_mobile" => '1',
2444
  "wplc_display_name" => '1',
2445
+ "wplc_record_ip_address" => '1',
2446
+
2447
+ "wplc_pro_fst1" => __("Questions?", "wplivechat"),
2448
+ "wplc_pro_fst2" => __("Chat with us", "wplivechat"),
2449
+ "wplc_pro_fst3" => __("Start live chat", "wplivechat"),
2450
+ "wplc_pro_sst1" => __("Start Chat", "wplivechat"),
2451
+ "wplc_pro_sst2" => __("Connecting. Please be patient...", "wplivechat"),
2452
+ "wplc_pro_tst1" => __("Reactivating your previous chat...", "wplivechat"),
2453
+ "wplc_pro_na" => __("Chat offline. Leave a message", "wplivechat"),
2454
+ "wplc_pro_intro" => __("Hello. Please input your details so that I may help you.", "wplivechat"),
2455
+ "wplc_pro_offline1" => __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"),
2456
+ "wplc_pro_offline2" => __("Sending message...", "wplivechat"),
2457
+ "wplc_pro_offline3" => __("Thank you for your message. We will be in contact soon.", "wplivechat"),
2458
+ "wplc_user_enter" => __("Press ENTER to send your message", "wplivechat"),
2459
+ "wplc_user_welcome_chat" => __("Welcome. How may I help you?", "wplivechat"),
2460
+
2461
  ));
2462
  }
2463
 
2464
 
2465
 
2466
 
2467
+
2468
+
2469
+ $admins = get_role('administrator');
2470
+ $admins->add_cap('wplc_ma_agent');
2471
+
2472
+ $uid = get_current_user_id();
2473
+ update_user_meta($uid, 'wplc_ma_agent', 1);
2474
+ update_user_meta($uid, "wplc_chat_agent_online", time());
2475
+
2476
  add_option("WPLC_HIDE_CHAT", "true");
2477
  add_option("WPLC_FIRST_TIME", true);
2478
  }
2566
  wp_enqueue_style('wplc-font-awesome');
2567
  wp_register_style('wplc-style', plugins_url('/css/wplcstyle.css', __FILE__));
2568
  wp_enqueue_style('wplc-style');
2569
+
2570
+
2571
+ global $wplc_pro_version;
2572
+ $wplc_ver = str_replace('.', '', $wplc_pro_version);
2573
+ $checker = intval($wplc_ver);
2574
+
2575
+ if (function_exists("wplc_pro_version_control") && $checker < 6000) {
2576
+ /* old pro version backwards compatibility */
2577
+ wp_register_style('wplc-style-pro', plugins_url('/css/wplcstyle_old.css', __FILE__));
2578
+ wp_enqueue_style('wplc-style-pro');
2579
+
2580
+
2581
+ }
2582
+
2583
+
2584
+
2585
+ $wplc_settings = get_option('WPLC_SETTINGS');
2586
+ if (isset($wplc_settings['wplc_theme'])) { $wplc_theme = $wplc_settings['wplc_theme']; } else { $wplc_theme = "theme-default"; }
2587
+
2588
+ if ( (isset($wplc_theme) && $checker >= 6000 ) || (! function_exists("wplc_pro_version_control") ) ) {
2589
+ if($wplc_theme == 'theme-default') {
2590
+ wp_register_style('wplc-theme-palette-default', plugins_url('/css/themes/theme-default.css', __FILE__));
2591
+ wp_enqueue_style('wplc-theme-palette-default');
2592
+
2593
+ }
2594
+ else if($wplc_theme == 'theme-1') {
2595
+ wp_register_style('wplc-theme-palette-1', plugins_url('/css/themes/theme-1.css', __FILE__));
2596
+ wp_enqueue_style('wplc-theme-palette-1');
2597
+
2598
+ }
2599
+ else if($wplc_theme == 'theme-2') {
2600
+ wp_register_style('wplc-theme-palette-2', plugins_url('/css/themes/theme-2.css', __FILE__));
2601
+ wp_enqueue_style('wplc-theme-palette-2');
2602
+
2603
+ }
2604
+ else if($wplc_theme == 'theme-3') {
2605
+ wp_register_style('wplc-theme-palette-3', plugins_url('/css/themes/theme-3.css', __FILE__));
2606
+ wp_enqueue_style('wplc-theme-palette-3');
2607
+
2608
+ }
2609
+ else if($wplc_theme == 'theme-4') {
2610
+ wp_register_style('wplc-theme-palette-4', plugins_url('/css/themes/theme-4.css', __FILE__));
2611
+ wp_enqueue_style('wplc-theme-palette-4');
2612
+
2613
+ }
2614
+ else if($wplc_theme == 'theme-5') {
2615
+ wp_register_style('wplc-theme-palette-5', plugins_url('/css/themes/theme-5.css', __FILE__));
2616
+ wp_enqueue_style('wplc-theme-palette-5');
2617
+
2618
+ }
2619
+ else if($wplc_theme == 'theme-6') {
2620
+ /* custom */
2621
+ /* handled elsewhere */
2622
+
2623
+
2624
+
2625
+ }
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+ if (isset($wplc_settings['wplc_newtheme'])) { $wplc_newtheme = $wplc_settings['wplc_newtheme']; } else { }
2632
+ if (isset($wplc_newtheme)) {
2633
+ if($wplc_newtheme == 'theme-1') {
2634
+ wp_register_style('wplc-theme-classic', plugins_url('/css/themes/classic.css', __FILE__));
2635
+ wp_enqueue_style('wplc-theme-classic');
2636
+
2637
+ }
2638
+ else if($wplc_newtheme == 'theme-2') {
2639
+ wp_register_style('wplc-theme-modern', plugins_url('/css/themes/modern.css', __FILE__));
2640
+ wp_enqueue_style('wplc-theme-modern');
2641
+
2642
+ }
2643
+ }
2644
+
2645
+ if ($wplc_settings["wplc_settings_align"] == 1) {
2646
+ wp_register_style('wplc-theme-position', plugins_url('/css/themes/position-bottom-left.css', __FILE__));
2647
+ wp_enqueue_style('wplc-theme-position');
2648
+ } else if ($wplc_settings["wplc_settings_align"] == 2) {
2649
+ wp_register_style('wplc-theme-position', plugins_url('/css/themes/position-bottom-right.css', __FILE__));
2650
+ wp_enqueue_style('wplc-theme-position');
2651
+ } else if ($wplc_settings["wplc_settings_align"] == 3) {
2652
+ wp_register_style('wplc-theme-position', plugins_url('/css/themes/position-left.css', __FILE__));
2653
+ wp_enqueue_style('wplc-theme-position');
2654
+ } else if ($wplc_settings["wplc_settings_align"] == 4) {
2655
+ wp_register_style('wplc-theme-position', plugins_url('/css/themes/position-right.css', __FILE__));
2656
+ wp_enqueue_style('wplc-theme-position');
2657
+ } else {
2658
+ wp_register_style('wplc-theme-position', plugins_url('/css/themes/position-bottom-right.css', __FILE__));
2659
+ wp_enqueue_style('wplc-theme-position');
2660
+ }
2661
+
2662
+ }
2663
+
2664
+
2665
+
2666
+
2667
  }
2668
  if(function_exists('wplc_ce_activate')){
2669
  if(function_exists('wplc_ce_load_user_styles')){
2682
  wp_enqueue_style('wplc-font-awesome');
2683
  wp_enqueue_script('jquery-ui-core');
2684
  wp_enqueue_script('jquery-effects-core');
2685
+ }
2686
+ if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu' && isset($_GET['action']) && $_GET['action'] == "ac") {
2687
+ wp_register_style('wplc-admin-chat-box-style', plugins_url('/css/admin-chat-box-style.css', __FILE__));
2688
+ wp_enqueue_style('wplc-admin-chat-box-style');
2689
 
2690
  }
2691
  if (isset($_GET['page']) && $_GET['page'] == "wplivechat-menu-support-page") {
3003
  if (isset($_POST['wplc_settings_align'])) { $wplc_data['wplc_settings_align'] = esc_attr($_POST['wplc_settings_align']); }
3004
  if (isset($_POST['wplc_settings_fill'])) { $wplc_data['wplc_settings_fill'] = esc_attr($_POST['wplc_settings_fill']); }
3005
  if (isset($_POST['wplc_settings_font'])) { $wplc_data['wplc_settings_font'] = esc_attr($_POST['wplc_settings_font']); }
3006
+
3007
+ if (isset($_POST['wplc_settings_color1'])) { $wplc_data['wplc_settings_color1'] = esc_attr($_POST['wplc_settings_color1']); /* backwards compatibility for pro */ $wplc_data['wplc_settings_fill'] = esc_attr($_POST['wplc_settings_color1']); }
3008
+ if (isset($_POST['wplc_settings_color2'])) { $wplc_data['wplc_settings_color2'] = esc_attr($_POST['wplc_settings_color2']); /* backwards compatibility for pro */ $wplc_data['wplc_settings_font'] = esc_attr($_POST['wplc_settings_color2']); }
3009
+ if (isset($_POST['wplc_settings_color3'])) { $wplc_data['wplc_settings_color3'] = esc_attr($_POST['wplc_settings_color3']); }
3010
+ if (isset($_POST['wplc_settings_color4'])) { $wplc_data['wplc_settings_color4'] = esc_attr($_POST['wplc_settings_color4']); }
3011
+
3012
  if (isset($_POST['wplc_settings_enabled'])) { $wplc_data['wplc_settings_enabled'] = esc_attr($_POST['wplc_settings_enabled']); }
3013
  if (isset($_POST['wplc_auto_pop_up'])) { $wplc_data['wplc_auto_pop_up'] = esc_attr($_POST['wplc_auto_pop_up']); }
3014
  if (isset($_POST['wplc_require_user_info'])) { $wplc_data['wplc_require_user_info'] = esc_attr($_POST['wplc_require_user_info']); } else { $wplc_data['wplc_require_user_info'] = "0"; }
3043
 
3044
  if(isset($_POST['wplc_animation'])){ $wplc_data['wplc_animation'] = esc_attr($_POST['wplc_animation']); }
3045
  if(isset($_POST['wplc_theme'])){ $wplc_data['wplc_theme'] = esc_attr($_POST['wplc_theme']); }
3046
+ if(isset($_POST['wplc_newtheme'])){ $wplc_data['wplc_newtheme'] = esc_attr($_POST['wplc_newtheme']); }
3047
 
3048
  if(isset($_POST['wplc_agent_select']) && $_POST['wplc_agent_select'] != "") {
3049
  $user_array = get_users(array(
3379
 
3380
 
3381
  $pointer_localize_strings = array(
3382
+ "initiate" => "<h3>".__("Initiate Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate1_pointer' title='".__("see who's online and initiate chats", "wplivechat")."' target=\"_BLANK\">".__("initiate chats", "wplivechat")."</a> ".__("with your online visitors with the click of a button.", "wplivechat")." <br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=initiate2_pointer' title='".__("Buy the Pro add-on now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Pro add-on now (once off payment).", "wplivechat")."</strong></a></p>",
3383
+ "chats" => "<h3>".__("Multiple Chats","wplivechat")."</h3><p>".__("With the Pro add-on of WP Live Chat Support, you can", "wplivechat")." <a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=morechats1_pointer' title='".__("accept and handle multiple chats.", "wplivechat")."' target=\"_BLANK\">".__("accept and handle multiple chats.", "wplivechat")."</a><br /><br /><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=morechats2_pointer' title='".__("Buy the Pro add-on now (once off payment).", "wplivechat")."' target=\"_BLANK\"><strong>".__("Buy the Pro add-on now (once off payment).", "wplivechat")."</strong></a></p>",
3384
+ "agent_info" => "<h3>".__("Add unlimited agents","wplivechat")."</h3><p><a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents1_pointer' title='".__("Add unlimited agents", "wplivechat")."' target=\"_BLANK\">".__("Add unlimited agents", "wplivechat")."</a> ".__(" with the Pro add-on of WP Live Chat Support","wplivechat")." "."<a href='http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=unlimited_agents2_pointer' target='_BLANK'>".__("(once off payment).","wplivechat")."</a></p>"
3385
+ );
3386
 
3387
 
3388
  wp_enqueue_style( 'wp-pointer' );
3504
  <p><i class='fa fa-plus-circle fa-4x' style='color:#ccc;' ></i></p>
3505
  <h3><?php _e("Add New Agent","wplivechat"); ?></h3>
3506
  <p><button class='button button-secondary' id='wplc_add_agent' disabled style=><?php _e("Add Agent","wplivechat"); ?></button></p>
3507
+ <p style='font-size:0.8em'><?php _e("Add as many agents as you need with the ","wplivechat") ?> <a href="http://wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=multipleAgents" target="_BLANK"><?php _e("Pro version.", "wplivechat") ?></a></p>
3508
  </li>
3509
  </ul>
3510
  <?php
3521
  <?php
3522
  }
3523
 
 
 
3524
  function wplc_get_chat_data($cid) {
3525
  global $wpdb;
3526
  global $wplc_tblname_chats;
3527
+ $sql = "SELECT * FROM $wplc_tblname_chats WHERE `id` = '".intval($cid)."' LIMIT 1";
3528
+ $results = $wpdb->get_results($sql);
3529
  if (isset($results[0])) { $result = $results[0]; } else { $result = null; }
3530
  $result = apply_filters("wplc_filter_get_chat_data",$result,$cid);
3531
  return $result;
3588
  if ($data['string'] == "Include Exclude Pages") {
3589
  $link = "";
3590
  $image = "https://ccplugins.co/api-wplc-extensions/images/IncludeAndExclude-Small.jpg";
3591
+ }
3592
+
3593
+
3594
+ if ($data['string'] == "WP Live Chat Support Pro") {
3595
+ $link = "";
3596
+ $image = "https://ccplugins.co/api-wplc-extensions/images/add-on0.jpg";
3597
+ }
3598
+
3599
 
3600
 
3601
 
3644
 
3645
 
3646
 
3647
+ add_filter("wplc_filter_relevant_extensions_main","wplc_filter_control_relevant_extensions_main_proe");
3648
+ function wplc_filter_control_relevant_extensions_main_proe($text) {
 
3649
  if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
3650
 
3651
+ $rel_name = __("Pro Add-on","wplivechat");
3652
+ $rel_image = "https://ccplugins.co/api-wplc-extensions/images/add-on0.jpg";
3653
+ $rel_link = "http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro";
3654
  $text .= '<div class="wplc-extension relevant_extension">';
3655
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3656
+ $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
3657
  $text .= '</a>';
3658
  $text .= '<div class="float:left; padding-left:10px;">';
3659
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3660
+ $text .= '<p>'.__("Get unlimited agents, initiate chats, advanced chat box control, encryption and more with the Pro add-on.","wplivechat").'</p>';
3661
  $text .= '</div>';
3662
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3663
  $text .= '</div>';
3665
  return $text;
3666
  }
3667
 
3668
+
3669
  add_filter("wplc_filter_relevant_extensions_main","wplc_filter_control_relevant_extensions_main_mobile");
3670
  function wplc_filter_control_relevant_extensions_main_mobile($text) {
3671
  if (function_exists("wplc_mobile_check_if_logged_in")) { return $text; }
3675
  $rel_link = "https://wp-livechat.com/extensions/mobile-desktop-app-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_mobile";
3676
  $text .= '<div class="wplc-extension relevant_extension">';
3677
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3678
+ $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
3679
  $text .= '</a>';
3680
  $text .= '<div class="float:left; padding-left:10px;">';
3681
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3696
  $rel_link = "https://wp-livechat.com/extensions/cloud-server-extension/?utm_source=plugin&amp;utm_medium=link&amp;utm_campaign=relevant_cloud";
3697
  $text .= '<div class="wplc-extension relevant_extension">';
3698
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3699
+ $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
3700
  $text .= '</a>';
3701
  $text .= '<div class="float:left; padding-left:10px;">';
3702
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3709
  }
3710
 
3711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3712
 
 
 
3713
 
3714
 
3715
+ add_filter("wplc_filter_relevant_extensions_chatbox","wplc_filter_control_relevant_extensions_chatbox_proe");
3716
+ function wplc_filter_control_relevant_extensions_chatbox_proe($text) {
3717
+ if (function_exists("wplc_hook_control_intiate_check")) { return $text; }
3718
+
3719
+ $rel_name = __("Pro Add-on","wplivechat");
3720
+ $rel_image = "https://ccplugins.co/api-wplc-extensions/images/add-on0.jpg";
3721
+ $rel_link = "http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=relevant_pro_chatbox";
3722
  $text .= '<div class="wplc-extension relevant_extension">';
3723
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" target="_BLANK" style="float:left;">';
3724
+ $text .= '<img src="'.$rel_image.'" class="attachment-showcase wp-post-image" alt="'.$rel_name.'" title="'.$rel_name.'" >';
3725
  $text .= '</a>';
3726
  $text .= '<div class="float:left; padding-left:10px;">';
3727
  $text .= '<h3 class="wplc-extension-title">'.$rel_name.'</h3>';
3728
+ $text .= '<p>'.__("Get unlimited agents, initiate chats, advanced chat box control, encryption and more with the Pro add-on.","wplivechat").'</p>';
3729
  $text .= '</div>';
3730
  $text .= '<a href="'.$rel_link.'" title="'.$rel_name.'" class="button-secondary" target="_BLANK">'.__("Get this extension","wplivechat").'</a>';
3731
  $text .= '</div>';
3734
  }
3735
 
3736
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3737
 
 
 
3738
 
3739
  /**
3740
  * Add to the chat box settings page
3854
  echo '<tr class="active"><td>&nbsp;</td><td colspan="2" style="color:red;">
3855
  &nbsp; &nbsp; '.__('Your API Key is Invalid. You are not eligible for future updates. Please enter your API key <a href="admin.php?page=wplivechat-menu-api-keys-page">here</a>.','wplivechat').'
3856
  </td></tr>';
3857
+ }
3858
+
3859
+ function wplc_basic_hide_chat_when_offline(){
3860
+ $wplc_settings = get_option("WPLC_SETTINGS");
3861
+
3862
+ $hide_chat = 0;
3863
+ if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide_when_offline'] == 1) {
3864
+ /* Hide the window when its offline */
3865
+ $logged_in = apply_filters("wplc_loggedin_filter",false);
3866
+ if (!$logged_in) {
3867
+ $hide_chat++;
3868
+ }
3869
+ } else {
3870
+ $hide_chat = 0;
3871
+ }
3872
+ return $hide_chat;
3873
+ }
3874
+
3875
+
3876
+ function wplc_string_check() {
3877
+ $wplc_settings = get_option("WPLC_SETTINGS");
3878
+
3879
+ if (!isset($wplc_settings['wplc_pro_na']) || (isset($wplc_settings['wplc_pro_na']) && $wplc_settings['wplc_pro_na'] == "")) { $wplc_settings["wplc_pro_na"] = __("Chat offline. Leave a message", "wplivechat"); }
3880
+ if (!isset($wplc_settings['wplc_pro_intro']) || (isset($wplc_settings['wplc_pro_intro']) && $wplc_settings['wplc_pro_intro'] == "")) { $wplc_settings["wplc_pro_intro"] = __("Hello. Please input your details so that I may help you.", "wplivechat"); }
3881
+ if (!isset($wplc_settings['wplc_pro_offline1']) || (isset($wplc_settings['wplc_pro_offline1']) && $wplc_settings['wplc_pro_offline1'] == "")) { $wplc_settings["wplc_pro_offline1"] = __("We are currently offline. Please leave a message and we'll get back to you shortly.", "wplivechat"); }
3882
+ if (!isset($wplc_settings['wplc_pro_offline2']) || (isset($wplc_settings['wplc_pro_offline2']) && $wplc_settings['wplc_pro_offline2'] == "")) { $wplc_settings["wplc_pro_offline2"] = __("Sending message...", "wplivechat"); }
3883
+ if (!isset($wplc_settings['wplc_pro_offline3']) || (isset($wplc_settings['wplc_pro_offline3']) && $wplc_settings['wplc_pro_offline3'] == "")) { $wplc_settings["wplc_pro_offline3"] = __("Thank you for your message. We will be in contact soon.", "wplivechat"); }
3884
+ if (!isset($wplc_settings['wplc_pro_fst1']) || (isset($wplc_settings['wplc_pro_fst1']) && $wplc_settings['wplc_pro_fst1'] == "")) { $wplc_settings["wplc_pro_fst1"] = __("Questions?", "wplivechat"); }
3885
+ if (!isset($wplc_settings['wplc_pro_fst2']) || (isset($wplc_settings['wplc_pro_fst2']) && $wplc_settings['wplc_pro_fst2'] == "")) { $wplc_settings["wplc_pro_fst2"] = __("Chat with us", "wplivechat"); }
3886
+ if (!isset($wplc_settings['wplc_pro_fst3']) || (isset($wplc_settings['wplc_pro_fst3']) && $wplc_settings['wplc_pro_fst3'] == "")) { $wplc_settings["wplc_pro_fst3"] = __("Start live chat", "wplivechat"); }
3887
+ if (!isset($wplc_settings['wplc_pro_sst1']) || (isset($wplc_settings['wplc_pro_sst1']) && $wplc_settings['wplc_pro_sst1'] == "")) { $wplc_settings["wplc_pro_sst1"] = __("Start Chat", "wplivechat"); }
3888
+ if (!isset($wplc_settings['wplc_pro_sst2']) || (isset($wplc_settings['wplc_pro_sst2']) && $wplc_settings['wplc_pro_sst2'] == "")) { $wplc_settings["wplc_pro_sst2"] = __("Connecting. Please be patient...", "wplivechat"); }
3889
+ if (!isset($wplc_settings['wplc_pro_tst1']) || (isset($wplc_settings['wplc_pro_tst1']) && $wplc_settings['wplc_pro_tst1'] == "")) { $wplc_settings["wplc_pro_tst1"] = __("Reactivating your previous chat...", "wplivechat"); }
3890
+ if (!isset($wplc_settings['wplc_user_welcome_chat']) || (isset($wplc_settings['wplc_user_welcome_chat']) && $wplc_settings['wplc_user_welcome_chat'] == "")) { $wplc_settings["wplc_user_welcome_chat"] = __("Welcome. How may I help you?", "wplivechat"); }
3891
+ if (!isset($wplc_settings['wplc_user_enter']) || (isset($wplc_settings['wplc_user_enter']) && $wplc_settings['wplc_user_enter'] == "")) { $wplc_settings["wplc_user_enter"] = __("Press ENTER to send your message", "wplivechat"); }
3892
+
3893
+ update_option("WPLC_SETTINGS",$wplc_settings);
3894
+
3895
  }