PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 6.7.0
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v6.7.0
8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 All 535 releases
← All changes | includes/simple_text_response.php +413 -434 8.7.26.7.0 View file →
@@ -3,9 +3,242 @@
3 3 exit;
4 4 }
5 5 global $wpdb;
6 6 ?>
7 +<style>
8 +.wpbot_dashboard_header {
9 + margin-right: unset !important;
10 + margin-left: unset !important;
11 + background: #32373c;
12 + color: #fff;
13 + text-align: center;
14 + border-radius: 5px 5px 0px 0px;
15 +}
16 +.wpbot_addons_section {
17 + margin-right: unset !important;
18 + margin-left: unset !important;
19 + margin-bottom: 10px;
20 + background: #32373c;
21 + padding-bottom: 20px;
22 + border-radius: 0px 0px 5px 5px;
23 +}
24 +.wpbot_single_addon_wrapper2 {
25 + background: #32373c !important;
26 + color: #fff !important;
27 + padding: 20px;
28 +}
29 +.wpbot_single_addon_wrapper2 .form-table th,.wpbot_single_addon_wrapper2 .form-wrap label{
30 + color: #fff !important;
31 +}
32 +.wp-chatbot-admin-header, .wp-chatbot-admin-footer {
33 + padding: 25px;
34 +}
35 +.wpbot_dashboard_header h1 {
36 + font-size: 30px;
37 + line-height: 100px;
38 + margin: 0px;
39 + color: #fff;
40 +}
41 +.container {
42 + width: 1170px;
43 + padding-right: 15px;
44 + padding-left: 15px;
45 +}
46 +.wrapTexttop {
47 + background: #1a1a1a;
48 + padding: 8px 20px;
49 + border-radius: 8px;
50 +}
51 +.form-table-str{
52 + border: 0 !important;
53 +}
54 +.form-table{
55 + border: 0 !important;
56 +}
57 +.form-table-str.form-table tr:nth-child(odd){
58 + background: #32373c !important;
59 +}
60 +.form-table tr:nth-child(odd) {
61 + background: #32373c !important;
62 +}
7 63
64 +
65 +
66 +
67 +/* 10-16-2024 - CSS Updated*/
68 +
69 +.TextResponsesouter .wrap.TextResponses{
70 + position: relative;
71 + max-width: 1170px;
72 +}
73 +.TextResponsesouter .wrap.TextResponses:before {
74 + content: '';
75 + position: absolute;
76 + background: url("<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-left-dark.png' );?>") top left;
77 + left: -6px;
78 + width: 40px;
79 + height: 100%;
80 + z-index: 999;
81 + top: 0;
82 + background-repeat: repeat !important;
83 +}
84 +.TextResponsesouter .wrap.TextResponses:after {
85 + content: '';
86 + position: absolute;
87 + background: url("<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-righ-dark.png' );?>") top right;
88 +
89 + width: 41px;
90 + height: 100%;
91 + right: -22px;
92 + width: 28px;
93 + z-index: 999;
94 + top: 0;
95 + background-repeat: repeat !important;
96 +}
97 +.TextResponsesouter {
98 + position: relative;
99 + max-width: 1190px;
100 +}
101 +.TextResponsesouter:before {
102 + content: '';
103 + position: absolute;
104 + background: url(<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-top-dark_new.png' );?>) top center;
105 + left: 2px;
106 + width: 100%;
107 + height: 34px;
108 + z-index: 9999999;
109 + top: -7px;
110 + background-repeat: no-repeat;
111 + background-size: cover;
112 +}
113 +.card-header .wpbot_dashboard_header {
114 + background: #222222;
115 +}
116 +.card-header .wpbot_addons_section {
117 + background: #222222;
118 +}
119 +
120 +path{stroke-dasharray:300;stroke-dashoffset:300;stroke:#c3a477;stroke-width:2px;-webkit-animation:draw ease-out infinite;animation:draw ease-out infinite}
121 +#l1{-webkit-animation-duration:3s;animation-duration:3s}
122 +#l2{-webkit-animation-duration:5.5s;animation-duration:5.5s}
123 +#l3{-webkit-animation-duration:2s;animation-duration:2s}
124 +#l4{-webkit-animation-duration:5.5s;animation-duration:5.5s}@-webkit-keyframes draw{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-300}}@keyframes draw{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-300}}
125 +.lineanimation{position:absolute;top:-64px;z-index:99999999;left:-10px;right:0;margin:0 auto;width:257px;max-width:257px;height:90px;overflow:hidden;bottom:0}
126 +.lineanimation svg{width:250px;height:95px}.lineanimation svg{width:250px;height:150px;overflow:hidden}.lineanimation path{stroke:#5e5e5e}
127 +
128 +
129 +.TextResponsesouter .TextResponses {
130 + background: #222222;
131 +}
132 +
133 +.TextResponsesouter {
134 + max-width: 1230px;
135 +}
136 +.TextResponsesouter .form-table-str.form-table tr:nth-child(odd) {
137 + background: #222222 !important;
138 +}
139 +
140 +.wrapTexttop {
141 + margin: 20px 0 0 0;
142 +}
143 +.form-table-str.form-table tr:nth-child(odd) {
144 + background: #32373c !important;
145 +}
146 +
147 +.wp-chatbot-wrap .form-table td {
148 + color: #fff;
149 +}
150 +
151 +
152 +
153 +
154 +
155 +
156 +
157 +
158 +
159 +/* 10-23-2024 - CSS Updated*/
160 +
161 +.qcwrap.TextResponses{
162 + position: relative;
163 + max-width: 1170px;
164 +}
165 +.qcwrap.TextResponses:before {
166 + content: '';
167 + position: absolute;
168 + background: url("<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-left-dark.png' );?>") top left;
169 + left: -6px;
170 + width: 40px;
171 + height: 100%;
172 + z-index: 999;
173 + top: 0;
174 + background-repeat: repeat !important;
175 +}
176 +.qcwrap.TextResponses:after {
177 + content: '';
178 + position: absolute;
179 + background: url("<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-righ-dark.png' );?>") top right;
180 +
181 + width: 41px;
182 + height: 100%;
183 + right: -22px;
184 + width: 28px;
185 + z-index: 999;
186 + top: 0;
187 + background-repeat: repeat !important;
188 +}
189 +.TextResponsesoutside {
190 + position: relative;
191 + max-width: 1190px;
192 +}
193 +.TextResponsesoutside:before {
194 + content: '';
195 + position: absolute;
196 + background: url(<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/hud-top-dark_new.png' );?>) top center;
197 + left: 2px;
198 + width: 100%;
199 + height: 34px;
200 + z-index: 9999999;
201 + top: -7px;
202 + background-repeat: no-repeat;
203 + background-size: cover;
204 +}
205 +.card-header .wpbot_dashboard_header {
206 + background: #222222;
207 +}
208 +.card-header .wpbot_addons_section {
209 + background: #222222;
210 +}
211 +
212 +path{stroke-dasharray:300;stroke-dashoffset:300;stroke:#c3a477;stroke-width:2px;-webkit-animation:draw ease-out infinite;animation:draw ease-out infinite}
213 +#l1{-webkit-animation-duration:3s;animation-duration:3s}
214 +#l2{-webkit-animation-duration:5.5s;animation-duration:5.5s}
215 +#l3{-webkit-animation-duration:2s;animation-duration:2s}
216 +#l4{-webkit-animation-duration:5.5s;animation-duration:5.5s}@-webkit-keyframes draw{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-300}}@keyframes draw{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-300}}
217 +.lineanimation{position:absolute;top:-64px;z-index:99999999;left:-10px;right:0;margin:0 auto;width:257px;max-width:257px;height:90px;overflow:hidden;bottom:0}
218 +.lineanimation svg{width:250px;height:95px}.lineanimation svg{width:250px;height:150px;overflow:hidden}.lineanimation path{stroke:#5e5e5e}
219 +
220 +
221 +
222 +.TextResponsesoutside .wpbot_dashboard_header {
223 + background: #222222;
224 +}
225 +.TextResponsesoutside .wpbot_addons_section {
226 + background: #222222;
227 +}
228 +.TextResponsesoutside .wpbot_single_addon_wrapper2 {
229 + background: #222222 !important;
230 +}
231 +.TextResponsesoutside .form-table-str.form-table tr:nth-child(odd) {
232 + background: #222222 !important;
233 +}
234 +
235 +.TextResponsesoutside .TextResponses {
236 + background: #222222;
237 +}
238 +</style>
239 +
240 +
8 241 <?php
9 242 if(isset($_GET['opt']) && $_GET['opt']=='add'):
10 243
11 244 do_action('qcld_str_add_category');
@@ -17,13 +250,13 @@
17 250 elseif(isset($_GET['page']) && $_GET['page']=='simple-text-response' && isset($_GET['action']) && $_GET['action']=='import'):
18 251
19 252 do_action('qcld_str_import');
20 253
21 - elseif(isset($_GET['action']) && wp_unslash($_GET['action'])=='manage-categories'):
254 + elseif(isset($_GET['action']) && $_GET['action']=='manage-categories'):
22 255
23 256 include_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH.'/includes/templates/manage-categories.php');
24 257
25 - elseif(isset($_GET['action']) && wp_unslash($_GET['action'])=='edit'):
258 + elseif(isset($_GET['action']) && $_GET['action']=='edit'):
26 259
27 260 if(class_exists('Qcld_str_pro')):
28 261 do_action('qcld_str_pro_stredit');
29 262 else:
@@ -28,52 +261,66 @@
28 261 do_action('qcld_str_pro_stredit');
29 262 else:
30 263
31 264 $hasEdit = false;
32 - if(isset($_GET['query']) && wp_unslash($_GET['query'])!=''){
265 + if(isset($_GET['query']) && $_GET['query']!=''){
33 266 $hasEdit = true;
34 - $id = sanitize_text_field(wp_unslash($_GET['query']));
267 + $id = sanitize_text_field($_GET['query']);
35 268 $table = $wpdb->prefix.'wpbot_response';
36 - $data = $wpdb->get_row($wpdb->prepare("select * from {$table} where id = %d", $id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
269 + $data = $wpdb->get_row($wpdb->prepare("select * from $table where id = %d", $id)); //DB Call OK, No Caching OK
270 +
37 271 }
272 +
273 +
38 274 ?>
39 -<div class="qcld-wp-chatbot-wrap-header">
40 275
41 - <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a>
42 - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
43 - </div>
44 - <ul class="qcld-wp-chatbot-wrap-version-wrapper">
45 - <li>
46 - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
47 -
48 - </li>
49 - </ul>
50 -</div>
276 +
277 +
51 278 <div class="TextResponsesoutside">
279 +
280 +<div class="lineanimation">
281 +<svg width="350" height="350" viewBox="0 0 308 309" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
282 +<defs>
283 +<circle id="a" cx="150" cy="150" r="150"></circle>
284 +<linearGradient x1="50%" y1="0%" x2="50%" y2="62.304%" id="c">
285 +<stop stop-color="#09DFF3" offset="0%"></stop>
286 +<stop stop-color="#44BEFF" offset="100%"></stop>
287 +</linearGradient>
288 +</defs>
289 +<g>
290 +<path id="l1" d="M0 130 L300 130"></path>
291 +<path id="l2" d="M0 150 L300 150"></path>
292 +<path id="l3" d="M0 170 L300 170"></path>
293 +<path id="l4" d="M0 190 L300 190"></path>
294 +</g>
295 +</svg></div>
296 +
297 +
52 298 <div class="qcwrap TextResponses">
299 +
53 300 <div class="wp-chatbot-wrap">
54 - <div class="wpbot_dashboard_header "><h1><?php echo ($hasEdit?'Edit':'Add') ?> Response</h1></div>
301 + <div class="wpbot_dashboard_header container"><h1><?php echo ($hasEdit?'Edit':'Add') ?> Response</h1></div>
55 302 <form method="post" action="">
56 - <div class="wpbot_addons_section ">
303 + <div class="wpbot_addons_section container">
57 304 <div class="wpbot_single_addon_wrapper2">
58 - <p><b><?php esc_html_e('Please note the following ', 'chatbot'); ?></b></p>
305 + <p><b><?php esc_html_e('Please note the following ', 'wpbot'); ?></b></p>
59 306 <ul>
60 - <li> <?php esc_html_e('1. The Query, Response and Keywords fields will be searched. Add Keywords for best matches', 'chatbot'); ?></li>
61 - <li> <?php esc_html_e('2. Please clear browser Cache and Cookies both before testing new responses', 'chatbot'); ?></li>
307 + <li> <?php esc_html_e('1. The Query, Response and Keywords fields will be searched. Add Keywords for best matches', 'wpbot'); ?></li>
308 + <li> <?php esc_html_e('2. Please clear browser Cache and Cookies both before testing new responses', 'wpbot'); ?></li>
62 309 </ul>
63 310 <table class="form-table-str form-table">
64 311 <tbody>
65 312 <tr valign="top">
66 - <th scope="row"><?php esc_html_e('Query', 'chatbot'); ?></th>
313 + <th scope="row"><?php esc_html_e('Query', 'wpbot'); ?></th>
67 314 <td>
68 315 <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" />
69 - <input type="text" name="qc_bot_str_query" value="<?php echo esc_attr($hasEdit?$data->query:''); ?>" style="width: 100%;" required />
70 - <br><i><?php esc_html_e('*Required. Add the query here. ', 'chatbot'); ?></i>
316 + <input type="text" name="qc_bot_str_query" value="<?php echo esc_attr($hasEdit?$data->query:''); ?>" style="width: 400px;" required />
317 + <br><i><?php esc_html_e('*Required. Add the query here. ', 'wpbot'); ?></i>
71 318 </td>
72 319 </tr>
73 320
74 321 <tr valign="top">
75 - <th scope="row"> <?php esc_html_e('Response', 'chatbot'); ?></th>
322 + <th scope="row"> <?php esc_html_e('Response', 'wpbot'); ?></th>
76 323 <td>
77 324 <?php
78 325
79 326 $content = ($hasEdit?$data->response:'');
@@ -82,16 +329,16 @@
82 329
83 330 wp_editor( $content, $editor_id, $settings );
84 331
85 332 ?>
86 - <br><i><?php esc_html_e('*Required. Add the response here. ', 'chatbot'); ?></i>
333 + <br><i><?php esc_html_e('*Required. Add the response here. ', 'wpbot'); ?></i>
87 334 </td>
88 335 </tr>
89 336 <tr valign="top">
90 337 <th scope="row">Keyword</th>
91 338 <td>
92 - <input type="text" name="qc_bot_str_keyword" value="<?php echo esc_attr($hasEdit?$data->keyword:''); ?>" style="width: 100%;" />
93 - <br><i> <?php esc_html_e('Optional. Add multiple keyword or phrases as comma(,) seperated value. It will help to find the best match result.', 'chatbot'); ?></i>
339 + <input type="text" name="qc_bot_str_keyword" value="<?php echo esc_attr($hasEdit?$data->keyword:''); ?>" style="width: 400px;" />
340 + <br><i> <?php esc_html_e('Optional. Add multiple keyword or phrases as comma(,) seperated value. It will help to find the best match result.', 'wpbot'); ?></i>
94 341 </td>
95 342 </tr>
96 343
97 344
@@ -99,11 +346,14 @@
99 346
100 347 <input type="hidden" name="qc_bot_str_id" value="<?php echo esc_attr($data->id); ?>" />
101 348
102 349 <?php endif; ?>
350 +
351 +
103 352 </tbody>
104 353 </table>
105 354 </div>
355 +
106 356 <footer class="wp-chatbot-admin-footer">
107 357 <div class="row">
108 358 <div class="text-left col-sm-3 col-sm-offset-3">
109 359
@@ -113,93 +363,87 @@
113 363 </div>
114 364 </div>
115 365 <!-- row-->
116 366 </footer>
367 +
368 +
117 369 </div></form>
118 370 </div>
119 371 </div>
120 372 </div>
373 + <?php endif; ?>
374 + <?php else: ?>
375 + <h1 class="wp-heading-inline"><?php esc_html_e('Simple Text Responses', 'wpbot'); ?></h1>
376 + <a href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Add New', 'wpbot'); ?></a>
377 +
378 + <?php if(class_exists('Qcld_str_pro')): ?>
379 +
380 + <a href="<?php echo esc_url( add_query_arg( 'action', 'manage-categories', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Manage Categories', 'wpbot'); ?></a>
381 + <a href="<?php echo esc_url( admin_url( 'admin-post.php?action=qc_str_export' ) ); ?>" class="button page-title-action"><?php esc_html_e('Export', 'wpbot'); ?></a>
382 + <a href="<?php echo esc_url( add_query_arg( 'action', 'import', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Import', 'wpbot'); ?></a>
383 +
121 384 <?php endif; ?>
122 385
386 + <div class="TextResponsesouter">
123 387
124 - <?php else: ?>
125 388
126 -<div class="qcld-wp-chatbot-wrap-header">
389 + <div class="lineanimation">
390 +<svg width="350" height="350" viewBox="0 0 308 309" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
391 +<defs>
392 +<circle id="a" cx="150" cy="150" r="150"></circle>
393 +<linearGradient x1="50%" y1="0%" x2="50%" y2="62.304%" id="c">
394 +<stop stop-color="#09DFF3" offset="0%"></stop>
395 +<stop stop-color="#44BEFF" offset="100%"></stop>
396 +</linearGradient>
397 +</defs>
398 +<g>
399 +<path id="l1" d="M0 130 L300 130"></path>
400 +<path id="l2" d="M0 150 L300 150"></path>
401 +<path id="l3" d="M0 170 L300 170"></path>
402 +<path id="l4" d="M0 190 L300 190"></path>
403 +</g>
404 +</svg></div>
127 405
128 - <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a>
129 - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
130 - <ul class="qcld-wp-chatbot-wrap-version-wrapper">
131 - <li>
132 - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
133 -
134 - </li>
135 - </ul>
136 -</div>
137 -
138 -<div class="qcld-wp-chatbot-wrap-header_inn">
139 -<div class="qcld-wp-chatbot-wrap-header_inn_heading">
140 - <h1 class="wp-heading-inline"><?php esc_html_e('Simple Text Responses', 'chatbot'); ?></h1>
141 - <a style="visibility: hidden;" href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Add New', 'chatbot'); ?></a>
142 - </div>
143 - <?php if(class_exists('Qcld_str_pro')): ?>
144 -
145 - <a href="<?php echo esc_url( add_query_arg( 'action', 'manage-categories', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Manage Categories', 'chatbot'); ?></a>
146 - <a href="<?php echo esc_url( admin_url( 'admin-post.php?action=qc_str_export' ) ); ?>" class="button page-title-action"><?php esc_html_e('Export', 'chatbot'); ?></a>
147 - <a href="<?php echo esc_url( add_query_arg( 'action', 'import', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Import', 'chatbot'); ?></a>
148 - </div>
149 - <?php endif; ?>
150 - <div class="TextResponsesouter">
406 +
151 407 <div class="wrap TextResponses">
408 +
152 409
153 -<div id="qcld-show-more-wrapper-box">
154 -<div class="qcld-show-more-text qcld-show-more-show-more-height">
155 410
156 411 <div class="wrapTexttop">
157 - <p><?php esc_html_e('Create simple text responses and the ChatBot will use advanced search algorithm to answer user questions. This is a simpler alternative to OpenAI or DialogFlow.', 'chatbot'); ?><br>
158 - <b><?php esc_html_e('NB: Simple Text Responses require mySQL Client version 5.6+', 'chatbot'); ?></b></p>
412 +
413 + <p><?php esc_html_e('Create simple text responses and the ChatBot will use advanced search algorithm to answer user questions. This is a simpler alternative to OpenAI or DialogFlow.', 'wpbot'); ?><br>
414 + <b><?php esc_html_e('NB: Simple Text Responses require mySQL Client version 5.6+', 'wpbot'); ?></b></p>
159 415 </div>
160 416 <form method="post" action="">
161 417 <table class="form-table-str form-table">
162 418 <tbody>
163 419 <tr valign="top">
164 - <th scope="row"><?php esc_html_e('Phrase matching accuracy', 'chatbot'); ?></th>
420 + <th scope="row"><?php esc_html_e('Phrase matching accuracy', 'wpbot'); ?></th>
165 421 <td>
166 422 <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" />
167 - <input type="text" name="qc_bot_str_weight" value="<?php echo esc_attr( !empty(get_option('qc_bot_str_weight')) ? get_option('qc_bot_str_weight') : '0.4' ); ?>" style="width: 100%;" required />
168 - <br><i><?php esc_html_e('Please enter a value between 0 to 1. Higher value means more exact matching of phrases.', 'chatbot'); ?></i>
423 + <input type="text" name="qc_bot_str_weight" value="<?php esc_attr_e((get_option('qc_bot_str_weight')!=''?get_option('qc_bot_str_weight'):'0.4')); ?>" style="width: 400px;" required />
424 + <br><i><?php esc_html_e('Please enter a value between 0 to 1. Higher value means more exact matching of phrases.', 'wpbot'); ?></i>
169 425 </td>
170 426 </tr>
171 427 <tr valign="top">
172 - <th scope="row"><?php esc_html_e('Search Fields', 'chatbot'); ?></th>
428 + <th scope="row"><?php esc_html_e('Search Fields', 'wpbot'); ?></th>
173 429 <td>
174 430 <?php
175 431 $fields = get_option('qc_bot_str_fields');
176 432 ?>
177 433
178 - <label for="qc_bot_str_field_title"><?php esc_html_e('Title', 'chatbot'); ?></label>
434 + <label for="qc_bot_str_field_title"><?php esc_html_e('Title', 'wpbot'); ?></label>
179 435 <input id="qc_bot_str_field_title" type="checkbox" name="qc_bot_str_fields[]" value="query" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('query', $fields)?'checked="checked"':''); ?> />
180 436
181 - <label for="qc_bot_str_field_keyword"><?php esc_html_e('Keyword', 'chatbot'); ?></label>
437 + <label for="qc_bot_str_field_keyword"><?php esc_html_e('Keyword', 'wpbot'); ?></label>
182 438 <input id="qc_bot_str_field_keyword" type="checkbox" name="qc_bot_str_fields[]" value="keyword" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('keyword', $fields)?'checked="checked"':''); ?> />
183 439
184 - <label for="qc_bot_str_field_response"><?php esc_html_e('Response', 'chatbot'); ?></label>
440 + <label for="qc_bot_str_field_response"><?php esc_html_e('Response', 'wpbot'); ?></label>
185 441 <input id="qc_bot_str_field_response" type="checkbox" name="qc_bot_str_fields[]" value="response" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('response', $fields)?'checked="checked"':''); ?> />
186 - <br><i><?php esc_html_e('Please check/uncheck to allow/disallow searching in that fields', 'chatbot'); ?></i>
442 + <br><i><?php esc_html_e('Please check/uncheck to allow/disallow searching in that fields', 'wpbot'); ?></i>
187 443 </td>
188 444 </tr>
189 - <?php
190 - $current_user = wp_get_current_user();
191 - if ( in_array( 'administrator', $current_user->roles )) {
192 - ?>
193 - <tr valign="top">
194 - <th scope="row"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></th>
195 - <td>
196 - <input id="qc_bot_str_allow_author_editor" type="checkbox" name="qc_bot_str_allow_author_editor" value="1" <?php echo ( get_option( 'qc_bot_str_allow_author_editor' ) && get_option( 'qc_bot_str_allow_author_editor' ) == 1 ? 'checked="checked"' : '' ); ?> />
197 - <label for="qc_bot_str_allow_author_editor"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></label>
198 - <br><i><?php echo esc_html( 'Please enable to allow Author & Editor to edit STR.' ); ?></i>
199 - </td>
200 - </tr>
201 - <?php } ?>
445 +
202 446 <tr valign="top">
203 447 <th scope="row"></th>
204 448 <td>
205 449 <input type="submit" class="button button-primary" name="submit" id="submit" value="Save Settings">
@@ -207,30 +451,24 @@
207 451 </tr>
208 452 </tbody>
209 453 </table>
210 454 </form>
455 +
211 456 <form method="post" action="">
212 457 <table class="form-table-str form-table">
213 458 <tbody>
214 459 <tr valign="top">
215 - <th scope="row"><?php esc_html_e('Re-Index STR', 'chatbot'); ?></th>
460 + <th scope="row"><?php esc_html_e('Re-Index STR Simple Text Responses', 'wpbot'); ?></th>
216 461 <td>
217 462 <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" />
218 463 <input type="submit" class="button button-primary" name="qc-re-index" id="re-index" value="Re Index">
219 -
220 - <i><?php esc_html_e('Re-Index if results are not as expected.', 'chatbot'); ?></i>
464 + <br/>
465 + <i><?php esc_html_e('Re-Indexing may required after migration.', 'wpbot'); ?></i>
221 466 </td>
222 467 </tr>
223 468 </tbody>
224 469 </table>
225 470 </form>
226 -
227 -
228 -
229 - </div>
230 - <div class="qcld-show-more-show-more"><div class="Expandmore">Expand for More Options<span>+</span></div></div>
231 - </div>
232 -
233 471 <div id="poststuff">
234 472 <div id="post-body" class="metabox-holder">
235 473 <div id="post-body-content-edit" class="str-form">
236 474 <div class="meta-box-sortables ui-sortable">
@@ -235,9 +473,9 @@
235 473 <div id="post-body-content-edit" class="str-form">
236 474 <div class="meta-box-sortables ui-sortable">
237 475 <form method="post">
238 476
239 - <a href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action str-addnew"><?php esc_html_e('Add New', 'chatbot'); ?></a>
477 + <a href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action str-addnew"><?php esc_html_e('Add New', 'wpbot'); ?></a>
240 478 <?php
241 479 $this->response_list->prepare_items();
242 480 $this->response_list->display(); ?>
243 481 </form>
@@ -248,375 +486,116 @@
248 486 </div>
249 487 </div>
250 488 </div>
251 489 <?php endif; ?>
490 +<script type="text/javascript">
491 + // var stopcheckBox = document.getElementById("qc_bot_str_remove_stopwords");
492 + // stopcheckBox.addEventListener('change', function () {
493 + // if (stopcheckBox.checked == true){
494 + // stopcheckBox.value = "1";
495 +
496 + // } else {
497 + // stopcheckBox.value = "0";
498 + // }
499 + // });
252 500
501 + // var small_talk = document.getElementById('small_talk');
502 + // small_talk.addEventListener( 'click', () => { small_talk_import(); } );
503 + // function small_talk_import(){
504 + // var req = new XMLHttpRequest();
505 + // req.open('POST', ajaxurl, true);
506 + // req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
507 + // var s = 'action=small_talk_import';
508 + // req.send(s);
509 + // if(req.DONE == 4){
510 + // alert('Smalltalk is imported');
511 + // setTimeout(function(){
512 + // window.location.reload();
513 + // }, 3000);
514 + // }
515 + // }
516 +
517 +</script>
253 518
254 519
255 - <style>
256 -body {
257 - background-color: #F5F7FD;
258 - font-family: "DM Sans", sans-serif !important;
259 - font-optical-sizing: auto;
260 - font-size: 16px;
261 - font-weight: normal;
262 -}
263 -.qcld-wp-chatbot-wrap-header {
264 - display: flex;
265 - column-gap: 15px;
266 - row-gap: 10px;
267 - background: #fff;
268 - padding: 15px 15px;
269 - margin: 20px 20px 20px 0;
270 - border-radius: 16px;
271 - align-items: center;
272 - justify-content: space-between;
273 - width: 97%;
274 -}
520 +<style>
275 521
276 -.qcld-wp-chatbot-wrap-header img{
277 - max-width: 50px;
278 -}
279 522
280 -.qcld-wp-chatbot-wrap-header ul, .qcld-wp-chatbot-wrap-header p, .qcld-wp-chatbot-wrap-header li{
281 - margin: 0;
523 +.TextResponses{
524 + background: #32373c;
525 + padding: 20px 20px;
526 + border-radius: 6px;
527 + width: 100%;
528 + max-width: 1220px;
282 529 }
283 -.qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade {
284 - padding: 12px 25px;
285 - background: #ffffff;
286 - color: #5B4E96;
287 - border: 2px solid #5B4E96;
288 - border-radius: 6px;
289 - font-weight: bold;
530 +.TextResponses p{
531 + color:#fff;
290 532 }
291 -
292 -.qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade:hover {
293 - padding: 12px 25px;
294 - background: #5B4E96;
295 - color: #fff;
296 - border: 2px solid #5B4E96;
297 - border-radius: 6px;
298 - font-weight: bold;
299 - text-decoration: none;
533 +.TextResponses i{
534 + color:#fff;
300 535 }
301 -a.qcld-wp-chatbot-wrap-site__logo {
302 - font-size: 22px;
303 - color: #000;
304 - font-weight: bold;
305 - display: flex;
306 - align-items: center;
307 - gap: 12px;
308 - text-decoration: none;
309 - margin: 0;
310 - padding: 0;
536 +.TextResponses h1{
537 + color:#fff;
311 538 }
312 -
313 -a{
314 - text-decoration: none;
539 +.TextResponses .form-table th, .TextResponses .form-wrap label {
540 + color:#fff;
315 541 }
316 -.qcld-wp-chatbot-wrap-header_inn {
317 - background: #fff;
318 - border-radius: 16px;
319 - margin: 0 20px 0 0;
320 - padding: 20px;
542 +.qcwrap {
543 + margin: 20px 0 0 0;
321 544 }
322 -.TextResponsesoutside {
323 - background: #fff;
324 - border-radius: 16px;
325 - margin: 0 20px 0 0;
326 - padding: 20px;
545 +.TextResponses label {
546 + color: #fff;
327 547 }
328 -
329 -
330 -.qcld-wp-chatbot-wrap-header_inn h1.wp-heading-inline {
331 - border-bottom: 1px solid #eee;
332 - padding: 0 0 15px 0;
333 - margin: 20px 0 12px 0;
334 - font-weight: bold;
335 - font-size: 22px !important;
336 -}
337 -
338 -.TextResponsesoutside h1 {
339 - border-bottom: 1px solid #eee;
340 - padding: 0 0 8px 0;
341 - margin: 20px 0 12px 0;
342 - font-weight: bold;
343 - font-size: 22px !important;
344 -}
345 -.TextResponsesoutside ul li {
346 - font-size: 14px;
347 -}
348 -.wpbot_single_addon_wrapper2 p {
349 - font-size: 16px;
350 -}
351 -.TextResponsesouter i {
352 - font-weight: normal;
353 - font-size: 12px;
354 - color: red;
355 -}
356 -.TextResponsesoutside i {
357 - font-weight: normal;
358 - font-size: 12px;
359 - color: red;
360 -}
361 -
362 -table.form-table-str.form-table tr {
363 - background: #fff;
364 - padding: 2px 10px !important;
365 - border-radius: 6px;
366 - margin: 0 0 8px 0;
367 - border: 5px solid #fff;
368 - vertical-align: middle;
369 - border: 1px solid #eee;
370 -}
371 -table.form-table-str.form-table {
372 - border: 1px solid #eee;
373 -}
374 -table.form-table-str.form-table tr {
375 - border: none;
376 -}
377 -table.form-table-str.form-table th {
378 - vertical-align: top;
548 +.tablenav-pages .current-page {
549 + display: inline-block;
550 + vertical-align: baseline;
551 + min-width: 30px;
552 + min-height: 31px;
553 + margin: 0 0 0 0;
554 + padding: 0 4px;
555 + font-size: 13px;
556 + line-height: 1.5;
379 557 text-align: center;
380 - padding: 20px 10px 20px 0;
381 - width: 200px;
382 - line-height: 1.3;
383 - font-weight: 600;
384 - vertical-align: middle;
385 558 }
386 -
387 -.TextResponsesoutside footer.wp-chatbot-admin-footer input#submit {
388 - padding: 12px 20px;
389 - width: 100%;
390 - font-size: 16px;
391 - font-weight: 500;
392 - color: #988FBD;
393 - border-radius: 8px;
394 - position: relative;
395 - display: flex;
396 - align-items: center;
397 - gap: 15px;
398 - background: #5B4E96;
399 - color: #ffffff;
400 - text-decoration: none;
401 - border: none;
402 - max-width: 220px;
403 - margin: 12px 0 0 0;
404 - line-height: 24px;
559 +.tablenav-pages .current-page {
560 + border: 1px solid
405 561 }
406 -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action {
407 - padding: 3px 25px;
408 - background: #ffffff;
409 - color: #5B4E96;
410 - border: 2px solid #5B4E96;
411 - border-radius: 6px;
412 - font-weight: bold;
413 -}
414 -
415 -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action:hover {
416 - padding: 0px 15px;
417 - background: #5B4E96;
562 +div#poststuff {
418 563 color: #fff;
419 - border: 2px solid #5B4E96;
420 - border-radius: 6px;
421 - font-weight: bold;
422 - position: absolute;
423 - top: 36px;
424 - left: 280px;
425 564 }
426 -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action {
427 - padding: 0px 15px;
428 - background: #ffffff;
429 - color: #5B4E96;
430 - border: 2px solid #5B4E96;
431 - border-radius: 6px;
432 - font-weight: bold;
433 - position: absolute;
434 - top: 36px;
435 - left: 280px;
565 +.str-form{
566 + position: relative;
436 567 }
437 -
438 -.qcld-wp-chatbot-wrap-header_inn {
439 - position: relative;
568 +.str-addnew{
569 + position: absolute !important;
570 + left: 50%;
440 571 }
441 -.notice.is-dismissible.qcbot-str-top-notic {
442 - width: 95%;
572 +.qcbot-str-top-notic {
573 + max-width: 1240px;
574 + padding: 0 !important;
575 + margin: 20px 0 0 0;
443 576 }
444 -
445 -.TextResponsesouter i {
446 - position: relative;
447 - top: 6px;
577 +body .qcbot-str-top-notic {
578 + max-width: initial !important;
579 + padding: 0 !important;
580 + margin: 20px 20px 20px 0 !important;
581 + padding: 15px 15px 15px 0 !important;
582 + border: none !important;
583 + border-radius: 6px !important;
584 + box-shadow: 0px 4px 6px 1px #ebebeb !important;
448 585 }
449 -
450 -table.form-table-str.form-table th {
451 - text-align: left !important;
452 - padding: 20px 10px 20px 20px !important;
586 +div#promotion-wpchatbot {
587 + max-width: inherit;
588 + margin-left: 0;
589 + border: none;
590 + margin: 12px 20px 20px 0;
453 591 }
454 -
455 -.qc-review-text img {
456 - width: 100%;
457 -}
458 -
459 -.TextResponsesouter input#submit {
460 - padding: 0px 15px;
461 - background: #ffffff;
462 - color: #5B4E96;
463 - border: 2px solid #5B4E96;
464 - border-radius: 6px;
465 - font-weight: bold;
466 -}
467 -.TextResponsesouter input#re-index {
468 - padding: 0px 15px;
469 - background: #ffffff;
470 - color: #5B4E96;
471 - border: 2px solid #5B4E96;
472 - border-radius: 6px;
473 - font-weight: bold;
474 -}
475 -
476 -
477 -#qcld-show-more-wrapper-box {
478 - margin-top: 0;
479 - position:relative;
480 -}
481 -#qcld-show-more-wrapper-box .qcld-show-more-text {
482 -/* width: 660px; */
483 - margin-bottom: 5px;
484 - padding: 0 0;
485 - position:relative;
592 +div#promotion-wpchatbot a{
486 593 display: block;
487 594 }
488 -#qcld-show-more-wrapper-box .qcld-show-more-show-more {
489 - color: #ffffff;
490 - position: relative;
491 - padding: 40px 0 0 0;
492 - height: 40px;
493 - text-align: center;
494 - background: #f1f1f1;
495 - cursor: pointer;
496 - background: linear-gradient(to bottom, rgb(255 255 255 / 53%) 0%, rgb(188 174 255) 100%);
497 - margin: -18px 0 0 0;
498 - border-radius: 0 0 15px 15px;
499 - z-index: 99999;
500 - font-weight: bold;
501 595
596 +.str-addnew {
597 + position: absolute !important;
598 + left: 15% !important;
599 + top: 5px !important;
502 600 }
503 -
504 -#qcld-show-more-wrapper-box .qcld-show-more-show-more-height {
505 - height: 112px;
506 - overflow:hidden;
507 -}
508 -
509 -#qcld-show-more-wrapper-box .qcld-show-more-show-more i {
510 - display: block;
511 - padding: 0 0 0 0;
512 - background: #5b4e96;
513 - width: 30px;
514 - height: 30px;
515 - line-height: 30px;
516 - border-radius: 50%;
517 - margin: -15px auto 0 auto;
518 - font-size: 18px !important;
519 - color: #fff;
520 -}
521 -.TextResponsesouter input#submit:hover {
522 - background: #5B4E96;
523 - color: #fff;
524 - border: 2px solid #5B4E96;
525 -}
526 -
527 -.TextResponsesouter input#re-index:hover {
528 - background: #5B4E96;
529 - color: #fff;
530 - border: 2px solid #5B4E96;
531 -}
532 -.TextResponsesouter table.widefat {
533 - border: 1px solid #ebebeb;
534 -}
535 -.TextResponsesouter .tablenav {
536 - padding: 8px;
537 - background: #5B4E96;
538 -}
539 -.TextResponsesouter span.displaying-num {
540 - color: #fff;
541 -}
542 -
543 -.TextResponsesouter .tablenav #doaction, .TextResponsesouter .tablenav #doaction2 {
544 - border: 1px solid #ffffff !important;
545 - color: #ffffff !important;
546 -}
547 -
548 -
549 -
550 -.qcld-wp-chatbot-wrap-header-logo {
551 - display: flex;
552 - align-items: center;
553 - gap: 10px;
554 -}
555 -
556 -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action {
557 - padding: 8px 15px;
558 - background: #ffffff;
559 - color: #5B4E96;
560 - border: 2px solid #5B4E96;
561 - border-radius: 6px;
562 - font-weight: bold;
563 - position: absolute;
564 - top: 30px;
565 - left: 280px;
566 - line-height: normal;
567 - min-height: unset;
568 -}
569 -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action:hover {
570 - padding: 8px 15px;
571 - background: #5B4E96;
572 - color: #fff;
573 - border: 2px solid #5B4E96;
574 - border-radius: 6px;
575 - font-weight: bold;
576 - position: absolute;
577 - top: 30px;
578 - left: 280px;
579 -}
580 -
581 -.Expandmore {
582 - background: #23ab10;
583 - display: inline-block;
584 - padding: 4px 10px;
585 - font-size: 14px;
586 - border-radius: 6px;
587 - position: relative;
588 - top: 0;
589 -}
590 -
591 -.Collapsemore {
592 - background: #ff0000;
593 - display: inline-block;
594 - padding: 4px 10px;
595 - font-size: 14px;
596 - border-radius: 6px;
597 - position: relative;
598 - top: 0;
599 -
600 -}
601 -
602 -.Expandmore span {
603 - color: #fff;
604 - margin: 0 0 0 8px;
605 - padding: 0 5px;
606 - font-size: 18px;
607 -}
608 - </style>
609 -
610 -<script type="text/javascript">
611 -jQuery(".qcld-show-more-show-more").click(function () {
612 - if(jQuery(".qcld-show-more-text").hasClass("qcld-show-more-show-more-height")) {
613 - jQuery(this).html('<div class="Collapsemore">Collapse Options</div>');
614 - } else {
615 - jQuery(this).html('<div class="Expandmore">Expand for More Options<span>+</span></div>');
616 - }
617 -
618 - jQuery(".qcld-show-more-text").toggleClass("qcld-show-more-show-more-height");
619 - });
620 -
621 -
622 -</script>
601 +</style>