REVE Chat – WP Live Chat Support plugin - Version 2.0.2

Version Description

Download this release

Release Info

Developer revechat
Plugin Icon 128x128 REVE Chat – WP Live Chat Support plugin
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

css/admin-styles.css CHANGED
@@ -43,6 +43,12 @@
43
  color: #a94442;
44
  padding: 20px;
45
  }
 
 
 
 
 
 
46
  #revechat .revechat_success_message{
47
  background: #ffffff;
48
  padding: 50px;
@@ -76,7 +82,11 @@
76
  text-decoration: none;
77
  text-shadow: 0 -1px 1px #ab3c02,1px 0 1px #ab3c02,0 1px 1px #ab3c02,-1px 0 1px #ab3c02;
78
  }
79
-
 
 
 
 
80
  #revechat #revechat-admin-settings-form {
81
  padding: 18px;
82
  }
@@ -92,10 +102,7 @@
92
  list-style: outside none none;
93
  padding-left: 20px;
94
  }
95
- #revechat .form-wrapper {
96
- padding: 16px;
97
- padding-bottom: 31px;
98
- }
99
  #revechat .form-item > label {
100
  display: table;
101
  margin-bottom: 11px;
43
  color: #a94442;
44
  padding: 20px;
45
  }
46
+ #revechat .ajax_message.message.success{
47
+ background-color: #dff0d8;
48
+ border: 1px solid #dff0d8;
49
+ color: #3c763d;
50
+ padding: 20px;
51
+ }
52
  #revechat .revechat_success_message{
53
  background: #ffffff;
54
  padding: 50px;
82
  text-decoration: none;
83
  text-shadow: 0 -1px 1px #ab3c02,1px 0 1px #ab3c02,0 1px 1px #ab3c02,-1px 0 1px #ab3c02;
84
  }
85
+ #revechat .box {
86
+ background: #ffffff;
87
+ border: 1px solid #e5e5e5;
88
+ padding: 20px;
89
+ }
90
  #revechat #revechat-admin-settings-form {
91
  padding: 18px;
92
  }
102
  list-style: outside none none;
103
  padding-left: 20px;
104
  }
105
+
 
 
 
106
  #revechat .form-item > label {
107
  display: table;
108
  margin-bottom: 11px;
includes/remove-form.php CHANGED
@@ -1,3 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div>
2
  <div class="messages revechat_success">REVE Chat
3
  is already installed.</div>
@@ -6,4 +20,4 @@
6
  <input type="hidden" name="<?php echo $accountId; ?>" value="0" id="revechat_aid">
7
  <input type="submit" class="form-submit button-primary" value="Remove" name="revechat_remove" id="edit-submit">
8
  </div>
9
- </div>
1
+ <div class="box">
2
+ <h3>REVE Chat has been installed.</h3>
3
+ <p>Sign in to REVE Chat Dashboard and start chatting with your customers.</p>
4
+ <p><a href="https://dashboard.revechat.com" class="form-submit button-primary" target="_blank">Go to Dashboard</a></p>
5
+
6
+
7
+ </div>
8
+ <div id="edit-actions" class="form-actions form-wrapper">
9
+ <input type="hidden" name="<?php echo $accountId; ?>" value="0" id="revechat_aid">
10
+ <p><small>Something went wrong? <input type="submit" style="background: transparent; border: 0; text-decoration: underline;text-transform: lowercase; font-size: 10px; cursor: pointer;" value="Remove" name="revechat_remove" id="edit-submit"></small></p>
11
+ </div>
12
+
13
+
14
+ <!--
15
  <div>
16
  <div class="messages revechat_success">REVE Chat
17
  is already installed.</div>
20
  <input type="hidden" name="<?php echo $accountId; ?>" value="0" id="revechat_aid">
21
  <input type="submit" class="form-submit button-primary" value="Remove" name="revechat_remove" id="edit-submit">
22
  </div>
23
+ </div> -->
includes/signup-form.php CHANGED
@@ -4,14 +4,28 @@
4
  <table class="form-table">
5
  <tr>
6
  <th>
7
- <label for="edit-name">
8
  <?php
9
- _e("Name")
10
  ?>
11
  </label>
12
  </th>
13
  <td>
14
- <input type="text" class="regular-text" name="name" id="edit-name">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  </td>
16
  </tr>
17
 
@@ -31,14 +45,27 @@
31
 
32
  <tr>
33
  <th>
34
- <label for="edit-phone">
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  <?php
36
- _e('Phone')
37
  ?>
38
  </label>
39
  </th>
40
  <td>
41
- <input type="text" class="regular-text" name="Phone" id="edit-phone">
42
  </td>
43
  </tr>
44
  </table>
4
  <table class="form-table">
5
  <tr>
6
  <th>
7
+ <label for="edit-firstname">
8
  <?php
9
+ _e("First Name")
10
  ?>
11
  </label>
12
  </th>
13
  <td>
14
+ <input type="text" class="regular-text" name="firstName" id="edit-firstname">
15
+ </td>
16
+ </tr>
17
+
18
+
19
+ <tr>
20
+ <th>
21
+ <label for="edit-lastname">
22
+ <?php
23
+ _e("Last Name")
24
+ ?>
25
+ </label>
26
+ </th>
27
+ <td>
28
+ <input type="text" class="regular-text" name="firstName" id="edit-lastname">
29
  </td>
30
  </tr>
31
 
45
 
46
  <tr>
47
  <th>
48
+ <label for="edit-accountpassword">
49
+ <?php
50
+ _e('Create Password')
51
+ ?>
52
+ </label>
53
+ </th>
54
+ <td>
55
+ <input type="password" class="regular-text" name="edit-accountpassword" id="edit-accountpassword">
56
+ </td>
57
+ </tr>
58
+
59
+ <tr>
60
+ <th>
61
+ <label for="edit-retypepassword">
62
  <?php
63
+ _e('Confirm your Password')
64
  ?>
65
  </label>
66
  </th>
67
  <td>
68
+ <input type="password" class="regular-text" name="edit-retypepassword" id="edit-retypepassword">
69
  </td>
70
  </tr>
71
  </table>
index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><title></title>
1
+ <!DOCTYPE html><title></title>
js/revechat-admin.js CHANGED
@@ -32,7 +32,7 @@ jQuery.noConflict();
32
  bindFormSubmit: function () {
33
  $('#revechat-admin-settings-form').submit(function(e)
34
  {
35
- //e.preventDefault();
36
 
37
  if($('#edit-submit').val() == 'Remove'){
38
  $('#revechat_aid').val(0);
@@ -64,22 +64,8 @@ jQuery.noConflict();
64
  return false;
65
  }
66
  $('.ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
67
- var signInUrl = baseUrl +'/license/adminId/'+$('#edit-revechat-account-email').val()+'/?callback=?';
68
- $.getJSON(signInUrl,
69
- function(response)
70
- {
71
- if (response.error)
72
- {
73
- $('.ajax_message').removeClass('wait').addClass('message alert').html('Incorrect REVE Chat login.');
74
- $('#edit-revechat-account-email').focus();
75
- return false;
76
- }
77
- else
78
- {
79
- $('#revechat_aid').val(response.data.account_id);
80
- $('#revechat-admin-settings-form').submit();
81
- }
82
- });
83
  return false;
84
  }
85
  }
@@ -91,7 +77,24 @@ jQuery.noConflict();
91
  }
92
  return true;
93
  },
94
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  newLicenseForm: function()
96
  {
97
  if (parseInt(($('#revechat_aid').val()) > 0))
@@ -112,31 +115,30 @@ jQuery.noConflict();
112
 
113
  $('.ajax_message').removeClass('message').addClass('wait').html('Creating new account&hellip;');
114
 
115
- var signUpUrl = baseUrl + '/revechat/rest/api/signup.do';
 
 
 
 
 
 
116
 
117
  $.ajax({
118
- data: { 'firstname':$('#edit-name').val(), 'lastname':' ', 'mailAddr':$('#edit-email').val(), 'phoneNo':$('#edit-phone').val() },
119
  type:'POST',
120
  url:signUpUrl,
121
  dataType: 'json',
122
  cache:false,
123
  success: function(response) {
124
- if(response.error)
125
  {
126
- $('.ajax_message').html(response.error).addClass('message alert').removeClass('wait');
127
  return false;
128
  }
129
- else if(response.success)
130
  {
131
- $('#revechat-admin-settings-form').children('div').remove();
132
- var message = '<div class="revechat_success_message">';
133
- message += '<h3>Thank you for sigining up with REVE Chat</h3>';
134
- message += '<p>A verification link has been sent to your registered email address from <strong><a href="#">support@revechat.com</a></strong>. Kindly verify your email to complete the signup process</p>';
135
- message += '<p>Then come backe again to integrate REVE Chat in your website.</p>';
136
- message += '</div>';
137
- $(message).appendTo('#revechat-admin-settings-form');
138
- $('p.submit').remove();
139
- $('.ajax_message').removeClass('wait');
140
  return false;
141
  }
142
  }
@@ -158,29 +160,60 @@ jQuery.noConflict();
158
 
159
  validateNewLicenseForm: function()
160
  {
161
- if ($('#edit-name').val().length < 1)
 
 
 
 
 
 
 
 
 
162
  {
163
- alert ('Please enter your full name.');
164
- $('#edit-name').addClass('error').focus();
165
  return false;
166
  }
167
 
168
- if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-email').val()) == false)
169
  {
170
- alert ('Please enter a valid email address.');
171
- $('#edit-email').addClass('error').focus();
172
  return false;
173
  }
174
 
175
- if ($('#edit-phone').val().length < 1)
176
  {
177
- alert ('Please enter your phone number.');
178
- $('#edit-phone').addClass('error').focus();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  return false;
180
  }
 
181
 
182
  return true;
183
- }
 
 
 
 
184
  }
185
  $(document).ready(function()
186
  {
32
  bindFormSubmit: function () {
33
  $('#revechat-admin-settings-form').submit(function(e)
34
  {
35
+ // e.preventDefault();
36
 
37
  if($('#edit-submit').val() == 'Remove'){
38
  $('#revechat_aid').val(0);
64
  return false;
65
  }
66
  $('.ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
67
+
68
+ ReveChat.signIn($('#edit-revechat-account-email').val());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  return false;
70
  }
71
  }
77
  }
78
  return true;
79
  },
80
+ signIn: function (email) {
81
+ var signInUrl = baseUrl +'/license/adminId/'+email+'/?callback=?';
82
+ $.getJSON(signInUrl,
83
+ function(response)
84
+ {
85
+ if (response.error)
86
+ {
87
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Incorrect REVE Chat login.');
88
+ $('#edit-revechat-account-email').focus();
89
+ return false;
90
+ }
91
+ else
92
+ {
93
+ $('#revechat_aid').val(response.data.account_id);
94
+ $('#revechat-admin-settings-form').submit();
95
+ }
96
+ });
97
+ },
98
  newLicenseForm: function()
99
  {
100
  if (parseInt(($('#revechat_aid').val()) > 0))
115
 
116
  $('.ajax_message').removeClass('message').addClass('wait').html('Creating new account&hellip;');
117
 
118
+ var firstName = $.trim($('#edit-firstname').val());
119
+ var lastName = $.trim($('#edit-lastname').val());
120
+ var email = $.trim($('#edit-email').val());
121
+ var password = $.trim($('#edit-accountpassword').val());
122
+ var rePassword = $.trim($('#edit-retypepassword').val());
123
+
124
+ var signUpUrl = baseUrl + 'revechat/cms/api/signup.do';
125
 
126
  $.ajax({
127
+ data: { 'firstname':firstName, 'lastname':lastName, 'mailAddr':email, 'password':password },
128
  type:'POST',
129
  url:signUpUrl,
130
  dataType: 'json',
131
  cache:false,
132
  success: function(response) {
133
+ if(response.status == 'error')
134
  {
135
+ $('.ajax_message').html(response.message).addClass('message alert').removeClass('wait');
136
  return false;
137
  }
138
+ else if(response.status == 'success')
139
  {
140
+ $('#edit-revechat-account-email').val(email);
141
+ ReveChat.signIn(email);
 
 
 
 
 
 
 
142
  return false;
143
  }
144
  }
160
 
161
  validateNewLicenseForm: function()
162
  {
163
+
164
+ var firstName = $.trim($('#edit-firstname').val());
165
+ var lastName = $.trim($('#edit-lastname').val());
166
+ var email = $.trim($('#edit-email').val());
167
+ var password = $.trim($('#edit-accountpassword').val());
168
+ var rePassword = $.trim($('#edit-retypepassword').val());
169
+
170
+
171
+
172
+ if (!firstName.length)
173
  {
174
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please provide your first name.');
175
+ $('#edit-firstname').focus();
176
  return false;
177
  }
178
 
179
+ if (!lastName.length)
180
  {
181
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please provide your last name.');
182
+ $('#edit-lastname').focus();
183
  return false;
184
  }
185
 
186
+ if (!ReveChat.isValidEmailAddress(email))
187
  {
188
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please provide valid email address.');
189
+ $('#edit-email').focus();
190
+ return false;
191
+ }
192
+
193
+ if(password.length < 6){
194
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please provide your password. The password must be at least 6 characters long.');
195
+ $('#edit-accountpassword').focus();
196
+ return false;
197
+ }
198
+
199
+ if(!rePassword.length || password.length < 6){
200
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please retype your password.');
201
+ $('#edit-retypepassword').focus();
202
+ return false;
203
+ }
204
+
205
+ if(password != rePassword){
206
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Please retype your password.');
207
  return false;
208
  }
209
+
210
 
211
  return true;
212
+ },
213
+ isValidEmailAddress: function (emailAddress) {
214
+ var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;
215
+ return pattern.test(emailAddress);
216
+ },
217
  }
218
  $(document).ready(function()
219
  {
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Reve Chat ===
2
  Contributors: revechat_official
3
- Tags: chat, chat online, contact plugin, customer support, free chat, chat software, IM chat, live chat, live chat inc, live chat services, live chat software, live chatting, live help, live support, live web chat, livechat, live help, live support, olark, online chat, online support, php live chat, snapengage, support software, website chat, wordpress chat, wordpress live chat, wordpress live chat plugin, ReveChat, REVE Chat, zendesk, Zopim live chat, clickdesk, olark, click desk, visitor analytics, web analytics, lead generation, online leads
4
 
5
  Stable tag: 2.0.1
6
 
@@ -10,6 +10,8 @@ REVE Chat is powerful and intuitive real-time customer engagement software.
10
  == Description ==
11
  REVE Chat is powerful and intuitive real-time customer engagement software. It puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display.
12
 
 
 
13
  In the fast paced ambience of live customer support, the efficient usage of valuable time is the main key to both happy customers and professional management. Traditionally interactions between support agents and customers have been restricted to one-on-one supports over phones or emails. Live chat for customer support has now become the alternative that today's multitasking and net savvy generation is looking for. It offers quick response in real time and higher customer satisfaction which can generate more conversions. In the era of automated customer assistance systems, the chance to chat with a person in real time through your website is a distinct feature. Now just like a sales person in the shop, talk to the visitors of your website in real-time.
14
  REVE Chat is powerful and intuitive real-time customer engagement software. It puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use. So place this customizable REVE Chat widget to your business and start getting sales conversion and higher customer satisfaction.
15
 
1
  === Reve Chat ===
2
  Contributors: revechat_official
3
+ Tags: chat online, contact plugin, customer support, free chat, chat software, IM chat, live chat, live chat inc, live chat services, live chat software, live chatting, live help, live support, live web chat, livechat, live help, live support, olark, online chat, online support, php live chat, snapengage, support software, website chat, wordpress chat, wordpress live chat, wordpress live chat plugin, ReveChat, REVE Chat, zendesk, Zopim live chat, clickdesk, olark, click desk, visitor analytics, web analytics, lead generation, online leads
4
 
5
  Stable tag: 2.0.1
6
 
10
  == Description ==
11
  REVE Chat is powerful and intuitive real-time customer engagement software. It puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display.
12
 
13
+ https://youtu.be/t1dykZ9Tg8U
14
+
15
  In the fast paced ambience of live customer support, the efficient usage of valuable time is the main key to both happy customers and professional management. Traditionally interactions between support agents and customers have been restricted to one-on-one supports over phones or emails. Live chat for customer support has now become the alternative that today's multitasking and net savvy generation is looking for. It offers quick response in real time and higher customer satisfaction which can generate more conversions. In the era of automated customer assistance systems, the chance to chat with a person in real time through your website is a distinct feature. Now just like a sales person in the shop, talk to the visitors of your website in real-time.
16
  REVE Chat is powerful and intuitive real-time customer engagement software. It puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use. So place this customizable REVE Chat widget to your business and start getting sales conversion and higher customer satisfaction.
17
 
revechat.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Reve Chat
4
  Description: REVE Chat is a powerful and intuitive real-time customer engagement software. As a customer support software, REVE Chat puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This live chat service helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use.
5
- Version: 2.0.1
6
  Author: ReveChat
7
  Author URI: www.revechat.com
8
  License: GPL2
@@ -98,32 +98,34 @@ if(!class_exists('WP_Plugin_Revechat'))
98
  ?>
99
  <div class="wrap" id="revechat">
100
 
101
- <div class="reve-chat-logo">
102
- <img src="<?php echo plugin_dir_url( __FILE__ )."images/logo.png";?>" alt="REVE Chat">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  </div>
104
- <div class="form-item form-type-item" id="edit-ajax-message">
105
- <p class="ajax_message"></p>
106
- </div>
107
-
108
- <form name="form1" id="revechat-admin-settings-form" method="post" action="">
109
-
110
- <?php
111
- if(isset($val_accountId) && $val_accountId != 0){
112
- require (plugin_dir_path( __FILE__ )."includes/remove-form.php");
113
- return;
114
- }
115
-
116
- require (plugin_dir_path( __FILE__ )."includes/choose-form.php");
117
- require (plugin_dir_path( __FILE__ )."includes/login-form.php");
118
- require (plugin_dir_path( __FILE__ )."includes/signup-form.php");
119
- ?>
120
-
121
- <p class="submit">
122
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
123
- </p>
124
-
125
- </form>
126
- </div>
127
 
128
  <?php
129
  }
2
  /*
3
  Plugin Name: Reve Chat
4
  Description: REVE Chat is a powerful and intuitive real-time customer engagement software. As a customer support software, REVE Chat puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This live chat service helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use.
5
+ Version: 2.0.2
6
  Author: ReveChat
7
  Author URI: www.revechat.com
8
  License: GPL2
98
  ?>
99
  <div class="wrap" id="revechat">
100
 
101
+ <div class="box">
102
+ <div class="reve-chat-logo">
103
+ <img src="<?php echo plugin_dir_url( __FILE__ )."images/logo.png";?>" alt="REVE Chat">
104
+ </div>
105
+ <div class="form-item form-type-item" id="edit-ajax-message">
106
+ <p class="ajax_message"></p>
107
+ </div>
108
+
109
+ <form name="form1" id="revechat-admin-settings-form" method="post" action="">
110
+
111
+ <?php
112
+ if(isset($val_accountId) && $val_accountId != 0){
113
+ require (plugin_dir_path( __FILE__ )."includes/remove-form.php");
114
+ return;
115
+ }
116
+
117
+ require (plugin_dir_path( __FILE__ )."includes/choose-form.php");
118
+ require (plugin_dir_path( __FILE__ )."includes/login-form.php");
119
+ require (plugin_dir_path( __FILE__ )."includes/signup-form.php");
120
+ ?>
121
+
122
+ <p class="submit">
123
+ <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
124
+ </p>
125
+
126
+ </form>
127
+ </div>
128
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  <?php
131
  }