Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/aimogen-pro/res/aiomatic-chatbot.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
function aiomatic_chat_settings_updated($old_value, $value, $option)
3
+
{
4
+
if (array_key_exists('remote_chat', $value) && (!isset($old_value['remote_chat']) || $value['remote_chat'] !== $old_value['remote_chat']))
5
+
{
6
+
$myop = get_option('aiomatic_chat_page_id', false);
7
+
if($myop !== false)
8
+
{
9
+
if(is_numeric($myop))
10
+
{
11
+
$myop = array($myop);
12
+
}
13
+
$changedone = false;
14
+
foreach($myop as $mind => $marr)
15
+
{
16
+
$tp = get_post($marr);
17
+
if($tp === null)
18
+
{
19
+
unset($myop[$mind]);
20
+
$changedone = true;
21
+
}
22
+
}
23
+
if($changedone == true)
24
+
{
25
+
aiomatic_update_option('aiomatic_chat_page_id', $myop);
26
+
}
27
+
if (!isset($value['remote_chat']) || trim($value['remote_chat']) != 'on')
28
+
{
29
+
foreach($myop as $mind => $marr)
30
+
{
31
+
wp_delete_post($marr, true);
32
+
delete_option('aiomatic_chat_page_id');
33
+
}
34
+
}
35
+
}
36
+
}
37
+
else
38
+
{
39
+
if(!isset($value['remote_chat']))
40
+
{
41
+
$myop = get_option('aiomatic_chat_page_id', false);
42
+
if($myop !== false)
43
+
{
44
+
if(is_numeric($myop))
45
+
{
46
+
$myop = array($myop);
47
+
}
48
+
foreach($myop as $mind => $marr)
49
+
{
50
+
wp_delete_post($marr, true);
51
+
delete_option('aiomatic_chat_page_id');
52
+
}
53
+
}
54
+
}
55
+
}
56
+
}
57
+
add_action('aiomatic_update_option_aiomatic_Chatbot_Settings', 'aiomatic_chat_settings_updated', 10, 3);
58
+
function aiomatic_chatbot_panel()
59
+
{
60
+
$aiomatic_Main_Settings = get_option('aiomatic_Main_Settings', false);
61
+
if (!isset($aiomatic_Main_Settings['app_id']) || trim($aiomatic_Main_Settings['app_id']) == '')
62
+
{
63
+
?>
64
+
<h1><?php echo esc_html__("You must add an OpenAI/AiomaticAPI API Key into the plugin's 'Settings' menu before you can use this feature!", 'aiomatic-automatic-ai-content-writer');?></h1>
65
+
<?php
66
+
return;
67
+
}
68
+
$mcp_servers = get_option('aiomatic_mcp_servers', array());
69
+
$all_models = aiomatic_get_all_models(true);
70
+
$all_assistants = aiomatic_get_all_assistants(true);
71
+
$aiomatic_Chatbot_Settings = get_option('aiomatic_Chatbot_Settings', false);
72
+
if (isset($aiomatic_Chatbot_Settings['font_size'])) {
73
+
$font_size = $aiomatic_Chatbot_Settings['font_size'];
74
+
} else {
75
+
$font_size = '';
76
+
}
77
+
if (isset($aiomatic_Chatbot_Settings['show_header'])) {
78
+
$show_header = $aiomatic_Chatbot_Settings['show_header'];
79
+
} else {
80
+
$show_header = '';
81
+
}
82
+
if (isset($aiomatic_Chatbot_Settings['bubble_width'])) {
83
+
$bubble_width = $aiomatic_Chatbot_Settings['bubble_width'];
84
+
} else {
85
+
$bubble_width = '';
86
+
}
87
+
if (isset($aiomatic_Chatbot_Settings['bubble_alignment'])) {
88
+
$bubble_alignment = $aiomatic_Chatbot_Settings['bubble_alignment'];
89
+
} else {
90
+
$bubble_alignment = '';
91
+
}
92
+
if (isset($aiomatic_Chatbot_Settings['bubble_user_alignment'])) {
93
+
$bubble_user_alignment = $aiomatic_Chatbot_Settings['bubble_user_alignment'];
94
+
} else {
95
+
$bubble_user_alignment = '';
96
+
}
97
+
if (isset($aiomatic_Chatbot_Settings['show_ai_avatar'])) {
98
+
$show_ai_avatar = $aiomatic_Chatbot_Settings['show_ai_avatar'];
99
+
} else {
100
+
$show_ai_avatar = 'show';
101
+
}
102
+
if (isset($aiomatic_Chatbot_Settings['show_user_avatar'])) {
103
+
$show_user_avatar = $aiomatic_Chatbot_Settings['show_user_avatar'];
104
+
} else {
105
+
$show_user_avatar = 'show';
106
+
}
107
+
if (isset($aiomatic_Chatbot_Settings['user_account_avatar'])) {
108
+
$user_account_avatar = $aiomatic_Chatbot_Settings['user_account_avatar'];
109
+
} else {
110
+
$user_account_avatar = '';
111
+
}
112
+
if (isset($aiomatic_Chatbot_Settings['conversation_starters'])) {
113
+
$conversation_starters = $aiomatic_Chatbot_Settings['conversation_starters'];
114
+
} else {
115
+
$conversation_starters = '';
116
+
}
117
+
if (isset($aiomatic_Chatbot_Settings['chatbot_append'])) {
118
+
$chatbot_append = $aiomatic_Chatbot_Settings['chatbot_append'];
119
+
} else {
120
+
$chatbot_append = '';
121
+
}
122
+
if (isset($aiomatic_Chatbot_Settings['chatbot_prepend'])) {
123
+
$chatbot_prepend = $aiomatic_Chatbot_Settings['chatbot_prepend'];
124
+
} else {
125
+
$chatbot_prepend = '';
126
+
}
127
+
if (isset($aiomatic_Chatbot_Settings['chat_theme'])) {
128
+
$chat_theme = $aiomatic_Chatbot_Settings['chat_theme'];
129
+
} else {
130
+
$chat_theme = '';
131
+
}
132
+
if (isset($aiomatic_Chatbot_Settings['show_dltxt'])) {
133
+
$show_dltxt = $aiomatic_Chatbot_Settings['show_dltxt'];
134
+
} else {
135
+
$show_dltxt = '';
136
+
}
137
+
if (isset($aiomatic_Chatbot_Settings['show_mute'])) {
138
+
$show_mute = $aiomatic_Chatbot_Settings['show_mute'];
139
+
} else {
140
+
$show_mute = '';
141
+
}
142
+
if (isset($aiomatic_Chatbot_Settings['show_internet'])) {
143
+
$show_internet = $aiomatic_Chatbot_Settings['show_internet'];
144
+
} else {
145
+
$show_internet = '';
146
+
}
147
+
if (isset($aiomatic_Chatbot_Settings['show_internet_default'])) {
148
+
$show_internet_default = $aiomatic_Chatbot_Settings['show_internet_default'];
149
+
} else {
150
+
$show_internet_default = '';
151
+
}
152
+
if (isset($aiomatic_Chatbot_Settings['show_clear'])) {
153
+
$show_clear = $aiomatic_Chatbot_Settings['show_clear'];
154
+
} else {
155
+
$show_clear = '';
156
+
}
157
+
if (isset($aiomatic_Chatbot_Settings['voice_language'])) {
158
+
$voice_language = $aiomatic_Chatbot_Settings['voice_language'];
159
+
} else {
160
+
$voice_language = 'en-US';
161
+
}
162
+
if (isset($aiomatic_Chatbot_Settings['did_image'])) {
163
+
$did_image = $aiomatic_Chatbot_Settings['did_image'];
164
+
} else {
165
+
$did_image = 'https://create-images-results.d-id.com/api_docs/assets/noelle.jpeg';
166
+
}
167
+
if (isset($aiomatic_Chatbot_Settings['did_height'])) {
168
+
$did_height = $aiomatic_Chatbot_Settings['did_height'];
169
+
} else {
170
+
$did_height = '300';
171
+
}
172
+
if (isset($aiomatic_Chatbot_Settings['did_width'])) {
173
+
$did_width = $aiomatic_Chatbot_Settings['did_width'];
174
+
} else {
175
+
$did_width = '300';
176
+
}
177
+
if (isset($aiomatic_Chatbot_Settings['did_voice'])) {
178
+
$did_voice = $aiomatic_Chatbot_Settings['did_voice'];
179
+
} else {
180
+
$did_voice = 'microsoft:en-US-JennyNeural:Cheerful';
181
+
}
182
+
if (isset($aiomatic_Chatbot_Settings['google_voice'])) {
183
+
$google_voice = $aiomatic_Chatbot_Settings['google_voice'];
184
+
} else {
185
+
$google_voice = 'en-US';
186
+
}
187
+
if (isset($aiomatic_Chatbot_Settings['voice_pitch'])) {
188
+
$voice_pitch = $aiomatic_Chatbot_Settings['voice_pitch'];
189
+
} else {
190
+
$voice_pitch = '0';
191
+
}
192
+
if (isset($aiomatic_Chatbot_Settings['google_voice_model'])) {
193
+
$google_voice_model = $aiomatic_Chatbot_Settings['google_voice_model'];
194
+
} else {
195
+
$google_voice_model = 'default';
196
+
}
197
+
if (isset($aiomatic_Chatbot_Settings['voice_speed'])) {
198
+
$voice_speed = $aiomatic_Chatbot_Settings['voice_speed'];
199
+
} else {
200
+
$voice_speed = '1';
201
+
}
202
+
if (isset($aiomatic_Chatbot_Settings['audio_profile'])) {
203
+
$audio_profile = $aiomatic_Chatbot_Settings['audio_profile'];
204
+
} else {
205
+
$audio_profile = 'en-US';
206
+
}
207
+
if (isset($aiomatic_Chatbot_Settings['chatbot_text_speech'])) {
208
+
$chatbot_text_speech = $aiomatic_Chatbot_Settings['chatbot_text_speech'];
209
+
} else {
210
+
$chatbot_text_speech = '';
211
+
}
212
+
if (isset($aiomatic_Chatbot_Settings['azure_voice'])) {
213
+
$azure_voice = $aiomatic_Chatbot_Settings['azure_voice'];
214
+
} else {
215
+
$azure_voice = 'en-US-AvaMultilingualNeural';
216
+
}
217
+
if (isset($aiomatic_Chatbot_Settings['azure_voice_profile'])) {
218
+
$azure_voice_profile = $aiomatic_Chatbot_Settings['azure_voice_profile'];
219
+
} else {
220
+
$azure_voice_profile = '';
221
+
}
222
+
if (isset($aiomatic_Chatbot_Settings['azure_private_endpoint'])) {
223
+
$azure_private_endpoint = $aiomatic_Chatbot_Settings['azure_private_endpoint'];
224
+
} else {
225
+
$azure_private_endpoint = '';
226
+
}
227
+
if (isset($aiomatic_Chatbot_Settings['azure_voice_endpoint'])) {
228
+
$azure_voice_endpoint = $aiomatic_Chatbot_Settings['azure_voice_endpoint'];
229
+
} else {
230
+
$azure_voice_endpoint = '';
231
+
}
232
+
if (isset($aiomatic_Chatbot_Settings['azure_region'])) {
233
+
$azure_region = $aiomatic_Chatbot_Settings['azure_region'];
234
+
} else {
235
+
$azure_region = 'westus2';
236
+
}
237
+
if (isset($aiomatic_Chatbot_Settings['canvas_avatar_width'])) {
238
+
$canvas_avatar_width = $aiomatic_Chatbot_Settings['canvas_avatar_width'];
239
+
} else {
240
+
$canvas_avatar_width = '1200px';
241
+
}
242
+
if (isset($aiomatic_Chatbot_Settings['azure_character'])) {
243
+
$azure_character = $aiomatic_Chatbot_Settings['azure_character'];
244
+
} else {
245
+
$azure_character = 'lisa';
246
+
}
247
+
if (isset($aiomatic_Chatbot_Settings['azure_character_style'])) {
248
+
$azure_character_style = $aiomatic_Chatbot_Settings['azure_character_style'];
249
+
} else {
250
+
$azure_character_style = 'casual-sitting';
251
+
}
252
+
if (isset($aiomatic_Chatbot_Settings['free_voice'])) {
253
+
$free_voice = $aiomatic_Chatbot_Settings['free_voice'];
254
+
} else {
255
+
$free_voice = '';
256
+
}
257
+
if (isset($aiomatic_Chatbot_Settings['eleven_voice'])) {
258
+
$eleven_voice = $aiomatic_Chatbot_Settings['eleven_voice'];
259
+
} else {
260
+
$eleven_voice = '';
261
+
}
262
+
if (isset($aiomatic_Chatbot_Settings['voice_similarity_boost'])) {
263
+
$voice_similarity_boost = $aiomatic_Chatbot_Settings['voice_similarity_boost'];
264
+
} else {
265
+
$voice_similarity_boost = '';
266
+
}
267
+
if (isset($aiomatic_Chatbot_Settings['voice_style'])) {
268
+
$voice_style = $aiomatic_Chatbot_Settings['voice_style'];
269
+
} else {
270
+
$voice_style = '';
271
+
}
272
+
if (isset($aiomatic_Chatbot_Settings['speaker_boost'])) {
273
+
$speaker_boost = $aiomatic_Chatbot_Settings['speaker_boost'];
274
+
} else {
275
+
$speaker_boost = '';
276
+
}
277
+
if (isset($aiomatic_Chatbot_Settings['open_model_id'])) {
278
+
$open_model_id = $aiomatic_Chatbot_Settings['open_model_id'];
279
+
} else {
280
+
$open_model_id = '';
281
+
}
282
+
if (isset($aiomatic_Chatbot_Settings['open_voice'])) {
283
+
$open_voice = $aiomatic_Chatbot_Settings['open_voice'];
284
+
} else {
285
+
$open_voice = '';
286
+
}
287
+
if (isset($aiomatic_Chatbot_Settings['open_format'])) {
288
+
$open_format = $aiomatic_Chatbot_Settings['open_format'];
289
+
} else {
290
+
$open_format = '';
291
+
}
292
+
if (isset($aiomatic_Chatbot_Settings['open_speed'])) {
293
+
$open_speed = $aiomatic_Chatbot_Settings['open_speed'];
294
+
} else {
295
+
$open_speed = '';
296
+
}
297
+
if (isset($aiomatic_Chatbot_Settings['voice_stability'])) {
298
+
$voice_stability = $aiomatic_Chatbot_Settings['voice_stability'];
299
+
} else {
300
+
$voice_stability = '';
301
+
}
302
+
if (isset($aiomatic_Chatbot_Settings['eleven_model_id'])) {
303
+
$eleven_model_id = $aiomatic_Chatbot_Settings['eleven_model_id'];
304
+
} else {
305
+
$eleven_model_id = '';
306
+
}
307
+
if (isset($aiomatic_Chatbot_Settings['eleven_voice_custom'])) {
308
+
$eleven_voice_custom = $aiomatic_Chatbot_Settings['eleven_voice_custom'];
309
+
} else {
310
+
$eleven_voice_custom = '';
311
+
}
312
+
if (isset($aiomatic_Chatbot_Settings['width'])) {
313
+
$width = $aiomatic_Chatbot_Settings['width'];
314
+
} else {
315
+
$width = '';
316
+
}
317
+
if (isset($aiomatic_Chatbot_Settings['height'])) {
318
+
$height = $aiomatic_Chatbot_Settings['height'];
319
+
} else {
320
+
$height = '';
321
+
}
322
+
if (isset($aiomatic_Chatbot_Settings['minheight'])) {
323
+
$minheight = $aiomatic_Chatbot_Settings['minheight'];
324
+
} else {
325
+
$minheight = '';
326
+
}
327
+
if (isset($aiomatic_Chatbot_Settings['topavatar_width'])) {
328
+
$topavatar_width = $aiomatic_Chatbot_Settings['topavatar_width'];
329
+
} else {
330
+
$topavatar_width = '';
331
+
}
332
+
if (isset($aiomatic_Chatbot_Settings['topavatar_height'])) {
333
+
$topavatar_height = $aiomatic_Chatbot_Settings['topavatar_height'];
334
+
} else {
335
+
$topavatar_height = '';
336
+
}
337
+
if (isset($aiomatic_Chatbot_Settings['convavatar_height'])) {
338
+
$convavatar_height = $aiomatic_Chatbot_Settings['convavatar_height'];
339
+
} else {
340
+
$convavatar_height = '';
341
+
}
342
+
if (isset($aiomatic_Chatbot_Settings['convavatar_width'])) {
343
+
$convavatar_width = $aiomatic_Chatbot_Settings['convavatar_width'];
344
+
} else {
345
+
$convavatar_width = '';
346
+
}
347
+
if (isset($aiomatic_Chatbot_Settings['custom_header'])) {
348
+
$custom_header = $aiomatic_Chatbot_Settings['custom_header'];
349
+
} else {
350
+
$custom_header = '';
351
+
}
352
+
if (isset($aiomatic_Chatbot_Settings['custom_footer'])) {
353
+
$custom_footer = $aiomatic_Chatbot_Settings['custom_footer'];
354
+
} else {
355
+
$custom_footer = '';
356
+
}
357
+
if (isset($aiomatic_Chatbot_Settings['custom_css'])) {
358
+
$custom_css = $aiomatic_Chatbot_Settings['custom_css'];
359
+
} else {
360
+
$custom_css = '';
361
+
}
362
+
if (isset($aiomatic_Chatbot_Settings['placeholder'])) {
363
+
$placeholder = $aiomatic_Chatbot_Settings['placeholder'];
364
+
} else {
365
+
$placeholder = '';
366
+
}
367
+
if (isset($aiomatic_Chatbot_Settings['submit'])) {
368
+
$submit = $aiomatic_Chatbot_Settings['submit'];
369
+
} else {
370
+
$submit = '';
371
+
}
372
+
if (isset($aiomatic_Chatbot_Settings['submit_image'])) {
373
+
$submit_image = $aiomatic_Chatbot_Settings['submit_image'];
374
+
} else {
375
+
$submit_image = '';
376
+
}
377
+
if (isset($aiomatic_Chatbot_Settings['submit_full'])) {
378
+
$submit_full = $aiomatic_Chatbot_Settings['submit_full'];
379
+
} else {
380
+
$submit_full = '';
381
+
}
382
+
if (isset($aiomatic_Chatbot_Settings['compliance'])) {
383
+
$compliance = $aiomatic_Chatbot_Settings['compliance'];
384
+
} else {
385
+
$compliance = '';
386
+
}
387
+
if (isset($aiomatic_Chatbot_Settings['select_prompt'])) {
388
+
$select_prompt = $aiomatic_Chatbot_Settings['select_prompt'];
389
+
} else {
390
+
$select_prompt = '';
391
+
}
392
+
if (isset($aiomatic_Chatbot_Settings['upload_pdf'])) {
393
+
$upload_pdf = $aiomatic_Chatbot_Settings['upload_pdf'];
394
+
} else {
395
+
$upload_pdf = '';
396
+
}
397
+
if (isset($aiomatic_Chatbot_Settings['pdf_page'])) {
398
+
$pdf_page = $aiomatic_Chatbot_Settings['pdf_page'];
399
+
} else {
400
+
$pdf_page = '';
401
+
}
402
+
if (isset($aiomatic_Chatbot_Settings['pdf_character'])) {
403
+
$pdf_character = $aiomatic_Chatbot_Settings['pdf_character'];
404
+
} else {
405
+
$pdf_character = '';
406
+
}
407
+
if (isset($aiomatic_Chatbot_Settings['pdf_ok'])) {
408
+
$pdf_ok = $aiomatic_Chatbot_Settings['pdf_ok'];
409
+
} else {
410
+
$pdf_ok = '';
411
+
}
412
+
if (isset($aiomatic_Chatbot_Settings['pdf_end'])) {
413
+
$pdf_end = $aiomatic_Chatbot_Settings['pdf_end'];
414
+
} else {
415
+
$pdf_end = '';
416
+
}
417
+
if (isset($aiomatic_Chatbot_Settings['pdf_fail'])) {
418
+
$pdf_fail = $aiomatic_Chatbot_Settings['pdf_fail'];
419
+
} else {
420
+
$pdf_fail = '';
421
+
}
422
+
if (isset($aiomatic_Chatbot_Settings['file_expiration_pdf'])) {
423
+
$file_expiration_pdf = $aiomatic_Chatbot_Settings['file_expiration_pdf'];
424
+
} else {
425
+
$file_expiration_pdf = '';
426
+
}
427
+
if (isset($aiomatic_Chatbot_Settings['background'])) {
428
+
$background = $aiomatic_Chatbot_Settings['background'];
429
+
} else {
430
+
$background = '#f7f7f9';
431
+
}
432
+
if (isset($aiomatic_Chatbot_Settings['general_background'])) {
433
+
$general_background = $aiomatic_Chatbot_Settings['general_background'];
434
+
} else {
435
+
$general_background = '#ffffff';
436
+
}
437
+
if (isset($aiomatic_Chatbot_Settings['user_font_color'])) {
438
+
$user_font_color = $aiomatic_Chatbot_Settings['user_font_color'];
439
+
} else {
440
+
$user_font_color = 'white';
441
+
}
442
+
if (isset($aiomatic_Chatbot_Settings['user_background_color'])) {
443
+
$user_background_color = $aiomatic_Chatbot_Settings['user_background_color'];
444
+
} else {
445
+
$user_background_color = '#0084ff';
446
+
}
447
+
if (isset($aiomatic_Chatbot_Settings['ai_font_color'])) {
448
+
$ai_font_color = $aiomatic_Chatbot_Settings['ai_font_color'];
449
+
} else {
450
+
$ai_font_color = 'black';
451
+
}
452
+
if (isset($aiomatic_Chatbot_Settings['ai_background_color'])) {
453
+
$ai_background_color = $aiomatic_Chatbot_Settings['ai_background_color'];
454
+
} else {
455
+
$ai_background_color = '#f0f0f0';
456
+
}
457
+
if (isset($aiomatic_Chatbot_Settings['input_border_color'])) {
458
+
$input_border_color = $aiomatic_Chatbot_Settings['input_border_color'];
459
+
} else {
460
+
$input_border_color = '#e1e3e6';
461
+
}
462
+
if (isset($aiomatic_Chatbot_Settings['input_text_color'])) {
463
+
$input_text_color = $aiomatic_Chatbot_Settings['input_text_color'];
464
+
} else {
465
+
$input_text_color = '#000000';
466
+
}
467
+
if (isset($aiomatic_Chatbot_Settings['persona_name_color'])) {
468
+
$persona_name_color = $aiomatic_Chatbot_Settings['persona_name_color'];
469
+
} else {
470
+
$persona_name_color = '#3c434a';
471
+
}
472
+
if (isset($aiomatic_Chatbot_Settings['persona_role_color'])) {
473
+
$persona_role_color = $aiomatic_Chatbot_Settings['persona_role_color'];
474
+
} else {
475
+
$persona_role_color = '#728096';
476
+
}
477
+
if (isset($aiomatic_Chatbot_Settings['input_placeholder_color'])) {
478
+
$input_placeholder_color = $aiomatic_Chatbot_Settings['input_placeholder_color'];
479
+
} else {
480
+
$input_placeholder_color = '#333333';
481
+
}
482
+
if (isset($aiomatic_Chatbot_Settings['submit_color'])) {
483
+
$submit_color = $aiomatic_Chatbot_Settings['submit_color'];
484
+
} else {
485
+
$submit_color = '#55a7e2';
486
+
}
487
+
if (isset($aiomatic_Chatbot_Settings['voice_color'])) {
488
+
$voice_color = $aiomatic_Chatbot_Settings['voice_color'];
489
+
} else {
490
+
$voice_color = '#55a7e2';
491
+
}
492
+
if (isset($aiomatic_Chatbot_Settings['voice_color_activated'])) {
493
+
$voice_color_activated = $aiomatic_Chatbot_Settings['voice_color_activated'];
494
+
} else {
495
+
$voice_color_activated = '#55a7e2';
496
+
}
497
+
if (isset($aiomatic_Chatbot_Settings['submit_text_color'])) {
498
+
$submit_text_color = $aiomatic_Chatbot_Settings['submit_text_color'];
499
+
} else {
500
+
$submit_text_color = '#ffffff';
501
+
}
502
+
if (isset($aiomatic_Chatbot_Settings['enable_moderation'])) {
503
+
$enable_moderation = $aiomatic_Chatbot_Settings['enable_moderation'];
504
+
} else {
505
+
$enable_moderation = '';
506
+
}
507
+
if (isset($aiomatic_Chatbot_Settings['blocked_words'])) {
508
+
$blocked_words = $aiomatic_Chatbot_Settings['blocked_words'];
509
+
} else {
510
+
$blocked_words = '';
511
+
}
512
+
if (isset($aiomatic_Chatbot_Settings['moderation_model'])) {
513
+
$moderation_model = $aiomatic_Chatbot_Settings['moderation_model'];
514
+
} else {
515
+
$moderation_model = '';
516
+
}
517
+
if (isset($aiomatic_Chatbot_Settings['flagged_message'])) {
518
+
$flagged_message = $aiomatic_Chatbot_Settings['flagged_message'];
519
+
} else {
520
+
$flagged_message = '';
521
+
}
522
+
if (isset($aiomatic_Chatbot_Settings['enable_copy'])) {
523
+
$enable_copy = $aiomatic_Chatbot_Settings['enable_copy'];
524
+
} else {
525
+
$enable_copy = '';
526
+
}
527
+
if (isset($aiomatic_Chatbot_Settings['chat_editing'])) {
528
+
$chat_editing = $aiomatic_Chatbot_Settings['chat_editing'];
529
+
} else {
530
+
$chat_editing = 'disabled';
531
+
}
532
+
if (isset($aiomatic_Chatbot_Settings['enable_html'])) {
533
+
$enable_html = $aiomatic_Chatbot_Settings['enable_html'];
534
+
} else {
535
+
$enable_html = '';
536
+
}
537
+
if (isset($aiomatic_Chatbot_Settings['disable_modern_chat'])) {
538
+
$disable_modern_chat = $aiomatic_Chatbot_Settings['disable_modern_chat'];
539
+
} else {
540
+
$disable_modern_chat = '';
541
+
}
542
+
if (isset($aiomatic_Chatbot_Settings['allow_stream_stop'])) {
543
+
$allow_stream_stop = $aiomatic_Chatbot_Settings['allow_stream_stop'];
544
+
} else {
545
+
$allow_stream_stop = '';
546
+
}
547
+
if (isset($aiomatic_Chatbot_Settings['strip_js'])) {
548
+
$strip_js = $aiomatic_Chatbot_Settings['strip_js'];
549
+
} else {
550
+
$strip_js = '';
551
+
}
552
+
if (isset($aiomatic_Chatbot_Settings['scroll_bot'])) {
553
+
$scroll_bot = $aiomatic_Chatbot_Settings['scroll_bot'];
554
+
} else {
555
+
$scroll_bot = '';
556
+
}
557
+
if (isset($aiomatic_Chatbot_Settings['chat_waveform'])) {
558
+
$chat_waveform = $aiomatic_Chatbot_Settings['chat_waveform'];
559
+
} else {
560
+
$chat_waveform = '';
561
+
}
562
+
if (isset($aiomatic_Chatbot_Settings['waveform_color'])) {
563
+
$waveform_color = $aiomatic_Chatbot_Settings['waveform_color'];
564
+
} else {
565
+
$waveform_color = '';
566
+
}
567
+
if (isset($aiomatic_Chatbot_Settings['send_message_sound'])) {
568
+
$send_message_sound = $aiomatic_Chatbot_Settings['send_message_sound'];
569
+
} else {
570
+
$send_message_sound = '';
571
+
}
572
+
if (isset($aiomatic_Chatbot_Settings['receive_message_sound'])) {
573
+
$receive_message_sound = $aiomatic_Chatbot_Settings['receive_message_sound'];
574
+
} else {
575
+
$receive_message_sound = '';
576
+
}
577
+
if (isset($aiomatic_Chatbot_Settings['response_delay'])) {
578
+
$response_delay = $aiomatic_Chatbot_Settings['response_delay'];
579
+
} else {
580
+
$response_delay = '';
581
+
}
582
+
if (isset($aiomatic_Chatbot_Settings['typewriter_delay'])) {
583
+
$typewriter_delay = $aiomatic_Chatbot_Settings['typewriter_delay'];
584
+
} else {
585
+
$typewriter_delay = '50';
586
+
}
587
+
if (isset($aiomatic_Chatbot_Settings['instant_response'])) {
588
+
$instant_response = $aiomatic_Chatbot_Settings['instant_response'];
589
+
} else {
590
+
$instant_response = '';
591
+
}
592
+
if (isset($aiomatic_Chatbot_Settings['voice_input'])) {
593
+
$voice_input = $aiomatic_Chatbot_Settings['voice_input'];
594
+
} else {
595
+
$voice_input = '';
596
+
}
597
+
if (isset($aiomatic_Chatbot_Settings['auto_submit_voice'])) {
598
+
$auto_submit_voice = $aiomatic_Chatbot_Settings['auto_submit_voice'];
599
+
} else {
600
+
$auto_submit_voice = '';
601
+
}
602
+
if (isset($aiomatic_Chatbot_Settings['chat_download_format'])) {
603
+
$chat_download_format = $aiomatic_Chatbot_Settings['chat_download_format'];
604
+
} else {
605
+
$chat_download_format = '';
606
+
}
607
+
if (isset($aiomatic_Chatbot_Settings['chat_preppend_text'])) {
608
+
$chat_preppend_text = $aiomatic_Chatbot_Settings['chat_preppend_text'];
609
+
} else {
610
+
$chat_preppend_text = '';
611
+
}
612
+
if (isset($aiomatic_Chatbot_Settings['user_message_preppend'])) {
613
+
$user_message_preppend = $aiomatic_Chatbot_Settings['user_message_preppend'];
614
+
} else {
615
+
$user_message_preppend = '';
616
+
}
617
+
if (isset($aiomatic_Chatbot_Settings['ai_message_preppend'])) {
618
+
$ai_message_preppend = $aiomatic_Chatbot_Settings['ai_message_preppend'];
619
+
} else {
620
+
$ai_message_preppend = '';
621
+
}
622
+
if (isset($aiomatic_Chatbot_Settings['ai_role'])) {
623
+
$ai_role = $aiomatic_Chatbot_Settings['ai_role'];
624
+
} else {
625
+
$ai_role = '';
626
+
}
627
+
if (isset($aiomatic_Chatbot_Settings['ai_first_message'])) {
628
+
$ai_first_message = $aiomatic_Chatbot_Settings['ai_first_message'];
629
+
} else {
630
+
$ai_first_message = '';
631
+
}
632
+
if (isset($aiomatic_Chatbot_Settings['ai_avatar'])) {
633
+
$ai_avatar = $aiomatic_Chatbot_Settings['ai_avatar'];
634
+
} else {
635
+
$ai_avatar = '';
636
+
}
637
+
if (isset($aiomatic_Chatbot_Settings['user_avatar'])) {
638
+
$user_avatar = $aiomatic_Chatbot_Settings['user_avatar'];
639
+
} else {
640
+
$user_avatar = '';
641
+
}
642
+
if (isset($aiomatic_Chatbot_Settings['chat_mode'])) {
643
+
$chat_mode = $aiomatic_Chatbot_Settings['chat_mode'];
644
+
} else {
645
+
$chat_mode = '';
646
+
}
647
+
if (isset($aiomatic_Chatbot_Settings['chat_model'])) {
648
+
$chat_model = $aiomatic_Chatbot_Settings['chat_model'];
649
+
} else {
650
+
$chat_model = aiomatic_get_default_model_name($aiomatic_Main_Settings);
651
+
}
652
+
if (isset($aiomatic_Chatbot_Settings['assistant_id'])) {
653
+
$assistant_id = $aiomatic_Chatbot_Settings['assistant_id'];
654
+
} else {
655
+
$assistant_id = '';
656
+
}
657
+
if (isset($aiomatic_Chatbot_Settings['enable_vision'])) {
658
+
$enable_vision = $aiomatic_Chatbot_Settings['enable_vision'];
659
+
} else {
660
+
$enable_vision = 'off';
661
+
}
662
+
if (isset($aiomatic_Chatbot_Settings['enable_file_uploads'])) {
663
+
$enable_file_uploads = $aiomatic_Chatbot_Settings['enable_file_uploads'];
664
+
} else {
665
+
$enable_file_uploads = 'off';
666
+
}
667
+
if (isset($aiomatic_Chatbot_Settings['persistent'])) {
668
+
$persistent = $aiomatic_Chatbot_Settings['persistent'];
669
+
} else {
670
+
$persistent = '';
671
+
}
672
+
if (isset($aiomatic_Chatbot_Settings['persistent_guests'])) {
673
+
$persistent_guests = $aiomatic_Chatbot_Settings['persistent_guests'];
674
+
} else {
675
+
$persistent_guests = '';
676
+
}
677
+
if (isset($aiomatic_Chatbot_Settings['max_chat_log_login'])) {
678
+
$max_chat_log_login = $aiomatic_Chatbot_Settings['max_chat_log_login'];
679
+
} else {
680
+
$max_chat_log_login = '';
681
+
}
682
+
if (isset($aiomatic_Chatbot_Settings['remember_chat_transient'])) {
683
+
$remember_chat_transient = $aiomatic_Chatbot_Settings['remember_chat_transient'];
684
+
} else {
685
+
$remember_chat_transient = '';
686
+
}
687
+
if (isset($aiomatic_Chatbot_Settings['max_chat_log_not_login'])) {
688
+
$max_chat_log_not_login = $aiomatic_Chatbot_Settings['max_chat_log_not_login'];
689
+
} else {
690
+
$max_chat_log_not_login = '';
691
+
}
692
+
if (isset($aiomatic_Chatbot_Settings['prompt_templates'])) {
693
+
$prompt_templates = $aiomatic_Chatbot_Settings['prompt_templates'];
694
+
} else {
695
+
$prompt_templates = '';
696
+
}
697
+
if (isset($aiomatic_Chatbot_Settings['prompt_editable'])) {
698
+
$prompt_editable = $aiomatic_Chatbot_Settings['prompt_editable'];
699
+
} else {
700
+
$prompt_editable = '';
701
+
}
702
+
if (isset($aiomatic_Chatbot_Settings['updown_navigate'])) {
703
+
$updown_navigate = $aiomatic_Chatbot_Settings['updown_navigate'];
704
+
} else {
705
+
$updown_navigate = '';
706
+
}
707
+
if (isset($aiomatic_Chatbot_Settings['markdown_parse'])) {
708
+
$markdown_parse = $aiomatic_Chatbot_Settings['markdown_parse'];
709
+
} else {
710
+
$markdown_parse = '';
711
+
}
712
+
if (isset($aiomatic_Chatbot_Settings['katex_parse'])) {
713
+
$katex_parse = $aiomatic_Chatbot_Settings['katex_parse'];
714
+
} else {
715
+
$katex_parse = 'off';
716
+
}
717
+
if (isset($aiomatic_Chatbot_Settings['file_expiration'])) {
718
+
$file_expiration = $aiomatic_Chatbot_Settings['file_expiration'];
719
+
} else {
720
+
$file_expiration = '';
721
+
}
722
+
if (isset($aiomatic_Chatbot_Settings['image_chat_size'])) {
723
+
$image_chat_size = $aiomatic_Chatbot_Settings['image_chat_size'];
724
+
} else {
725
+
$image_chat_size = '512x512';
726
+
}
727
+
if (isset($aiomatic_Chatbot_Settings['image_chat_model'])) {
728
+
$image_chat_model = $aiomatic_Chatbot_Settings['image_chat_model'];
729
+
} else {
730
+
$image_chat_model = 'dalle2';
731
+
}
732
+
if (isset($aiomatic_Chatbot_Settings['show_gdpr'])) {
733
+
$show_gdpr = $aiomatic_Chatbot_Settings['show_gdpr'];
734
+
} else {
735
+
$show_gdpr = '';
736
+
}
737
+
if (isset($aiomatic_Chatbot_Settings['gdpr_notice'])) {
738
+
$gdpr_notice = $aiomatic_Chatbot_Settings['gdpr_notice'];
739
+
} else {
740
+
$gdpr_notice = "By using this chatbot, you consent to the collection and use of your data as outlined in our <a href='%%privacy_policy_url%%' target='_blank'>Privacy Policy</a>. Your data will only be used to assist with your inquiry.";
741
+
}
742
+
if (isset($aiomatic_Chatbot_Settings['gdpr_checkbox'])) {
743
+
$gdpr_checkbox = $aiomatic_Chatbot_Settings['gdpr_checkbox'];
744
+
} else {
745
+
$gdpr_checkbox = "I agree to the terms.";
746
+
}
747
+
if (isset($aiomatic_Chatbot_Settings['gdpr_button'])) {
748
+
$gdpr_button = $aiomatic_Chatbot_Settings['gdpr_button'];
749
+
} else {
750
+
$gdpr_button = "Start chatting";
751
+
}
752
+
if (isset($aiomatic_Chatbot_Settings['remote_chat'])) {
753
+
$remote_chat = $aiomatic_Chatbot_Settings['remote_chat'];
754
+
} else {
755
+
$remote_chat = '';
756
+
}
757
+
if (isset($aiomatic_Chatbot_Settings['allow_chatbot_site'])) {
758
+
$allow_chatbot_site = $aiomatic_Chatbot_Settings['allow_chatbot_site'];
759
+
} else {
760
+
$allow_chatbot_site = '';
761
+
}
762
+
if (isset($aiomatic_Chatbot_Settings['user_token_cap_per_day'])) {
763
+
$user_token_cap_per_day = $aiomatic_Chatbot_Settings['user_token_cap_per_day'];
764
+
} else {
765
+
$user_token_cap_per_day = '';
766
+
}
767
+
if (isset($aiomatic_Chatbot_Settings['god_whitelisted_functions'])) {
768
+
$god_whitelisted_functions = $aiomatic_Chatbot_Settings['god_whitelisted_functions'];
769
+
} else {
770
+
$god_whitelisted_functions = '';
771
+
}
772
+
if (isset($aiomatic_Chatbot_Settings['god_blacklisted_functions'])) {
773
+
$god_blacklisted_functions = $aiomatic_Chatbot_Settings['god_blacklisted_functions'];
774
+
} else {
775
+
$god_blacklisted_functions = '';
776
+
}
777
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_wp'])) {
778
+
$god_mode_enable_wp = $aiomatic_Chatbot_Settings['god_mode_enable_wp'];
779
+
} else {
780
+
$god_mode_enable_wp = '';
781
+
}
782
+
if (isset($aiomatic_Chatbot_Settings['database_command_types'])) {
783
+
$database_command_types = $aiomatic_Chatbot_Settings['database_command_types'];
784
+
} else {
785
+
$database_command_types = array();
786
+
}
787
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_dalle'])) {
788
+
$god_mode_enable_dalle = $aiomatic_Chatbot_Settings['god_mode_enable_dalle'];
789
+
} else {
790
+
$god_mode_enable_dalle = '';
791
+
}
792
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_chart'])) {
793
+
$god_mode_enable_chart = $aiomatic_Chatbot_Settings['god_mode_enable_chart'];
794
+
} else {
795
+
$god_mode_enable_chart = '';
796
+
}
797
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_end'])) {
798
+
$god_mode_enable_end = $aiomatic_Chatbot_Settings['god_mode_enable_end'];
799
+
} else {
800
+
$god_mode_enable_end = '';
801
+
}
802
+
if (isset($aiomatic_Chatbot_Settings['additional_bots'])) {
803
+
$additional_bots = $aiomatic_Chatbot_Settings['additional_bots'];
804
+
} else {
805
+
$additional_bots = array();
806
+
}
807
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_stable'])) {
808
+
$god_mode_enable_stable = $aiomatic_Chatbot_Settings['god_mode_enable_stable'];
809
+
} else {
810
+
$god_mode_enable_stable = '';
811
+
}
812
+
if (isset($aiomatic_Chatbot_Settings['strip_botname'])) {
813
+
$strip_botname = $aiomatic_Chatbot_Settings['strip_botname'];
814
+
} else {
815
+
$strip_botname = '';
816
+
}
817
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_midjourney'])) {
818
+
$god_mode_enable_midjourney = $aiomatic_Chatbot_Settings['god_mode_enable_midjourney'];
819
+
} else {
820
+
$god_mode_enable_midjourney = '';
821
+
}
822
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_replicate'])) {
823
+
$god_mode_enable_replicate = $aiomatic_Chatbot_Settings['god_mode_enable_replicate'];
824
+
} else {
825
+
$god_mode_enable_replicate = '';
826
+
}
827
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_ideogram'])) {
828
+
$god_mode_enable_ideogram = $aiomatic_Chatbot_Settings['god_mode_enable_ideogram'];
829
+
} else {
830
+
$god_mode_enable_ideogram = '';
831
+
}
832
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_google_image'])) {
833
+
$god_mode_enable_google_image = $aiomatic_Chatbot_Settings['god_mode_enable_google_image'];
834
+
} else {
835
+
$god_mode_enable_google_image = '';
836
+
}
837
+
if (isset($aiomatic_Chatbot_Settings['ai_image_size_stable'])) {
838
+
$ai_image_size_stable = $aiomatic_Chatbot_Settings['ai_image_size_stable'];
839
+
} else {
840
+
$ai_image_size_stable = '';
841
+
}
842
+
if (isset($aiomatic_Chatbot_Settings['stable_model'])) {
843
+
$stable_model = $aiomatic_Chatbot_Settings['stable_model'];
844
+
} else {
845
+
$stable_model = '';
846
+
}
847
+
if (isset($aiomatic_Chatbot_Settings['ai_image_model'])) {
848
+
$ai_image_model = $aiomatic_Chatbot_Settings['ai_image_model'];
849
+
} else {
850
+
$ai_image_model = '';
851
+
}
852
+
if (isset($aiomatic_Chatbot_Settings['ai_image_size'])) {
853
+
$ai_image_size = $aiomatic_Chatbot_Settings['ai_image_size'];
854
+
} else {
855
+
$ai_image_size = '';
856
+
}
857
+
if (isset($aiomatic_Chatbot_Settings['god_mode_dalle_failed'])) {
858
+
$god_mode_dalle_failed = $aiomatic_Chatbot_Settings['god_mode_dalle_failed'];
859
+
} else {
860
+
$god_mode_dalle_failed = '';
861
+
}
862
+
if (isset($aiomatic_Chatbot_Settings['god_mode_stable_failed'])) {
863
+
$god_mode_stable_failed = $aiomatic_Chatbot_Settings['god_mode_stable_failed'];
864
+
} else {
865
+
$god_mode_stable_failed = '';
866
+
}
867
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_stable_video'])) {
868
+
$god_mode_enable_stable_video = $aiomatic_Chatbot_Settings['god_mode_enable_stable_video'];
869
+
} else {
870
+
$god_mode_enable_stable_video = '';
871
+
}
872
+
if (isset($aiomatic_Chatbot_Settings['ai_video_size_stable'])) {
873
+
$ai_video_size_stable = $aiomatic_Chatbot_Settings['ai_video_size_stable'];
874
+
} else {
875
+
$ai_video_size_stable = '';
876
+
}
877
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_amazon'])) {
878
+
$god_mode_enable_amazon = $aiomatic_Chatbot_Settings['god_mode_enable_amazon'];
879
+
} else {
880
+
$god_mode_enable_amazon = '';
881
+
}
882
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_amazon_details'])) {
883
+
$god_mode_enable_amazon_details = $aiomatic_Chatbot_Settings['god_mode_enable_amazon_details'];
884
+
} else {
885
+
$god_mode_enable_amazon_details = '';
886
+
}
887
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_booking'])) {
888
+
$god_mode_enable_booking = $aiomatic_Chatbot_Settings['god_mode_enable_booking'];
889
+
} else {
890
+
$god_mode_enable_booking = '';
891
+
}
892
+
if (isset($aiomatic_Chatbot_Settings['affiliate_id'])) {
893
+
$affiliate_id = $aiomatic_Chatbot_Settings['affiliate_id'];
894
+
} else {
895
+
$affiliate_id = '';
896
+
}
897
+
if (isset($aiomatic_Chatbot_Settings['target_country'])) {
898
+
$target_country = $aiomatic_Chatbot_Settings['target_country'];
899
+
} else {
900
+
$target_country = '';
901
+
}
902
+
if (isset($aiomatic_Chatbot_Settings['bot_workflow'])) {
903
+
$bot_workflow = $aiomatic_Chatbot_Settings['bot_workflow'];
904
+
} else {
905
+
$bot_workflow = '';
906
+
}
907
+
if (isset($aiomatic_Chatbot_Settings['enable_mcp'])) {
908
+
$enable_mcp = $aiomatic_Chatbot_Settings['enable_mcp'];
909
+
} else {
910
+
$enable_mcp = array();
911
+
}
912
+
if (isset($aiomatic_Chatbot_Settings['listing_template'])) {
913
+
$listing_template = $aiomatic_Chatbot_Settings['listing_template'];
914
+
} else {
915
+
$listing_template = '%%product_counter%%. %%product_title%% - Desciption: %%product_description%% - Link: %%product_url%% - Price: %%product_price%%';
916
+
}
917
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_scraper'])) {
918
+
$god_mode_enable_scraper = $aiomatic_Chatbot_Settings['god_mode_enable_scraper'];
919
+
} else {
920
+
$god_mode_enable_scraper = '';
921
+
}
922
+
if (isset($aiomatic_Chatbot_Settings['scrape_method'])) {
923
+
$scrape_method = $aiomatic_Chatbot_Settings['scrape_method'];
924
+
} else {
925
+
$scrape_method = '0';
926
+
}
927
+
if (isset($aiomatic_Chatbot_Settings['strip_tags'])) {
928
+
$strip_tags = $aiomatic_Chatbot_Settings['strip_tags'];
929
+
} else {
930
+
$strip_tags = '0';
931
+
}
932
+
if (isset($aiomatic_Chatbot_Settings['max_chars'])) {
933
+
$max_chars = $aiomatic_Chatbot_Settings['max_chars'];
934
+
} else {
935
+
$max_chars = '0';
936
+
}
937
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_rss'])) {
938
+
$god_mode_enable_rss = $aiomatic_Chatbot_Settings['god_mode_enable_rss'];
939
+
} else {
940
+
$god_mode_enable_rss = '';
941
+
}
942
+
if (isset($aiomatic_Chatbot_Settings['max_rss_items'])) {
943
+
$max_rss_items = $aiomatic_Chatbot_Settings['max_rss_items'];
944
+
} else {
945
+
$max_rss_items = '5';
946
+
}
947
+
if (isset($aiomatic_Chatbot_Settings['rss_template'])) {
948
+
$rss_template = $aiomatic_Chatbot_Settings['rss_template'];
949
+
} else {
950
+
$rss_template = '[%%item_counter%%]: %%item_title%% - %%item_description%%';
951
+
}
952
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_google'])) {
953
+
$god_mode_enable_google = $aiomatic_Chatbot_Settings['god_mode_enable_google'];
954
+
} else {
955
+
$god_mode_enable_google = '';
956
+
}
957
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_youtube_captions'])) {
958
+
$god_mode_enable_youtube_captions = $aiomatic_Chatbot_Settings['god_mode_enable_youtube_captions'];
959
+
} else {
960
+
$god_mode_enable_youtube_captions = '';
961
+
}
962
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_database'])) {
963
+
$god_mode_enable_database = $aiomatic_Chatbot_Settings['god_mode_enable_database'];
964
+
} else {
965
+
$god_mode_enable_database = '';
966
+
}
967
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_omniblock'])) {
968
+
$god_mode_enable_omniblock = $aiomatic_Chatbot_Settings['god_mode_enable_omniblock'];
969
+
} else {
970
+
$god_mode_enable_omniblock = '';
971
+
}
972
+
if (isset($aiomatic_Chatbot_Settings['god_omniblock_rules'])) {
973
+
$god_omniblock_rules = $aiomatic_Chatbot_Settings['god_omniblock_rules'];
974
+
} else {
975
+
$god_omniblock_rules = '';
976
+
}
977
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_email'])) {
978
+
$god_mode_enable_email = $aiomatic_Chatbot_Settings['god_mode_enable_email'];
979
+
} else {
980
+
$god_mode_enable_email = '';
981
+
}
982
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_webhook'])) {
983
+
$god_mode_enable_webhook = $aiomatic_Chatbot_Settings['god_mode_enable_webhook'];
984
+
} else {
985
+
$god_mode_enable_webhook = '';
986
+
}
987
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_facebook_post'])) {
988
+
$god_mode_enable_facebook_post = $aiomatic_Chatbot_Settings['god_mode_enable_facebook_post'];
989
+
} else {
990
+
$god_mode_enable_facebook_post = '';
991
+
}
992
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_toubiz'])) {
993
+
$god_mode_enable_toubiz = $aiomatic_Chatbot_Settings['god_mode_enable_toubiz'];
994
+
} else {
995
+
$god_mode_enable_toubiz = '';
996
+
}
997
+
if (isset($aiomatic_Chatbot_Settings['facebook_post_select'])) {
998
+
$facebook_post_select = $aiomatic_Chatbot_Settings['facebook_post_select'];
999
+
} else {
1000
+
$facebook_post_select = '';
1001
+
}
1002
+
if (isset($aiomatic_Chatbot_Settings['max_caption_length'])) {
1003
+
$max_caption_length = $aiomatic_Chatbot_Settings['max_caption_length'];
1004
+
} else {
1005
+
$max_caption_length = '';
1006
+
}
1007
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_royalty'])) {
1008
+
$god_mode_enable_royalty = $aiomatic_Chatbot_Settings['god_mode_enable_royalty'];
1009
+
} else {
1010
+
$god_mode_enable_royalty = '';
1011
+
}
1012
+
if (isset($aiomatic_Chatbot_Settings['god_mode_lead_capture'])) {
1013
+
$god_mode_lead_capture = $aiomatic_Chatbot_Settings['god_mode_lead_capture'];
1014
+
} else {
1015
+
$god_mode_lead_capture = '';
1016
+
}
1017
+
if (isset($aiomatic_Chatbot_Settings['god_mode_ai'])) {
1018
+
$god_mode_ai = $aiomatic_Chatbot_Settings['god_mode_ai'];
1019
+
} else {
1020
+
$god_mode_ai = '';
1021
+
}
1022
+
if (isset($aiomatic_Chatbot_Settings['ai_models_recall'])) {
1023
+
$ai_models_recall = $aiomatic_Chatbot_Settings['ai_models_recall'];
1024
+
} else {
1025
+
$ai_models_recall = array();
1026
+
}
1027
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_youtube'])) {
1028
+
$god_mode_enable_youtube = $aiomatic_Chatbot_Settings['god_mode_enable_youtube'];
1029
+
} else {
1030
+
$god_mode_enable_youtube = '';
1031
+
}
1032
+
if (isset($aiomatic_Chatbot_Settings['max_google_items'])) {
1033
+
$max_google_items = $aiomatic_Chatbot_Settings['max_google_items'];
1034
+
} else {
1035
+
$max_google_items = '5';
1036
+
}
1037
+
if (isset($aiomatic_Chatbot_Settings['google_template'])) {
1038
+
$google_template = $aiomatic_Chatbot_Settings['google_template'];
1039
+
} else {
1040
+
$google_template = '[%%item_counter%%]: %%item_title%% - %%item_snippet%%';
1041
+
}
1042
+
if (isset($aiomatic_Chatbot_Settings['sort_results'])) {
1043
+
$sort_results = $aiomatic_Chatbot_Settings['sort_results'];
1044
+
} else {
1045
+
$sort_results = 'none';
1046
+
}
1047
+
if (isset($aiomatic_Chatbot_Settings['max_products'])) {
1048
+
$max_products = $aiomatic_Chatbot_Settings['max_products'];
1049
+
} else {
1050
+
$max_products = '3-4';
1051
+
}
1052
+
if (isset($aiomatic_Chatbot_Settings['god_preview'])) {
1053
+
$god_preview = $aiomatic_Chatbot_Settings['god_preview'];
1054
+
} else {
1055
+
$god_preview = '';
1056
+
}
1057
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_twitter_post'])) {
1058
+
$god_mode_enable_twitter_post = $aiomatic_Chatbot_Settings['god_mode_enable_twitter_post'];
1059
+
} else {
1060
+
$god_mode_enable_twitter_post = '';
1061
+
}
1062
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_threads_post'])) {
1063
+
$god_mode_enable_threads_post = $aiomatic_Chatbot_Settings['god_mode_enable_threads_post'];
1064
+
} else {
1065
+
$god_mode_enable_threads_post = '';
1066
+
}
1067
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_instagram_post'])) {
1068
+
$god_mode_enable_instagram_post = $aiomatic_Chatbot_Settings['god_mode_enable_instagram_post'];
1069
+
} else {
1070
+
$god_mode_enable_instagram_post = '';
1071
+
}
1072
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_pinterest_post'])) {
1073
+
$god_mode_enable_pinterest_post = $aiomatic_Chatbot_Settings['god_mode_enable_pinterest_post'];
1074
+
} else {
1075
+
$god_mode_enable_pinterest_post = '';
1076
+
}
1077
+
if (isset($aiomatic_Chatbot_Settings['pinterest_post_select'])) {
1078
+
$pinterest_post_select = $aiomatic_Chatbot_Settings['pinterest_post_select'];
1079
+
} else {
1080
+
$pinterest_post_select = '';
1081
+
}
1082
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_google_post'])) {
1083
+
$god_mode_enable_google_post = $aiomatic_Chatbot_Settings['god_mode_enable_google_post'];
1084
+
} else {
1085
+
$god_mode_enable_google_post = '';
1086
+
}
1087
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_youtube_post'])) {
1088
+
$god_mode_enable_youtube_post = $aiomatic_Chatbot_Settings['god_mode_enable_youtube_post'];
1089
+
} else {
1090
+
$god_mode_enable_youtube_post = '';
1091
+
}
1092
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_reddit_post'])) {
1093
+
$god_mode_enable_reddit_post = $aiomatic_Chatbot_Settings['god_mode_enable_reddit_post'];
1094
+
} else {
1095
+
$god_mode_enable_reddit_post = '';
1096
+
}
1097
+
if (isset($aiomatic_Chatbot_Settings['subreddits_list'])) {
1098
+
$subreddits_list = $aiomatic_Chatbot_Settings['subreddits_list'];
1099
+
} else {
1100
+
$subreddits_list = '';
1101
+
}
1102
+
if (isset($aiomatic_Chatbot_Settings['god_mode_enable_linkedin_post'])) {
1103
+
$god_mode_enable_linkedin_post = $aiomatic_Chatbot_Settings['god_mode_enable_linkedin_post'];
1104
+
} else {
1105
+
$god_mode_enable_linkedin_post = '';
1106
+
}
1107
+
if (isset($aiomatic_Chatbot_Settings['linkedin_selected_pages'])) {
1108
+
$linkedin_selected_pages = $aiomatic_Chatbot_Settings['linkedin_selected_pages'];
1109
+
} else {
1110
+
$linkedin_selected_pages = '';
1111
+
}
1112
+
if (isset($aiomatic_Chatbot_Settings['business_post_select'])) {
1113
+
$business_post_select = $aiomatic_Chatbot_Settings['business_post_select'];
1114
+
} else {
1115
+
$business_post_select = array();
1116
+
}
1117
+
if (isset($aiomatic_Chatbot_Settings['god_mode_front_end'])) {
1118
+
$god_mode_front_end = $aiomatic_Chatbot_Settings['god_mode_front_end'];
1119
+
} else {
1120
+
$god_mode_front_end = '';
1121
+
}
1122
+
if (isset($aiomatic_Chatbot_Settings['max_input_length'])) {
1123
+
$max_input_length = $aiomatic_Chatbot_Settings['max_input_length'];
1124
+
} else {
1125
+
$max_input_length = '';
1126
+
}
1127
+
if (isset($aiomatic_Chatbot_Settings['max_message_count'])) {
1128
+
$max_message_count = $aiomatic_Chatbot_Settings['max_message_count'];
1129
+
} else {
1130
+
$max_message_count = '';
1131
+
}
1132
+
if (isset($aiomatic_Chatbot_Settings['max_message_context'])) {
1133
+
$max_message_context = $aiomatic_Chatbot_Settings['max_message_context'];
1134
+
} else {
1135
+
$max_message_context = '';
1136
+
}
1137
+
if (isset($aiomatic_Chatbot_Settings['restriction_time'])) {
1138
+
$restriction_time = $aiomatic_Chatbot_Settings['restriction_time'];
1139
+
} else {
1140
+
$restriction_time = '';
1141
+
}
1142
+
if (isset($aiomatic_Chatbot_Settings['restriction_count'])) {
1143
+
$restriction_count = $aiomatic_Chatbot_Settings['restriction_count'];
1144
+
} else {
1145
+
$restriction_count = '';
1146
+
}
1147
+
if (isset($aiomatic_Chatbot_Settings['restriction_message'])) {
1148
+
$restriction_message = $aiomatic_Chatbot_Settings['restriction_message'];
1149
+
} else {
1150
+
$restriction_message = '';
1151
+
}
1152
+
if (isset($aiomatic_Chatbot_Settings['no_empty'])) {
1153
+
$no_empty = $aiomatic_Chatbot_Settings['no_empty'];
1154
+
} else {
1155
+
$no_empty = '';
1156
+
}
1157
+
if (isset($aiomatic_Chatbot_Settings['temperature'])) {
1158
+
$temperature = $aiomatic_Chatbot_Settings['temperature'];
1159
+
} else {
1160
+
$temperature = '1';
1161
+
}
1162
+
if (isset($aiomatic_Chatbot_Settings['top_p'])) {
1163
+
$top_p = $aiomatic_Chatbot_Settings['top_p'];
1164
+
} else {
1165
+
$top_p = '1';
1166
+
}
1167
+
if (isset($aiomatic_Chatbot_Settings['max_tokens'])) {
1168
+
$max_tokens = $aiomatic_Chatbot_Settings['max_tokens'];
1169
+
} else {
1170
+
$max_tokens = '';
1171
+
}
1172
+
if (isset($aiomatic_Chatbot_Settings['presence_penalty'])) {
1173
+
$presence_penalty = $aiomatic_Chatbot_Settings['presence_penalty'];
1174
+
} else {
1175
+
$presence_penalty = '0';
1176
+
}
1177
+
if (isset($aiomatic_Chatbot_Settings['frequency_penalty'])) {
1178
+
$frequency_penalty = $aiomatic_Chatbot_Settings['frequency_penalty'];
1179
+
} else {
1180
+
$frequency_penalty = '0';
1181
+
}
1182
+
if (isset($aiomatic_Chatbot_Settings['store_data'])) {
1183
+
$store_data = $aiomatic_Chatbot_Settings['store_data'];
1184
+
} else {
1185
+
$store_data = '';
1186
+
}
1187
+
if (isset($aiomatic_Chatbot_Settings['enable_front_end'])) {
1188
+
$enable_front_end = $aiomatic_Chatbot_Settings['enable_front_end'];
1189
+
} else {
1190
+
$enable_front_end = '';
1191
+
}
1192
+
if (isset($aiomatic_Chatbot_Settings['custom_global_shortcode'])) {
1193
+
$custom_global_shortcode = $aiomatic_Chatbot_Settings['custom_global_shortcode'];
1194
+
} else {
1195
+
$custom_global_shortcode = '';
1196
+
}
1197
+
if (isset($aiomatic_Chatbot_Settings['window_location'])) {
1198
+
$window_location = $aiomatic_Chatbot_Settings['window_location'];
1199
+
} else {
1200
+
$window_location = '';
1201
+
}
1202
+
if (isset($aiomatic_Chatbot_Settings['page_load_chat'])) {
1203
+
$page_load_chat = $aiomatic_Chatbot_Settings['page_load_chat'];
1204
+
} else {
1205
+
$page_load_chat = '';
1206
+
}
1207
+
if (isset($aiomatic_Chatbot_Settings['page_load_chat_delay'])) {
1208
+
$page_load_chat_delay = $aiomatic_Chatbot_Settings['page_load_chat_delay'];
1209
+
} else {
1210
+
$page_load_chat_delay = '';
1211
+
}
1212
+
if (isset($aiomatic_Chatbot_Settings['page_load_chat_once'])) {
1213
+
$page_load_chat_once = $aiomatic_Chatbot_Settings['page_load_chat_once'];
1214
+
} else {
1215
+
$page_load_chat_once = '';
1216
+
}
1217
+
if (isset($aiomatic_Chatbot_Settings['page_load_chat_urls'])) {
1218
+
$page_load_chat_urls = $aiomatic_Chatbot_Settings['page_load_chat_urls'];
1219
+
} else {
1220
+
$page_load_chat_urls = '';
1221
+
}
1222
+
if (isset($aiomatic_Chatbot_Settings['page_load_chat_message'])) {
1223
+
$page_load_chat_message = $aiomatic_Chatbot_Settings['page_load_chat_message'];
1224
+
} else {
1225
+
$page_load_chat_message = '';
1226
+
}
1227
+
if (isset($aiomatic_Chatbot_Settings['page_exit_chat'])) {
1228
+
$page_exit_chat = $aiomatic_Chatbot_Settings['page_exit_chat'];
1229
+
} else {
1230
+
$page_exit_chat = '';
1231
+
}
1232
+
if (isset($aiomatic_Chatbot_Settings['page_exit_chat_once'])) {
1233
+
$page_exit_chat_once = $aiomatic_Chatbot_Settings['page_exit_chat_once'];
1234
+
} else {
1235
+
$page_exit_chat_once = '';
1236
+
}
1237
+
if (isset($aiomatic_Chatbot_Settings['page_exit_chat_urls'])) {
1238
+
$page_exit_chat_urls = $aiomatic_Chatbot_Settings['page_exit_chat_urls'];
1239
+
} else {
1240
+
$page_exit_chat_urls = '';
1241
+
}
1242
+
if (isset($aiomatic_Chatbot_Settings['page_exit_chat_message'])) {
1243
+
$page_exit_chat_message = $aiomatic_Chatbot_Settings['page_exit_chat_message'];
1244
+
} else {
1245
+
$page_exit_chat_message = '';
1246
+
}
1247
+
if (isset($aiomatic_Chatbot_Settings['page_scroll_chat'])) {
1248
+
$page_scroll_chat = $aiomatic_Chatbot_Settings['page_scroll_chat'];
1249
+
} else {
1250
+
$page_scroll_chat = '';
1251
+
}
1252
+
if (isset($aiomatic_Chatbot_Settings['page_scroll_chat_percent'])) {
1253
+
$page_scroll_chat_percent = $aiomatic_Chatbot_Settings['page_scroll_chat_percent'];
1254
+
} else {
1255
+
$page_scroll_chat_percent = '50';
1256
+
}
1257
+
if (isset($aiomatic_Chatbot_Settings['page_scroll_chat_once'])) {
1258
+
$page_scroll_chat_once = $aiomatic_Chatbot_Settings['page_scroll_chat_once'];
1259
+
} else {
1260
+
$page_scroll_chat_once = '';
1261
+
}
1262
+
if (isset($aiomatic_Chatbot_Settings['page_scroll_chat_urls'])) {
1263
+
$page_scroll_chat_urls = $aiomatic_Chatbot_Settings['page_scroll_chat_urls'];
1264
+
} else {
1265
+
$page_scroll_chat_urls = '';
1266
+
}
1267
+
if (isset($aiomatic_Chatbot_Settings['page_scroll_chat_message'])) {
1268
+
$page_scroll_chat_message = $aiomatic_Chatbot_Settings['page_scroll_chat_message'];
1269
+
} else {
1270
+
$page_scroll_chat_message = '';
1271
+
}
1272
+
if (isset($aiomatic_Chatbot_Settings['page_inactive_chat'])) {
1273
+
$page_inactive_chat = $aiomatic_Chatbot_Settings['page_inactive_chat'];
1274
+
} else {
1275
+
$page_inactive_chat = '';
1276
+
}
1277
+
if (isset($aiomatic_Chatbot_Settings['page_inactive_chat_time'])) {
1278
+
$page_inactive_chat_time = $aiomatic_Chatbot_Settings['page_inactive_chat_time'];
1279
+
} else {
1280
+
$page_inactive_chat_time = '30000';
1281
+
}
1282
+
if (isset($aiomatic_Chatbot_Settings['chatbot_invite_message'])) {
1283
+
$chatbot_invite_message = $aiomatic_Chatbot_Settings['chatbot_invite_message'];
1284
+
} else {
1285
+
$chatbot_invite_message = '30000';
1286
+
}
1287
+
if (isset($aiomatic_Chatbot_Settings['page_inactive_chat_once'])) {
1288
+
$page_inactive_chat_once = $aiomatic_Chatbot_Settings['page_inactive_chat_once'];
1289
+
} else {
1290
+
$page_inactive_chat_once = '';
1291
+
}
1292
+
if (isset($aiomatic_Chatbot_Settings['page_inactive_chat_urls'])) {
1293
+
$page_inactive_chat_urls = $aiomatic_Chatbot_Settings['page_inactive_chat_urls'];
1294
+
} else {
1295
+
$page_inactive_chat_urls = '';
1296
+
}
1297
+
if (isset($aiomatic_Chatbot_Settings['page_inactive_chat_message'])) {
1298
+
$page_inactive_chat_message = $aiomatic_Chatbot_Settings['page_inactive_chat_message'];
1299
+
} else {
1300
+
$page_inactive_chat_message = '';
1301
+
}
1302
+
if (isset($aiomatic_Chatbot_Settings['window_width'])) {
1303
+
$window_width = $aiomatic_Chatbot_Settings['window_width'];
1304
+
} else {
1305
+
$window_width = '';
1306
+
}
1307
+
if (isset($aiomatic_Chatbot_Settings['not_show_urls'])) {
1308
+
$not_show_urls = $aiomatic_Chatbot_Settings['not_show_urls'];
1309
+
} else {
1310
+
$not_show_urls = '';
1311
+
}
1312
+
if (isset($aiomatic_Chatbot_Settings['only_show_urls'])) {
1313
+
$only_show_urls = $aiomatic_Chatbot_Settings['only_show_urls'];
1314
+
} else {
1315
+
$only_show_urls = '';
1316
+
}
1317
+
if (isset($aiomatic_Chatbot_Settings['min_time'])) {
1318
+
$min_time = $aiomatic_Chatbot_Settings['min_time'];
1319
+
} else {
1320
+
$min_time = '';
1321
+
}
1322
+
if (isset($aiomatic_Chatbot_Settings['never_show'])) {
1323
+
$never_show = $aiomatic_Chatbot_Settings['never_show'];
1324
+
} else {
1325
+
$never_show = array();
1326
+
}
1327
+
if (isset($aiomatic_Chatbot_Settings['show_content_wp'])) {
1328
+
$show_content_wp = $aiomatic_Chatbot_Settings['show_content_wp'];
1329
+
} else {
1330
+
$show_content_wp = array();
1331
+
}
1332
+
if (isset($aiomatic_Chatbot_Settings['no_show_content_wp'])) {
1333
+
$no_show_content_wp = $aiomatic_Chatbot_Settings['no_show_content_wp'];
1334
+
} else {
1335
+
$no_show_content_wp = array();
1336
+
}
1337
+
if (isset($aiomatic_Chatbot_Settings['no_show_locales'])) {
1338
+
$no_show_locales = $aiomatic_Chatbot_Settings['no_show_locales'];
1339
+
} else {
1340
+
$no_show_locales = array();
1341
+
}
1342
+
if (isset($aiomatic_Chatbot_Settings['show_locales'])) {
1343
+
$show_locales = $aiomatic_Chatbot_Settings['show_locales'];
1344
+
} else {
1345
+
$show_locales = array();
1346
+
}
1347
+
if (isset($aiomatic_Chatbot_Settings['no_show_roles'])) {
1348
+
$no_show_roles = $aiomatic_Chatbot_Settings['no_show_roles'];
1349
+
} else {
1350
+
$no_show_roles = array();
1351
+
}
1352
+
if (isset($aiomatic_Chatbot_Settings['show_roles'])) {
1353
+
$show_roles = $aiomatic_Chatbot_Settings['show_roles'];
1354
+
} else {
1355
+
$show_roles = array();
1356
+
}
1357
+
if (isset($aiomatic_Chatbot_Settings['show_devices'])) {
1358
+
$show_devices = $aiomatic_Chatbot_Settings['show_devices'];
1359
+
} else {
1360
+
$show_devices = array();
1361
+
}
1362
+
if (isset($aiomatic_Chatbot_Settings['no_show_devices'])) {
1363
+
$no_show_devices = $aiomatic_Chatbot_Settings['no_show_devices'];
1364
+
} else {
1365
+
$no_show_devices = array();
1366
+
}
1367
+
if (isset($aiomatic_Chatbot_Settings['show_oses'])) {
1368
+
$show_oses = $aiomatic_Chatbot_Settings['show_oses'];
1369
+
} else {
1370
+
$show_oses = array();
1371
+
}
1372
+
if (isset($aiomatic_Chatbot_Settings['no_show_oses'])) {
1373
+
$no_show_oses = $aiomatic_Chatbot_Settings['no_show_oses'];
1374
+
} else {
1375
+
$no_show_oses = array();
1376
+
}
1377
+
if (isset($aiomatic_Chatbot_Settings['no_show_browsers'])) {
1378
+
$no_show_browsers = $aiomatic_Chatbot_Settings['no_show_browsers'];
1379
+
} else {
1380
+
$no_show_browsers = array();
1381
+
}
1382
+
if (isset($aiomatic_Chatbot_Settings['show_browsers'])) {
1383
+
$show_browsers = $aiomatic_Chatbot_Settings['show_browsers'];
1384
+
} else {
1385
+
$show_browsers = array();
1386
+
}
1387
+
if (isset($aiomatic_Chatbot_Settings['show_ips'])) {
1388
+
$show_ips = $aiomatic_Chatbot_Settings['show_ips'];
1389
+
} else {
1390
+
$show_ips = '';
1391
+
}
1392
+
if (isset($aiomatic_Chatbot_Settings['no_show_ips'])) {
1393
+
$no_show_ips = $aiomatic_Chatbot_Settings['no_show_ips'];
1394
+
} else {
1395
+
$no_show_ips = '';
1396
+
}
1397
+
if (isset($aiomatic_Chatbot_Settings['always_show'])) {
1398
+
$always_show = $aiomatic_Chatbot_Settings['always_show'];
1399
+
} else {
1400
+
$always_show = array();
1401
+
}
1402
+
if (isset($aiomatic_Chatbot_Settings['max_time'])) {
1403
+
$max_time = $aiomatic_Chatbot_Settings['max_time'];
1404
+
} else {
1405
+
$max_time = '';
1406
+
}
1407
+
if (isset($aiomatic_Chatbot_Settings['chatbot_icon_html'])) {
1408
+
$chatbot_icon_html = $aiomatic_Chatbot_Settings['chatbot_icon_html'];
1409
+
} else {
1410
+
$chatbot_icon_html = '';
1411
+
}
1412
+
if (isset($aiomatic_Chatbot_Settings['open_width'])) {
1413
+
$open_width = $aiomatic_Chatbot_Settings['open_width'];
1414
+
} else {
1415
+
$open_width = '';
1416
+
}
1417
+
if (isset($aiomatic_Chatbot_Settings['chatbot_icon'])) {
1418
+
$chatbot_icon = $aiomatic_Chatbot_Settings['chatbot_icon'];
1419
+
} else {
1420
+
$chatbot_icon = '';
1421
+
}
1422
+
if (isset($aiomatic_Chatbot_Settings['aiomatic_chat_json'])) {
1423
+
$aiomatic_chat_json = $aiomatic_Chatbot_Settings['aiomatic_chat_json'];
1424
+
} else {
1425
+
$aiomatic_chat_json = '';
1426
+
}
1427
+
if (isset($aiomatic_Main_Settings['pinecone_app_id'])) {
1428
+
$pinecone_app_id = $aiomatic_Main_Settings['pinecone_app_id'];
1429
+
} else {
1430
+
$pinecone_app_id = '';
1431
+
}
1432
+
if (isset($aiomatic_Main_Settings['qdrant_app_id'])) {
1433
+
$qdrant_app_id = $aiomatic_Main_Settings['qdrant_app_id'];
1434
+
} else {
1435
+
$qdrant_app_id = '';
1436
+
}
1437
+
$avatar_url = '';
1438
+
if(is_numeric($ai_avatar))
1439
+
{
1440
+
$att_src = wp_get_attachment_image_src( $ai_avatar, 'thumbnail', false );
1441
+
if ( $att_src )
1442
+
{
1443
+
$avatar_url = $att_src[0];
1444
+
}
1445
+
}
1446
+
$avatar_url_user = '';
1447
+
if(is_numeric($user_avatar))
1448
+
{
1449
+
$att_src_user = wp_get_attachment_image_src( $user_avatar, 'thumbnail', false );
1450
+
if ( $att_src_user )
1451
+
{
1452
+
$avatar_url_user = $att_src_user[0];
1453
+
}
1454
+
}
1455
+
if($assistant_id != '')
1456
+
{
1457
+
$assistant_found = false;
1458
+
if(is_array($all_assistants))
1459
+
{
1460
+
foreach($all_assistants as $myassistant)
1461
+
{
1462
+
if ($assistant_id == $myassistant->ID)
1463
+
{
1464
+
$assistant_found = true;
1465
+
}
1466
+
}
1467
+
}
1468
+
if($assistant_found === false)
1469
+
{
1470
+
$assistant_id = '';
1471
+
}
1472
+
}
1473
+
?>
1474
+
<div class="wp-header-end"></div>
1475
+
<div class="wrap gs_popuptype_holder seo_pops">
1476
+
<h2 class="cr_center"><?php echo esc_html__("AI Chatbot", 'aiomatic-automatic-ai-content-writer');?></h2>
1477
+
<nav class="nav-tab-wrapper">
1478
+
<a href="#tab-t" class="nav-tab"><?php echo esc_html__("Tutorial", 'aiomatic-automatic-ai-content-writer');?></a>
1479
+
<a href="#tab-0" class="nav-tab"><?php echo esc_html__("Bot Configuration", 'aiomatic-automatic-ai-content-writer');?></a>
1480
+
<a href="#tab-17" class="nav-tab"><?php echo esc_html__("Multi-Bot Chat", 'aiomatic-automatic-ai-content-writer');?></a>
1481
+
<a href="#tab-10" class="nav-tab"><?php echo esc_html__("Bot Persona Manager", 'aiomatic-automatic-ai-content-writer');?></a>
1482
+
<a href="#tab-18" class="nav-tab"><?php echo esc_html__("Bot Workflows", 'aiomatic-automatic-ai-content-writer');?></a>
1483
+
<a href="#tab-4" class="nav-tab"><?php echo esc_html__("API Parameters", 'aiomatic-automatic-ai-content-writer');?></a>
1484
+
<a href="#tab-12" class="nav-tab"><?php echo esc_html__("User Interface", 'aiomatic-automatic-ai-content-writer');?></a>
1485
+
<a href="#tab-1" class="nav-tab"><?php echo esc_html__("Styling", 'aiomatic-automatic-ai-content-writer');?></a>
1486
+
<a href="#tab-2" class="nav-tab"><?php echo esc_html__("Moderation", 'aiomatic-automatic-ai-content-writer');?></a>
1487
+
<a href="#tab-5" class="nav-tab"><?php echo esc_html__("Global Chatbots", 'aiomatic-automatic-ai-content-writer');?></a>
1488
+
<a href="#tab-11" class="nav-tab"><?php echo esc_html__("Limitations", 'aiomatic-automatic-ai-content-writer');?></a>
1489
+
<a href="#tab-8" class="nav-tab"><?php echo esc_html__("Text-to-Speech/Video", 'aiomatic-automatic-ai-content-writer');?></a>
1490
+
<a href="#tab-13" class="nav-tab"><?php echo esc_html__("PDF Chat", 'aiomatic-automatic-ai-content-writer');?></a>
1491
+
<a href="#tab-7" class="nav-tab"><?php echo esc_html__("Custom Chatbot Builder", 'aiomatic-automatic-ai-content-writer');?></a>
1492
+
<a href="#tab-15" class="nav-tab"><?php echo esc_html__("Remote Chatbot", 'aiomatic-automatic-ai-content-writer');?></a>
1493
+
<a href="#tab-6" class="nav-tab"><?php echo esc_html__("History & Logs", 'aiomatic-automatic-ai-content-writer');?></a>
1494
+
<a href="#tab-16" class="nav-tab"><?php echo esc_html__("Lead Capture", 'aiomatic-automatic-ai-content-writer');?></a>
1495
+
<a href="#tab-19" class="nav-tab"><?php echo esc_html__("MCP Server Connection", 'aiomatic-automatic-ai-content-writer');?></a>
1496
+
<a href="#tab-14" class="nav-tab"><?php echo esc_html__("Extensions", 'aiomatic-automatic-ai-content-writer');?></a>
1497
+
<a href="#tab-3" class="nav-tab"><?php echo esc_html__("More Settings", 'aiomatic-automatic-ai-content-writer');?></a>
1498
+
</nav>
1499
+
<form autocomplete="off" id="myForm" method="post" action="<?php if(is_multisite() && is_network_admin()){echo '../options.php';}else{echo 'options.php';}?>">
1500
+
<div class="cr_autocomplete">
1501
+
<input type="password" id="PreventChromeAutocomplete"
1502
+
name="PreventChromeAutocomplete" autocomplete="address-level4" />
1503
+
</div>
1504
+
<?php
1505
+
settings_fields('aiomatic_option_group4');
1506
+
do_settings_sections('aiomatic_option_group4');
1507
+
if (isset($_GET['settings-updated'])) {
1508
+
?>
1509
+
<div id="message" class="updated">
1510
+
<p class="cr_saved_notif"><strong> <?php echo esc_html__('Settings saved.', 'aiomatic-automatic-ai-content-writer');?></strong></p>
1511
+
</div>
1512
+
<?php
1513
+
}
1514
+
?>
1515
+
<div class="aiomatic_class">
1516
+
<div id="tab-t" class="tab-content">
1517
+
<br/>
1518
+
<h3><?php echo esc_html__("AI Chatbot Configuration Details", 'aiomatic-automatic-ai-content-writer');?></h3>
1519
+
<p><?php echo esc_html__('In this tutorial, I\'ll walk through the process of setting up an AI-powered chatbot on your WordPress website using the Aimogen WordPress plugin. This plugin allows you to integrate AI language models to create a highly customizable chatbot that can interact with your website visitors.', 'aiomatic-automatic-ai-content-writer');?></p>
1520
+
<h4><?php echo esc_html__("Step 1: Customize the Chatbot Behavior", 'aiomatic-automatic-ai-content-writer');?></h3>
1521
+
<p><?php echo esc_html__("In the Aimogen settings page, navigate to the \"AI Chatbot\" menu of the plugin. You will be able to customize the chatbot in the 'Chatbot Customization', 'Chatbot Default Styling', 'Chatbot Settings' and 'Default API Parameters' tabs. Here, you can define how the chatbot will respond to specific user inputs. You can also change the visual style and appearance of the chatbot. Don't forget to always save your changes.", 'aiomatic-automatic-ai-content-writer');?></p>
1522
+
<h4><?php echo esc_html__("Step 2: Add the Chatbot to Your Website", 'aiomatic-automatic-ai-content-writer');?></h3>
1523
+
<p><?php echo esc_html__("You can add the chatbot globally to your site or locally to posts or pages. To add the chatbot locally, you can use the [aimogen-chat-form] shortcode. If you want to add it globally, you need to go to the settings page of the plugin, go to the \"AI Chatbot\" menu of the plugin and navigate to the 'Global Chatbots' tab. Choose where you want the chatbot to appear on your website (e.g., on all front end, back end, except pages where you don't want the chatbot to appear).", 'aiomatic-automatic-ai-content-writer');?></p>
1524
+
<h4><?php echo esc_html__("Step 3: Test the Chatbot", 'aiomatic-automatic-ai-content-writer');?></h3>
1525
+
<p><?php echo esc_html__("Visit your website and look for the chatbot. Interact with the chatbot by typing questions or phrases into the chat window. Verify that the chatbot responds appropriately based on the rules you defined.", 'aiomatic-automatic-ai-content-writer');?></p>
1526
+
<p><?php echo esc_html__("That's it! You've successfully set up an AI-powered chatbot on your WordPress website using the Aimogen plugin. This chatbot can be a valuable tool for engaging with your website visitors, answering frequently asked questions, and providing personalized assistance.", 'aiomatic-automatic-ai-content-writer');?></p>
1527
+
<h3><?php echo esc_html__("AI Chatbot Tutorial Video", 'aiomatic-automatic-ai-content-writer');?></h3>
1528
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
1529
+
?>
1530
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/QCkNkCrFi-o" frameborder="0" allowfullscreen></iframe></div></p>
1531
+
<?php
1532
+
}
1533
+
?>
1534
+
</div>
1535
+
<div id="tab-0" class="tab-content">
1536
+
<table class="widefat">
1537
+
<tr><td>
1538
+
<h2><?php echo esc_html__("Bot AI Model/Assistant Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
1539
+
</td></tr>
1540
+
<tr>
1541
+
<td>
1542
+
<div>
1543
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1544
+
<div class="bws_hidden_help_text cr_min_260px">
1545
+
<?php
1546
+
echo esc_html__("Select the assistant to be used for chatbot. The model used when creating the bot will be used to create the content.", 'aiomatic-automatic-ai-content-writer');
1547
+
?>
1548
+
</div>
1549
+
</div>
1550
+
<b><?php echo esc_html__("Bot Assistant Name (Using This Disables Chatbot Personas):", 'aiomatic-automatic-ai-content-writer');?></b>
1551
+
</td>
1552
+
<td class="cr_min_width_200">
1553
+
<select id="assistant_id" name="aiomatic_Chatbot_Settings[assistant_id]" class="cr_width_full" onchange="assistantChanged();">
1554
+
<?php
1555
+
if($all_assistants === false)
1556
+
{
1557
+
echo '<option val="" selected disabled>' . esc_html__("Only OpenAI API is supported for Assistants API", 'aiomatic-automatic-ai-content-writer') . '</option>';
1558
+
}
1559
+
else
1560
+
{
1561
+
if(count($all_assistants) == 0)
1562
+
{
1563
+
echo '<option val="" selected disabled>' . esc_html__("No Assistans added, go to the plugin's 'AI Assistans' menu to add new assistants!", 'aiomatic-automatic-ai-content-writer') . '</option>';
1564
+
}
1565
+
else
1566
+
{
1567
+
echo '<option value=""';
1568
+
if ($assistant_id == '')
1569
+
{
1570
+
echo " selected";
1571
+
}
1572
+
echo '>' . esc_html__("Don't use assistants, use AI models instead", 'aiomatic-automatic-ai-content-writer') . '</option>';
1573
+
foreach($all_assistants as $myassistant)
1574
+
{
1575
+
echo '<option value="' . esc_html($myassistant->ID) .'"';
1576
+
if ($assistant_id == $myassistant->ID)
1577
+
{
1578
+
echo " selected";
1579
+
}
1580
+
echo '>' . esc_html($myassistant->post_title);
1581
+
echo '</option>';
1582
+
}
1583
+
}
1584
+
}
1585
+
$assistant_model = '';
1586
+
if ($assistant_id != '')
1587
+
{
1588
+
$assist = get_post( $assistant_id );
1589
+
if($assist !== null)
1590
+
{
1591
+
$ai_message_preppend = $assist->post_title;
1592
+
$chat_preppend_text = $assist->post_content;
1593
+
$ai_role = $assist->post_excerpt;
1594
+
$ai_first_message = get_post_meta($assistant_id, '_assistant_first_message', true);
1595
+
$assistant_model = get_post_meta($assistant_id, '_assistant_model', true);
1596
+
if(!empty($assistant_model))
1597
+
{
1598
+
$chat_model = $assistant_model;
1599
+
}
1600
+
$ai_avatar = get_post_thumbnail_id($assistant_id);
1601
+
if(empty($ai_avatar))
1602
+
{
1603
+
$ai_avatar = '';
1604
+
}
1605
+
}
1606
+
}
1607
+
?>
1608
+
</select>
1609
+
</td>
1610
+
</tr>
1611
+
<tr class="hideAssist">
1612
+
<td>
1613
+
<div>
1614
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1615
+
<div class="bws_hidden_help_text cr_min_260px">
1616
+
<?php
1617
+
echo esc_html__("Select if you want to enable file upload for the chatbot. Note that to use this feature, you will need an AI model which supports file search. Supported file types: .c, .cs, .cpp, .doc, .docx, .html, .java, .json, .md, .pdf, .php, .pptx, .py, .rb, .tex, .txt, .css, .js, .sh, .ts", 'aiomatic-automatic-ai-content-writer');
1618
+
?>
1619
+
</div>
1620
+
</div>
1621
+
<b><?php echo esc_html__("Enable File Uploads To The Bot (Using AI Assistants File Search):", 'aiomatic-automatic-ai-content-writer');?></b>
1622
+
</td>
1623
+
<td class="cr_min_width_200">
1624
+
<select autocomplete="off" id="enable_file_uploads" name="aiomatic_Chatbot_Settings[enable_file_uploads]" <?php
1625
+
if ($assistant_id != '')
1626
+
{
1627
+
if(!empty($assistant_model))
1628
+
{
1629
+
if(!aiomatic_is_retrieval_model($assistant_model, ''))
1630
+
{
1631
+
echo 'disabled title="Disabled when using AI Assistants which use models which don\'t support AI Retrieval"';
1632
+
}
1633
+
}
1634
+
else
1635
+
{
1636
+
echo 'disabled title="No AI model added to this assistant"';
1637
+
}
1638
+
}
1639
+
?>class="cr_width_full">
1640
+
<option value="on" <?php if($enable_file_uploads == 'on'){echo ' selected';}?> ><?php echo esc_html__("On", 'aiomatic-automatic-ai-content-writer');?></option>
1641
+
<option value="off" <?php if($enable_file_uploads == 'off'){echo ' selected';}?> ><?php echo esc_html__("Off", 'aiomatic-automatic-ai-content-writer');?></option>
1642
+
</select>
1643
+
</td>
1644
+
</tr>
1645
+
<?php
1646
+
if ($assistant_id != '')
1647
+
{
1648
+
echo '<tr><td colspan="2"><p class="cr_red">' . esc_html__("An AI Assistant is selected for the chatbot. In this case, the below settings are loaded directly from the Assistant configuration. You can manage these settings in the AI Assistant settings.", 'aiomatic-automatic-ai-content-writer') . '</p></td></tr>';
1649
+
}
1650
+
?>
1651
+
<tr>
1652
+
<td>
1653
+
<div>
1654
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1655
+
<div class="bws_hidden_help_text cr_min_260px">
1656
+
<?php
1657
+
echo esc_html__("Select the model to be used for chatbot.", 'aiomatic-automatic-ai-content-writer');
1658
+
?>
1659
+
</div>
1660
+
</div>
1661
+
<b><?php echo esc_html__("Bot Model:", 'aiomatic-automatic-ai-content-writer');?></b>
1662
+
</td>
1663
+
<td class="cr_min_width_200">
1664
+
<select id="chat_model" name="aiomatic_Chatbot_Settings[chat_model]" class="hideAssistantIDMain cr_width_full" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?> onchange="aiomatic_check_vision();">
1665
+
<?php
1666
+
$all_tool_models = aiomatic_get_all_models_function();
1667
+
foreach($all_models as $modelx)
1668
+
{
1669
+
echo '<option value="' . esc_html($modelx) .'"';
1670
+
if ($chat_model == $modelx)
1671
+
{
1672
+
echo " selected";
1673
+
}
1674
+
echo '>' . esc_html($modelx);
1675
+
if(aiomatic_is_vision_model($modelx, ''))
1676
+
{
1677
+
echo esc_html__(" [Vision]", 'aiomatic-automatic-ai-content-writer');
1678
+
}
1679
+
if(in_array($modelx, $all_tool_models))
1680
+
{
1681
+
echo esc_html__(" [Tools]", 'aiomatic-automatic-ai-content-writer');
1682
+
}
1683
+
echo esc_html(aiomatic_get_model_provider($modelx));
1684
+
echo '</option>';
1685
+
}
1686
+
?>
1687
+
</select>
1688
+
</td>
1689
+
</tr>
1690
+
<tr class="hideVision">
1691
+
<td>
1692
+
<div>
1693
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1694
+
<div class="bws_hidden_help_text cr_min_260px">
1695
+
<?php
1696
+
echo esc_html__("Select if you want to enable vision for the chatbot. Note that to use this feature, you will need an AI model which supports vision.", 'aiomatic-automatic-ai-content-writer');
1697
+
?>
1698
+
</div>
1699
+
</div>
1700
+
<b><?php echo esc_html__("Enable Bot Vision:", 'aiomatic-automatic-ai-content-writer');?></b>
1701
+
</td>
1702
+
<td class="cr_min_width_200">
1703
+
<select autocomplete="off" id="enable_vision" name="aiomatic_Chatbot_Settings[enable_vision]" <?php
1704
+
if ($assistant_id != '')
1705
+
{
1706
+
if(!empty($assistant_model))
1707
+
{
1708
+
if(!aiomatic_is_vision_model($assistant_model, ''))
1709
+
{
1710
+
echo 'disabled title="Disabled when using AI Assistants which use models which don\'t support AI Vision"';
1711
+
}
1712
+
}
1713
+
else
1714
+
{
1715
+
echo 'disabled title="No AI model added to this assistant"';
1716
+
}
1717
+
}
1718
+
?>class="cr_width_full">
1719
+
<option value="on" <?php if($enable_vision == 'on'){echo ' selected';}?> ><?php echo esc_html__("On", 'aiomatic-automatic-ai-content-writer');?></option>
1720
+
<option value="off" <?php if($enable_vision == 'off'){echo ' selected';}?> ><?php echo esc_html__("Off", 'aiomatic-automatic-ai-content-writer');?></option>
1721
+
</select>
1722
+
</td>
1723
+
</tr>
1724
+
<tr><td colspan="2">
1725
+
<h2><?php echo esc_html__("Bot Configuration:", 'aiomatic-automatic-ai-content-writer');?></h2>
1726
+
</td></tr>
1727
+
<tr><td>
1728
+
<div>
1729
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1730
+
<div class="bws_hidden_help_text cr_min_260px">
1731
+
<?php
1732
+
echo esc_html__("Set the name of the bot. This will be prepended to each AI message. This is useful to teach the AI chatbot about its role and name. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins).", 'aiomatic-automatic-ai-content-writer');
1733
+
?>
1734
+
</div>
1735
+
</div>
1736
+
<b><?php echo esc_html__("Bot Name:", 'aiomatic-automatic-ai-content-writer');?></b>
1737
+
</div>
1738
+
</td><td>
1739
+
<div>
1740
+
<textarea class="hideAssistantIDMain" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}else{echo 'name="aiomatic_Chatbot_Settings[ai_message_preppend]" ';}?>id="ai_name" rows="2" placeholder="AI"><?php
1741
+
echo esc_textarea($ai_message_preppend);
1742
+
?></textarea>
1743
+
</div>
1744
+
</td></tr>
1745
+
<tr><td>
1746
+
<div>
1747
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1748
+
<div class="bws_hidden_help_text cr_min_260px">
1749
+
<?php
1750
+
echo esc_html__("Set the role of the bot. This info is only informative, will appear only in the chatbot interface, is not sent to the AI writer. Be sure to add the role in the 'Chatbot Context' settings field, for it to take effect in the AI writer.", 'aiomatic-automatic-ai-content-writer');
1751
+
?>
1752
+
</div>
1753
+
</div>
1754
+
<b><?php echo esc_html__("Bot Description:", 'aiomatic-automatic-ai-content-writer');?></b>
1755
+
</div>
1756
+
</td><td>
1757
+
<div>
1758
+
<textarea class="hideAssistantIDMain" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}else{echo 'name="aiomatic_Chatbot_Settings[ai_role]" ';}?>id="ai_role" rows="2" placeholder="Bot description"><?php
1759
+
echo esc_textarea($ai_role);
1760
+
?></textarea>
1761
+
</div>
1762
+
</td></tr>
1763
+
<tr><td>
1764
+
<div>
1765
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1766
+
<div class="bws_hidden_help_text cr_min_260px">
1767
+
<?php
1768
+
echo esc_html__("Add a context to the AI chatbot, so it knows how to act and how to respond to customers. You can define here the language, tone of voice and role of the bot. Any other settings will also be able to be defined here. This text will be preppended to each conversation, to teach the AI some additional info about you or its behavior. This text will not be displayed to users, it will be only sent to the chatbot. You can also use shortcodes in this field. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_language%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). Example of prompt to pretain the AI --- Article: \"%%post_content%%\" \n\n Discussion: \n\n", 'aiomatic-automatic-ai-content-writer');
1769
+
?>
1770
+
</div>
1771
+
</div>
1772
+
<b><?php echo esc_html__("Bot Context:", 'aiomatic-automatic-ai-content-writer');?></b>
1773
+
</div>
1774
+
</td><td>
1775
+
<div>
1776
+
<textarea class="hideAssistantIDMain" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}else{echo 'name="aiomatic_Chatbot_Settings[chat_preppend_text]" ';}?>id="preppend_text" rows="6" placeholder="Example: Converse as if you were a Marketing Agency Assistant. Be friendly, creative. Respond only in English."><?php
1777
+
echo esc_textarea($chat_preppend_text);
1778
+
?></textarea>
1779
+
</div>
1780
+
</td></tr>
1781
+
<tr><td>
1782
+
<div>
1783
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1784
+
<div class="bws_hidden_help_text cr_min_260px">
1785
+
<?php
1786
+
echo esc_html__("Set the name of the AI. This will be prepended to each AI message. This is useful to teach the AI chatbot about its role and name. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins).", 'aiomatic-automatic-ai-content-writer');
1787
+
?>
1788
+
</div>
1789
+
</div>
1790
+
<b><?php echo esc_html__("Bot Initial Messages (One Per Line):", 'aiomatic-automatic-ai-content-writer');?></b>
1791
+
</div>
1792
+
</td><td>
1793
+
<div>
1794
+
<textarea class="hideAssistantIDMain" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}else{echo 'name="aiomatic_Chatbot_Settings[ai_first_message]" ';}?>rows="2" id="first_message_ai" placeholder="Hi! How can I help you?"><?php
1795
+
echo esc_textarea($ai_first_message);
1796
+
?></textarea>
1797
+
</div>
1798
+
</td></tr>
1799
+
<tr><td>
1800
+
<div>
1801
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1802
+
<div class="bws_hidden_help_text cr_min_260px">
1803
+
<?php
1804
+
echo esc_html__("Set the avatar image of the AI. This will be shown in the chatbot interface.", 'aiomatic-automatic-ai-content-writer');
1805
+
?>
1806
+
</div>
1807
+
</div>
1808
+
<b><?php echo esc_html__("Bot Avatar Image:", 'aiomatic-automatic-ai-content-writer');?></b>
1809
+
</div>
1810
+
</td><td>
1811
+
<div>
1812
+
<?php
1813
+
$add_src = '';
1814
+
if(is_numeric($ai_avatar))
1815
+
{
1816
+
$att_src = wp_get_attachment_image_src( $ai_avatar, 'thumbnail', false );
1817
+
if ( $att_src && $att_src[0] != false )
1818
+
{
1819
+
$add_src = ' src="' . esc_url($att_src[0]) . '"';
1820
+
}
1821
+
}
1822
+
$image = '<div class="coderevolution_gutenberg_input"><img id="aiomatic-preview-image"' . $add_src . '/></div>';
1823
+
echo $image;?>
1824
+
<input type="hidden" <?php if ($assistant_id == ''){echo 'name="aiomatic_Chatbot_Settings[ai_avatar]"';}?> id="aiomatic_image_id" value="<?php echo esc_html($ai_avatar);?>" class="regular-text" />
1825
+
<input <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}?>type='button' class="hideAssistantIDMain button-primary" value="<?php esc_attr_e( 'Select an avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_manager"/>
1826
+
<input <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using Assistants" ';}?>type='button' class="hideAssistantIDMain button-primary" value="<?php esc_attr_e( 'Clear avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_clear"/>
1827
+
1828
+
</div>
1829
+
</td></tr>
1830
+
<tr><td colspan="2">
1831
+
<hr/>
1832
+
<h2><?php echo esc_html__("Select A Chatbot Persona: ", 'aiomatic-automatic-ai-content-writer');?>
1833
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1834
+
<div class="bws_hidden_help_text cr_min_260px">
1835
+
<?php
1836
+
echo esc_html__("Click the persona you want to use in your chatbot and it will be selected and its values will be automatically filled in the settings fields from above. All you have to do afterwards, is to save settings and the chatbot persona will be applied to the chatbot!", 'aiomatic-automatic-ai-content-writer');
1837
+
?>
1838
+
</div>
1839
+
</div></h2><br/>
1840
+
</td></tr>
1841
+
<?php
1842
+
$aiomatic_persona_page = isset($_GET['wpage']) && !empty($_GET['wpage']) ? sanitize_text_field($_GET['wpage']) : 1;
1843
+
$aiomatic_personas = new WP_Query(array(
1844
+
'post_type' => 'aiomatic_personas',
1845
+
'posts_per_page' => 12,
1846
+
'paged' => $aiomatic_persona_page,
1847
+
'order' => 'DESC',
1848
+
'orderby' => 'date',
1849
+
'post_status' => 'any'
1850
+
));
1851
+
if ($assistant_id != '')
1852
+
{
1853
+
echo '<tr><td colspan="2">' . esc_html__("Chatbot personas are not available when AI Assistants are used, as in this case, the persona configuration is loaded from the AI Assistant configuration. To use AI Personas, disable AI Assistants in the 'Bot Assistant Name' settings field.", 'aiomatic-automatic-ai-content-writer') . '</td></tr>';
1854
+
}
1855
+
else
1856
+
{
1857
+
?>
1858
+
<tr><td colspan="2">
1859
+
<div class="row" id="aiomatic-templates-panel">
1860
+
<?php
1861
+
if(!$aiomatic_personas->have_posts())
1862
+
{
1863
+
echo ' ' . esc_html__("No chatbot personas added. Add them in the 'Manage Chatbot Personas' tab.", 'aiomatic-automatic-ai-content-writer');
1864
+
}
1865
+
else
1866
+
{
1867
+
foreach ($aiomatic_personas->posts as $aiomatic_persona)
1868
+
{
1869
+
echo '<div class="aiomatic-col-lg-3"><div class="aiomatic-chat-boxes aiomatic-text-center"><div class="aiomatic-card" onclick="aiomatic_select_persona(' . esc_html($aiomatic_persona->ID) . ');"><div class="aiomatic-card-body">';
1870
+
$att_src = get_the_post_thumbnail_url( $aiomatic_persona->ID, 'thumbnail' );
1871
+
if ( $att_src )
1872
+
{
1873
+
echo '<div class="aiomatic-widget-user-image"><img alt="User Avatar" class="ai-user-avatar aiomatic-rounded-circle" src="' . esc_url($att_src) . '"></div>';
1874
+
}
1875
+
else
1876
+
{
1877
+
echo '<div class="aiomatic-widget-user-image">' . esc_html__("No avatar added", 'aiomatic-automatic-ai-content-writer') . '</div>';
1878
+
}
1879
+
echo '<div class="aiomatic-template-title"><h6 class="aiomatic-number-font">' . esc_html($aiomatic_persona->post_title) . '</h6></div><div class="aiomatic-template-info"><p class="aiomatic-text-muted">' . esc_html($aiomatic_persona->post_excerpt) . '</p></div>';
1880
+
echo '</div></div></div></div>';
1881
+
}
1882
+
}
1883
+
?>
1884
+
</div>
1885
+
<?php
1886
+
if($aiomatic_personas->have_posts() && $aiomatic_personas->max_num_pages > 1)
1887
+
{
1888
+
?>
1889
+
<div class="aiomatic-paginate">
1890
+
<?php
1891
+
echo esc_html__("Page: ", 'aiomatic-automatic-ai-content-writer') . paginate_links( array(
1892
+
'base' => admin_url('admin.php?page=aiomatic_chatbot_panel&wpage=%#%'),
1893
+
'total' => $aiomatic_personas->max_num_pages,
1894
+
'current' => $aiomatic_persona_page,
1895
+
'format' => '?wpage=%#%',
1896
+
'show_all' => false,
1897
+
'prev_next' => true,
1898
+
'add_args' => false,
1899
+
));
1900
+
?>
1901
+
</div>
1902
+
<?php
1903
+
}
1904
+
?>
1905
+
</td>
1906
+
</tr>
1907
+
<?php
1908
+
}
1909
+
?>
1910
+
</table>
1911
+
</div>
1912
+
<div id="tab-7" class="tab-content">
1913
+
<table class="widefat">
1914
+
<tr><td><h2><?php echo esc_html__("Use the following shortcode to add the customized chatbot to your site:", 'aiomatic-automatic-ai-content-writer');?></h2></td></tr>
1915
+
<tr><td colspan="2" class="cr_width_full"><div class="cr_center"><span class="cr_red cr_center cr_width_full cr_margin_block crf_bord" id="customized_chatbot">[aimogen-chat-form temperature="1" top_p="1" assistant_id="" model="gpt-4.1-mini" enable_vision="off" presence_penalty="0" frequency_penalty="0" mcp_servers="" additional_bots="" instant_response="false" ai_role="" ai_avatar="" user_avatar="" chat_preppend_text="Act as a customer assistant, respond to every question in a helpful way." chatbot_text_speech="off" upload_pdf="" enable_god_mode="disabled" user_message_preppend="User" show_header="" show_clear="" show_dltxt="" show_mute="" show_internet="" overwrite_voice="" overwrite_avatar_image="" internet_access="enabled" embeddings="enabled" embeddings_namespace="" ai_message_preppend="AI" ai_first_message="Hello, how can I help you today?" chat_mode="text" persistent="off" prompt_templates="" prompt_editable="on" placeholder="Enter your chat message here" bot_workflow="" select_prompt="Please select a prompt" file_uploads="off" bubble_user_alignment="right" show_ai_avatar="show" show_user_avatar="show" bubble_alignment="left" bubble_width="full" custom_header="" custom_footer="" custom_css="" store_data="off" send_message_sound="" receive_message_sound="" response_delay="" submit="Submit" submit_image="" submit_full="off" compliance="" show_in_window="off" conversation_starters="" window_location="top-right" font_size="1em" height="100%" background="auto" general_background="#ffffff" minheight="250px" user_font_color="#ffffff" user_background_color="#0084ff" ai_font_color="#000000" ai_background_color="#f0f0f0" input_placeholder_color="#333333" persona_name_color="#3c434a" persona_role_color="#728096" input_text_color="#000000" input_border_color="#e1e3e6" submit_color="#55a7e2" submit_text_color="#ffffff" voice_color="#55a7e2" voice_color_activated="#55a7e2" width="100%"]</span><button class="page-title-action aimt-10" id="aiomaticCopyShortcodeText"><?php echo esc_html__("Copy Text", 'aiomatic-automatic-ai-content-writer');?></button></div><br/></td></tr>
1916
+
1917
+
<tr><td colspan="2">
1918
+
<hr/></td></tr><tr><td colspan="2">
1919
+
<h2><?php echo esc_html__("Chatbot API Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
1920
+
</td></tr>
1921
+
<tr>
1922
+
<td>
1923
+
<div>
1924
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1925
+
<div class="bws_hidden_help_text cr_min_260px">
1926
+
<?php
1927
+
echo esc_html__("Select the assistant to be used for chatbot. The model used when creating the AI Assistant will be used to create the content.", 'aiomatic-automatic-ai-content-writer');
1928
+
?>
1929
+
</div>
1930
+
</div>
1931
+
<b><?php echo esc_html__("AI Assistant Name (Using This Disables Chatbot Personas):", 'aiomatic-automatic-ai-content-writer');?></b>
1932
+
</td>
1933
+
<td class="cr_min_width_200">
1934
+
<select id="assistant_id_b" onchange="anythingChanged();assistantChanged_b();" class="cr_width_full">
1935
+
<?php
1936
+
if($all_assistants === false)
1937
+
{
1938
+
echo '<option val="" selected disabled>' . esc_html__("Only OpenAI API is supported for Assistants API", 'aiomatic-automatic-ai-content-writer') . '</option>';
1939
+
}
1940
+
else
1941
+
{
1942
+
if(count($all_assistants) == 0)
1943
+
{
1944
+
echo '<option val="" selected disabled>' . esc_html__("No Assistans added, go to the plugin's 'AI Assistans' menu to add new assistants!", 'aiomatic-automatic-ai-content-writer') . '</option>';
1945
+
}
1946
+
else
1947
+
{
1948
+
echo '<option value=""';
1949
+
if ($assistant_id == '')
1950
+
{
1951
+
echo " selected";
1952
+
}
1953
+
echo '>' . esc_html__("Don't use assistants, use AI models instead", 'aiomatic-automatic-ai-content-writer') . '</option>';
1954
+
foreach($all_assistants as $myassistant)
1955
+
{
1956
+
echo '<option value="' . esc_html($myassistant->ID) .'"';
1957
+
if ($assistant_id == $myassistant->ID)
1958
+
{
1959
+
echo " selected";
1960
+
}
1961
+
echo '>' . esc_html($myassistant->post_title);
1962
+
echo '</option>';
1963
+
}
1964
+
}
1965
+
}
1966
+
?>
1967
+
</select>
1968
+
</td>
1969
+
</tr>
1970
+
<tr class="hideAssist_b">
1971
+
<td>
1972
+
<div>
1973
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1974
+
<div class="bws_hidden_help_text cr_min_260px">
1975
+
<?php
1976
+
echo esc_html__("Select if you want to enable file upload for the chatbot. Note that to use this feature, you will need an AI model which supports file search. Supported file types: .c, .cs, .cpp, .doc, .docx, .html, .java, .json, .md, .pdf, .php, .pptx, .py, .rb, .tex, .txt, .css, .js, .sh, .ts", 'aiomatic-automatic-ai-content-writer');
1977
+
?>
1978
+
</div>
1979
+
</div>
1980
+
<b><?php echo esc_html__("Enable File Uploads In The Bot (Using AI Assistants File Search):", 'aiomatic-automatic-ai-content-writer');?></b>
1981
+
</td>
1982
+
<td class="cr_min_width_200">
1983
+
<select autocomplete="off" id="enable_file_uploads_b" onchange="anythingChanged();" class="cr_width_full">
1984
+
<option value="on" <?php if($enable_file_uploads == 'on'){echo ' selected';}?> ><?php echo esc_html__("On", 'aiomatic-automatic-ai-content-writer');?></option>
1985
+
<option value="off" <?php if($enable_file_uploads == 'off'){echo ' selected';}?> ><?php echo esc_html__("Off", 'aiomatic-automatic-ai-content-writer');?></option>
1986
+
</select>
1987
+
</td>
1988
+
</tr>
1989
+
<tr><td>
1990
+
<div>
1991
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
1992
+
<div class="bws_hidden_help_text cr_min_260px">
1993
+
<?php
1994
+
echo esc_html__("Select the model of the chatbot.", 'aiomatic-automatic-ai-content-writer');
1995
+
?>
1996
+
</div>
1997
+
</div>
1998
+
<b><?php echo esc_html__("Bot Model:", 'aiomatic-automatic-ai-content-writer');?></b>
1999
+
</div>
2000
+
</td><td>
2001
+
<div>
2002
+
<select id="model_b" onchange="anythingChanged();" class="hideAssistantID cr_width_full" >
2003
+
<?php
2004
+
echo '<option selected value="default">default</option>';
2005
+
foreach($all_models as $modelx)
2006
+
{
2007
+
echo '<option value="' . esc_html($modelx) .'"';
2008
+
if ($chat_model == $modelx)
2009
+
{
2010
+
echo " selected";
2011
+
}
2012
+
echo '>' . esc_html($modelx);
2013
+
if(aiomatic_is_vision_model($modelx, ''))
2014
+
{
2015
+
echo esc_html__(" [Vision]", 'aiomatic-automatic-ai-content-writer');
2016
+
}
2017
+
if(in_array($modelx, $all_tool_models))
2018
+
{
2019
+
echo esc_html__(" [Tools]", 'aiomatic-automatic-ai-content-writer');
2020
+
}
2021
+
echo esc_html(aiomatic_get_model_provider($modelx));
2022
+
echo '</option>';
2023
+
}
2024
+
?>
2025
+
</select>
2026
+
</div>
2027
+
</td></tr>
2028
+
<tr class="hideVision_b">
2029
+
<td>
2030
+
<div>
2031
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2032
+
<div class="bws_hidden_help_text cr_min_260px">
2033
+
<?php
2034
+
echo esc_html__("Select if you want to enable vision for the chatbot. Note that to use this feature, you will need an AI model which supports vision.", 'aiomatic-automatic-ai-content-writer');
2035
+
?>
2036
+
</div>
2037
+
</div>
2038
+
<b><?php echo esc_html__("Enable Bot Vision:", 'aiomatic-automatic-ai-content-writer');?></b>
2039
+
</td>
2040
+
<td class="cr_min_width_200">
2041
+
<select autocomplete="off" id="enable_vision_b" class="hideAssistantIDVision cr_width_full" onchange="anythingChanged();">
2042
+
<option value="on" <?php if($enable_vision == 'on'){echo ' selected';}?> ><?php echo esc_html__("On", 'aiomatic-automatic-ai-content-writer');?></option>
2043
+
<option value="off" <?php if($enable_vision == 'off'){echo ' selected';}?> ><?php echo esc_html__("Off", 'aiomatic-automatic-ai-content-writer');?></option>
2044
+
</select>
2045
+
</td>
2046
+
</tr>
2047
+
<tr><td>
2048
+
<div>
2049
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2050
+
<div class="bws_hidden_help_text cr_min_260px">
2051
+
<?php
2052
+
echo esc_html__("What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or top_p but not both.", 'aiomatic-automatic-ai-content-writer');
2053
+
?>
2054
+
</div>
2055
+
</div>
2056
+
<b><?php echo esc_html__("Chatbot Temperature:", 'aiomatic-automatic-ai-content-writer');?></b>
2057
+
2058
+
</td><td>
2059
+
<input type="number" min="0" step="0.01" id="temperature_b" max="2" class="hideAssistantID cr_width_full" onchange="anythingChanged();" value="<?php echo esc_html($temperature);?>" placeholder="1">
2060
+
</td></tr><tr><td>
2061
+
<div>
2062
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2063
+
<div class="bws_hidden_help_text cr_min_260px">
2064
+
<?php
2065
+
echo esc_html__("An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", 'aiomatic-automatic-ai-content-writer');
2066
+
?>
2067
+
</div>
2068
+
</div>
2069
+
<b><?php echo esc_html__("Chatbot Top_p:", 'aiomatic-automatic-ai-content-writer');?></b>
2070
+
2071
+
</td><td>
2072
+
<input type="number" min="0" step="0.01" max="1" id="top_p_b" class="hideAssistantID cr_width_full" onchange="anythingChanged();" value="<?php echo esc_html($top_p);?>" placeholder="1">
2073
+
</td></tr><tr><td>
2074
+
<div>
2075
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2076
+
<div class="bws_hidden_help_text cr_min_260px">
2077
+
<?php
2078
+
echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", 'aiomatic-automatic-ai-content-writer');
2079
+
?>
2080
+
</div>
2081
+
</div>
2082
+
<b><?php echo esc_html__("Presence Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
2083
+
2084
+
</td><td>
2085
+
<input type="number" min="-2" step="0.01" max="2" id="presence_penalty_b" class="hideAssistantID cr_width_full" onchange="anythingChanged();" value="<?php echo esc_html($presence_penalty);?>" placeholder="0">
2086
+
</td></tr><tr><td>
2087
+
<div>
2088
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2089
+
<div class="bws_hidden_help_text cr_min_260px">
2090
+
<?php
2091
+
echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", 'aiomatic-automatic-ai-content-writer');
2092
+
?>
2093
+
</div>
2094
+
</div>
2095
+
<b><?php echo esc_html__("Frequency Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
2096
+
2097
+
</td><td>
2098
+
<input type="number" min="-2" step="0.01" max="2" id="frequency_penalty_b" class="hideAssistantID cr_width_full" onchange="anythingChanged();" value="<?php echo esc_html($frequency_penalty);?>" placeholder="0">
2099
+
</td></tr><tr><td>
2100
+
<div>
2101
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2102
+
<div class="bws_hidden_help_text cr_min_260px">
2103
+
<?php
2104
+
echo esc_html__("If you check this checkbox, the plugin will store all prompts used in the plugin, to allow model dillution and other features on OpenAI API's part.", 'aiomatic-automatic-ai-content-writer');
2105
+
?>
2106
+
</div>
2107
+
</div>
2108
+
<b><?php echo esc_html__("Store AI Prompts On OpenAI's Part:", 'aiomatic-automatic-ai-content-writer');?></b>
2109
+
2110
+
</td><td>
2111
+
<select autocomplete="off" id="store_data_b" class="hideAssistantIDVision cr_width_full" onchange="anythingChanged();">
2112
+
<option value="on" <?php if($store_data == 'on'){echo ' selected';}?> ><?php echo esc_html__("On", 'aiomatic-automatic-ai-content-writer');?></option>
2113
+
<option value="off" <?php if($store_data == 'off'){echo ' selected';}?> ><?php echo esc_html__("Off", 'aiomatic-automatic-ai-content-writer');?></option>
2114
+
</select>
2115
+
</td></tr>
2116
+
<tr><td>
2117
+
<h2><?php echo esc_html__("Main Bot Persona Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
2118
+
</td></tr>
2119
+
<tr><td>
2120
+
<div>
2121
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2122
+
<div class="bws_hidden_help_text cr_min_260px">
2123
+
<?php
2124
+
echo esc_html__("Select the chatbot persona you want to use for your current chatbot setup.", 'aiomatic-automatic-ai-content-writer');
2125
+
?>
2126
+
</div>
2127
+
</div>
2128
+
<b><?php echo esc_html__("Bot Persona:", 'aiomatic-automatic-ai-content-writer');?></b>
2129
+
</td>
2130
+
<td>
2131
+
<select id="persona_b" onchange="personaChanged();" class="hideAssistantID cr_width_full">
2132
+
<?php
2133
+
$post_list = array();
2134
+
$postsPerPage = 50000;
2135
+
$paged = 0;
2136
+
do
2137
+
{
2138
+
$postOffset = $paged * $postsPerPage;
2139
+
$query = array(
2140
+
'post_status' => array(
2141
+
'publish'
2142
+
),
2143
+
'post_type' => array(
2144
+
'aiomatic_personas'
2145
+
),
2146
+
'numberposts' => $postsPerPage,
2147
+
'offset' => $postOffset
2148
+
);
2149
+
$got_me = get_posts($query);
2150
+
$post_list = array_merge($post_list, $got_me);
2151
+
$paged++;
2152
+
}while(!empty($got_me));
2153
+
if(count($post_list) == 0)
2154
+
{
2155
+
echo '<option value="" disabled>' . esc_html__("No chatbot personas added. Add them in the 'Manage Chatbot Personas' tab.", 'aiomatic-automatic-ai-content-writer') . '</option>';
2156
+
}
2157
+
else
2158
+
{
2159
+
echo '<option value="" disabled selected>' . esc_html__("Select a persona", 'aiomatic-automatic-ai-content-writer') . '</option>';
2160
+
foreach ($post_list as $aiomatic_persona)
2161
+
{
2162
+
echo '<option value="' . esc_html($aiomatic_persona->ID) . '">' . esc_html($aiomatic_persona->post_title) . ' (' . esc_html($aiomatic_persona->post_excerpt) . ')' . '</option>';
2163
+
}
2164
+
}
2165
+
?>
2166
+
</td></tr>
2167
+
<tr><td>
2168
+
<div>
2169
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2170
+
<div class="bws_hidden_help_text cr_min_260px">
2171
+
<?php
2172
+
echo esc_html__("Set the name of the AI. This will be prepended to each AI message. This is useful to teach the AI chatbot about its role and name.", 'aiomatic-automatic-ai-content-writer');
2173
+
?>
2174
+
</div>
2175
+
</div>
2176
+
<b><?php echo esc_html__("Bot Name:", 'aiomatic-automatic-ai-content-writer');?></b>
2177
+
</div>
2178
+
</td><td>
2179
+
<div>
2180
+
<textarea id="ai_name_b" rows="2" onchange="anythingChanged();" placeholder="AI" class="hideAssistantID"><?php
2181
+
echo esc_textarea($ai_message_preppend);
2182
+
?></textarea>
2183
+
</div>
2184
+
</td></tr>
2185
+
<tr><td>
2186
+
<div>
2187
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2188
+
<div class="bws_hidden_help_text cr_min_260px">
2189
+
<?php
2190
+
echo esc_html__("Set the role of the bot. This info is only informative, will appear only in the chatbot interface, is not sent to the AI writer. Be sure to add the role in the 'Chatbot Context' settings field, for it to take effect in the AI writer.", 'aiomatic-automatic-ai-content-writer');
2191
+
?>
2192
+
</div>
2193
+
</div>
2194
+
<b><?php echo esc_html__("Bot Description:", 'aiomatic-automatic-ai-content-writer');?></b>
2195
+
</div>
2196
+
</td><td>
2197
+
<div>
2198
+
<textarea rows="2" id="ai_role_b" onchange="anythingChanged();" placeholder="Bot description" class="hideAssistantID"><?php
2199
+
echo esc_textarea($ai_role);
2200
+
?></textarea>
2201
+
</div>
2202
+
</td></tr>
2203
+
<tr><td>
2204
+
<div>
2205
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2206
+
<div class="bws_hidden_help_text cr_min_260px">
2207
+
<?php
2208
+
echo esc_html__("Add a context to the AI chatbot, so it knows how to act and how to respond to customers. You can define here the language, tone of voice and role of the bot. Any other settings will also be able to be defined here. This text will be preppended to each conversation, to teach the AI some additional info about you or its behavior. This text will not be displayed to users, it will be only sent to the chatbot. You can also use shortcodes in this field. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_language%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins). Example of prompt to pretain the AI --- Article: \"%%post_content%%\" \n\n Discussion: \n\n", 'aiomatic-automatic-ai-content-writer');
2209
+
?>
2210
+
</div>
2211
+
</div>
2212
+
<b><?php echo esc_html__("Bot Context:", 'aiomatic-automatic-ai-content-writer');?></b>
2213
+
</div>
2214
+
</td><td>
2215
+
<div>
2216
+
<textarea rows="4" id="context_b" onchange="anythingChanged();" rows="2" class="hideAssistantID" placeholder="Example: Converse as if you were a Marketing Agency Assistant. Be friendly, creative. Respond only in English."><?php
2217
+
echo esc_textarea($chat_preppend_text);
2218
+
?></textarea>
2219
+
</div>
2220
+
</td></tr>
2221
+
<tr><td>
2222
+
<div>
2223
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2224
+
<div class="bws_hidden_help_text cr_min_260px">
2225
+
<?php
2226
+
echo esc_html__("Set the name of the AI. This will be prepended to each AI message. This is useful to teach the AI chatbot about its role and name.", 'aiomatic-automatic-ai-content-writer');
2227
+
?>
2228
+
</div>
2229
+
</div>
2230
+
<b><?php echo esc_html__("Bot Initial Messages (One Per Line):", 'aiomatic-automatic-ai-content-writer');?></b>
2231
+
</div>
2232
+
</td><td>
2233
+
<div>
2234
+
<textarea id="ai_message_b" onchange="anythingChanged();" rows="2" class="hideAssistantID" placeholder="Hi! How can I help you?"><?php
2235
+
echo esc_textarea($ai_first_message);
2236
+
?></textarea>
2237
+
</div>
2238
+
</td></tr>
2239
+
<tr><td>
2240
+
<div>
2241
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2242
+
<div class="bws_hidden_help_text cr_min_260px">
2243
+
<?php
2244
+
echo esc_html__("Set the avatar image of the AI. This will be shown in the chatbot interface.", 'aiomatic-automatic-ai-content-writer');
2245
+
?>
2246
+
</div>
2247
+
</div>
2248
+
<b><?php echo esc_html__("Bot Avatar Image:", 'aiomatic-automatic-ai-content-writer');?></b>
2249
+
</div>
2250
+
</td><td>
2251
+
<div>
2252
+
<?php
2253
+
$add_src = '';
2254
+
if(is_numeric($ai_avatar))
2255
+
{
2256
+
$att_src = wp_get_attachment_image_src( $ai_avatar, 'thumbnail', false );
2257
+
if ( $att_src && $att_src[0] != false )
2258
+
{
2259
+
$add_src = ' src="' . esc_url($att_src[0]) . '"';
2260
+
}
2261
+
}
2262
+
$image = '<div class="coderevolution_gutenberg_input"><img id="aiomatic-preview-image-b"' . $add_src . '/></div>';
2263
+
echo $image; ?>
2264
+
<input type="hidden" id="aiomatic_image_id_b" value="<?php echo esc_html($ai_avatar);?>" class="regular-text" />
2265
+
<input type='button' class="hideAssistantID button-primary" value="<?php esc_attr_e( 'Select an avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_manager_b"/>
2266
+
<input type='button' class="hideAssistantID button-primary" value="<?php esc_attr_e( 'Clear avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_clear_b"/>
2267
+
2268
+
</div>
2269
+
</td></tr>
2270
+
<tr><td colspan="2">
2271
+
<h2><?php echo esc_html__("MCP Server Connection:", 'aiomatic-automatic-ai-content-writer');?></h2>
2272
+
</td></tr>
2273
+
<tr><td>
2274
+
<div>
2275
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2276
+
<div class="bws_hidden_help_text cr_min_260px">
2277
+
<?php
2278
+
echo esc_html__("Select a list of MCP connections to enable for the chatbot. To add or remove MCP server connections, go to the plugin's 'MCP Integration' menu -> 'Connect To A MCP Server' tab.", 'aiomatic-automatic-ai-content-writer');
2279
+
?>
2280
+
</div>
2281
+
</div>
2282
+
<b><?php echo esc_html__("Enabled MCP Server Connections", 'aiomatic-automatic-ai-content-writer');?></b>
2283
+
</div>
2284
+
</td><td>
2285
+
<div>
2286
+
<?php
2287
+
$responses_api = isset($aiomatic_Main_Settings['responses_api']) ? $aiomatic_Main_Settings['responses_api'] : '';
2288
+
$api_selector = isset($aiomatic_Main_Settings['api_selector']) ? $aiomatic_Main_Settings['api_selector'] : 'openai';
2289
+
2290
+
$is_aiomaticapi = false;
2291
+
$token = '';
2292
+
if (!empty($aiomatic_Main_Settings['app_id'])) {
2293
+
$appids = preg_split('/\r\n|\r|\n/', trim($aiomatic_Main_Settings['app_id']));
2294
+
$appids = array_filter($appids);
2295
+
if (count($appids) == 1) {
2296
+
$token = $appids[array_rand($appids)];
2297
+
$token = apply_filters('aimogen_openai_api_key', $token);$token = apply_filters('aiomatic_openai_api_key', $token);
2298
+
if (aiomatic_is_aiomaticapi_key($token)) {
2299
+
$call_count = get_transient('aiomaticapi_tokens');
2300
+
if ($token != '' && $call_count !== false) {
2301
+
$is_aiomaticapi = true;
2302
+
}
2303
+
}
2304
+
}
2305
+
}
2306
+
?>
2307
+
<?php if ($responses_api === 'on' && $api_selector === 'openai' && !$is_aiomaticapi)
2308
+
{ ?>
2309
+
<select id="enable_mcp_b" multiple="multiple" onchange="anythingChanged();" class="cr_width_full resize_vertical">
2310
+
<?php foreach ($mcp_servers as $mid => $server): ?>
2311
+
<option value="<?php echo esc_attr($mid); ?>" <?php echo in_array($mid, $enable_mcp) ? 'selected' : ''; ?>>
2312
+
<?php echo esc_html($server['name']);
2313
+
?>
2314
+
</option>
2315
+
<?php endforeach; ?>
2316
+
</select>
2317
+
<?php
2318
+
}
2319
+
else
2320
+
{
2321
+
?>
2322
+
<select id="enable_mcp_b" multiple="multiple" onchange="anythingChanged();" class="cr_width_full resize_vertical" disabled><option value=""><?php echo esc_html__('Not available', 'aiomatic-automatic-ai-content-writer');?></option></select>
2323
+
<p><?php echo esc_html__('This functionality is only available when Aimogen is enabled, Responses API is turned on, the API selector is set to OpenAI, and you are not using an Aimogen API key. Please adjust your settings to enable MCP server connections. This will work in OpenAI models and also for Anthropic models.', 'aiomatic-automatic-ai-content-writer'); ?></p>
2324
+
<?php
2325
+
}
2326
+
?>
2327
+
</div>
2328
+
</td></tr>
2329
+
<tr><td colspan="2">
2330
+
<h2><?php echo esc_html__("Multi-Bot Chat:", 'aiomatic-automatic-ai-content-writer');?></h2>
2331
+
</td></tr>
2332
+
<tr><td>
2333
+
<div>
2334
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2335
+
<div class="bws_hidden_help_text cr_min_260px">
2336
+
<?php
2337
+
echo esc_html__("Select additional bots you want to add to the chatbot.", 'aiomatic-automatic-ai-content-writer');
2338
+
?>
2339
+
</div>
2340
+
</div>
2341
+
<b><?php echo esc_html__("Add Additional Bots To The Conversation:", 'aiomatic-automatic-ai-content-writer');?></b>
2342
+
</div>
2343
+
</td><td>
2344
+
<div>
2345
+
<?php
2346
+
$assistants = get_posts([
2347
+
'post_type' => 'aiomatic_assistants',
2348
+
'numberposts' => -1
2349
+
]);
2350
+
$personas = get_posts([
2351
+
'post_type' => 'aiomatic_personas',
2352
+
'numberposts' => -1
2353
+
]);
2354
+
$bot_posts = array_merge($assistants, $personas);
2355
+
?>
2356
+
<select id="multibot_b" multiple="multiple" onchange="anythingChanged();" class="cr_width_full resize_vertical">
2357
+
<?php foreach ($bot_posts as $post): ?>
2358
+
<option value="<?php echo esc_attr($post->ID); ?>" <?php echo in_array($post->ID, $additional_bots) ? 'selected' : ''; ?>>
2359
+
<?php echo esc_html($post->post_title);
2360
+
if($post->post_type == 'aiomatic_assistants')
2361
+
{
2362
+
echo ' (AI Assistant)';
2363
+
}
2364
+
elseif($post->post_type == 'aiomatic_personas')
2365
+
{
2366
+
echo ' (Persona)';
2367
+
}
2368
+
?>
2369
+
</option>
2370
+
<?php endforeach; ?>
2371
+
</select>
2372
+
</div>
2373
+
</td></tr>
2374
+
<tr><td>
2375
+
<h2><?php echo esc_html__("Chatbot Interface:", 'aiomatic-automatic-ai-content-writer');?></h2>
2376
+
</td></tr>
2377
+
<tr><td>
2378
+
<div>
2379
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2380
+
<div class="bws_hidden_help_text cr_min_260px">
2381
+
<?php
2382
+
echo esc_html__("Set the name of the user. This will be prepended to each user message. This is useful to teach the AI chatbot about its role and name.", 'aiomatic-automatic-ai-content-writer');
2383
+
?>
2384
+
</div>
2385
+
</div>
2386
+
<b><?php echo esc_html__("User Name:", 'aiomatic-automatic-ai-content-writer');?></b>
2387
+
</div>
2388
+
</td><td>
2389
+
<div>
2390
+
<textarea id="user_name_b" rows="2" onchange="anythingChanged();" placeholder="User"><?php
2391
+
echo esc_textarea($user_message_preppend);
2392
+
?></textarea>
2393
+
</div>
2394
+
</td></tr>
2395
+
<tr><td>
2396
+
<div>
2397
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2398
+
<div class="bws_hidden_help_text cr_min_260px">
2399
+
<?php
2400
+
echo esc_html__("Set the avatar image of the User. This will be shown in the chatbot interface.", 'aiomatic-automatic-ai-content-writer');
2401
+
?>
2402
+
</div>
2403
+
</div>
2404
+
<b><?php echo esc_html__("User Avatar Image:", 'aiomatic-automatic-ai-content-writer');?></b>
2405
+
</div>
2406
+
</td><td>
2407
+
<div>
2408
+
<?php
2409
+
$add_src = '';
2410
+
if(is_numeric($user_avatar))
2411
+
{
2412
+
$att_src = wp_get_attachment_image_src( $user_avatar, 'thumbnail', false );
2413
+
if ( $att_src && $att_src[0] != false )
2414
+
{
2415
+
$add_src = ' src="' . esc_url($att_src[0]) . '"';
2416
+
}
2417
+
}
2418
+
$image = '<div class="coderevolution_gutenberg_input"><img id="aiomatic-preview-image-user-b"' . $add_src . '/></div>';
2419
+
echo $image; ?>
2420
+
<input type="hidden" id="aiomatic_image_id_user_b" value="<?php echo esc_html($user_avatar);?>" class="regular-text" />
2421
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Select an avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_manager_user_b"/>
2422
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Clear avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_clear_user_b"/>
2423
+
2424
+
</div>
2425
+
</td></tr>
2426
+
<tr><td>
2427
+
<div>
2428
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2429
+
<div class="bws_hidden_help_text cr_min_260px">
2430
+
<?php
2431
+
echo esc_html__("Set the placeholder text of the chat input. The default is: Enter your chat message here.", 'aiomatic-automatic-ai-content-writer');
2432
+
?>
2433
+
</div>
2434
+
</div>
2435
+
<b><?php echo esc_html__("Chat Input Placeholder:", 'aiomatic-automatic-ai-content-writer');?></b>
2436
+
</div>
2437
+
</td><td>
2438
+
<div>
2439
+
<textarea rows="1" id="placeholder_b" placeholder="Enter your chat message here" onchange="anythingChanged()"><?php
2440
+
echo esc_textarea($placeholder);
2441
+
?></textarea>
2442
+
</div>
2443
+
</td></tr>
2444
+
<tr><td>
2445
+
<div>
2446
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2447
+
<div class="bws_hidden_help_text cr_min_260px">
2448
+
<?php
2449
+
echo esc_html__("Set the text of the submit button. The default is: Submit", 'aiomatic-automatic-ai-content-writer');
2450
+
?>
2451
+
</div>
2452
+
</div>
2453
+
<b><?php echo esc_html__("Chat Input Submit Button Text:", 'aiomatic-automatic-ai-content-writer');?></b>
2454
+
</div>
2455
+
</td><td>
2456
+
<div>
2457
+
<textarea rows="1" id="submit_b" placeholder="Submit" onchange="anythingChanged()"><?php
2458
+
echo esc_textarea($submit);
2459
+
?></textarea>
2460
+
</div>
2461
+
</td></tr>
2462
+
<tr><td>
2463
+
<div>
2464
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2465
+
<div class="bws_hidden_help_text cr_min_260px">
2466
+
<?php
2467
+
echo esc_html__("Set the image URL which will be used for the submit button. Note that if you set this, it will overwrite the submit button text, which instead will be used as image alt tag and title.", 'aiomatic-automatic-ai-content-writer');
2468
+
?>
2469
+
</div>
2470
+
</div>
2471
+
<b><?php echo esc_html__("Chat Input Submit Button Image URL:", 'aiomatic-automatic-ai-content-writer');?></b>
2472
+
</div>
2473
+
</td><td>
2474
+
<div>
2475
+
<input type="url" id="submit_image_b" placeholder="Submit image URL" onchange="anythingChanged()" value="<?php echo esc_attr($submit_image);?>"/>
2476
+
</div>
2477
+
</td></tr>
2478
+
<tr><td>
2479
+
<div>
2480
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2481
+
<div class="bws_hidden_help_text cr_min_260px">
2482
+
<?php
2483
+
echo esc_html__("Set if you want to show full width buttons.", 'aiomatic-automatic-ai-content-writer');
2484
+
?>
2485
+
</div>
2486
+
</div>
2487
+
<b><?php echo esc_html__("Full Width Buttons:", 'aiomatic-automatic-ai-content-writer');?></b>
2488
+
</div>
2489
+
</td><td>
2490
+
<div>
2491
+
<select id="submit_full_b" onchange="anythingChanged();" >
2492
+
<?php
2493
+
echo '<option value="off"';
2494
+
if ($submit_full !== 'on')
2495
+
{
2496
+
echo ' selected';
2497
+
}
2498
+
echo '>Disabled</option>';
2499
+
echo '<option value="on"';
2500
+
if ($submit_full == 'on')
2501
+
{
2502
+
echo ' selected';
2503
+
}
2504
+
echo '>Enabled</option>';
2505
+
?>
2506
+
</select>
2507
+
</div>
2508
+
</td></tr>
2509
+
<tr><td>
2510
+
<div>
2511
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2512
+
<div class="bws_hidden_help_text cr_min_260px">
2513
+
<?php
2514
+
echo esc_html__("Set the compliance text which will be shown at the bottom of the chatbot (default is empty).", 'aiomatic-automatic-ai-content-writer');
2515
+
?>
2516
+
</div>
2517
+
</div>
2518
+
<b><?php echo esc_html__("Chat Compliance Text:", 'aiomatic-automatic-ai-content-writer');?></b>
2519
+
</div>
2520
+
</td><td>
2521
+
<div>
2522
+
<textarea rows="1" id="compliance_b" placeholder="Compliance text" onchange="anythingChanged()"><?php
2523
+
echo esc_textarea($compliance);
2524
+
?></textarea>
2525
+
</div>
2526
+
</td></tr>
2527
+
<tr><td>
2528
+
<div>
2529
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2530
+
<div class="bws_hidden_help_text cr_min_260px">
2531
+
<?php
2532
+
echo esc_html__("Set the text of the prompt selection placeholder. The default is: Please select a prompt", 'aiomatic-automatic-ai-content-writer');
2533
+
?>
2534
+
</div>
2535
+
</div>
2536
+
<b><?php echo esc_html__("Text For Prompt Templates Selection:", 'aiomatic-automatic-ai-content-writer');?></b>
2537
+
</div>
2538
+
</td><td>
2539
+
<div>
2540
+
<textarea rows="1" id="select_prompt_b" placeholder="Please select a prompt" onchange="anythingChanged()"><?php
2541
+
echo esc_textarea($select_prompt);
2542
+
?></textarea>
2543
+
</div>
2544
+
</td></tr>
2545
+
<tr><td>
2546
+
<h2><?php echo esc_html__("Chatbot Workflows:", 'aiomatic-automatic-ai-content-writer');?></h2>
2547
+
</td></tr>
2548
+
<tr><td>
2549
+
<div>
2550
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2551
+
<div class="bws_hidden_help_text cr_min_260px">
2552
+
<?php
2553
+
echo esc_html__("Set the configurations json string for the bot workflow. Use the workflow builder tool to configure this settings field's value. You can create this string using the Chatbot Workflow Builder from the 'Bot Workflows' tab of the plugin.", 'aiomatic-automatic-ai-content-writer');
2554
+
?>
2555
+
</div>
2556
+
</div>
2557
+
<b><?php echo esc_html__("Bot Workflow Configuration String:", 'aiomatic-automatic-ai-content-writer');?></b>
2558
+
</div>
2559
+
</td><td>
2560
+
<div>
2561
+
<textarea rows="4" id="bot_workflow_b" onchange="anythingChanged();" placeholder='Bot workflow json'><?php
2562
+
echo esc_textarea($bot_workflow);
2563
+
?></textarea>
2564
+
</div>
2565
+
</td></tr>
2566
+
<tr><td>
2567
+
<h2><?php echo esc_html__("Chatbot General Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
2568
+
</td></tr>
2569
+
<tr><td>
2570
+
<div>
2571
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2572
+
<div class="bws_hidden_help_text cr_min_260px">
2573
+
<?php
2574
+
echo esc_html__("Select if you want to make the chatbot respond with full text or do you want to enable a typing effect, so text will appear gradually. You can also use streaming, which is the recommended method to be used, as in this case, the plugin will show the response in real time, as it is generated by the AI (similar to ChatGPT).", 'aiomatic-automatic-ai-content-writer');
2575
+
?>
2576
+
</div>
2577
+
</div>
2578
+
<b><?php echo esc_html__("Enable Chatbot Instant Responses:", 'aiomatic-automatic-ai-content-writer');?></b>
2579
+
</div>
2580
+
</td><td>
2581
+
<div>
2582
+
<select id="instant_response_b" onchange="anythingChanged();" class="cr_width_full">
2583
+
<?php
2584
+
echo '<option' . ($instant_response == 'on' ? ' selected': '') . ' value="on">on</option>';
2585
+
echo '<option' . ($instant_response == 'stream' ? ' selected': '') . ' value="stream">stream</option>';
2586
+
echo '<option' . ($instant_response == 'off' ? ' selected': '') . ' value="off">off</option>';
2587
+
?>
2588
+
</div>
2589
+
</td></tr>
2590
+
<tr><td>
2591
+
<div>
2592
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2593
+
<div class="bws_hidden_help_text cr_min_260px">
2594
+
<?php
2595
+
echo wp_kses(
2596
+
sprintf(
2597
+
__(
2598
+
'Select a sound effect to be played when a message is sent in the chatbot. To disable this feature, leave this settings field blank. You can get free sound effects from %s.',
2599
+
'aiomatic-automatic-ai-content-writer'
2600
+
),
2601
+
'<a href="https://pixabay.com/sound-effects/search/notification/?order=ec" target="_blank">Pixabay</a>'
2602
+
),
2603
+
array(
2604
+
'a' => array(
2605
+
'href' => array(),
2606
+
'target' => array(),
2607
+
),
2608
+
)
2609
+
);
2610
+
?>
2611
+
</div>
2612
+
</div>
2613
+
<b><?php echo esc_html__("Chatbot 'Send Message' Sound Effect:", 'aiomatic-automatic-ai-content-writer');?></b>
2614
+
</div>
2615
+
</td><td>
2616
+
<div>
2617
+
<input type="text" placeholder="<?php echo esc_html__("Upload your 'Send Message' sound effect file using the button from below", 'aiomatic-automatic-ai-content-writer');?>" onchange="anythingChanged();" id="send_message_sound_b" value="<?php echo esc_attr($send_message_sound); ?>" />
2618
+
<button class="button" id="aiomatic_upload_send_sound_button_b"><?php echo esc_html__("Upload a 'Send Message' sound effect", 'aiomatic-automatic-ai-content-writer');?></button>
2619
+
</div>
2620
+
</td></tr>
2621
+
<tr><td>
2622
+
<div>
2623
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2624
+
<div class="bws_hidden_help_text cr_min_260px">
2625
+
<?php
2626
+
echo wp_kses(
2627
+
sprintf(
2628
+
__(
2629
+
'Select a sound effect to be played when a message is received in the chatbot. To disable this feature, leave this settings field blank. You can get free sound effects from %s.',
2630
+
'aiomatic-automatic-ai-content-writer'
2631
+
),
2632
+
'<a href="https://pixabay.com/sound-effects/search/notification/?order=ec" target="_blank">Pixabay</a>'
2633
+
),
2634
+
array(
2635
+
'a' => array(
2636
+
'href' => array(),
2637
+
'target' => array(),
2638
+
),
2639
+
)
2640
+
);
2641
+
?>
2642
+
</div>
2643
+
</div>
2644
+
<b><?php echo esc_html__("Chatbot 'Receive Message' Sound Effect:", 'aiomatic-automatic-ai-content-writer');?></b>
2645
+
</div>
2646
+
</td><td>
2647
+
<div>
2648
+
<input type="text" placeholder="<?php echo esc_html__("Upload your 'Receive Message' sound effect file using the button from below", 'aiomatic-automatic-ai-content-writer');?>" onchange="anythingChanged();" id="receive_message_sound_b" value="<?php echo esc_attr($receive_message_sound); ?>" />
2649
+
<button class="button" id="aiomatic_upload_receive_sound_button_b"><?php echo esc_html__("Upload a 'Receive Message' sound effect", 'aiomatic-automatic-ai-content-writer');?></button>
2650
+
</div>
2651
+
</td></tr>
2652
+
<tr><td>
2653
+
<div>
2654
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2655
+
<div class="bws_hidden_help_text cr_min_260px">
2656
+
<?php
2657
+
echo esc_html__("Set a number of milliseconds to set as a delay for the chatbot. You can also set an interval between two values (in ms), case in which, the chatbot will select a random number of milliseconds from that interval, at each response.", 'aiomatic-automatic-ai-content-writer');
2658
+
?>
2659
+
</div>
2660
+
</div>
2661
+
<b><?php echo esc_html__("Chatbot Response Delay (ms):", 'aiomatic-automatic-ai-content-writer');?></b>
2662
+
</div>
2663
+
</td><td>
2664
+
<div>
2665
+
<input type="text" placeholder="<?php echo esc_html__("Example: 100-500", 'aiomatic-automatic-ai-content-writer');?>" id="response_delay_b" onchange="anythingChanged();" value="<?php echo esc_attr($response_delay); ?>" />
2666
+
</div>
2667
+
</td></tr>
2668
+
<tr>
2669
+
<td>
2670
+
<div>
2671
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2672
+
<div class="bws_hidden_help_text cr_min_260px">
2673
+
<?php
2674
+
echo esc_html__("Select the default chat mode (image or text).", 'aiomatic-automatic-ai-content-writer');
2675
+
?>
2676
+
</div>
2677
+
</div>
2678
+
<b><?php echo esc_html__("Default Chat Mode:", 'aiomatic-automatic-ai-content-writer');?></b>
2679
+
</td>
2680
+
<td class="cr_min_width_200">
2681
+
<select id="chat_mode_b" onchange="anythingChanged();" class="cr_width_full">
2682
+
<?php
2683
+
echo '<option' . ($chat_mode == 'text' ? ' selected': '') . ' value="text">Text</option>';
2684
+
echo '<option' . ($chat_mode == 'images' ? ' selected': '') . ' value="images">Image</option>';
2685
+
?>
2686
+
</select>
2687
+
</td>
2688
+
</tr>
2689
+
<tr>
2690
+
<td>
2691
+
<div>
2692
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2693
+
<div class="bws_hidden_help_text cr_min_260px">
2694
+
<?php
2695
+
echo esc_html__("Select if you want to enable the persistent chat mode. Chats will be saved in the database and can be viewed from the 'Limits and Statistics' menu of the plugin. If you want to enable the Vector Database persistent chat functionality, you need to add your API key for a Vector Database Service in the plugin's 'Settings' menu. Also, you need to enable embeddings for the chatbot, from the 'Settings' menu -> 'Embeddings' tab -> 'Enable Embeddings For' -> check the 'Chatbot Shortcodes' checkbox -> save settings.", 'aiomatic-automatic-ai-content-writer');
2696
+
?>
2697
+
</div>
2698
+
</div>
2699
+
<b><?php echo esc_html__("Remember Chat Conversations (Persistent Chat):", 'aiomatic-automatic-ai-content-writer');?></b>
2700
+
</td>
2701
+
<td class="cr_min_width_200">
2702
+
<select id="persistent_b" onchange="anythingChanged();" class="cr_width_full">
2703
+
<?php
2704
+
echo '<option' . ($persistent == 'off' ? ' selected': '') . ' value="off">' . esc_html__("Off", 'aiomatic-automatic-ai-content-writer') . '</option>';
2705
+
echo '<option' . ($persistent == 'history' ? ' selected': '') . ' value="history">' . esc_html__("Remember Multiple Conversations And Allow Switching Between Them (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
2706
+
echo '<option' . ($persistent == 'on' ? ' selected': '') . ' value="on">' . esc_html__("Load Last Conversation And Save Chat Logs (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
2707
+
echo '<option' . ($persistent == 'logs' ? ' selected': '') . ' value="logs">' . esc_html__("Only Save Chat Logs (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
2708
+
echo '<option' . ($persistent == 'vector' ? ' selected': '') . ' value="vector"';
2709
+
if($pinecone_app_id == '' && $qdrant_app_id == '')
2710
+
{
2711
+
echo ' disabled title="' . esc_html__("You need to set up a Pinecone or a Qdrant API keys in plugin settings for this to work", 'aiomatic-automatic-ai-content-writer') . '"';
2712
+
}
2713
+
echo '>' . esc_html__("Auto Create Embeddings From User Messages (Vector Database Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
2714
+
?>
2715
+
</select>
2716
+
</td>
2717
+
</tr><tr>
2718
+
<td>
2719
+
<div>
2720
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2721
+
<div class="bws_hidden_help_text cr_min_260px">
2722
+
<?php
2723
+
echo esc_html__("Select if you want to enable Chatbot internet access for this specific chatbot? To enable internet access, you have to go to the 'Settings' menu -> 'AI Internet Access' tab -> 'Enable AI Internet Access For' -> check the 'Chatbot Shortcodes' checkbox -> save settings.", 'aiomatic-automatic-ai-content-writer');
2724
+
?>
2725
+
</div>
2726
+
</div>
2727
+
<b><?php echo esc_html__("Enable Chatbot Internet Access:", 'aiomatic-automatic-ai-content-writer');?></b>
2728
+
</td>
2729
+
<td class="cr_min_width_200">
2730
+
<select id="no_internet_b" <?php if(!isset($aiomatic_Main_Settings['internet_chat_short']) || $aiomatic_Main_Settings['internet_chat_short'] != 'on'){ echo ' disabled title="' . esc_html__("For this to work, you need to enable internet access for the chatbot in the 'Settings' menu -> 'AI Internet Access' tab -> 'Chatbot Shortcodes' checkbox", 'aiomatic-automatic-ai-content-writer') . '"';}?> onchange="anythingChanged();" class="cr_width_full">
2731
+
<?php
2732
+
echo '<option selected value="enabled">Enabled</option>';
2733
+
echo '<option value="disabled">Disabled</option>';
2734
+
?>
2735
+
</select>
2736
+
</td>
2737
+
</tr><tr>
2738
+
<td>
2739
+
<div>
2740
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2741
+
<div class="bws_hidden_help_text cr_min_260px">
2742
+
<?php
2743
+
echo esc_html__("Select if you want to enable Chatbot embeddings for this specific chatbot? To enable embeddings, you have to go to the 'Settings' menu -> 'Embeddings' tab -> 'Enable Embeddings For' -> check the 'Chatbot Shortcodes' checkbox -> save settings.", 'aiomatic-automatic-ai-content-writer');
2744
+
?>
2745
+
</div>
2746
+
</div>
2747
+
<b><?php echo esc_html__("Enable Chatbot Embeddings:", 'aiomatic-automatic-ai-content-writer');?></b>
2748
+
</td>
2749
+
<td class="cr_min_width_200">
2750
+
<select id="no_embeddings_b" <?php if($pinecone_app_id == '' && $qdrant_app_id == ''){echo ' disabled title="You need to set up a Pinecone or a Qdrant API keys in plugin settings for this to work"';}else{if(!isset($aiomatic_Main_Settings['embeddings_chat_short']) || $aiomatic_Main_Settings['embeddings_chat_short'] != 'on'){ echo ' disabled title="' . esc_html__("For this to work, you need to enable embeddings for the chatbot in the 'Settings' menu -> 'Embeddings' tab -> 'Chatbot Shortcodes' checkbox", 'aiomatic-automatic-ai-content-writer') . '"';}}?> onchange="anythingChanged();" class="cr_width_full">
2751
+
<?php
2752
+
echo '<option selected value="enabled">Enabled</option>';
2753
+
echo '<option value="disabled">Disabled</option>';
2754
+
?>
2755
+
</select>
2756
+
</td>
2757
+
</tr><tr>
2758
+
<td>
2759
+
<div>
2760
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2761
+
<div class="bws_hidden_help_text cr_min_260px">
2762
+
<?php
2763
+
echo esc_html__("Set a custom embeddings namespace for this chatbot", 'aiomatic-automatic-ai-content-writer');
2764
+
?>
2765
+
</div>
2766
+
</div>
2767
+
<b><?php echo esc_html__("Chatbot Embeddings Namespace (Optional):", 'aiomatic-automatic-ai-content-writer');?></b>
2768
+
</td>
2769
+
<td class="cr_min_width_200">
2770
+
<input type="text" id="embeddings_namespace_b" <?php if($pinecone_app_id == '' && $qdrant_app_id == ''){echo ' disabled title="You need to set up a Pinecone or a Qdrant API keys in plugin settings for this to work"';}else{if(!isset($aiomatic_Main_Settings['embeddings_chat_short']) || $aiomatic_Main_Settings['embeddings_chat_short'] != 'on'){ echo ' disabled title="' . esc_html__("For this to work, you need to enable embeddings for the chatbot in the 'Settings' menu -> 'Embeddings' tab -> 'Chatbot Shortcodes' checkbox", 'aiomatic-automatic-ai-content-writer') . '"';}}?> value="" autocomplete="off" placeholder="Embeddings namespace" onchange="anythingChanged()" class="cr_width_full">
2771
+
</td>
2772
+
</tr>
2773
+
<tr><td>
2774
+
<div>
2775
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2776
+
<div class="bws_hidden_help_text cr_min_260px">
2777
+
<?php
2778
+
echo esc_html__("Select if you want to enable the prompts to be user editable. You should use this feature only together with the prompt templates feature. These are different from Conversation Starters, as these will not disappear after the first message is sent in the chatbot.", 'aiomatic-automatic-ai-content-writer');
2779
+
?>
2780
+
</div>
2781
+
</div>
2782
+
<b><?php echo esc_html__("Prompt Templates:", 'aiomatic-automatic-ai-content-writer');?></b>
2783
+
</div>
2784
+
</td><td>
2785
+
<div>
2786
+
<textarea rows="2" onchange="anythingChanged();" id="template_b" placeholder="Tell me a joke!;What can you do?;How's the weather today?;Help me with something."><?php
2787
+
echo esc_textarea($prompt_templates);
2788
+
?></textarea>
2789
+
</div>
2790
+
</td></tr>
2791
+
<tr><td>
2792
+
<div>
2793
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2794
+
<div class="bws_hidden_help_text cr_min_260px">
2795
+
<?php
2796
+
echo esc_html__("Select if you want to show to users of the chatbot an initial list of conversations starters, which appear as clickable buttons, for easier starting of conversations. Delimit multiple starters using ; characters. These are different from prompt templates, as they appear only before the user sends the first message to the bot.", 'aiomatic-automatic-ai-content-writer');
2797
+
?>
2798
+
</div>
2799
+
</div>
2800
+
<b><?php echo esc_html__("Conversation Starters:", 'aiomatic-automatic-ai-content-writer');?></b>
2801
+
</div>
2802
+
</td><td>
2803
+
<div>
2804
+
<textarea rows="2" onchange="anythingChanged();" id="conversation_starters_b" placeholder="Tell me a joke!;What can you do?;How's the weather today?;Help me with something."><?php
2805
+
echo esc_textarea($conversation_starters);
2806
+
?></textarea>
2807
+
</div>
2808
+
</td></tr>
2809
+
<tr>
2810
+
<td>
2811
+
<div>
2812
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2813
+
<div class="bws_hidden_help_text cr_min_260px">
2814
+
<?php
2815
+
echo esc_html__("Select if you want to allow editing of prompts when templates are used.", 'aiomatic-automatic-ai-content-writer');
2816
+
?>
2817
+
</div>
2818
+
</div>
2819
+
<b><?php echo esc_html__("Prompts Editable By Users:", 'aiomatic-automatic-ai-content-writer');?></b>
2820
+
</td>
2821
+
<td class="cr_min_width_200">
2822
+
<select id="prompt_editable_b" onchange="anythingChanged();" class="cr_width_full">
2823
+
<?php
2824
+
echo '<option' . ($prompt_editable == 'on' ? ' selected': '') . ' value="on">On</option>';
2825
+
echo '<option' . ($prompt_editable == 'off' ? ' selected': '') . ' value="off">Off</option>';
2826
+
?>
2827
+
</select>
2828
+
</td>
2829
+
</tr>
2830
+
<tr><td>
2831
+
<div>
2832
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2833
+
<div class="bws_hidden_help_text cr_min_260px">
2834
+
<?php
2835
+
echo esc_html__("Select if you want to inject the chatbot globally, to the entire front end and/or back end of your site.", 'aiomatic-automatic-ai-content-writer');
2836
+
?>
2837
+
</div>
2838
+
</div>
2839
+
<b><?php echo esc_html__("Inject Chatbot Globally To Your Site:", 'aiomatic-automatic-ai-content-writer');?></b>
2840
+
</div>
2841
+
</td><td>
2842
+
<div>
2843
+
<select id="enable_front_end_b" onchange="anythingChanged();" class="cr_width_full">
2844
+
<?php
2845
+
echo '<option' . ($enable_front_end == 'off' ? ' selected': '') . ' value="off">Off</option>';
2846
+
echo '<option' . ($enable_front_end == 'front' ? ' selected': '') . ' value="front">Front End</option>';
2847
+
echo '<option' . ($enable_front_end == 'back' ? ' selected': '') . ' value="back">Back End</option>';
2848
+
echo '<option' . ($enable_front_end == 'both' ? ' selected': '') . ' value="both">Front End & Back End</option>';
2849
+
?>
2850
+
</select>
2851
+
</div>
2852
+
</td></tr>
2853
+
<tr><td>
2854
+
<div>
2855
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2856
+
<div class="bws_hidden_help_text cr_min_260px">
2857
+
<?php
2858
+
echo esc_html__("Select where you want to show the embedded chatbot.", 'aiomatic-automatic-ai-content-writer');
2859
+
?>
2860
+
</div>
2861
+
</div>
2862
+
<b><?php echo esc_html__("Chatbot Location:", 'aiomatic-automatic-ai-content-writer');?></b>
2863
+
</div>
2864
+
</td><td>
2865
+
<div>
2866
+
<select id="window_location_b" onchange="anythingChanged();" class="cr_width_full">
2867
+
<?php
2868
+
echo '<option' . ($window_location == 'bottom-right' ? ' selected': '') . ' value="bottom-right">Bottom Right</option>';
2869
+
echo '<option' . ($window_location == 'bottom-left' ? ' selected': '') . ' value="bottom-left">Bottom Left</option>';
2870
+
echo '<option' . ($window_location == 'top-right' ? ' selected': '') . ' value="top-right">Top Right</option>';
2871
+
echo '<option' . ($window_location == 'top-left' ? ' selected': '') . ' value="top-left">Top Left</option>';
2872
+
?>
2873
+
</select>
2874
+
</div>
2875
+
</td></tr>
2876
+
<?php
2877
+
if(!function_exists('is_plugin_active'))
2878
+
{
2879
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2880
+
}
2881
+
$all_ok = true;
2882
+
$issue_counter = 1;
2883
+
if (!is_plugin_active('aiomatic-extension-pdf-files/aiomatic-extension-pdf-files.php'))
2884
+
{
2885
+
$all_ok = false;
2886
+
}
2887
+
if($pinecone_app_id == '' && $qdrant_app_id == '')
2888
+
{
2889
+
$all_ok = false;
2890
+
}
2891
+
if (!isset($aiomatic_Main_Settings['embeddings_chat_short']) || trim($aiomatic_Main_Settings['embeddings_chat_short']) != 'on')
2892
+
{
2893
+
$all_ok = false;
2894
+
}
2895
+
?>
2896
+
<tr><td>
2897
+
<div>
2898
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2899
+
<div class="bws_hidden_help_text cr_min_260px">
2900
+
<?php
2901
+
echo esc_html__("Select if you want to enable users to upload PDF files to the chatbot. This will require some prerequisites to function, please check the 'PDF Chat' tab for details.", 'aiomatic-automatic-ai-content-writer');
2902
+
?>
2903
+
</div>
2904
+
</div>
2905
+
<b><?php echo esc_html__("Enable Users To Upload PDF Files To The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
2906
+
</div>
2907
+
</td><td>
2908
+
<div>
2909
+
<select id="upload_pdf_b" <?php if($all_ok === false){echo ' disabled title="Feature not available, check the \'PDF Chat\' tab for details"';}?> onchange="anythingChanged();" >
2910
+
<?php
2911
+
echo '<option value="disabled"';
2912
+
if ($upload_pdf !== 'on' || $all_ok == false)
2913
+
{
2914
+
echo ' selected';
2915
+
}
2916
+
echo '>Disabled</option>';
2917
+
echo '<option value="enabled"';
2918
+
if ($upload_pdf == 'on' && $all_ok == true)
2919
+
{
2920
+
echo ' selected';
2921
+
}
2922
+
echo '>Enabled</option>';
2923
+
?>
2924
+
</select>
2925
+
</div>
2926
+
</td></tr>
2927
+
<tr><td>
2928
+
<div>
2929
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
2930
+
<div class="bws_hidden_help_text cr_min_260px">
2931
+
<?php
2932
+
echo esc_html__("Select if you want to enable/disable the chatbot Extensions feature. This can be used to enable a series of extensions, like social posting, email sending, Amazon product details scraping, website or RSS feed scraping, God Mode, which will allow ultimate control of your WordPress site, allowing it to call functions from WordPress directly. Using this feature, you will be able to create posts directly from the chatbot, assign taxonomies, images and many more! Warning! This is a BETA feature, use it with caution. This will apply only if regular AI models are used (not AI Assistants - for these, the God Mode needs to be enabled from Assistant editing menu). Also, God Mode will work only for logged in administrator privileged users.", 'aiomatic-automatic-ai-content-writer');
2933
+
?>
2934
+
</div>
2935
+
</div>
2936
+
<b><?php echo esc_html__("Enable Chatbot Extensions:", 'aiomatic-automatic-ai-content-writer');?></b>
2937
+
</div>
2938
+
</td><td>
2939
+
<div>
2940
+
<select multiple id="enable_god_mode_b" class="hideAssistantID resize_vertical" onchange="anythingChanged();" >
2941
+
<?php
2942
+
echo '<option selected value="disabled">Disabled</option>';
2943
+
echo '<option value="god_mode_ai">\'AI Generate Reasoning\' Extension</option>';
2944
+
echo '<option value="god_mode_enable_chart">\'AI Charts\' Extension</option>';
2945
+
echo '<option value="god_mode_enable_end">\'End Conversation\' Extension</option>';
2946
+
echo '<option value="god_mode_enable_dalle">\'Dall-E Image\' Extension</option>';
2947
+
echo '<option value="god_mode_enable_midjourney">\'Midjourney Image\' Extension</option>';
2948
+
echo '<option value="god_mode_enable_replicate">\'Replicate Image\' Extension</option>';
2949
+
echo '<option value="god_mode_enable_ideogram">\'Ideogram Image\' Extension</option>';
2950
+
echo '<option value="god_mode_enable_google_image">\'Google Image\' Extension</option>';
2951
+
echo '<option value="god_mode_enable_stable">\'Stable Diffusion Image\' Extension</option>';
2952
+
echo '<option value="god_mode_enable_stable_video">\'Stable Diffusion Video\' Extension</option>';
2953
+
echo '<option value="god_mode_enable_amazon">\'Amazon Product Listing\' Extension</option>';
2954
+
echo '<option value="god_mode_enable_amazon_details">\'Amazon Product Details\' Extension</option>';
2955
+
echo '<option value="god_mode_enable_booking">\'The Booking Calendar Integration\' Extension</option>';
2956
+
echo '<option value="god_mode_enable_scraper">\'Website Scraper\' Extension</option>';
2957
+
echo '<option value="god_mode_enable_rss">\'RSS Feed Parser\' Extension</option>';
2958
+
echo '<option value="god_mode_enable_google">\'Google SERP Parser\' Extension</option>';
2959
+
echo '<option value="god_mode_enable_youtube_captions">\'YouTube Video Captions\' Extension</option>';
2960
+
echo '<option value="god_mode_enable_royalty">\'Royalty Free Image Search\' Extension</option>';
2961
+
echo '<option value="god_mode_lead_capture">\'Lead Capture\' Extension</option>';
2962
+
echo '<option value="god_mode_enable_youtube">\'YouTube Video Search\' Extension</option>';
2963
+
echo '<option value="god_mode_enable_email">\'Email Sending\' Extension</option>';
2964
+
echo '<option value="god_mode_enable_webhook">\'Webhook Calling\' Extension</option>';
2965
+
echo '<option value="god_mode_enable_omniblock">\'OmniBlock Rule Trigger\' Extension</option>';
2966
+
echo '<option value="god_mode_enable_database">\'Database Access\' Extension (WordPress Database Query)</option>';
2967
+
echo '<option value="god_mode_enable_wp">\'God Mode\' Extension (WordPress Function Calling)</option>';
2968
+
if(!function_exists('is_plugin_active'))
2969
+
{
2970
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2971
+
}
2972
+
$no_pl = '';
2973
+
if (!is_plugin_active('aiomatic-extension-toubiz-api/aiomatic-extension-toubiz-api.php'))
2974
+
{
2975
+
$no_pl = ' disabled';
2976
+
}
2977
+
echo '<option value="god_mode_enable_toubiz"' . esc_html($no_pl) . '>\'Toubiz API Integration\' Extension</option>';
2978
+
$no_pl = '';
2979
+
if (!is_plugin_active('fbomatic-facebook-post-generator/fbomatic-facebook-post-generator.php'))
2980
+
{
2981
+
$no_pl = ' disabled';
2982
+
}
2983
+
echo '<option value="god_mode_enable_facebook_post"' . esc_html($no_pl) . '>\'Facebook Posting\' Extension</option>';
2984
+
$no_pl = '';
2985
+
if (!is_plugin_active('twitomatic-twitter-post-generator/twitomatic-twitter-post-generator.php'))
2986
+
{
2987
+
$no_pl = ' disabled';
2988
+
}
2989
+
echo '<option value="god_mode_enable_twitter_post"' . esc_html($no_pl) . '>\'Twitter (X) Posting\' Extension</option>';
2990
+
$no_pl = '';
2991
+
if (!is_plugin_active('threadsomatic-threads-auto-poster/threadsomatic-threads-auto-poster.php'))
2992
+
{
2993
+
$no_pl = ' disabled';
2994
+
}
2995
+
echo '<option value="god_mode_enable_threads_post"' . esc_html($no_pl) . '>\'Threads Posting\' Extension</option>';
2996
+
$no_pl = '';
2997
+
if (!is_plugin_active('instamatic-instagram-post-generator/instamatic-instagram-post-generator.php'))
2998
+
{
2999
+
$no_pl = ' disabled';
3000
+
}
3001
+
echo '<option value="god_mode_enable_instagram_post"' . esc_html($no_pl) . '>\'Instagram Posting\' Extension</option>';
3002
+
$no_pl = '';
3003
+
if (!is_plugin_active('pinterestomatic-pinterest-post-generator/pinterestomatic-pinterest-post-generator.php'))
3004
+
{
3005
+
$no_pl = ' disabled';
3006
+
}
3007
+
echo '<option value="god_mode_enable_pinterest_post"' . esc_html($no_pl) . '>\'Pinterest Posting\' Extension</option>';
3008
+
$no_pl = '';
3009
+
if (!is_plugin_active('businessomatic-google-my-business-post-generator/businessomatic-google-my-business-post-generator.php'))
3010
+
{
3011
+
$no_pl = ' disabled';
3012
+
}
3013
+
echo '<option value="god_mode_enable_google_post"' . esc_html($no_pl) . '>\'Google My Business Posting\' Extension</option>';
3014
+
$no_pl = '';
3015
+
if (!is_plugin_active('youtubomatic-youtube-post-generator/youtubomatic-youtube-post-generator.php'))
3016
+
{
3017
+
$no_pl = ' disabled';
3018
+
}
3019
+
echo '<option value="god_mode_enable_youtube_post"' . esc_html($no_pl) . '>\'YouTube Community Posting\' Extension</option>';
3020
+
$no_pl = '';
3021
+
if (!is_plugin_active('redditomatic-reddit-post-generator/redditomatic-reddit-post-generator.php'))
3022
+
{
3023
+
$no_pl = ' disabled';
3024
+
}
3025
+
echo '<option value="god_mode_enable_reddit_post"' . esc_html($no_pl) . '>\'Reddit Posting\' Extension</option>';
3026
+
$no_pl = '';
3027
+
if (!is_plugin_active('linkedinomatic-linkedin-post-generator/linkedinomatic-linkedin-post-generator.php'))
3028
+
{
3029
+
$no_pl = ' disabled';
3030
+
}
3031
+
echo '<option value="god_mode_enable_linkedin_post"' . esc_html($no_pl) . '>\'LinkedIn Posting\' Extension</option>';
3032
+
echo '<option value="enabled">' . esc_html__("Enable All Globally Activated Extensions", 'aiomatic-automatic-ai-content-writer') . '</option>';
3033
+
?>
3034
+
</select>
3035
+
</div>
3036
+
</td></tr>
3037
+
<tr><td>
3038
+
<div>
3039
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3040
+
<div class="bws_hidden_help_text cr_min_260px">
3041
+
<?php
3042
+
echo esc_html__("Select if you want to enable chatbot text to speech/video.", 'aiomatic-automatic-ai-content-writer');
3043
+
?>
3044
+
</div>
3045
+
</div>
3046
+
<b><?php echo esc_html__("Enable Chatbot Text-to-Speech/Video:", 'aiomatic-automatic-ai-content-writer');?></b>
3047
+
</div>
3048
+
</td><td>
3049
+
<select id="chatbot_text_speech_b" onchange="anythingChanged()" >
3050
+
<?php
3051
+
echo '<option' . ($chatbot_text_speech == 'off' ? ' selected': '') . ' value="off">Off</option>';
3052
+
echo '<option' . ($chatbot_text_speech == 'free' ? ' selected': '') . ' value="free">Browser Text-to-Speech (Free)</option>';
3053
+
if (!isset($aiomatic_Main_Settings['app_id']))
3054
+
{
3055
+
$aiomatic_Main_Settings['app_id'] = '';
3056
+
}
3057
+
$appids = preg_split('/\r\n|\r|\n/', trim($aiomatic_Main_Settings['app_id']));
3058
+
$appids = array_filter($appids);
3059
+
if(empty($appids))
3060
+
{
3061
+
$token = '';
3062
+
}
3063
+
else
3064
+
{
3065
+
$token = $appids[array_rand($appids)];
3066
+
$token = apply_filters('aimogen_openai_api_key', $token);$token = apply_filters('aiomatic_openai_api_key', $token);
3067
+
}
3068
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure')))
3069
+
{
3070
+
echo '<option' . ($chatbot_text_speech == 'openai' ? ' selected': '') . ' value="openai">OpenAI Text-to-Speech</option>';
3071
+
}
3072
+
else
3073
+
{
3074
+
echo '<option' . ($chatbot_text_speech == 'openai' ? ' selected': '') . ' disabled value="openai">OpenAI Text-to-Speech (' . esc_html__("Currently Only OpenAI API is supported for TTS", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3075
+
}
3076
+
if (isset($aiomatic_Main_Settings['elevenlabs_app_id']) && trim($aiomatic_Main_Settings['elevenlabs_app_id']) != '')
3077
+
{
3078
+
echo '<option' . ($chatbot_text_speech == 'elevenlabs' ? ' selected': '') . ' value="elevenlabs">ElevenLabs.io Text-to-Speech</option>';
3079
+
}
3080
+
else
3081
+
{
3082
+
echo '<option' . ($chatbot_text_speech == 'elevenlabs' ? ' selected': '') . ' disabled value="elevenlabs">ElevenLabs.io Text-to-Speech (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3083
+
}
3084
+
if (isset($aiomatic_Main_Settings['google_app_id']) && trim($aiomatic_Main_Settings['google_app_id']) != '')
3085
+
{
3086
+
echo '<option' . ($chatbot_text_speech == 'google' ? ' selected': '') . ' value="google">Google Text-to-Speech</option>';
3087
+
}
3088
+
else
3089
+
{
3090
+
echo '<option' . ($chatbot_text_speech == 'google' ? ' selected': '') . ' disabled value="google">Google Text-to-Speech (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3091
+
}
3092
+
if (isset($aiomatic_Main_Settings['did_app_id']) && trim($aiomatic_Main_Settings['did_app_id']) != '')
3093
+
{
3094
+
echo '<option' . ($chatbot_text_speech == 'did' ? ' selected': '') . ' value="did">D-ID Text-to-Video</option>';
3095
+
echo '<option' . ($chatbot_text_speech == 'didstream' ? ' selected': '') . ' value="didstream">D-ID Text-to-Video Streaming</option>';
3096
+
}
3097
+
else
3098
+
{
3099
+
echo '<option' . ($chatbot_text_speech == 'did' ? ' selected': '') . ' disabled value="did">D-ID Text-to-Video (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3100
+
echo '<option' . ($chatbot_text_speech == 'didstream' ? ' selected': '') . ' disabled value="didstream">D-ID Text-to-Video Streaming (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3101
+
}
3102
+
if (isset($aiomatic_Main_Settings['azure_speech_id']) && trim($aiomatic_Main_Settings['azure_speech_id']) != '')
3103
+
{
3104
+
echo '<option' . ($chatbot_text_speech == 'azure' ? ' selected': '') . ' value="azure">Azure Text-to-Video Streaming</option>';
3105
+
}
3106
+
else
3107
+
{
3108
+
echo '<option' . ($chatbot_text_speech == 'azure' ? ' selected': '') . ' disabled value="azure">Azure Text-to-Video Streaming (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
3109
+
}
3110
+
?>
3111
+
</select>
3112
+
</td></tr>
3113
+
<tr><td>
3114
+
<div>
3115
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3116
+
<div class="bws_hidden_help_text cr_min_260px">
3117
+
<?php
3118
+
echo esc_html__("Select if you want to overwrite the chatbot text-to-speech voice ID. This needs to be exactly matching the voice ID of the text-to-speech engine you are using. For example, for OpenAI Text-to-Speech API, the voice IDs can be: alloy, echo, onyx, nova, fable, shimmer", 'aiomatic-automatic-ai-content-writer');
3119
+
?>
3120
+
</div>
3121
+
</div>
3122
+
<b><?php echo esc_html__("Overwrite Chatbot Text-to-Speech Voice ID:", 'aiomatic-automatic-ai-content-writer');?></b>
3123
+
</div>
3124
+
</td><td>
3125
+
<div>
3126
+
<?php
3127
+
if($chatbot_text_speech == 'openai')
3128
+
{
3129
+
?>
3130
+
<select id="chatbot_voice_b" onchange="anythingChanged()" class="cr_width_full">
3131
+
<?php
3132
+
echo '<option value="">Select a voice</option>';
3133
+
echo '<option value="alloy">alloy</option>';
3134
+
echo '<option value="echo">echo</option>';
3135
+
echo '<option value="fable">fable</option>';
3136
+
echo '<option value="nova">nova</option>';
3137
+
echo '<option value="onyx">onyx</option>';
3138
+
echo '<option value="shimmer">shimmer</option>';
3139
+
?>
3140
+
</select>
3141
+
<?php
3142
+
}
3143
+
elseif($chatbot_text_speech == 'did' || $chatbot_text_speech == 'didstream')
3144
+
{
3145
+
?>
3146
+
<input id="chatbot_voice_b" value="" list="did_voice_list" autocomplete="off" placeholder="Custom chatbot voice" onchange="anythingChanged()" class="cr_width_full"/>
3147
+
<?php
3148
+
}
3149
+
elseif($chatbot_text_speech == 'elevenlabs')
3150
+
{
3151
+
?>
3152
+
<select id="chatbot_voice_b" onchange="anythingChanged()" class="cr_width_full">
3153
+
<?php
3154
+
$eleven_voices = aiomatic_get_eleven_voices();
3155
+
if($eleven_voices === false)
3156
+
{
3157
+
echo '<option value="" disabled>'.esc_html__("Failed to list voices!", 'aiomatic-automatic-ai-content-writer').'</option>';
3158
+
}
3159
+
else
3160
+
{
3161
+
echo '<option value="">Select a voice</option>';
3162
+
foreach($eleven_voices as $key => $voice)
3163
+
{
3164
+
echo '<option value="'.esc_attr($key).'">'.esc_html($voice).'</option>';
3165
+
}
3166
+
}
3167
+
?>
3168
+
</select>
3169
+
<?php
3170
+
}
3171
+
elseif($chatbot_text_speech == 'google')
3172
+
{
3173
+
?>
3174
+
<select id="chatbot_voice_b" onchange="anythingChanged()" class="cr_width_full">
3175
+
<?php
3176
+
$google_voices = aiomatic_get_google_voices($voice_language);
3177
+
if($google_voices === false)
3178
+
{
3179
+
echo '<option value="" disabled>'.esc_html__("Failed to list voices!", 'aiomatic-automatic-ai-content-writer').'</option>';
3180
+
}
3181
+
else
3182
+
{
3183
+
echo '<option value="">Select a voice</option>';
3184
+
foreach($google_voices as $key => $voice)
3185
+
{
3186
+
echo '<option value="'.esc_attr($voice['name']).'">'.esc_html($voice['name']).'</option>';
3187
+
}
3188
+
}
3189
+
?>
3190
+
</select>
3191
+
<?php
3192
+
}
3193
+
elseif($chatbot_text_speech == 'azure')
3194
+
{
3195
+
?>
3196
+
<input id="chatbot_voice_b" value="" autocomplete="off" placeholder="Custom chatbot voice" onchange="anythingChanged()" class="cr_width_full"/>
3197
+
<?php
3198
+
}
3199
+
else
3200
+
{
3201
+
?>
3202
+
<input type="text" id="chatbot_voice_b" value="" autocomplete="off" placeholder="Custom chatbot voice" onchange="anythingChanged()" class="cr_width_full">
3203
+
<?php
3204
+
}
3205
+
?>
3206
+
</div>
3207
+
</td></tr>
3208
+
<tr><td>
3209
+
<div>
3210
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3211
+
<div class="bws_hidden_help_text cr_min_260px">
3212
+
<?php
3213
+
echo esc_html__("Select if you want to overwrite the chatbot video avatar URL.", 'aiomatic-automatic-ai-content-writer');
3214
+
?>
3215
+
</div>
3216
+
</div>
3217
+
<b><?php echo esc_html__("Overwrite Chatbot Video Avatar URL:", 'aiomatic-automatic-ai-content-writer');?></b>
3218
+
</div>
3219
+
</td><td>
3220
+
<input type="text" id="chatbot_video_b" value="" autocomplete="off" placeholder="Custom chatbot video avatar" onchange="anythingChanged()" class="cr_width_full">
3221
+
</td></tr>
3222
+
<tr><td>
3223
+
<h2><?php echo esc_html__("Chatbot Styling Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
3224
+
</td></tr>
3225
+
<tr><td>
3226
+
<div>
3227
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3228
+
<div class="bws_hidden_help_text cr_min_260px">
3229
+
<?php
3230
+
echo esc_html__("Select if you want to show the chatbot header.", 'aiomatic-automatic-ai-content-writer');
3231
+
?>
3232
+
</div>
3233
+
</div>
3234
+
<b><?php echo esc_html__("Show Chatbot Header:", 'aiomatic-automatic-ai-content-writer');?></b>
3235
+
</div>
3236
+
</td><td>
3237
+
<div>
3238
+
<select id="show_header_b" onchange="anythingChanged();" >
3239
+
<?php
3240
+
echo '<option'.($show_header == 'show' ? ' selected': '').' value="show">Show</option>';
3241
+
echo '<option'.($show_header == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3242
+
?>
3243
+
</select>
3244
+
</div>
3245
+
</td></tr>
3246
+
<tr><td>
3247
+
<div>
3248
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3249
+
<div class="bws_hidden_help_text cr_min_260px">
3250
+
<?php
3251
+
echo esc_html__("Select if you want to show the Chat Log TXT or PDF File Download Button.", 'aiomatic-automatic-ai-content-writer');
3252
+
?>
3253
+
</div>
3254
+
</div>
3255
+
<b><?php echo esc_html__("Show Chat Log File Download Button:", 'aiomatic-automatic-ai-content-writer');?></b>
3256
+
</div>
3257
+
</td><td>
3258
+
<div>
3259
+
<select id="show_dltxt_b" onchange="anythingChanged();" >
3260
+
<?php
3261
+
echo '<option'.($show_dltxt == 'show' ? ' selected': '').' value="show">Show</option>';
3262
+
echo '<option'.($show_dltxt == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3263
+
?>
3264
+
</select>
3265
+
</div>
3266
+
</td></tr>
3267
+
<tr><td>
3268
+
<div>
3269
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3270
+
<div class="bws_hidden_help_text cr_min_260px">
3271
+
<?php
3272
+
echo esc_html__("Select if you want to show the Text-To-Speech Mute Button.", 'aiomatic-automatic-ai-content-writer');
3273
+
?>
3274
+
</div>
3275
+
</div>
3276
+
<b><?php echo esc_html__("Show Text-To-Speech Mute Button:", 'aiomatic-automatic-ai-content-writer');?></b>
3277
+
</div>
3278
+
</td><td>
3279
+
<div>
3280
+
<select id="show_mute_b" onchange="anythingChanged();" >
3281
+
<?php
3282
+
echo '<option'.($show_mute == 'show' ? ' selected': '').' value="show">Show</option>';
3283
+
echo '<option'.($show_mute == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3284
+
?>
3285
+
</select>
3286
+
</div>
3287
+
</td></tr>
3288
+
<tr><td>
3289
+
<div>
3290
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3291
+
<div class="bws_hidden_help_text cr_min_260px">
3292
+
<?php
3293
+
echo esc_html__("Select if you want to show the Internet Access Button.", 'aiomatic-automatic-ai-content-writer');
3294
+
?>
3295
+
</div>
3296
+
</div>
3297
+
<b><?php echo esc_html__("Show Internet Access Button:", 'aiomatic-automatic-ai-content-writer');?></b>
3298
+
</div>
3299
+
</td><td>
3300
+
<div>
3301
+
<select id="show_internet_b" onchange="anythingChanged();" >
3302
+
<?php
3303
+
echo '<option'.($show_internet == 'show' ? ' selected': '').' value="show">Show</option>';
3304
+
echo '<option'.($show_internet == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3305
+
?>
3306
+
</select>
3307
+
</div>
3308
+
</td></tr>
3309
+
<tr><td>
3310
+
<div>
3311
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3312
+
<div class="bws_hidden_help_text cr_min_260px">
3313
+
<?php
3314
+
echo esc_html__("Select if you want to show the clearing button.", 'aiomatic-automatic-ai-content-writer');
3315
+
?>
3316
+
</div>
3317
+
</div>
3318
+
<b><?php echo esc_html__("Show Chat Clearing Button:", 'aiomatic-automatic-ai-content-writer');?></b>
3319
+
</div>
3320
+
</td><td>
3321
+
<div>
3322
+
<select id="show_clear_b" onchange="anythingChanged();" >
3323
+
<?php
3324
+
echo '<option'.($show_clear == 'show' ? ' selected': '').' value="show">Show</option>';
3325
+
echo '<option'.($show_clear == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3326
+
?>
3327
+
</select>
3328
+
</div>
3329
+
</td></tr>
3330
+
<tr><td>
3331
+
<div>
3332
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3333
+
<div class="bws_hidden_help_text cr_min_260px">
3334
+
<?php
3335
+
echo esc_html__("Select the chat font size of the chatbot form. Default is 1em", 'aiomatic-automatic-ai-content-writer');
3336
+
?>
3337
+
</div>
3338
+
</div>
3339
+
<b><?php echo esc_html__("Chat Font Size:", 'aiomatic-automatic-ai-content-writer');?></b>
3340
+
</div>
3341
+
</td><td>
3342
+
<div>
3343
+
<select id="font_size_b" onchange="anythingChanged();" >
3344
+
<?php
3345
+
echo '<option'.($font_size == '1em' ? ' selected': '').' value="1em">1em</option>';
3346
+
for($i = 10; $i <= 30; $i++){
3347
+
echo '<option'.($font_size == $i . 'px' ? ' selected': '').' value="'.esc_html($i).'px">'.esc_html($i).'px</option>';
3348
+
}
3349
+
?>
3350
+
</select>
3351
+
</div>
3352
+
</td></tr>
3353
+
<tr><td>
3354
+
<div>
3355
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3356
+
<div class="bws_hidden_help_text cr_min_260px">
3357
+
<?php
3358
+
echo esc_html__("Select the width of the chatbot form. For full width, you can set 100% (default value). You can also set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
3359
+
?>
3360
+
</div>
3361
+
</div>
3362
+
<b><?php echo esc_html__("Chat Form Width:", 'aiomatic-automatic-ai-content-writer');?></b>
3363
+
</div>
3364
+
</td><td>
3365
+
<div>
3366
+
<input type="text" id="width_b" value="<?php echo esc_html($width);?>" placeholder="100%" onchange="anythingChanged()">
3367
+
</div>
3368
+
</td></tr>
3369
+
<tr><td>
3370
+
<div>
3371
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3372
+
<div class="bws_hidden_help_text cr_min_260px">
3373
+
<?php
3374
+
echo esc_html__("Select the height of the chatbot form. Default is auto. You can set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
3375
+
?>
3376
+
</div>
3377
+
</div>
3378
+
<b><?php echo esc_html__("Chat Form Height:", 'aiomatic-automatic-ai-content-writer');?></b>
3379
+
</div>
3380
+
</td><td>
3381
+
<div>
3382
+
<input type="text" id="height_b" value="<?php echo esc_html($height);?>" placeholder="auto" onchange="anythingChanged()">
3383
+
</div>
3384
+
</td></tr>
3385
+
<tr><td>
3386
+
<div>
3387
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3388
+
<div class="bws_hidden_help_text cr_min_260px">
3389
+
<?php
3390
+
echo esc_html__("Select the min-height of the chatbot form (when the form is resized, this is the minimum height it will be allowed to get. Default is 250px. You can set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
3391
+
?>
3392
+
</div>
3393
+
</div>
3394
+
<b><?php echo esc_html__("Chat Form Min-Height:", 'aiomatic-automatic-ai-content-writer');?></b>
3395
+
</div>
3396
+
</td><td>
3397
+
<div>
3398
+
<input type="text" id="minheight_b" value="<?php echo esc_html($minheight);?>" placeholder="250px" onchange="anythingChanged()">
3399
+
</div>
3400
+
</td></tr>
3401
+
<tr><td>
3402
+
<div>
3403
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3404
+
<div class="bws_hidden_help_text cr_min_260px">
3405
+
<?php
3406
+
echo esc_html__("Select the width of the chatbot bubbles.", 'aiomatic-automatic-ai-content-writer');
3407
+
?>
3408
+
</div>
3409
+
</div>
3410
+
<b><?php echo esc_html__("Chat Bubble Width:", 'aiomatic-automatic-ai-content-writer');?></b>
3411
+
</div>
3412
+
</td><td>
3413
+
<div>
3414
+
<select id="bubble_width_b" class="cr_width_full" onchange="anythingChanged()">
3415
+
<?php
3416
+
echo '<option' . (($bubble_width == 'full' || empty($bubble_width)) ? ' selected': '') . ' value="full">' . esc_html__("Full Width", 'aiomatic-automatic-ai-content-writer') . '</option>';
3417
+
echo '<option' . ($bubble_width == 'auto' ? ' selected': '') . ' value="auto">' . esc_html__("Resize To Text Width", 'aiomatic-automatic-ai-content-writer') . '</option>';
3418
+
?>
3419
+
</select>
3420
+
</div>
3421
+
</td></tr>
3422
+
<tr><td>
3423
+
<div>
3424
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3425
+
<div class="bws_hidden_help_text cr_min_260px">
3426
+
<?php
3427
+
echo esc_html__("Select the alignment of the chatbot bubbles.", 'aiomatic-automatic-ai-content-writer');
3428
+
?>
3429
+
</div>
3430
+
</div>
3431
+
<b><?php echo esc_html__("Bot Avatar/Chat Bubble Alignment:", 'aiomatic-automatic-ai-content-writer');?></b>
3432
+
</div>
3433
+
</td><td>
3434
+
<div>
3435
+
<select id="bubble_alignment_b" class="cr_width_full" onchange="anythingChanged()">
3436
+
<?php
3437
+
echo '<option' . (($bubble_alignment == 'left' || empty($bubble_alignment)) ? ' selected': '') . ' value="left">' . esc_html__("Left", 'aiomatic-automatic-ai-content-writer') . '</option>';
3438
+
echo '<option' . ($bubble_alignment == 'right' ? ' selected': '') . ' value="right">' . esc_html__("Right", 'aiomatic-automatic-ai-content-writer') . '</option>';
3439
+
echo '<option' . ($bubble_alignment == 'center' ? ' selected': '') . ' value="center">' . esc_html__("Center", 'aiomatic-automatic-ai-content-writer') . '</option>';
3440
+
?>
3441
+
</select>
3442
+
</div>
3443
+
</td></tr>
3444
+
<tr><td>
3445
+
<div>
3446
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3447
+
<div class="bws_hidden_help_text cr_min_260px">
3448
+
<?php
3449
+
echo esc_html__("Select the alignment of the user bubbles.", 'aiomatic-automatic-ai-content-writer');
3450
+
?>
3451
+
</div>
3452
+
</div>
3453
+
<b><?php echo esc_html__("User Avatar/Chat Bubble Alignment:", 'aiomatic-automatic-ai-content-writer');?></b>
3454
+
</div>
3455
+
</td><td>
3456
+
<div>
3457
+
<select id="bubble_user_alignment_b" class="cr_width_full" onchange="anythingChanged()">
3458
+
<?php
3459
+
echo '<option' . (($bubble_user_alignment == 'left' || empty($bubble_user_alignment)) ? ' selected': '') . ' value="left">' . esc_html__("Left", 'aiomatic-automatic-ai-content-writer') . '</option>';
3460
+
echo '<option' . ($bubble_user_alignment == 'right' ? ' selected': '') . ' value="right">' . esc_html__("Right", 'aiomatic-automatic-ai-content-writer') . '</option>';
3461
+
echo '<option' . ($bubble_user_alignment == 'center' ? ' selected': '') . ' value="center">' . esc_html__("Center", 'aiomatic-automatic-ai-content-writer') . '</option>';
3462
+
?>
3463
+
</select>
3464
+
</div>
3465
+
</td></tr>
3466
+
<tr><td>
3467
+
<div>
3468
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3469
+
<div class="bws_hidden_help_text cr_min_260px">
3470
+
<?php
3471
+
echo esc_html__("Select if you want to show the chatbot avatar in the conversation?", 'aiomatic-automatic-ai-content-writer');
3472
+
?>
3473
+
</div>
3474
+
</div>
3475
+
<b><?php echo esc_html__("Show AI Chatbot Avatar In Conversation:", 'aiomatic-automatic-ai-content-writer');?></b>
3476
+
</div>
3477
+
</td><td>
3478
+
<div>
3479
+
<select id="show_ai_avatar_b" onchange="anythingChanged();" >
3480
+
<?php
3481
+
echo '<option'.($show_ai_avatar == 'show' ? ' selected': '').' value="show">Show</option>';
3482
+
echo '<option'.($show_ai_avatar == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3483
+
?>
3484
+
</select>
3485
+
</div>
3486
+
</td></tr>
3487
+
<tr><td>
3488
+
<div>
3489
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3490
+
<div class="bws_hidden_help_text cr_min_260px">
3491
+
<?php
3492
+
echo esc_html__("Select if you want to show the chatbot avatar in the conversation?", 'aiomatic-automatic-ai-content-writer');
3493
+
?>
3494
+
</div>
3495
+
</div>
3496
+
<b><?php echo esc_html__("Show User Chatbot Avatar In Conversation:", 'aiomatic-automatic-ai-content-writer');?></b>
3497
+
</div>
3498
+
</td><td>
3499
+
<div>
3500
+
<select id="show_user_avatar_b" onchange="anythingChanged();" >
3501
+
<?php
3502
+
echo '<option'.($show_user_avatar == 'show' ? ' selected': '').' value="show">Show</option>';
3503
+
echo '<option'.($show_user_avatar == 'hide' ? ' selected': '').' value="hide">Hide</option>';
3504
+
?>
3505
+
</select>
3506
+
</div>
3507
+
</td></tr>
3508
+
<tr><td>
3509
+
<div>
3510
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3511
+
<div class="bws_hidden_help_text cr_min_260px">
3512
+
<?php
3513
+
echo esc_html__("Set your own custom header text for the chatbot.", 'aiomatic-automatic-ai-content-writer');
3514
+
?>
3515
+
</div>
3516
+
</div>
3517
+
<b><?php echo esc_html__("Chatbot Custom Header Text:", 'aiomatic-automatic-ai-content-writer');?></b>
3518
+
</div>
3519
+
</td><td>
3520
+
<div>
3521
+
<?php
3522
+
$settings = array(
3523
+
'media_buttons' => true,
3524
+
'quicktags' => true,
3525
+
'tabindex' => '4',
3526
+
'editor_height' => 80,
3527
+
'teeny' => false
3528
+
);
3529
+
wp_editor( $custom_header, 'custom_header_b', $settings );
3530
+
?>
3531
+
</div>
3532
+
</td></tr>
3533
+
<tr><td>
3534
+
<div>
3535
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3536
+
<div class="bws_hidden_help_text cr_min_260px">
3537
+
<?php
3538
+
echo esc_html__("Set your own custom footer text for the chatbot.", 'aiomatic-automatic-ai-content-writer');
3539
+
?>
3540
+
</div>
3541
+
</div>
3542
+
<b><?php echo esc_html__("Chatbot Custom Footer Text:", 'aiomatic-automatic-ai-content-writer');?></b>
3543
+
</div>
3544
+
</td><td>
3545
+
<div>
3546
+
<?php
3547
+
$settings = array(
3548
+
'media_buttons' => true,
3549
+
'quicktags' => true,
3550
+
'tabindex' => '4',
3551
+
'editor_height' => 80,
3552
+
'teeny' => false
3553
+
);
3554
+
wp_editor( $custom_footer, 'custom_footer_b', $settings );
3555
+
?>
3556
+
</div>
3557
+
</td></tr>
3558
+
<tr><td>
3559
+
<div>
3560
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3561
+
<div class="bws_hidden_help_text cr_min_260px">
3562
+
<?php
3563
+
echo esc_html__("Set your own custom CSS code for the chatbot.", 'aiomatic-automatic-ai-content-writer');
3564
+
?>
3565
+
</div>
3566
+
</div>
3567
+
<b><?php echo esc_html__("Chatbot Custom CSS Code:", 'aiomatic-automatic-ai-content-writer');?></b>
3568
+
</div>
3569
+
</td><td>
3570
+
<div>
3571
+
<?php
3572
+
$settings = array(
3573
+
'media_buttons' => true,
3574
+
'quicktags' => true,
3575
+
'tabindex' => '4',
3576
+
'editor_height' => 80,
3577
+
'teeny' => false
3578
+
);
3579
+
wp_editor( $custom_css, 'custom_css_b', $settings );
3580
+
?>
3581
+
</div>
3582
+
</td></tr>
3583
+
<tr><td colspan="2"><h2><?php echo esc_html__("AI Chatbot Coloring Options:", 'aiomatic-automatic-ai-content-writer');?></h2></td></tr>
3584
+
<tr><td>
3585
+
<div>
3586
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3587
+
<div class="bws_hidden_help_text cr_min_260px">
3588
+
<?php
3589
+
echo esc_html__("Select the background color of the chatbot form. Default is #ffffff", 'aiomatic-automatic-ai-content-writer');
3590
+
?>
3591
+
</div>
3592
+
</div>
3593
+
<b><?php echo esc_html__("Form Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3594
+
</div>
3595
+
</td><td>
3596
+
<div>
3597
+
<input type="color" id="general_background_b" value="<?php echo esc_attr($general_background);?>" onchange="anythingChanged()">
3598
+
</div>
3599
+
</td></tr>
3600
+
<tr><td>
3601
+
<div>
3602
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3603
+
<div class="bws_hidden_help_text cr_min_260px">
3604
+
<?php
3605
+
echo esc_html__("Select the background color of the chatbot form. Default is #f7f7f9", 'aiomatic-automatic-ai-content-writer');
3606
+
?>
3607
+
</div>
3608
+
</div>
3609
+
<b><?php echo esc_html__("Input Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3610
+
</div>
3611
+
</td><td>
3612
+
<div>
3613
+
<input type="color" id="background_b" value="<?php echo esc_html($background);?>" onchange="anythingChanged()">
3614
+
</div>
3615
+
</td></tr>
3616
+
<tr><td>
3617
+
<div>
3618
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3619
+
<div class="bws_hidden_help_text cr_min_260px">
3620
+
<?php
3621
+
echo esc_html__("Select the font color of the user chatbot form. Default is white", 'aiomatic-automatic-ai-content-writer');
3622
+
?>
3623
+
</div>
3624
+
</div>
3625
+
<b><?php echo esc_html__("User Font Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3626
+
</div>
3627
+
</td><td>
3628
+
<div>
3629
+
<input type="color" id="user_font_color_b" value="<?php echo esc_html($user_font_color);?>" onchange="anythingChanged()">
3630
+
</div>
3631
+
</td></tr>
3632
+
<tr><td>
3633
+
<div>
3634
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3635
+
<div class="bws_hidden_help_text cr_min_260px">
3636
+
<?php
3637
+
echo esc_html__("Select the font color of the user baloon chatbot form. Default is #0084ff", 'aiomatic-automatic-ai-content-writer');
3638
+
?>
3639
+
</div>
3640
+
</div>
3641
+
<b><?php echo esc_html__("User Baloon Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3642
+
</div>
3643
+
</td><td>
3644
+
<div>
3645
+
<input type="color" id="user_background_color_b" value="<?php echo esc_html($user_background_color);?>" onchange="anythingChanged()">
3646
+
</div>
3647
+
</td></tr>
3648
+
<tr><td>
3649
+
<div>
3650
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3651
+
<div class="bws_hidden_help_text cr_min_260px">
3652
+
<?php
3653
+
echo esc_html__("Select the font color of the AI chatbot form. Default is black", 'aiomatic-automatic-ai-content-writer');
3654
+
?>
3655
+
</div>
3656
+
</div>
3657
+
<b><?php echo esc_html__("AI Font Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3658
+
</div>
3659
+
</td><td>
3660
+
<div>
3661
+
<input type="color" id="ai_font_color_b" value="<?php echo esc_html($ai_font_color);?>" onchange="anythingChanged()">
3662
+
</div>
3663
+
</td></tr>
3664
+
<tr><td>
3665
+
<div>
3666
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3667
+
<div class="bws_hidden_help_text cr_min_260px">
3668
+
<?php
3669
+
echo esc_html__("Select the font color of the AI baloon chatbot form. Default is #f0f0f0", 'aiomatic-automatic-ai-content-writer');
3670
+
?>
3671
+
</div>
3672
+
</div>
3673
+
<b><?php echo esc_html__("AI Baloon Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3674
+
</div>
3675
+
</td><td>
3676
+
<div>
3677
+
<input type="color" id="ai_background_color_b" value="<?php echo esc_html($ai_background_color);?>" onchange="anythingChanged()">
3678
+
</div>
3679
+
</td></tr>
3680
+
<tr><td>
3681
+
<div>
3682
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3683
+
<div class="bws_hidden_help_text cr_min_260px">
3684
+
<?php
3685
+
echo esc_html__("Select the border color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
3686
+
?>
3687
+
</div>
3688
+
</div>
3689
+
<b><?php echo esc_html__("Input Border Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3690
+
</div>
3691
+
</td><td>
3692
+
<div>
3693
+
<input type="color" id="input_border_color_b" value="<?php echo esc_html($input_border_color);?>" onchange="anythingChanged()">
3694
+
</div>
3695
+
</td></tr>
3696
+
<tr><td>
3697
+
<div>
3698
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3699
+
<div class="bws_hidden_help_text cr_min_260px">
3700
+
<?php
3701
+
echo esc_html__("Select the text color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
3702
+
?>
3703
+
</div>
3704
+
</div>
3705
+
<b><?php echo esc_html__("Input Text Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3706
+
</div>
3707
+
</td><td>
3708
+
<div>
3709
+
<input type="color" id="input_text_color_b" value="<?php echo esc_html($input_text_color);?>" onchange="anythingChanged()">
3710
+
</div>
3711
+
</td></tr>
3712
+
<tr><td>
3713
+
<div>
3714
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3715
+
<div class="bws_hidden_help_text cr_min_260px">
3716
+
<?php
3717
+
echo esc_html__("Select the placeholder color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
3718
+
?>
3719
+
</div>
3720
+
</div>
3721
+
<b><?php echo esc_html__("Input Placeholder Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3722
+
</div>
3723
+
</td><td>
3724
+
<div>
3725
+
<input type="color" id="input_placeholder_color_b" value="<?php echo esc_html($input_placeholder_color);?>" onchange="anythingChanged()">
3726
+
</div>
3727
+
</td></tr>
3728
+
<tr><td>
3729
+
<div>
3730
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3731
+
<div class="bws_hidden_help_text cr_min_260px">
3732
+
<?php
3733
+
echo esc_html__("Select the color of the persona name.", 'aiomatic-automatic-ai-content-writer');
3734
+
?>
3735
+
</div>
3736
+
</div>
3737
+
<b><?php echo esc_html__("Persona Name Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3738
+
</div>
3739
+
</td><td>
3740
+
<div>
3741
+
<input type="color" id="persona_name_color_b" value="<?php echo esc_html($persona_name_color);?>" onchange="anythingChanged()">
3742
+
</div>
3743
+
</td></tr>
3744
+
<tr><td>
3745
+
<div>
3746
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3747
+
<div class="bws_hidden_help_text cr_min_260px">
3748
+
<?php
3749
+
echo esc_html__("Select the color of the persona role.", 'aiomatic-automatic-ai-content-writer');
3750
+
?>
3751
+
</div>
3752
+
</div>
3753
+
<b><?php echo esc_html__("Persona Role Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3754
+
</div>
3755
+
</td><td>
3756
+
<div>
3757
+
<input type="color" id="persona_role_color_b" value="<?php echo esc_html($persona_role_color);?>" onchange="anythingChanged()">
3758
+
</div>
3759
+
</td></tr>
3760
+
<tr><td>
3761
+
<div>
3762
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3763
+
<div class="bws_hidden_help_text cr_min_260px">
3764
+
<?php
3765
+
echo esc_html__("Select the color of the submit button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
3766
+
?>
3767
+
</div>
3768
+
</div>
3769
+
<b><?php echo esc_html__("Submit Button Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3770
+
</div>
3771
+
</td><td>
3772
+
<div>
3773
+
<input type="color" id="submit_color_b" value="<?php echo esc_html($submit_color);?>" onchange="anythingChanged()">
3774
+
</div>
3775
+
</td></tr>
3776
+
<tr><td>
3777
+
<div>
3778
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3779
+
<div class="bws_hidden_help_text cr_min_260px">
3780
+
<?php
3781
+
echo esc_html__("Select the text color of the submit button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
3782
+
?>
3783
+
</div>
3784
+
</div>
3785
+
<b><?php echo esc_html__("Submit Button Text Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3786
+
</div>
3787
+
</td><td>
3788
+
<div>
3789
+
<input type="color" id="submit_text_color_b" value="<?php echo esc_html($submit_text_color);?>" onchange="anythingChanged()">
3790
+
</div>
3791
+
</td></tr>
3792
+
<tr><td>
3793
+
<div>
3794
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3795
+
<div class="bws_hidden_help_text cr_min_260px">
3796
+
<?php
3797
+
echo esc_html__("Select the color of the voice button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
3798
+
?>
3799
+
</div>
3800
+
</div>
3801
+
<b><?php echo esc_html__("Voice Button Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3802
+
</div>
3803
+
</td><td>
3804
+
<div>
3805
+
<input type="color" id="voice_color_b" value="<?php echo esc_html($voice_color);?>" onchange="anythingChanged()">
3806
+
</div>
3807
+
</td></tr>
3808
+
<tr><td>
3809
+
<div>
3810
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3811
+
<div class="bws_hidden_help_text cr_min_260px">
3812
+
<?php
3813
+
echo esc_html__("Select the color of the voice button when it is activated. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
3814
+
?>
3815
+
</div>
3816
+
</div>
3817
+
<b><?php echo esc_html__("Voice Button Activated Color:", 'aiomatic-automatic-ai-content-writer');?></b>
3818
+
</div>
3819
+
</td><td>
3820
+
<div>
3821
+
<input type="color" id="voice_color_activated_b" value="<?php echo esc_html($voice_color_activated);?>" onchange="anythingChanged()">
3822
+
</div>
3823
+
</td></tr>
3824
+
<tr><td>
3825
+
<div>
3826
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3827
+
<div class="bws_hidden_help_text cr_min_260px">
3828
+
<?php
3829
+
echo esc_html__("Select the looks of your chatbot.", 'aiomatic-automatic-ai-content-writer');
3830
+
?>
3831
+
</div>
3832
+
</div>
3833
+
<b><?php echo esc_html__("Chatbot Theme:", 'aiomatic-automatic-ai-content-writer');?></b>
3834
+
</div>
3835
+
</td><td>
3836
+
<div>
3837
+
<select id="chat_theme_b" onchange="themeChanged_b();" >
3838
+
<?php
3839
+
echo '<option'.($chat_theme == '' ? ' selected': '').' value="">No Change</option>';
3840
+
echo '<option'.($chat_theme == 'light' ? ' selected': '').' value="light">Light</option>';
3841
+
echo '<option'.($chat_theme == 'dark' ? ' selected': '').' value="dark">Dark</option>';
3842
+
echo '<option'.($chat_theme == 'midnight' ? ' selected': '').' value="midnight">Midnight</option>';
3843
+
echo '<option'.($chat_theme == 'sunrise' ? ' selected': '').' value="sunrise">Sunrise</option>';
3844
+
echo '<option'.($chat_theme == 'ocean' ? ' selected': '').' value="ocean">Ocean</option>';
3845
+
echo '<option'.($chat_theme == 'forest' ? ' selected': '').' value="forest">Forest</option>';
3846
+
echo '<option'.($chat_theme == 'winter' ? ' selected': '').' value="winter">Winter</option>';
3847
+
echo '<option'.($chat_theme == 'twilight' ? ' selected': '').' value="twilight">Twilight</option>';
3848
+
echo '<option'.($chat_theme == 'desert' ? ' selected': '').' value="desert">Desert</option>';
3849
+
echo '<option'.($chat_theme == 'cosmic' ? ' selected': '').' value="cosmic">Cosmic</option>';
3850
+
echo '<option'.($chat_theme == 'rose' ? ' selected': '').' value="rose">Rose</option>';
3851
+
echo '<option'.($chat_theme == 'tropical' ? ' selected': '').' value="tropical">Tropical</option>';
3852
+
echo '<option'.($chat_theme == 'facebook' ? ' selected': '').' value="facebook">Facebook</option>';
3853
+
echo '<option'.($chat_theme == 'twitter' ? ' selected': '').' value="twitter">Twitter</option>';
3854
+
echo '<option'.($chat_theme == 'instagram' ? ' selected': '').' value="instagram">Instagram</option>';
3855
+
echo '<option'.($chat_theme == 'whatsapp' ? ' selected': '').' value="whatsapp">WhatsApp</option>';
3856
+
echo '<option'.($chat_theme == 'linkedin' ? ' selected': '').' value="linkedin">LinkedIn</option>';
3857
+
$paged = 1;
3858
+
$posts_per_page = 100;
3859
+
do {
3860
+
$args = array(
3861
+
'post_type' => 'aiomatic_themes',
3862
+
'posts_per_page' => $posts_per_page,
3863
+
'order' => 'DESC',
3864
+
'orderby' => 'date',
3865
+
'post_status' => 'any',
3866
+
'paged' => $paged,
3867
+
);
3868
+
$aiomatic_themes = new WP_Query($args);
3869
+
if ($aiomatic_themes->have_posts()) {
3870
+
foreach ($aiomatic_themes->posts as $aiomatic_theme) {
3871
+
echo '<option' . ($chat_theme == $aiomatic_theme->ID ? ' selected' : '') .
3872
+
' value="' . esc_html($aiomatic_theme->ID) . '">' .
3873
+
esc_html($aiomatic_theme->post_title) . '</option>';
3874
+
}
3875
+
}
3876
+
$paged++;
3877
+
wp_reset_postdata();
3878
+
} while ($aiomatic_themes->have_posts());
3879
+
?>
3880
+
</select>
3881
+
</div>
3882
+
</td></tr>
3883
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
3884
+
?>
3885
+
<tr><td colspan="2">
3886
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
3887
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/XFomdusLtHc" frameborder="0" allowfullscreen></iframe></div></p>
3888
+
</td></tr>
3889
+
<?php
3890
+
}
3891
+
?>
3892
+
</table>
3893
+
</div><div id="tab-13" class="tab-content">
3894
+
<table class="widefat">
3895
+
<tr><td colspan="2">
3896
+
<h2><?php echo esc_html__("PDF Chat Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
3897
+
</td></tr>
3898
+
<?php
3899
+
$all_ok = true;
3900
+
$issue_counter = 1;
3901
+
if (!is_plugin_active('aiomatic-extension-pdf-files/aiomatic-extension-pdf-files.php'))
3902
+
{
3903
+
$all_ok = false;
3904
+
echo '<tr><td colspan="2"><span class="cr_red">' . esc_html($issue_counter++) . '. ' . esc_html__("This option requires the Aimogen Extension - PDF File Storage And Parsing to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://wpbay.com/product/aiomatic-extension-pdf-file-storage-and-parsing/" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.</span></td></tr>';
3905
+
}
3906
+
if($pinecone_app_id == '' && $qdrant_app_id == '')
3907
+
{
3908
+
$all_ok = false;
3909
+
echo '<tr><td colspan="2"><span class="cr_red">' . esc_html($issue_counter++) . '. ' . esc_html__("You need to enter a Pinecone.io API or a Qdrant API key in the 'API Keys' tab to use this feature, go to the plugin's 'Settings' menu -> in the 'API Keys' tab, set up an API key for a vector database ('Embeddings API Options' section)", 'aiomatic-automatic-ai-content-writer') . '</span></td></tr>';
3910
+
}
3911
+
if (!isset($aiomatic_Main_Settings['embeddings_chat_short']) || trim($aiomatic_Main_Settings['embeddings_chat_short']) != 'on')
3912
+
{
3913
+
$all_ok = false;
3914
+
echo '<tr><td colspan="2"><span class="cr_red">' . esc_html($issue_counter++) . '. ' . esc_html__("You need to enable Embeddings for the Chatbot -> go to the 'Embeddings' tab in the same menu and check the 'Enable Embeddings For' -> 'Chatbot Shortcodes' checkbox -> save settings.", 'aiomatic-automatic-ai-content-writer') . '</span></td></tr>';
3915
+
}
3916
+
?>
3917
+
<tr><td>
3918
+
<div>
3919
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3920
+
<div class="bws_hidden_help_text cr_min_260px">
3921
+
<?php
3922
+
echo esc_html__("Select if you want to enable users to upload PDF files to the chatbot.", 'aiomatic-automatic-ai-content-writer');
3923
+
?>
3924
+
</div>
3925
+
</div>
3926
+
<b><?php echo esc_html__("Enable Users To Upload PDF Files To The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
3927
+
</div>
3928
+
</td><td>
3929
+
<div>
3930
+
<input type="checkbox" id="upload_pdf" name="aiomatic_Chatbot_Settings[upload_pdf]"<?php
3931
+
if ($upload_pdf == 'on')
3932
+
{
3933
+
echo ' checked ';
3934
+
}
3935
+
if($all_ok === false)
3936
+
{
3937
+
echo " disabled title='This option requires the Aimogen Extension - PDF File Storage And Parsing to be active'";
3938
+
}
3939
+
?>>
3940
+
</div>
3941
+
</td></tr>
3942
+
<tr><td>
3943
+
<div>
3944
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3945
+
<div class="bws_hidden_help_text cr_min_260px">
3946
+
<?php
3947
+
echo esc_html__("Select if you want to limit the maximum number of pages extracted from the pdf files.", 'aiomatic-automatic-ai-content-writer');
3948
+
?>
3949
+
</div>
3950
+
</div>
3951
+
<b><?php echo esc_html__("Limit PDF Page Count:", 'aiomatic-automatic-ai-content-writer');?></b>
3952
+
</div>
3953
+
</td><td>
3954
+
<div>
3955
+
<input type="number" min="0" step="1" id="pdf_page" name="aiomatic_Chatbot_Settings[pdf_page]" class="cr_width_full" value="<?php echo esc_html($pdf_page);?>" placeholder="PDF page count limit">
3956
+
</div>
3957
+
</td></tr>
3958
+
<tr><td>
3959
+
<div>
3960
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3961
+
<div class="bws_hidden_help_text cr_min_260px">
3962
+
<?php
3963
+
echo esc_html__("Select if you want to limit the maximum number of characters extracted from the pdf files.", 'aiomatic-automatic-ai-content-writer');
3964
+
?>
3965
+
</div>
3966
+
</div>
3967
+
<b><?php echo esc_html__("Limit PDF Character Count:", 'aiomatic-automatic-ai-content-writer');?></b>
3968
+
</div>
3969
+
</td><td>
3970
+
<div>
3971
+
<input type="number" min="0" step="1" id="pdf_character" name="aiomatic_Chatbot_Settings[pdf_character]" class="cr_width_full" value="<?php echo esc_html($pdf_character);?>" placeholder="PDF character count limit">
3972
+
</div>
3973
+
</td></tr>
3974
+
<tr><td>
3975
+
<div>
3976
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3977
+
<div class="bws_hidden_help_text cr_min_260px">
3978
+
<?php
3979
+
echo esc_html__("Set the user message which appears when the pdf file was uploaded successfully.", 'aiomatic-automatic-ai-content-writer');
3980
+
?>
3981
+
</div>
3982
+
</div>
3983
+
<b><?php echo esc_html__("PDF File Uploaded Successfully User Message:", 'aiomatic-automatic-ai-content-writer');?></b>
3984
+
</div>
3985
+
</td><td>
3986
+
<div>
3987
+
<input type="text" id="pdf_ok" name="aiomatic_Chatbot_Settings[pdf_ok]" class="cr_width_full" value="<?php echo esc_html($pdf_ok);?>" placeholder="PDF file uploaded successfully! You can ask questions about it.">
3988
+
</div>
3989
+
</td></tr>
3990
+
<tr><td>
3991
+
<div>
3992
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
3993
+
<div class="bws_hidden_help_text cr_min_260px">
3994
+
<?php
3995
+
echo esc_html__("Set the user message which appears when the pdf session was ended by the user.", 'aiomatic-automatic-ai-content-writer');
3996
+
?>
3997
+
</div>
3998
+
</div>
3999
+
<b><?php echo esc_html__("PDF Session Ended User Message:", 'aiomatic-automatic-ai-content-writer');?></b>
4000
+
</div>
4001
+
</td><td>
4002
+
<div>
4003
+
<input type="text" id="pdf_end" name="aiomatic_Chatbot_Settings[pdf_end]" class="cr_width_full" value="<?php echo esc_html($pdf_end);?>" placeholder="PDF file session ended.">
4004
+
</div>
4005
+
</td></tr>
4006
+
<tr><td>
4007
+
<div>
4008
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4009
+
<div class="bws_hidden_help_text cr_min_260px">
4010
+
<?php
4011
+
echo esc_html__("Set the user message which appears when the pdf file upload failed.", 'aiomatic-automatic-ai-content-writer');
4012
+
?>
4013
+
</div>
4014
+
</div>
4015
+
<b><?php echo esc_html__("PDF File Uploaded Failed User Message:", 'aiomatic-automatic-ai-content-writer');?></b>
4016
+
</div>
4017
+
</td><td>
4018
+
<div>
4019
+
<input type="text" id="pdf_fail" name="aiomatic_Chatbot_Settings[pdf_fail]" class="cr_width_full" value="<?php echo esc_html($pdf_fail);?>" placeholder="Failed to upload the PDF file, please try again later.">
4020
+
</div>
4021
+
</td></tr>
4022
+
<tr>
4023
+
<td>
4024
+
<div>
4025
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4026
+
<div class="bws_hidden_help_text cr_min_260px">
4027
+
<?php
4028
+
echo esc_html__("Set an expiration date for uploaded PDF files - after the files expired, they will be automatically deleted. You can set dates in this format: +1 day, +2 days, etc. To disable this feature, leave it empty.", 'aiomatic-automatic-ai-content-writer');
4029
+
?>
4030
+
</div>
4031
+
</div>
4032
+
<b><?php echo esc_html__("Uploaded PDF Files Expiration Date:", 'aiomatic-automatic-ai-content-writer');?></b>
4033
+
</td>
4034
+
<td class="cr_min_width_200">
4035
+
<input type="text" name="aiomatic_Chatbot_Settings[file_expiration_pdf]" class="cr_width_full" value="<?php echo esc_html($file_expiration_pdf);?>" placeholder="Example: +1 day">
4036
+
</td>
4037
+
</tr>
4038
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4039
+
?>
4040
+
<tr><td colspan="2">
4041
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4042
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/SkFdO5-zxFY" frameborder="0" allowfullscreen></iframe></div></p>
4043
+
</td></tr>
4044
+
<?php
4045
+
}
4046
+
?>
4047
+
</table>
4048
+
</div>
4049
+
<div id="tab-12" class="tab-content">
4050
+
<table class="widefat">
4051
+
<tr><td>
4052
+
<h2><?php echo esc_html__("User Related Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
4053
+
</td></tr>
4054
+
<tr><td>
4055
+
<div>
4056
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4057
+
<div class="bws_hidden_help_text cr_min_260px">
4058
+
<?php
4059
+
echo esc_html__("Set the name of the user. This will be prepended to each user message. This is useful to teach the AI chatbot about its role and name. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins).", 'aiomatic-automatic-ai-content-writer');
4060
+
?>
4061
+
</div>
4062
+
</div>
4063
+
<b><?php echo esc_html__("User Name:", 'aiomatic-automatic-ai-content-writer');?></b>
4064
+
</div>
4065
+
</td><td>
4066
+
<div>
4067
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[user_message_preppend]" placeholder="User"><?php
4068
+
echo esc_textarea($user_message_preppend);
4069
+
?></textarea>
4070
+
</div>
4071
+
</td></tr>
4072
+
<tr><td>
4073
+
<div>
4074
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4075
+
<div class="bws_hidden_help_text cr_min_260px">
4076
+
<?php
4077
+
echo esc_html__("Set the avatar image of the User. This will be shown in the chatbot interface.", 'aiomatic-automatic-ai-content-writer');
4078
+
?>
4079
+
</div>
4080
+
</div>
4081
+
<b><?php echo esc_html__("User Avatar Image:", 'aiomatic-automatic-ai-content-writer');?></b>
4082
+
</div>
4083
+
</td><td>
4084
+
<div>
4085
+
<?php
4086
+
$add_src = '';
4087
+
if(is_numeric($user_avatar))
4088
+
{
4089
+
$att_src = wp_get_attachment_image_src( $user_avatar, 'thumbnail', false );
4090
+
if ( $att_src && $att_src[0] != false )
4091
+
{
4092
+
$add_src = ' src="' . esc_url($att_src[0]) . '"';
4093
+
}
4094
+
}
4095
+
$image = '<div class="coderevolution_gutenberg_input"><img id="aiomatic-preview-image-user"' . $add_src . '/></div>';
4096
+
echo $image; ?>
4097
+
<input type="hidden" name="aiomatic_Chatbot_Settings[user_avatar]" id="aiomatic_image_id_user" value="<?php echo esc_html($user_avatar);?>" class="regular-text" />
4098
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Select an avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_manager_user"/>
4099
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Clear avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_clear_user"/>
4100
+
4101
+
</div>
4102
+
</td></tr>
4103
+
<tr><td>
4104
+
<div>
4105
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4106
+
<div class="bws_hidden_help_text cr_min_260px">
4107
+
<?php
4108
+
echo esc_html__("Select if you want to use the user's avatar if a logged in user is found to be using the chatbot.", 'aiomatic-automatic-ai-content-writer');
4109
+
?>
4110
+
</div>
4111
+
</div>
4112
+
<b><?php echo esc_html__("Use User Avatar If A Logged In User Using The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
4113
+
</div>
4114
+
</td><td>
4115
+
<div>
4116
+
<input type="checkbox" id="user_account_avatar" name="aiomatic_Chatbot_Settings[user_account_avatar]"<?php
4117
+
if ($user_account_avatar == 'on')
4118
+
{
4119
+
echo ' checked ';
4120
+
}
4121
+
?>>
4122
+
</div>
4123
+
</td></tr>
4124
+
<tr><td colspan="2">
4125
+
<h2><?php echo esc_html__("Chatbot Interface:", 'aiomatic-automatic-ai-content-writer');?></h2>
4126
+
</td></tr>
4127
+
<tr><td>
4128
+
<div>
4129
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4130
+
<div class="bws_hidden_help_text cr_min_260px">
4131
+
<?php
4132
+
echo esc_html__("Set the placeholder text of the chat input. The default is: empty.", 'aiomatic-automatic-ai-content-writer');
4133
+
?>
4134
+
</div>
4135
+
</div>
4136
+
<b><?php echo esc_html__("Chat Input Placeholder:", 'aiomatic-automatic-ai-content-writer');?></b>
4137
+
</div>
4138
+
</td><td>
4139
+
<div>
4140
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[placeholder]" placeholder="Enter your chat message here"><?php
4141
+
echo esc_textarea($placeholder);
4142
+
?></textarea>
4143
+
</div>
4144
+
</td></tr>
4145
+
<tr><td>
4146
+
<div>
4147
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4148
+
<div class="bws_hidden_help_text cr_min_260px">
4149
+
<?php
4150
+
echo esc_html__("Set the text of the submit button. The default is: Submit", 'aiomatic-automatic-ai-content-writer');
4151
+
?>
4152
+
</div>
4153
+
</div>
4154
+
<b><?php echo esc_html__("Chat Input Submit Button Text:", 'aiomatic-automatic-ai-content-writer');?></b>
4155
+
</div>
4156
+
</td><td>
4157
+
<div>
4158
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[submit]" placeholder="Submit"><?php
4159
+
echo esc_textarea($submit);
4160
+
?></textarea>
4161
+
</div>
4162
+
</td></tr>
4163
+
<tr><td>
4164
+
<div>
4165
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4166
+
<div class="bws_hidden_help_text cr_min_260px">
4167
+
<?php
4168
+
echo esc_html__("Set the image URL which will be used for the submit button. Note that if you set this, it will overwrite the submit button text, which instead will be used as image alt tag and title.", 'aiomatic-automatic-ai-content-writer');
4169
+
?>
4170
+
</div>
4171
+
</div>
4172
+
<b><?php echo esc_html__("Chat Input Submit Button Image URL:", 'aiomatic-automatic-ai-content-writer');?></b>
4173
+
</div>
4174
+
</td><td>
4175
+
<div>
4176
+
<input type="url" name="aiomatic_Chatbot_Settings[submit_image]" placeholder="Submit button image URL" value="<?php echo esc_html($submit_image);?>" />
4177
+
</div>
4178
+
</td></tr>
4179
+
<tr><td>
4180
+
<div>
4181
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4182
+
<div class="bws_hidden_help_text cr_min_260px">
4183
+
<?php
4184
+
echo esc_html__("Set if you want to show full width buttons.", 'aiomatic-automatic-ai-content-writer');
4185
+
?>
4186
+
</div>
4187
+
</div>
4188
+
<b><?php echo esc_html__("Full Width Buttons:", 'aiomatic-automatic-ai-content-writer');?></b>
4189
+
</div>
4190
+
</td><td>
4191
+
<div>
4192
+
<input type="checkbox" id="submit_full" name="aiomatic_Chatbot_Settings[submit_full]"<?php
4193
+
if ($submit_full == 'on')
4194
+
{
4195
+
echo ' checked ';
4196
+
}
4197
+
?>>
4198
+
</div>
4199
+
</td></tr>
4200
+
<tr><td>
4201
+
<div>
4202
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4203
+
<div class="bws_hidden_help_text cr_min_260px">
4204
+
<?php
4205
+
echo esc_html__("Set the text of the prompt selection placeholder. The default is: Please select a prompt", 'aiomatic-automatic-ai-content-writer');
4206
+
?>
4207
+
</div>
4208
+
</div>
4209
+
<b><?php echo esc_html__("Text For Prompt Templates Selection:", 'aiomatic-automatic-ai-content-writer');?></b>
4210
+
</div>
4211
+
</td><td>
4212
+
<div>
4213
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[select_prompt]" placeholder="Please select a prompt"><?php
4214
+
echo esc_textarea($select_prompt);
4215
+
?></textarea>
4216
+
</div>
4217
+
</td></tr>
4218
+
<tr><td>
4219
+
<div>
4220
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4221
+
<div class="bws_hidden_help_text cr_min_260px">
4222
+
<?php
4223
+
echo esc_html__("Set the compliance text which will be shown at the bottom of the chatbot (default is empty)", 'aiomatic-automatic-ai-content-writer');
4224
+
?>
4225
+
</div>
4226
+
</div>
4227
+
<b><?php echo esc_html__("Chat Compliance Text:", 'aiomatic-automatic-ai-content-writer');?></b>
4228
+
</div>
4229
+
</td><td>
4230
+
<div>
4231
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[compliance]" placeholder="Compliance text"><?php
4232
+
echo esc_textarea($compliance);
4233
+
?></textarea>
4234
+
</div>
4235
+
</td></tr>
4236
+
</table>
4237
+
</div>
4238
+
<div id="tab-10" class="tab-content">
4239
+
<h2><?php echo esc_html__("Manage Chatbot Personas:", 'aiomatic-automatic-ai-content-writer');?></h2>
4240
+
<br/>
4241
+
<button href="#" id="aiomatic_sync_personas" class="page-title-action"><?php
4242
+
echo esc_html__("Sync Personas", 'aiomatic-automatic-ai-content-writer');
4243
+
?></button>
4244
+
<button id="aiomatic_manage_personas" class="page-title-action"><?php
4245
+
echo esc_html__("Add New Persona", 'aiomatic-automatic-ai-content-writer');
4246
+
?></button>
4247
+
<button id="aiomatic_backup_personas" class="page-title-action"><?php
4248
+
echo esc_html__("Backup/Restore Personas", 'aiomatic-automatic-ai-content-writer');
4249
+
?></button>
4250
+
<button href="#" id="aiomatic_delete_selected_personas" class="page-title-action"><?php
4251
+
echo esc_html__("Delete Selected Personas", 'aiomatic-automatic-ai-content-writer');
4252
+
?></button>
4253
+
<button href="#" id="aiomatic_deleteall_personas" class="page-title-action"><?php
4254
+
echo esc_html__("Delete All Personas", 'aiomatic-automatic-ai-content-writer');
4255
+
?></button>
4256
+
<?php
4257
+
if($aiomatic_personas->have_posts()){
4258
+
echo '<br><br>' . esc_html__('All personas', 'aiomatic-automatic-ai-content-writer') . ' (' . esc_html($aiomatic_personas->found_posts) . ')<br>';
4259
+
}
4260
+
?>
4261
+
<table class="wp-list-table widefat fixed striped table-view-list posts">
4262
+
<thead>
4263
+
<tr>
4264
+
<th class="manage-column column-cb check-column aiomatic-tdcol" scope="col"><input class="aiomatic-chk" type="checkbox" id="checkedAll"></th>
4265
+
<th scope="col"><?php
4266
+
echo esc_html__("Name", 'aiomatic-automatic-ai-content-writer');
4267
+
?></th>
4268
+
<th scope="col"><?php
4269
+
echo esc_html__("Role", 'aiomatic-automatic-ai-content-writer');
4270
+
?></th>
4271
+
<th scope="col"><?php
4272
+
echo esc_html__("Avatar", 'aiomatic-automatic-ai-content-writer');
4273
+
?></th>
4274
+
<th scope="col"><?php
4275
+
echo esc_html__("ID", 'aiomatic-automatic-ai-content-writer');
4276
+
?></th>
4277
+
<th scope="col"><?php
4278
+
echo esc_html__("Date", 'aiomatic-automatic-ai-content-writer');
4279
+
?></th>
4280
+
<th scope="col"><?php
4281
+
echo esc_html__("Manage", 'aiomatic-automatic-ai-content-writer');
4282
+
?></th>
4283
+
</tr>
4284
+
</thead>
4285
+
<tbody>
4286
+
<?php
4287
+
if($aiomatic_personas->have_posts())
4288
+
{
4289
+
foreach ($aiomatic_personas->posts as $aiomatic_persona)
4290
+
{
4291
+
?>
4292
+
<tr>
4293
+
<td><input class="aiomatic-select-persona" id="aiomatic-select-<?php echo esc_html($aiomatic_persona->ID);?>" type="checkbox" name="ids[]" value="<?php echo esc_html($aiomatic_persona->ID);?>"></td>
4294
+
<td><a href="<?php echo esc_url(get_edit_post_link($aiomatic_persona->ID));?>" class="aiomatic-persona-content"><?php echo esc_html($aiomatic_persona->post_title);?></a></td>
4295
+
<td><?php echo esc_html($aiomatic_persona->post_excerpt);?></td>
4296
+
<td><?php $avatar = get_the_post_thumbnail_url($aiomatic_persona->ID, 'thumbnail'); if($avatar === false){echo 'N/A';}else{echo '<img class="openai-chat-avatar" src="' . esc_url($avatar) . '" alt="avatar"/>';}?></td>
4297
+
<td><?php echo esc_html($aiomatic_persona->ID);?></td>
4298
+
<td><?php echo esc_html($aiomatic_persona->post_date)?></td>
4299
+
<td>
4300
+
<div class="cr_center">
4301
+
<a class="button button-small" href="<?php echo esc_url(get_edit_post_link($aiomatic_persona->ID));?>"><?php echo esc_html__("Edit", 'aiomatic-automatic-ai-content-writer');?></a>
4302
+
<button class="button button-small aiomatic_duplicate_persona" id="aiomatic_duplicate_persona_<?php echo esc_html($aiomatic_persona->ID);?>" data-id="<?php echo esc_html($aiomatic_persona->ID);?>"><?php echo esc_html__("Duplicate", 'aiomatic-automatic-ai-content-writer');?></button>
4303
+
<button class="button button-small button-link-delete aiomatic_delete_persona" id="aiomatic_delete_persona_<?php echo esc_html($aiomatic_persona->ID);?>" delete-id="<?php echo esc_html($aiomatic_persona->ID);?>"><?php echo esc_html__("Delete", 'aiomatic-automatic-ai-content-writer');?></button>
4304
+
<button class="button button-small aiomatic_convert_persona" id="aiomatic_convert_persona_<?php echo esc_html($aiomatic_persona->ID);?>" data-id="<?php echo esc_html($aiomatic_persona->ID);?>"><?php echo esc_html__("Convert to AI Assistant", 'aiomatic-automatic-ai-content-writer');?></button>
4305
+
</div>
4306
+
</td>
4307
+
</tr>
4308
+
<?php
4309
+
}
4310
+
}
4311
+
else
4312
+
{
4313
+
echo '<tr><td colspan="7">' . esc_html__("No chatbot personas added. You can add more using the 'Add New Persona' button from above.", 'aiomatic-automatic-ai-content-writer') . '</td></tr>';
4314
+
}
4315
+
?>
4316
+
</tbody>
4317
+
</table>
4318
+
<?php
4319
+
if($aiomatic_personas->have_posts() && $aiomatic_personas->max_num_pages > 1)
4320
+
{
4321
+
?>
4322
+
<div class="aiomatic-paginate">
4323
+
<?php
4324
+
echo esc_html__("Page: ", 'aiomatic-automatic-ai-content-writer') . paginate_links( array(
4325
+
'base' => admin_url('admin.php?page=aiomatic_chatbot_panel&wpage=%#%'),
4326
+
'total' => $aiomatic_personas->max_num_pages,
4327
+
'current' => $aiomatic_persona_page,
4328
+
'format' => '?wpage=%#%',
4329
+
'show_all' => false,
4330
+
'prev_next' => true,
4331
+
'add_args' => false,
4332
+
));
4333
+
?>
4334
+
</div>
4335
+
<?php
4336
+
}
4337
+
?>
4338
+
<br/></hr/><br/>
4339
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4340
+
?>
4341
+
<table class="widefat">
4342
+
<tr><td colspan="2">
4343
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4344
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/V0aiz-b1mdQ" frameborder="0" allowfullscreen></iframe></div></p>
4345
+
</td></tr></table>
4346
+
<?php
4347
+
}
4348
+
?>
4349
+
</div>
4350
+
<div id="tab-15" class="tab-content">
4351
+
<h2><?php echo esc_html__("AI Chatbot Embedding On Remote Sites Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
4352
+
<table class="wp-list-table widefat fixed striped table-view-list posts">
4353
+
<tr><td>
4354
+
<div>
4355
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4356
+
<div class="bws_hidden_help_text cr_min_260px">
4357
+
<?php
4358
+
echo esc_html__("Select if you want to enable embedding of the chatbot on remote websites, using iframes. If you deactivate remote chatbots, all created remote chatbot instances will be also deleted.", 'aiomatic-automatic-ai-content-writer');
4359
+
?>
4360
+
</div>
4361
+
</div>
4362
+
<b><?php echo esc_html__("Enable Chatbot Embedding On Remote Sites:", 'aiomatic-automatic-ai-content-writer');?></b>
4363
+
</div>
4364
+
</td><td>
4365
+
<div>
4366
+
<input type="checkbox" id="remote_chat" name="aiomatic_Chatbot_Settings[remote_chat]"<?php
4367
+
if ($remote_chat == 'on')
4368
+
{
4369
+
echo ' checked ';
4370
+
}
4371
+
?>>
4372
+
</div>
4373
+
</td></tr>
4374
+
<tr><td>
4375
+
<div>
4376
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4377
+
<div class="bws_hidden_help_text cr_min_260px">
4378
+
<?php
4379
+
echo sprintf(
4380
+
esc_html__(
4381
+
'Set a list of domains (separated by commas), which will be allowed to display the chatbot on their site. To allow all sites to add this chatbot, leave this field blank. Example usage: %s',
4382
+
'aiomatic-automatic-ai-content-writer'
4383
+
),
4384
+
'https://www.example.org'
4385
+
);
4386
+
?>
4387
+
</div>
4388
+
</div>
4389
+
<b><?php echo esc_html__("Domain List Allowed To Embed Chatbots:", 'aiomatic-automatic-ai-content-writer');?></b>
4390
+
</div>
4391
+
</td><td>
4392
+
<div>
4393
+
<textarea rows="1" id="allow_chatbot_site" placeholder="https://www.example.org" name="aiomatic_Chatbot_Settings[allow_chatbot_site]"><?php
4394
+
echo esc_textarea($allow_chatbot_site);
4395
+
?></textarea>
4396
+
</div>
4397
+
</td></tr>
4398
+
<?php
4399
+
if ($remote_chat == 'on')
4400
+
{
4401
+
$myop = get_option('aiomatic_chat_page_id', false);
4402
+
if($myop !== false)
4403
+
{
4404
+
if(is_numeric($myop))
4405
+
{
4406
+
$myop = array($myop);
4407
+
}
4408
+
?>
4409
+
<tr>
4410
+
<td colspan="2">
4411
+
<b><?php echo esc_html__("You can use these HTML codes to embed the chatbot on other websites:", 'aiomatic-automatic-ai-content-writer');?></b>
4412
+
</td>
4413
+
</tr>
4414
+
<?php
4415
+
$changedone = false;
4416
+
if(count($myop) == 0)
4417
+
{
4418
+
?>
4419
+
<tr>
4420
+
<td colspan="2">
4421
+
<b><?php echo esc_html__("No remote chatbot instances created. Click the button from below to create a new instance!", 'aiomatic-automatic-ai-content-writer');?></b>
4422
+
</td>
4423
+
</tr>
4424
+
<?php
4425
+
}
4426
+
foreach($myop as $zind => $myopthis)
4427
+
{
4428
+
if(get_permalink($myopthis) === false)
4429
+
{
4430
+
unset($myop[$zind]);
4431
+
$changedone = true;
4432
+
continue;
4433
+
}
4434
+
?>
4435
+
<tr>
4436
+
<td colspan="2">
4437
+
<hr/>
4438
+
</td>
4439
+
</tr>
4440
+
<tr>
4441
+
<td colspan="2">
4442
+
<b><?php echo esc_html__("Embed HTML Code:", 'aiomatic-automatic-ai-content-writer');?></b><br/>
4443
+
<span class="cr_red">
4444
+
<?php
4445
+
echo esc_html('<iframe src="' . get_permalink($myopthis) . '" width="600" height="800" frameborder="0" scrolling="no">' . esc_html__("Your browser does not support iframes.", 'aiomatic-automatic-ai-content-writer') . '</iframe>');
4446
+
?>
4447
+
</span>
4448
+
<p><?php
4449
+
echo sprintf( wp_kses( __( "<a href='%s' class='button' target='_blank'>Edit</a>", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'data-id' => array(), 'class' => array(), 'href' => array(), 'target' => array() ) ) ), esc_url(get_edit_post_link($myopthis)));
4450
+
?> <?php
4451
+
echo sprintf( wp_kses( __( "<a href='#' data-id='" . esc_attr($myopthis) . "' class='aiomatic_delete_remote_chatbot button'>Delete</a>", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'data-id' => array(), 'class' => array(), 'href' => array(), 'target' => array() ) ) ), esc_url(get_edit_post_link($myopthis)));
4452
+
?></p>
4453
+
</td>
4454
+
</tr>
4455
+
<?php
4456
+
}
4457
+
if($changedone == true)
4458
+
{
4459
+
aiomatic_update_option('aiomatic_chat_page_id', $myop);
4460
+
}
4461
+
}
4462
+
else
4463
+
{
4464
+
?>
4465
+
<tr>
4466
+
<td colspan="2">
4467
+
<b><?php echo esc_html__("No remote chatbot instances created. Click the button from below to create a new instance.", 'aiomatic-automatic-ai-content-writer');?></b>
4468
+
</td>
4469
+
</tr>
4470
+
<?php
4471
+
}
4472
+
?>
4473
+
<tr>
4474
+
<td colspan="2">
4475
+
<hr/>
4476
+
</td>
4477
+
</tr>
4478
+
<tr>
4479
+
<td colspan="2">
4480
+
<button id="aiomatic_add_remote_chatbot" class="button"><?php echo esc_html__("Add A New Remote Chatbot", 'aiomatic-automatic-ai-content-writer');?></button>
4481
+
</td>
4482
+
</tr>
4483
+
<?php
4484
+
}
4485
+
if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4486
+
?>
4487
+
<tr><td colspan="2">
4488
+
<h2><?php echo esc_html__("Remote Chatbot Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4489
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/jM7RBnV7HTc" frameborder="0" allowfullscreen></iframe></div></p>
4490
+
<h2><?php echo esc_html__("Floating Remote Chatbot Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4491
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/pGWniST1wCg" frameborder="0" allowfullscreen></iframe></div></p>
4492
+
</td></tr>
4493
+
<?php
4494
+
}
4495
+
?>
4496
+
</table>
4497
+
</div>
4498
+
<div id="tab-16" class="tab-content">
4499
+
<?php aiomatic_display_leads_table(); ?>
4500
+
<hr/>
4501
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4502
+
?>
4503
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4504
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/0vdlkbDD8dw" frameborder="0" allowfullscreen></iframe></div></p>
4505
+
<?php
4506
+
}
4507
+
?>
4508
+
</div>
4509
+
<div id="tab-19" class="tab-content">
4510
+
<table class="widefat">
4511
+
<tr><td colspan="2">
4512
+
<h2><?php echo esc_html__("MCP Connection Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
4513
+
</td></tr>
4514
+
<tr><td>
4515
+
<div>
4516
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4517
+
<div class="bws_hidden_help_text cr_min_260px">
4518
+
<?php
4519
+
echo esc_html__("Select a list of MCP connections to enable for the chatbot. To add or remove MCP server connections, go to the plugin's 'MCP Integration' menu -> 'Connect To A MCP Server' tab.", 'aiomatic-automatic-ai-content-writer');
4520
+
?>
4521
+
</div>
4522
+
</div>
4523
+
<b><?php echo esc_html__("Enabled MCP Server Connections:", 'aiomatic-automatic-ai-content-writer');?></b>
4524
+
</div>
4525
+
</td><td>
4526
+
<div>
4527
+
<?php
4528
+
$responses_api = isset($aiomatic_Main_Settings['responses_api']) ? $aiomatic_Main_Settings['responses_api'] : '';
4529
+
$api_selector = isset($aiomatic_Main_Settings['api_selector']) ? $aiomatic_Main_Settings['api_selector'] : 'openai';
4530
+
4531
+
$is_aiomaticapi = false;
4532
+
$token = '';
4533
+
if (!empty($aiomatic_Main_Settings['app_id'])) {
4534
+
$appids = preg_split('/\r\n|\r|\n/', trim($aiomatic_Main_Settings['app_id']));
4535
+
$appids = array_filter($appids);
4536
+
if (count($appids) == 1) {
4537
+
$token = $appids[array_rand($appids)];
4538
+
$token = apply_filters('aimogen_openai_api_key', $token);$token = apply_filters('aiomatic_openai_api_key', $token);
4539
+
if (aiomatic_is_aiomaticapi_key($token)) {
4540
+
$call_count = get_transient('aiomaticapi_tokens');
4541
+
if ($token != '' && $call_count !== false) {
4542
+
$is_aiomaticapi = true;
4543
+
}
4544
+
}
4545
+
}
4546
+
}
4547
+
?>
4548
+
<?php if ($responses_api === 'on' && $api_selector === 'openai' && !$is_aiomaticapi)
4549
+
{ ?>
4550
+
<select name="aiomatic_Chatbot_Settings[enable_mcp][]" multiple="multiple" class="cr_width_full resize_vertical">
4551
+
<?php
4552
+
foreach ($mcp_servers as $mid => $server): ?>
4553
+
<option value="<?php echo esc_attr($mid); ?>" <?php echo in_array($mid, $enable_mcp) ? 'selected' : ''; ?>>
4554
+
<?php echo esc_html($server['name']);
4555
+
?>
4556
+
</option>
4557
+
<?php endforeach; ?>
4558
+
</select>
4559
+
<?php
4560
+
}
4561
+
else
4562
+
{
4563
+
?>
4564
+
<select name="aiomatic_Chatbot_Settings[enable_mcp][]" multiple="multiple" class="cr_width_full resize_vertical" disabled><option value=""><?php echo esc_html__('Not available', 'aiomatic-automatic-ai-content-writer');?></option></select>
4565
+
<p><?php echo esc_html__('This functionality is only available when Aimogen is enabled, Responses API is turned on, the API selector is set to OpenAI, and you are not using an Aimogen API key. Please adjust your settings to enable MCP server connections. This will work in OpenAI models and also for Anthropic models.', 'aiomatic-automatic-ai-content-writer'); ?></p>
4566
+
<?php
4567
+
}
4568
+
?>
4569
+
</div>
4570
+
</td></tr>
4571
+
</table>
4572
+
<hr/>
4573
+
</div>
4574
+
<div id="tab-18" class="tab-content">
4575
+
<table class="widefat">
4576
+
<tr><td colspan="2">
4577
+
<h2><?php echo esc_html__("Chatbot Workflow Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
4578
+
</td></tr>
4579
+
<tr><td>
4580
+
<div>
4581
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4582
+
<div class="bws_hidden_help_text cr_min_260px">
4583
+
<?php
4584
+
echo esc_html__("Set the configurations json string for the bot workflow. Use the workflow builder tool to configure this settings field's value.", 'aiomatic-automatic-ai-content-writer');
4585
+
?>
4586
+
</div>
4587
+
</div>
4588
+
<b><?php echo esc_html__("Bot Workflow Configuration String:", 'aiomatic-automatic-ai-content-writer');?></b>
4589
+
<br><br>
4590
+
<button type="button" class="page-title-action" id="aidownloadTextareaContent"><?php echo esc_html__("Download to File", 'aiomatic-automatic-ai-content-writer');?></button>
4591
+
<button type="button" class="page-title-action" id="ailoadTextareaContent"><?php echo esc_html__("Load from File", 'aiomatic-automatic-ai-content-writer');?></button>
4592
+
<input type="file" id="aifileInput" style="display: none;" accept=".json,.txt">
4593
+
</div>
4594
+
</td><td>
4595
+
<div>
4596
+
<textarea rows="4" id="aiomatic_bot_workflow" name="aiomatic_Chatbot_Settings[bot_workflow]" placeholder='Bot workflow json'><?php
4597
+
echo esc_textarea($bot_workflow);
4598
+
?></textarea>
4599
+
</div>
4600
+
</td></tr>
4601
+
<tr><td colspan="2">
4602
+
<h2 class="cr_center"><?php echo esc_html__("Chatbot Workflow Builder:", 'aiomatic-automatic-ai-content-writer');?></h2>
4603
+
<hr/>
4604
+
<div id="aiomatic-workflow-builder-container"></div>
4605
+
</td></tr>
4606
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4607
+
?>
4608
+
<tr><td colspan="2">
4609
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4610
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/1cqpQvzHhoQ" frameborder="0" allowfullscreen></iframe></div></p>
4611
+
</td></tr>
4612
+
<?php
4613
+
}
4614
+
?>
4615
+
</table>
4616
+
<hr/>
4617
+
</div>
4618
+
<div id="tab-17" class="tab-content">
4619
+
<table class="widefat">
4620
+
<tr><td colspan="2">
4621
+
<h2><?php echo esc_html__("Multi-Bot Chat:", 'aiomatic-automatic-ai-content-writer');?></h2>
4622
+
</td></tr>
4623
+
<tr><td>
4624
+
<div>
4625
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4626
+
<div class="bws_hidden_help_text cr_min_260px">
4627
+
<?php
4628
+
echo esc_html__("Select if you want to strip the bot names from the prompts sent to the AI.", 'aiomatic-automatic-ai-content-writer');
4629
+
?>
4630
+
</div>
4631
+
</div>
4632
+
<b><?php echo esc_html__("Strip @BotName From AI Messages:", 'aiomatic-automatic-ai-content-writer');?></b>
4633
+
</div>
4634
+
</td><td>
4635
+
<div>
4636
+
<input type="checkbox" id="strip_botname" name="aiomatic_Chatbot_Settings[strip_botname]"<?php
4637
+
if ($strip_botname == 'on')
4638
+
echo ' checked ';
4639
+
?>>
4640
+
</div>
4641
+
</td></tr>
4642
+
<tr><td>
4643
+
<div>
4644
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4645
+
<div class="bws_hidden_help_text cr_min_260px">
4646
+
<?php
4647
+
echo esc_html__("Select additional bots you want to add to the chatbot.", 'aiomatic-automatic-ai-content-writer');
4648
+
?>
4649
+
</div>
4650
+
</div>
4651
+
<b><?php echo esc_html__("Add Additional Bots To The Conversation:", 'aiomatic-automatic-ai-content-writer');?></b><br/>
4652
+
<a href="javascript:void(0);" onclick="const selectElement = document.querySelector('select[name=\'aiomatic_Chatbot_Settings[additional_bots][]\']');
4653
+
if (selectElement) {
4654
+
for (let option of selectElement.options) {
4655
+
option.selected = false;
4656
+
}
4657
+
}"><?php echo esc_html__("Clear Selection", 'aiomatic-automatic-ai-content-writer');?></a>
4658
+
</div>
4659
+
</td><td>
4660
+
<div>
4661
+
<select name="aiomatic_Chatbot_Settings[additional_bots][]" multiple="multiple" class="cr_width_full resize_vertical">
4662
+
<?php foreach ($bot_posts as $post): ?>
4663
+
<option value="<?php echo esc_attr($post->ID); ?>" <?php echo in_array($post->ID, $additional_bots) ? 'selected' : ''; ?>>
4664
+
<?php echo esc_html($post->post_title);
4665
+
if($post->post_type == 'aiomatic_assistants')
4666
+
{
4667
+
echo ' (AI Assistant)';
4668
+
}
4669
+
elseif($post->post_type == 'aiomatic_personas')
4670
+
{
4671
+
echo ' (Persona)';
4672
+
}
4673
+
?>
4674
+
</option>
4675
+
<?php endforeach; ?>
4676
+
</select>
4677
+
</div>
4678
+
</td></tr>
4679
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
4680
+
?>
4681
+
<tr><td colspan="2">
4682
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
4683
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/AJgHEVCdqpM" frameborder="0" allowfullscreen></iframe></div></p>
4684
+
</td></tr>
4685
+
<?php
4686
+
}
4687
+
?>
4688
+
</table>
4689
+
<hr/>
4690
+
</div>
4691
+
<div id="tab-14" class="tab-content">
4692
+
<table class="widefat">
4693
+
<tr><td colspan="2">
4694
+
<h2><?php echo esc_html__("Chatbot Extension Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
4695
+
</td></tr>
4696
+
<?php
4697
+
$hide_extensions = '';
4698
+
$hide_class = '';
4699
+
if (!in_array($chat_model, aiomatic_get_all_models_function()))
4700
+
{
4701
+
$hide_extensions = ' class="cr_none"';
4702
+
$hide_class = 'cr_none';
4703
+
}
4704
+
if($assistant_id != '')
4705
+
{
4706
+
?>
4707
+
<tr><td colspan="2"><span class="cr_red"><?php echo esc_html__("If you are using AI Assistants for the chatbot, you need to select the Chatbot Extensions which you want to enable, directly in the AI Assistant settings.", 'aiomatic-automatic-ai-content-writer');?></span></td></tr>
4708
+
<?php
4709
+
}
4710
+
else
4711
+
{
4712
+
?>
4713
+
<tr><td colspan="2"><span class="cr_red"><?php echo esc_html__("Warning! This feature is currently supported for OpenAI models (excepting gpt-3.5-turbo-instruct) and for some other AI provider's models. Each extension will use some additional input tokens, which will be sent to the AI in each request. So, using extensions will increase also costs of API usage. Be sure to activate only the extensions which you need!", 'aiomatic-automatic-ai-content-writer');?></span></td></tr>
4714
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4715
+
<hr/>
4716
+
</td></tr>
4717
+
<tr <?php echo $hide_extensions;?>><td>
4718
+
<div>
4719
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4720
+
<div class="bws_hidden_help_text cr_min_260px">
4721
+
<?php
4722
+
echo esc_html__("Select if you want to enable the 'AI Generate Reasoning' for the Chatbot. This will allow the AI to recall different AI models to generate text for itself. This will simulate a 'thinking' mechanism.", 'aiomatic-automatic-ai-content-writer');
4723
+
?>
4724
+
</div>
4725
+
</div>
4726
+
<b><?php echo esc_html__("'AI Generate Reasoning' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4727
+
</div>
4728
+
</td><td>
4729
+
<div>
4730
+
<input type="checkbox" id="god_mode_ai" onchange="godaiChanged();" name="aiomatic_Chatbot_Settings[god_mode_ai]"<?php
4731
+
if ($god_mode_ai == 'on')
4732
+
echo ' checked ';
4733
+
?>>
4734
+
</div>
4735
+
</td></tr><tr class="hide_reasoning <?php echo $hide_class;?>">
4736
+
<td class="cr_min_width_200">
4737
+
<div>
4738
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4739
+
<div class="bws_hidden_help_text cr_min_260px">
4740
+
<?php
4741
+
echo esc_html__("Select the AI models which can be called by the AI content writer, while it is generating reasoning.", 'aiomatic-automatic-ai-content-writer');
4742
+
?>
4743
+
</div>
4744
+
</div>
4745
+
<b><?php echo esc_html__("AI Models Which Can Be Called While Reasoning:", 'aiomatic-automatic-ai-content-writer');?></b>
4746
+
</td>
4747
+
<td>
4748
+
<select autocomplete="off" id="ai_models_recall" multiple name="aiomatic_Chatbot_Settings[ai_models_recall][]" class="resize_vertical cr_width_full">
4749
+
<?php
4750
+
foreach($all_models as $modelx)
4751
+
{
4752
+
echo '<option value="' . esc_html($modelx) .'"';
4753
+
if (in_array($modelx, $ai_models_recall))
4754
+
{
4755
+
echo " selected";
4756
+
}
4757
+
echo '>' . esc_html($modelx);
4758
+
echo esc_html(aiomatic_get_model_provider($modelx));
4759
+
echo '</option>';
4760
+
}
4761
+
?>
4762
+
</select>
4763
+
</td>
4764
+
</tr>
4765
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4766
+
<hr/>
4767
+
</td></tr>
4768
+
<tr <?php echo $hide_extensions;?>><td>
4769
+
<div>
4770
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4771
+
<div class="bws_hidden_help_text cr_min_260px">
4772
+
<?php
4773
+
echo esc_html__("Select if you want to enable the 'AI Charts' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4774
+
?>
4775
+
</div>
4776
+
</div>
4777
+
<b><?php echo esc_html__("'AI Charts' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4778
+
</div>
4779
+
</td><td>
4780
+
<div>
4781
+
<input type="checkbox" id="god_mode_enable_chart" name="aiomatic_Chatbot_Settings[god_mode_enable_chart]"<?php
4782
+
if ($god_mode_enable_chart == 'on')
4783
+
echo ' checked ';
4784
+
?>>
4785
+
</div>
4786
+
</td></tr>
4787
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4788
+
<hr/>
4789
+
</td></tr>
4790
+
<tr <?php echo $hide_extensions;?>><td>
4791
+
<div>
4792
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4793
+
<div class="bws_hidden_help_text cr_min_260px">
4794
+
<?php
4795
+
echo esc_html__("Select if you want to enable the 'End Conversation' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4796
+
?>
4797
+
</div>
4798
+
</div>
4799
+
<b><?php echo esc_html__("'End Conversation' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4800
+
</div>
4801
+
</td><td>
4802
+
<div>
4803
+
<input type="checkbox" id="god_mode_enable_end" name="aiomatic_Chatbot_Settings[god_mode_enable_end]"<?php
4804
+
if ($god_mode_enable_end == 'on')
4805
+
echo ' checked ';
4806
+
?>>
4807
+
</div>
4808
+
</td></tr>
4809
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4810
+
<hr/>
4811
+
</td></tr>
4812
+
<tr <?php echo $hide_extensions;?>><td>
4813
+
<div>
4814
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4815
+
<div class="bws_hidden_help_text cr_min_260px">
4816
+
<?php
4817
+
echo esc_html__("Select if you want to enable the 'Dall-E Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4818
+
?>
4819
+
</div>
4820
+
</div>
4821
+
<b><?php echo esc_html__("'Dall-E Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4822
+
</div>
4823
+
</td><td>
4824
+
<div>
4825
+
<input type="checkbox" id="god_mode_enable_dalle" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_dalle]"<?php
4826
+
if ($god_mode_enable_dalle == 'on')
4827
+
echo ' checked ';
4828
+
?>>
4829
+
</div>
4830
+
</td></tr><tr class="hide_dalle <?php echo $hide_class;?>">
4831
+
<td class="cr_min_width_200">
4832
+
<div>
4833
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4834
+
<div class="bws_hidden_help_text cr_min_260px">
4835
+
<?php
4836
+
echo esc_html__("Select the image size for AI generated images.", 'aiomatic-automatic-ai-content-writer');
4837
+
?>
4838
+
</div>
4839
+
</div>
4840
+
<b><?php echo esc_html__("AI Generated Image Size:", 'aiomatic-automatic-ai-content-writer');?></b>
4841
+
</td>
4842
+
<td>
4843
+
<select autocomplete="off" id="ai_image_size" name="aiomatic_Chatbot_Settings[ai_image_size]" class="cr_width_full">
4844
+
<option value="256x256" <?php if($ai_image_size == '256x256'){echo ' selected';}?> ><?php echo esc_html__("256x256", 'aiomatic-automatic-ai-content-writer');?></option>
4845
+
<option value="512x512" <?php if($ai_image_size == '512x512'){echo ' selected';}?> ><?php echo esc_html__("512x512", 'aiomatic-automatic-ai-content-writer');?></option>
4846
+
<option value="1024x1024" <?php if($ai_image_size == '1024x1024'){echo ' selected';}?> ><?php echo esc_html__("1024x1024", 'aiomatic-automatic-ai-content-writer');?></option>
4847
+
<option value="1024x1792" <?php if($ai_image_size == '1024x1792'){echo ' selected';}?> ><?php echo esc_html__("1024x1792 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer');?></option>
4848
+
<option value="1792x1024" <?php if($ai_image_size == '1792x1024'){echo ' selected';}?> ><?php echo esc_html__("1792x1024 (only for Dall-E 3)", 'aiomatic-automatic-ai-content-writer');?></option>
4849
+
<option value="1024x1536" <?php if($ai_image_size == '1024x1536'){echo ' selected';}?> ><?php echo esc_html__("1024x1536 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer');?></option>
4850
+
<option value="1536x1024" <?php if($ai_image_size == '1536x1024'){echo ' selected';}?> ><?php echo esc_html__("1536x1024 (only for gpt-image-1, gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest)", 'aiomatic-automatic-ai-content-writer');?></option>
4851
+
</select>
4852
+
</td>
4853
+
</tr>
4854
+
<tr class="hide_dalle <?php echo $hide_class;?>">
4855
+
<td class="cr_min_width_200">
4856
+
<div>
4857
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4858
+
<div class="bws_hidden_help_text cr_min_260px">
4859
+
<?php
4860
+
echo esc_html__("Select the image model for OpenAI generated images.", 'aiomatic-automatic-ai-content-writer');
4861
+
?>
4862
+
</div>
4863
+
</div>
4864
+
<b><?php echo esc_html__("OpenAI Image Model:", 'aiomatic-automatic-ai-content-writer');?></b>
4865
+
</td>
4866
+
<td>
4867
+
<select autocomplete="off" id="ai_image_model" name="aiomatic_Chatbot_Settings[ai_image_model]" class="cr_width_full">
4868
+
<?php
4869
+
foreach(AIMOGEN_DALLE_IMAGE_MODELS as $modelx)
4870
+
{
4871
+
echo '<option value="' . esc_html($modelx) .'"';
4872
+
if ($modelx == $ai_image_model) { echo ' selected'; }
4873
+
echo '>' . esc_html($modelx) . '</option>';
4874
+
}
4875
+
?>
4876
+
</select>
4877
+
</td>
4878
+
</tr>
4879
+
<tr class="hide_dalle <?php echo $hide_class;?>"><td>
4880
+
<div>
4881
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4882
+
<div class="bws_hidden_help_text cr_min_260px">
4883
+
<?php
4884
+
echo esc_html__("Select the message which is displayed to the user in case the image creations fails.", 'aiomatic-automatic-ai-content-writer');
4885
+
?>
4886
+
</div>
4887
+
</div>
4888
+
<b><?php echo esc_html__("Image Generator Failed User Message:", 'aiomatic-automatic-ai-content-writer');?></b>
4889
+
</div>
4890
+
</td><td>
4891
+
<div>
4892
+
<input type="text" id="god_mode_dalle_failed" name="aiomatic_Chatbot_Settings[god_mode_dalle_failed]" value="<?php echo esc_html($god_mode_dalle_failed);?>" placeholder="Image creation failed, please try again later.">
4893
+
</div>
4894
+
</td></tr>
4895
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4896
+
<hr/>
4897
+
</td></tr>
4898
+
<tr <?php echo $hide_extensions;?>><td>
4899
+
<div>
4900
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4901
+
<div class="bws_hidden_help_text cr_min_260px">
4902
+
<?php
4903
+
echo esc_html__("Select if you want to enable the 'Midjourney Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4904
+
?>
4905
+
</div>
4906
+
</div>
4907
+
<b><?php echo esc_html__("'Midjourney Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4908
+
</div>
4909
+
</td><td>
4910
+
<div>
4911
+
<input type="checkbox" id="god_mode_enable_midjourney" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_midjourney]"<?php
4912
+
if ($god_mode_enable_midjourney == 'on')
4913
+
echo ' checked ';
4914
+
?>>
4915
+
</div>
4916
+
</td></tr>
4917
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4918
+
<hr/>
4919
+
</td></tr>
4920
+
<tr <?php echo $hide_extensions;?>><td>
4921
+
<div>
4922
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4923
+
<div class="bws_hidden_help_text cr_min_260px">
4924
+
<?php
4925
+
echo esc_html__("Select if you want to enable the 'Replicate Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4926
+
?>
4927
+
</div>
4928
+
</div>
4929
+
<b><?php echo esc_html__("'Replicate Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4930
+
</div>
4931
+
</td><td>
4932
+
<div>
4933
+
<input type="checkbox" id="god_mode_enable_replicate" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_replicate]"<?php
4934
+
if ($god_mode_enable_replicate == 'on')
4935
+
echo ' checked ';
4936
+
?>>
4937
+
</div>
4938
+
</td></tr>
4939
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4940
+
<hr/>
4941
+
</td></tr>
4942
+
<tr <?php echo $hide_extensions;?>><td>
4943
+
<div>
4944
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4945
+
<div class="bws_hidden_help_text cr_min_260px">
4946
+
<?php
4947
+
echo esc_html__("Select if you want to enable the 'Ideogram Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4948
+
?>
4949
+
</div>
4950
+
</div>
4951
+
<b><?php echo esc_html__("'Ideogram Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4952
+
</div>
4953
+
</td><td>
4954
+
<div>
4955
+
<input type="checkbox" id="god_mode_enable_ideogram" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_ideogram]"<?php
4956
+
if ($god_mode_enable_ideogram == 'on')
4957
+
echo ' checked ';
4958
+
?>>
4959
+
</div>
4960
+
</td></tr>
4961
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4962
+
<hr/>
4963
+
</td></tr>
4964
+
<tr <?php echo $hide_extensions;?>><td>
4965
+
<div>
4966
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4967
+
<div class="bws_hidden_help_text cr_min_260px">
4968
+
<?php
4969
+
echo esc_html__("Select if you want to enable the 'Google Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4970
+
?>
4971
+
</div>
4972
+
</div>
4973
+
<b><?php echo esc_html__("'Google Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4974
+
</div>
4975
+
</td><td>
4976
+
<div>
4977
+
<input type="checkbox" id="god_mode_enable_google_image" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_google_image]"<?php
4978
+
if ($god_mode_enable_google_image == 'on')
4979
+
echo ' checked ';
4980
+
?>>
4981
+
</div>
4982
+
</td></tr>
4983
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
4984
+
<hr/>
4985
+
</td></tr>
4986
+
<tr <?php echo $hide_extensions;?>><td>
4987
+
<div>
4988
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
4989
+
<div class="bws_hidden_help_text cr_min_260px">
4990
+
<?php
4991
+
echo esc_html__("Select if you want to enable the 'Stable Diffusion Image' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
4992
+
?>
4993
+
</div>
4994
+
</div>
4995
+
<b><?php echo esc_html__("'Stable Diffusion Image' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
4996
+
</div>
4997
+
</td><td>
4998
+
<div>
4999
+
<input type="checkbox" id="god_mode_enable_stable" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_stable]"<?php
5000
+
if ($god_mode_enable_stable == 'on')
5001
+
echo ' checked ';
5002
+
?>>
5003
+
</div>
5004
+
</td></tr>
5005
+
<tr class="hide_stable <?php echo $hide_class;?>">
5006
+
<td>
5007
+
<div>
5008
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5009
+
<div class="bws_hidden_help_text cr_min_260px">
5010
+
<?php
5011
+
echo esc_html__("Set what model to use when generating images. Default is ", 'aiomatic-automatic-ai-content-writer') . esc_html(AIMOGEN_STABLE_DEFAULT_MODE);
5012
+
?>
5013
+
</div>
5014
+
</div>
5015
+
<b><?php echo esc_html__("Image Model:", 'aiomatic-automatic-ai-content-writer');?></b>
5016
+
</div>
5017
+
</td>
5018
+
<td>
5019
+
<div>
5020
+
<select id="stable_model" name="aiomatic_Chatbot_Settings[stable_model]" class="cr_width_full">
5021
+
<?php
5022
+
$stable_models = aiomatic_get_stable_image_models();
5023
+
foreach($stable_models as $sm)
5024
+
{
5025
+
echo '<option value="' . esc_attr($sm) . '"';
5026
+
if ($stable_model == $sm)
5027
+
{
5028
+
echo " selected";
5029
+
}
5030
+
echo '>' . esc_html($sm) . '</option>';
5031
+
}
5032
+
?>
5033
+
</select>
5034
+
</div>
5035
+
</td>
5036
+
</tr>
5037
+
<tr class="hide_stable <?php echo $hide_class;?>">
5038
+
<td class="cr_min_width_200">
5039
+
<div>
5040
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5041
+
<div class="bws_hidden_help_text cr_min_260px">
5042
+
<?php
5043
+
echo esc_html__("Select the image size for AI generated images.", 'aiomatic-automatic-ai-content-writer');
5044
+
?>
5045
+
</div>
5046
+
</div>
5047
+
<b><?php echo esc_html__("AI Generated Image Size:", 'aiomatic-automatic-ai-content-writer');?></b>
5048
+
</td>
5049
+
<td>
5050
+
<select autocomplete="off" id="ai_image_size_stable" name="aiomatic_Chatbot_Settings[ai_image_size_stable]" class="cr_width_full">
5051
+
<option value="512x512" <?php if($ai_image_size_stable == '512x512'){echo ' selected';}?> ><?php echo esc_html__("512x512", 'aiomatic-automatic-ai-content-writer');?></option>
5052
+
<option value="1024x1024" <?php if($ai_image_size_stable == '1024x1024'){echo ' selected';}?> ><?php echo esc_html__("1024x1024", 'aiomatic-automatic-ai-content-writer');?></option>
5053
+
</select>
5054
+
</td>
5055
+
</tr>
5056
+
<tr class="hide_stable <?php echo $hide_class;?>"><td>
5057
+
<div>
5058
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5059
+
<div class="bws_hidden_help_text cr_min_260px">
5060
+
<?php
5061
+
echo esc_html__("Select the message which is displayed to the user in case the image creations fails.", 'aiomatic-automatic-ai-content-writer');
5062
+
?>
5063
+
</div>
5064
+
</div>
5065
+
<b><?php echo esc_html__("Image Generator Failed User Message:", 'aiomatic-automatic-ai-content-writer');?></b>
5066
+
</div>
5067
+
</td><td>
5068
+
<div>
5069
+
<input type="text" id="god_mode_stable_failed" name="aiomatic_Chatbot_Settings[god_mode_stable_failed]" value="<?php echo esc_html($god_mode_stable_failed);?>" placeholder="Image creation failed, please try again later.">
5070
+
</div>
5071
+
</td></tr>
5072
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5073
+
<hr/>
5074
+
</td></tr>
5075
+
<tr <?php echo $hide_extensions;?>><td>
5076
+
<div>
5077
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5078
+
<div class="bws_hidden_help_text cr_min_260px">
5079
+
<?php
5080
+
echo esc_html__("Select if you want to enable the 'Stable Diffusion Video' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5081
+
?>
5082
+
</div>
5083
+
</div>
5084
+
<b><?php echo esc_html__("'Stable Diffusion Video' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5085
+
</div>
5086
+
</td><td>
5087
+
<div>
5088
+
<input type="checkbox" id="god_mode_enable_stable_video" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_stable_video]"<?php
5089
+
if ($god_mode_enable_stable_video == 'on')
5090
+
echo ' checked ';
5091
+
?>>
5092
+
</div>
5093
+
</td></tr>
5094
+
<tr class="hide_stable_video <?php echo $hide_class;?>">
5095
+
<td class="cr_min_width_200">
5096
+
<div>
5097
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5098
+
<div class="bws_hidden_help_text cr_min_260px">
5099
+
<?php
5100
+
echo esc_html__("Select the size for AI generated videos.", 'aiomatic-automatic-ai-content-writer');
5101
+
?>
5102
+
</div>
5103
+
</div>
5104
+
<b><?php echo esc_html__("AI Generated Video Size:", 'aiomatic-automatic-ai-content-writer');?></b>
5105
+
</td>
5106
+
<td>
5107
+
<select autocomplete="off" id="ai_video_size_stable" name="aiomatic_Chatbot_Settings[ai_video_size_stable]" class="cr_width_full">
5108
+
<option value="768x768" <?php if($ai_video_size_stable == '768x768'){echo ' selected';}?> ><?php echo esc_html__("768x768", 'aiomatic-automatic-ai-content-writer');?></option>
5109
+
<option value="1024x576" <?php if($ai_video_size_stable == '1024x576'){echo ' selected';}?> ><?php echo esc_html__("1024x576", 'aiomatic-automatic-ai-content-writer');?></option>
5110
+
<option value="576x1024" <?php if($ai_video_size_stable == '576x1024'){echo ' selected';}?> ><?php echo esc_html__("576x1024", 'aiomatic-automatic-ai-content-writer');?></option>
5111
+
</select>
5112
+
</td>
5113
+
</tr>
5114
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5115
+
<hr/>
5116
+
</td></tr>
5117
+
<tr <?php echo $hide_extensions;?>><td>
5118
+
<div>
5119
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5120
+
<div class="bws_hidden_help_text cr_min_260px">
5121
+
<?php
5122
+
echo esc_html__("Select if you want to enable the 'Booking Calendar Integration' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5123
+
?>
5124
+
</div>
5125
+
</div>
5126
+
<b><?php echo esc_html__("'Booking Calendar Integration' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5127
+
</div>
5128
+
</td><td>
5129
+
<div>
5130
+
<input type="checkbox" id="god_mode_enable_booking" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_booking]"<?php
5131
+
if ($god_mode_enable_booking == 'on')
5132
+
echo ' checked ';
5133
+
?>>
5134
+
</div>
5135
+
</td></tr>
5136
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5137
+
<hr/>
5138
+
</td></tr>
5139
+
<tr <?php echo $hide_extensions;?>><td>
5140
+
<div>
5141
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5142
+
<div class="bws_hidden_help_text cr_min_260px">
5143
+
<?php
5144
+
echo esc_html__("Select if you want to enable the 'Amazon Product Listing' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5145
+
?>
5146
+
</div>
5147
+
</div>
5148
+
<b><?php echo esc_html__("'Amazon Product Listing' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5149
+
</div>
5150
+
</td><td>
5151
+
<div>
5152
+
<input type="checkbox" id="god_mode_enable_amazon" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_amazon]"<?php
5153
+
if ($god_mode_enable_amazon == 'on')
5154
+
echo ' checked ';
5155
+
?>>
5156
+
</div>
5157
+
</td></tr>
5158
+
<tr <?php echo $hide_extensions;?>><td>
5159
+
<div>
5160
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5161
+
<div class="bws_hidden_help_text cr_min_260px">
5162
+
<?php
5163
+
echo esc_html__("Select if you want to enable the 'Amazon Product Details' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5164
+
?>
5165
+
</div>
5166
+
</div>
5167
+
<b><?php echo esc_html__("'Amazon Product Details' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5168
+
</div>
5169
+
</td><td>
5170
+
<div>
5171
+
<input type="checkbox" id="god_mode_enable_amazon_details" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_amazon_details]"<?php
5172
+
if ($god_mode_enable_amazon_details == 'on')
5173
+
echo ' checked ';
5174
+
?>>
5175
+
</div>
5176
+
</td></tr>
5177
+
<tr class="hide_amazon <?php echo esc_html($hide_class);?>"><td>
5178
+
<div>
5179
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5180
+
<div class="bws_hidden_help_text cr_min_260px">
5181
+
<?php
5182
+
echo sprintf( wp_kses( __( "Insert your Amazon Associate ID (Optional). Learn how to get one <a href='%s' target='_blank'>here</a>. Also, you need to sign up for Amazon Affiliate program <a href='%s' target='_blank'>here</a>.", 'aiomatic-automatic-ai-content-writer'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), 'https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html', 'https://affiliate-program.amazon.com/assoc_credentials/home' );
5183
+
?>
5184
+
</div>
5185
+
</div>
5186
+
<b><?php echo esc_html__("Amazon Associate ID:", 'aiomatic-automatic-ai-content-writer');?></b>
5187
+
</div>
5188
+
</td><td>
5189
+
<div>
5190
+
<input type="text" id="affiliate_id" name="aiomatic_Chatbot_Settings[affiliate_id]" value="<?php echo esc_html($affiliate_id);?>" placeholder="Please insert your Amazon Affiliate ID">
5191
+
</div>
5192
+
</td></tr>
5193
+
<tr class="hide_amazon <?php echo $hide_class;?>"><td>
5194
+
<div>
5195
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5196
+
<div class="bws_hidden_help_text cr_min_260px">
5197
+
<?php
5198
+
echo esc_html__("Select the country where you have registred your affiliate account.", 'aiomatic-automatic-ai-content-writer');
5199
+
?>
5200
+
</div>
5201
+
</div>
5202
+
<b><?php echo esc_html__("Amazon Target Country:", 'aiomatic-automatic-ai-content-writer');?></b>
5203
+
</div>
5204
+
</td><td>
5205
+
<div>
5206
+
<select id="source" name="aiomatic_Chatbot_Settings[target_country]" class="cr_width_full">
5207
+
<?php
5208
+
$amaz_countries = aiomatic_get_amazon_codes();
5209
+
foreach ($amaz_countries as $key => $value) {
5210
+
echo '<option value="' . esc_html($key) . '"';
5211
+
if($target_country == $key)
5212
+
{
5213
+
echo ' selected';
5214
+
}
5215
+
echo '>' . esc_html($value) . '</option>';
5216
+
}
5217
+
?>
5218
+
</select>
5219
+
</div>
5220
+
</td></tr>
5221
+
<tr class="hide_amazon <?php echo $hide_class;?>">
5222
+
<td>
5223
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5224
+
<div class="bws_hidden_help_text cr_min_260px">
5225
+
<?php
5226
+
echo esc_html__("Set the maximum number of products to add in the product listing. You can also set a variable number of products, case in which a random number will be selected from the range you specify. Example 5-7", 'aiomatic-automatic-ai-content-writer');
5227
+
?>
5228
+
</div>
5229
+
</div>
5230
+
<b><?php echo esc_html__("Max Number Of Products To Include:", 'aiomatic-automatic-ai-content-writer');?></b>
5231
+
</td>
5232
+
<td class="cr_min_width_200">
5233
+
<input type="text" id="max_products" name="aiomatic_Chatbot_Settings[max_products]" placeholder="3-4" class="cr_width_full" value="<?php echo esc_attr($max_products);?>">
5234
+
</td>
5235
+
</tr>
5236
+
<tr class="hide_amazon <?php echo $hide_class;?>">
5237
+
<td class="cr_min_width_200">
5238
+
<div>
5239
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5240
+
<div class="bws_hidden_help_text cr_min_260px">
5241
+
<?php
5242
+
echo esc_html__("Select the type of sorting of the returned results.", 'aiomatic-automatic-ai-content-writer');
5243
+
?>
5244
+
</div>
5245
+
</div>
5246
+
<b><?php echo esc_html__("Sort Results By:", 'aiomatic-automatic-ai-content-writer');?></b>
5247
+
</td>
5248
+
<td class="cr_min_width_200">
5249
+
<select id="sort_results" name="aiomatic_Chatbot_Settings[sort_results]" class="cr_width_full">
5250
+
<option value="none" <?php if($sort_results == 'none'){echo ' selected';}?>><?php echo esc_html__("None", 'aiomatic-automatic-ai-content-writer');?></option>
5251
+
<option value="Relevance" <?php if($sort_results == 'Relevance'){echo ' selected';}?>><?php echo esc_html__("Relevance", 'aiomatic-automatic-ai-content-writer');?></option>
5252
+
<option value="Price:LowToHigh" <?php if($sort_results == 'Price:LowToHigh'){echo ' selected';}?>><?php echo esc_html__("Price:LowToHigh", 'aiomatic-automatic-ai-content-writer');?></option>
5253
+
<option value="Price:HighToLow" <?php if($sort_results == 'Price:HighToLow'){echo ' selected';}?>><?php echo esc_html__("Price:HighToLow", 'aiomatic-automatic-ai-content-writer');?></option>
5254
+
<option value="NewestArrivals" <?php if($sort_results == 'NewestArrivals'){echo ' selected';}?>><?php echo esc_html__("NewestArrivals", 'aiomatic-automatic-ai-content-writer');?></option>
5255
+
<option value="Featured" <?php if($sort_results == 'Featured'){echo ' selected';}?>><?php echo esc_html__("Featured", 'aiomatic-automatic-ai-content-writer');?></option>
5256
+
<option value="AvgCustomerReviews" <?php if($sort_results == 'AvgCustomerReviews'){echo ' selected';}?>><?php echo esc_html__("AvgCustomerReviews", 'aiomatic-automatic-ai-content-writer');?></option>
5257
+
</select>
5258
+
</td>
5259
+
</tr>
5260
+
<tr class="hide_amazon <?php echo $hide_class;?>"><td>
5261
+
<div>
5262
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5263
+
<div class="bws_hidden_help_text cr_min_260px">
5264
+
<?php
5265
+
echo esc_html__("Set what information do you want to add into each product listing entry. You can use the following shortcodes to get data for specific products: %%product_counter%%, %%product_title%%, %%product_description%%, %%product_url%%, %%product_price%%, %%product_list_price%%, %%product_image%%, %%product_cart_url%%, %%product_images_urls%%, %%product_images%%, %%product_reviews%%. If you have access to the Amazon API, you can set it up in the plugin and get access to the following advanced shortcodes also: %%product_score%%, %%product_edition%%, %%product_language%%, %%product_pages_count%%, %%product_publication_date%%, %%product_contributors%%, %%product_manufacturer%%, %%product_binding%%, %%product_product_group%%, %%product_rating%%, %%product_ean%%, %%product_part_no%%, %%product_model%%, %%product_warranty%%, %%product_color%%, %%product_is_adult%%, %%product_dimensions%%, %%product_date%%, %%product_size%%, %%product_unit_count%%", 'aiomatic-automatic-ai-content-writer');
5266
+
?>
5267
+
</div>
5268
+
</div>
5269
+
<b><?php echo esc_html__("Product Listing Template:", 'aiomatic-automatic-ai-content-writer');?></b>
5270
+
</div>
5271
+
</td><td>
5272
+
<div>
5273
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[listing_template]" placeholder='Set what information do you want to add into each product listing entry'><?php
5274
+
echo esc_textarea($listing_template);
5275
+
?></textarea>
5276
+
</div>
5277
+
</td></tr>
5278
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5279
+
<hr/>
5280
+
</td></tr>
5281
+
<tr <?php echo $hide_extensions;?>><td>
5282
+
<div>
5283
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5284
+
<div class="bws_hidden_help_text cr_min_260px">
5285
+
<?php
5286
+
echo esc_html__("Select if you want to enable the 'Websites Scraper' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5287
+
?>
5288
+
</div>
5289
+
</div>
5290
+
<b><?php echo esc_html__("'Website Scraper' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5291
+
</div>
5292
+
</td><td>
5293
+
<div>
5294
+
<input type="checkbox" id="god_mode_enable_scraper" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_scraper]"<?php
5295
+
if ($god_mode_enable_scraper == 'on')
5296
+
echo ' checked ';
5297
+
?>>
5298
+
</div>
5299
+
</td></tr>
5300
+
<tr class="hide_scraper <?php echo $hide_class;?>">
5301
+
<td class="cr_min_width_200">
5302
+
<div>
5303
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5304
+
<div class="bws_hidden_help_text cr_min_260px">
5305
+
<?php
5306
+
echo esc_html__("Select the method to be used for scraping.", 'aiomatic-automatic-ai-content-writer');
5307
+
?>
5308
+
</div>
5309
+
</div>
5310
+
<b><?php echo esc_html__("Scraping Method:", 'aiomatic-automatic-ai-content-writer');?></b>
5311
+
</td>
5312
+
<td class="cr_min_width_200">
5313
+
<select id="scrape_method" name="aiomatic_Chatbot_Settings[scrape_method]" class="cr_width_full">
5314
+
<option value="0" <?php if($scrape_method == '0'){echo ' selected';}?>><?php echo esc_html__("WordPress (Default)", 'aiomatic-automatic-ai-content-writer');?></option>
5315
+
<option value="1" <?php if($scrape_method == '1'){echo ' selected';}?>><?php echo esc_html__("PhantomJS (needs to be installed on server)", 'aiomatic-automatic-ai-content-writer');?></option>
5316
+
<option value="2" <?php if($scrape_method == '2'){echo ' selected';}?>><?php echo esc_html__("Puppeteer (needs to be installed on server)", 'aiomatic-automatic-ai-content-writer');?></option>
5317
+
<option value="3" <?php if($scrape_method == '3'){echo ' selected';}?>><?php echo esc_html__("Tor (needs to be installed on server)", 'aiomatic-automatic-ai-content-writer');?></option>
5318
+
<option value="4" <?php if($scrape_method == '4'){echo ' selected';}?>><?php echo esc_html__("Puppeteer (HeadlessBrowserAPI)", 'aiomatic-automatic-ai-content-writer');?></option>
5319
+
<option value="5" <?php if($scrape_method == '5'){echo ' selected';}?>><?php echo esc_html__("Tor (HeadlessBrowserAPI)", 'aiomatic-automatic-ai-content-writer');?></option>
5320
+
<option value="6" <?php if($scrape_method == '6'){echo ' selected';}?>><?php echo esc_html__("PhantomJS (HeadlessBrowserAPI)", 'aiomatic-automatic-ai-content-writer');?></option>
5321
+
</select>
5322
+
</td>
5323
+
</tr>
5324
+
<tr class="hide_scraper <?php echo $hide_class;?>"><td>
5325
+
<div>
5326
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5327
+
<div class="bws_hidden_help_text cr_min_260px">
5328
+
<?php
5329
+
echo esc_html__("Select if you want to remove all HTML tags from the scraped content and leave only the plain textual content in it.", 'aiomatic-automatic-ai-content-writer');
5330
+
?>
5331
+
</div>
5332
+
</div>
5333
+
<b><?php echo esc_html__("Strip All HTML Tags:", 'aiomatic-automatic-ai-content-writer');?></b>
5334
+
</div>
5335
+
</td><td>
5336
+
<div>
5337
+
<input type="checkbox" id="strip_tags" name="aiomatic_Chatbot_Settings[strip_tags]"<?php
5338
+
if ($strip_tags == 'on')
5339
+
echo ' checked ';
5340
+
?>>
5341
+
</div>
5342
+
</td></tr>
5343
+
<tr class="hide_scraper <?php echo $hide_class;?>"><td>
5344
+
<div>
5345
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5346
+
<div class="bws_hidden_help_text cr_min_260px">
5347
+
<?php
5348
+
echo esc_html__("Set the maximum number of characters to keep from the scraped data.", 'aiomatic-automatic-ai-content-writer');
5349
+
?>
5350
+
</div>
5351
+
</div>
5352
+
<b><?php echo esc_html__("Maximum # Of Characters To Keep:", 'aiomatic-automatic-ai-content-writer');?></b>
5353
+
</div>
5354
+
</td><td>
5355
+
<div>
5356
+
<input type="number" min="0" step="1" id="max_chars" name="aiomatic_Chatbot_Settings[max_chars]" class="cr_width_full" value="<?php echo esc_html($max_chars);?>" placeholder="# Of Characters To Keep">
5357
+
</div>
5358
+
</td></tr>
5359
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5360
+
<hr/>
5361
+
</td></tr>
5362
+
<tr <?php echo $hide_extensions;?>><td>
5363
+
<div>
5364
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5365
+
<div class="bws_hidden_help_text cr_min_260px">
5366
+
<?php
5367
+
echo esc_html__("Select if you want to enable the 'RSS Feed Parser' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5368
+
?>
5369
+
</div>
5370
+
</div>
5371
+
<b><?php echo esc_html__("'RSS Feed Parser' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5372
+
</div>
5373
+
</td><td>
5374
+
<div>
5375
+
<input type="checkbox" id="god_mode_enable_rss" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_rss]"<?php
5376
+
if ($god_mode_enable_rss == 'on')
5377
+
echo ' checked ';
5378
+
?>>
5379
+
</div>
5380
+
</td></tr>
5381
+
<tr class="hide_rss <?php echo $hide_class;?>"><td>
5382
+
<div>
5383
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5384
+
<div class="bws_hidden_help_text cr_min_260px">
5385
+
<?php
5386
+
echo esc_html__("Set the maximum number of items from the RSS feed to process.", 'aiomatic-automatic-ai-content-writer');
5387
+
?>
5388
+
</div>
5389
+
</div>
5390
+
<b><?php echo esc_html__("Maximum # Of Items To Process:", 'aiomatic-automatic-ai-content-writer');?></b>
5391
+
</div>
5392
+
</td><td>
5393
+
<div>
5394
+
<input type="number" min="0" step="1" id="max_rss_items" name="aiomatic_Chatbot_Settings[max_rss_items]" class="cr_width_full" value="<?php echo esc_html($max_rss_items);?>" placeholder="# Of RSS items to process">
5395
+
</div>
5396
+
</td></tr>
5397
+
<tr class="hide_rss <?php echo $hide_class;?>"><td>
5398
+
<div>
5399
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5400
+
<div class="bws_hidden_help_text cr_min_260px">
5401
+
<?php
5402
+
echo esc_html__("Set the template of the resulting string, which will be built after parsing the RSS feed. You can use the following shortcodes, which will map to the values of each RSS feed item: %%item_counter%%, %%item_title%%, %%item_content%%, %%item_description%%, %%item_url%%, %%item_author%%, %%item_categories%%", 'aiomatic-automatic-ai-content-writer');
5403
+
?>
5404
+
</div>
5405
+
</div>
5406
+
<b><?php echo esc_html__("Results Template:", 'aiomatic-automatic-ai-content-writer');?></b>
5407
+
</div>
5408
+
</td><td>
5409
+
<div>
5410
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[rss_template]" placeholder='Set the RSS item template sent to the AI'><?php
5411
+
echo esc_textarea($rss_template);
5412
+
?></textarea>
5413
+
</div>
5414
+
</td></tr>
5415
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5416
+
<hr/>
5417
+
</td></tr>
5418
+
<tr <?php echo $hide_extensions;?>><td>
5419
+
<div>
5420
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5421
+
<div class="bws_hidden_help_text cr_min_260px">
5422
+
<?php
5423
+
echo esc_html__("Select if you want to enable the 'RSS Feed Parser' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5424
+
?>
5425
+
</div>
5426
+
</div>
5427
+
<b><?php echo esc_html__("'Google SERP Parser' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5428
+
</div>
5429
+
</td><td>
5430
+
<div>
5431
+
<input type="checkbox" id="god_mode_enable_google" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_google]"<?php
5432
+
if ($god_mode_enable_google == 'on')
5433
+
echo ' checked ';
5434
+
?>>
5435
+
</div>
5436
+
</td></tr>
5437
+
<tr class="hide_google <?php echo $hide_class;?>"><td>
5438
+
<div>
5439
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5440
+
<div class="bws_hidden_help_text cr_min_260px">
5441
+
<?php
5442
+
echo esc_html__("Set the maximum number of items from the Google SERP to process.", 'aiomatic-automatic-ai-content-writer');
5443
+
?>
5444
+
</div>
5445
+
</div>
5446
+
<b><?php echo esc_html__("Maximum # Of Items To Process:", 'aiomatic-automatic-ai-content-writer');?></b>
5447
+
</div>
5448
+
</td><td>
5449
+
<div>
5450
+
<input type="number" min="0" step="1" id="max_google_items" name="aiomatic_Chatbot_Settings[max_google_items]" class="cr_width_full" value="<?php echo esc_html($max_google_items);?>" placeholder="# Of RSS items to process">
5451
+
</div>
5452
+
</td></tr>
5453
+
<tr class="hide_google <?php echo $hide_class;?>"><td>
5454
+
<div>
5455
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5456
+
<div class="bws_hidden_help_text cr_min_260px">
5457
+
<?php
5458
+
echo esc_html__("Set the template of the resulting string, which will be built after parsing the search results. You can use the following shortcodes, which will map to the values of each search results item: %%item_counter%%, %%item_title%%, %%item_snippet%%, %%item_url%%", 'aiomatic-automatic-ai-content-writer');
5459
+
?>
5460
+
</div>
5461
+
</div>
5462
+
<b><?php echo esc_html__("Results Template:", 'aiomatic-automatic-ai-content-writer');?></b>
5463
+
</div>
5464
+
</td><td>
5465
+
<div>
5466
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[google_template]" placeholder='Set the Google SERP item template sent to the AI'><?php
5467
+
echo esc_textarea($google_template);
5468
+
?></textarea>
5469
+
</div>
5470
+
</td></tr>
5471
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5472
+
<hr/>
5473
+
</td></tr>
5474
+
<tr <?php echo $hide_extensions;?>><td>
5475
+
<div>
5476
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5477
+
<div class="bws_hidden_help_text cr_min_260px">
5478
+
<?php
5479
+
echo esc_html__("Select if you want to enable the 'YouTube Video Captions' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5480
+
?>
5481
+
</div>
5482
+
</div>
5483
+
<b><?php echo esc_html__("'YouTube Video Captions' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5484
+
</div>
5485
+
</td><td>
5486
+
<div>
5487
+
<input type="checkbox" id="god_mode_enable_youtube_captions" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_youtube_captions]"<?php
5488
+
if ($god_mode_enable_youtube_captions == 'on')
5489
+
echo ' checked ';
5490
+
?>>
5491
+
</div>
5492
+
</td></tr>
5493
+
<tr class="hide_caption <?php echo $hide_class;?>"><td>
5494
+
<div>
5495
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5496
+
<div class="bws_hidden_help_text cr_min_260px">
5497
+
<?php
5498
+
echo esc_html__("Set the maximum length in characters of the resulting string. If the captions are longer than this value, they will shortened.", 'aiomatic-automatic-ai-content-writer');
5499
+
?>
5500
+
</div>
5501
+
</div>
5502
+
<b><?php echo esc_html__("Maximum Caption Length (Characters):", 'aiomatic-automatic-ai-content-writer');?></b>
5503
+
</div>
5504
+
</td><td>
5505
+
<div>
5506
+
<input type="number" min="0" step="1" id="max_caption_length" name="aiomatic_Chatbot_Settings[max_caption_length]" class="cr_width_full" value="<?php echo esc_html($max_caption_length);?>" placeholder="Maximum number of caption characters">
5507
+
</div>
5508
+
</td></tr>
5509
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5510
+
<hr/>
5511
+
</td></tr>
5512
+
<tr <?php echo $hide_extensions;?>><td>
5513
+
<div>
5514
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5515
+
<div class="bws_hidden_help_text cr_min_260px">
5516
+
<?php
5517
+
echo esc_html__("Select if you want to enable the 'Royalty Free Image Search' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5518
+
?>
5519
+
</div>
5520
+
</div>
5521
+
<b><?php echo esc_html__("'Royalty Free Image Search' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5522
+
</div>
5523
+
</td><td>
5524
+
<div>
5525
+
<input type="checkbox" id="god_mode_enable_royalty" name="aiomatic_Chatbot_Settings[god_mode_enable_royalty]"<?php
5526
+
if ($god_mode_enable_royalty == 'on')
5527
+
echo ' checked ';
5528
+
?>>
5529
+
</div>
5530
+
</td></tr>
5531
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5532
+
<hr/>
5533
+
</td></tr>
5534
+
<tr <?php echo $hide_extensions;?>><td>
5535
+
<div>
5536
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5537
+
<div class="bws_hidden_help_text cr_min_260px">
5538
+
<?php
5539
+
echo esc_html__("Select if you want to enable the 'Lead Capture' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5540
+
?>
5541
+
</div>
5542
+
</div>
5543
+
<b><?php echo esc_html__("'Lead Capture' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5544
+
</div>
5545
+
</td><td>
5546
+
<div>
5547
+
<input type="checkbox" id="god_mode_lead_capture" name="aiomatic_Chatbot_Settings[god_mode_lead_capture]"<?php
5548
+
if ($god_mode_lead_capture == 'on')
5549
+
echo ' checked ';
5550
+
?>>
5551
+
</div>
5552
+
</td></tr>
5553
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5554
+
<hr/>
5555
+
</td></tr>
5556
+
<tr <?php echo $hide_extensions;?>><td>
5557
+
<div>
5558
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5559
+
<div class="bws_hidden_help_text cr_min_260px">
5560
+
<?php
5561
+
echo esc_html__("Select if you want to enable the 'YouTube Video Search' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5562
+
?>
5563
+
</div>
5564
+
</div>
5565
+
<b><?php echo esc_html__("'YouTube Video Search' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5566
+
</div>
5567
+
</td><td>
5568
+
<div>
5569
+
<input type="checkbox" id="god_mode_enable_youtube" name="aiomatic_Chatbot_Settings[god_mode_enable_youtube]"<?php
5570
+
if ($god_mode_enable_youtube == 'on')
5571
+
echo ' checked ';
5572
+
?>>
5573
+
</div>
5574
+
</td></tr>
5575
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5576
+
<hr/>
5577
+
</td></tr>
5578
+
<tr <?php echo $hide_extensions;?>><td>
5579
+
<div>
5580
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5581
+
<div class="bws_hidden_help_text cr_min_260px">
5582
+
<?php
5583
+
echo esc_html__("Select if you want to enable the 'Email Sending' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5584
+
?>
5585
+
</div>
5586
+
</div>
5587
+
<b><?php echo esc_html__("'Email Sending' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5588
+
</div>
5589
+
</td><td>
5590
+
<div>
5591
+
<input type="checkbox" id="god_mode_enable_email" name="aiomatic_Chatbot_Settings[god_mode_enable_email]"<?php
5592
+
if ($god_mode_enable_email == 'on')
5593
+
echo ' checked ';
5594
+
?>>
5595
+
</div>
5596
+
</td></tr>
5597
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5598
+
<hr/>
5599
+
</td></tr>
5600
+
<tr <?php echo $hide_extensions;?>><td>
5601
+
<div>
5602
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5603
+
<div class="bws_hidden_help_text cr_min_260px">
5604
+
<?php
5605
+
echo esc_html__("Select if you want to enable the 'Webhook Calling' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5606
+
?>
5607
+
</div>
5608
+
</div>
5609
+
<b><?php echo esc_html__("'Webhook Calling' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5610
+
</div>
5611
+
</td><td>
5612
+
<div>
5613
+
<input type="checkbox" id="god_mode_enable_webhook" name="aiomatic_Chatbot_Settings[god_mode_enable_webhook]"<?php
5614
+
if ($god_mode_enable_webhook == 'on')
5615
+
echo ' checked ';
5616
+
?>>
5617
+
</div>
5618
+
</td></tr>
5619
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5620
+
<hr/>
5621
+
</td></tr>
5622
+
<tr <?php echo $hide_extensions;?>><td>
5623
+
<div>
5624
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5625
+
<div class="bws_hidden_help_text cr_min_260px">
5626
+
<?php
5627
+
echo esc_html__("Select if you want to enable the 'OmniBlock Rule Trigger' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5628
+
?>
5629
+
</div>
5630
+
</div>
5631
+
<b><?php echo esc_html__("'OmniBlock Rule Trigger' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5632
+
</div>
5633
+
</td><td>
5634
+
<div>
5635
+
<input type="checkbox" id="god_mode_enable_omniblock" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_omniblock]"<?php
5636
+
if ($god_mode_enable_omniblock == 'on')
5637
+
echo ' checked ';
5638
+
?>>
5639
+
</div>
5640
+
</td></tr>
5641
+
<tr class="hide_omniblock <?php echo $hide_class;?>"><td>
5642
+
<div>
5643
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5644
+
<div class="bws_hidden_help_text cr_min_260px">
5645
+
<?php
5646
+
echo esc_html__("Set the OmniBlock list which will be allowed for the AI to execute. You can add multiple OmniBlock IDs, one per each line. The format is: RuleID_OmniBlockID => OmniBlock description (to teach the AI when to trigger this OmniBlock sequence). In the description you can tell the AI also about any input parameter it can use, which will be passed to the OmniBlock rules. Give the exact input parameter name, so the AI will be able to use it.", 'aiomatic-automatic-ai-content-writer');
5647
+
?>
5648
+
</div>
5649
+
</div>
5650
+
<b><?php echo esc_html__("OmniBlock List Allowed For The AI To Execute:", 'aiomatic-automatic-ai-content-writer');?></b>
5651
+
</div>
5652
+
</td><td>
5653
+
<div>
5654
+
5655
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[god_omniblock_rules]" placeholder='RuleID_OmniBlockID => OmniBlock description (to teach the AI when to trigger this OmniBlock sequence)'><?php
5656
+
echo esc_textarea($god_omniblock_rules);
5657
+
?></textarea>
5658
+
</div>
5659
+
</td></tr>
5660
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5661
+
<hr/>
5662
+
</td></tr>
5663
+
<tr <?php echo $hide_extensions;?>><td>
5664
+
<div>
5665
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5666
+
<div class="bws_hidden_help_text cr_min_260px">
5667
+
<?php
5668
+
echo esc_html__("Select if you want to enable the 'Database Access' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5669
+
?>
5670
+
</div>
5671
+
</div>
5672
+
<b><?php echo esc_html__("'Database Access' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5673
+
</div>
5674
+
</td><td>
5675
+
<div>
5676
+
<input type="checkbox" id="god_mode_enable_database" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_database]"<?php
5677
+
if ($god_mode_enable_database == 'on')
5678
+
echo ' checked ';
5679
+
?>>
5680
+
</div>
5681
+
</td></tr>
5682
+
<tr class="hide_database <?php echo $hide_class;?>"><td>
5683
+
<div>
5684
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5685
+
<div class="bws_hidden_help_text cr_min_260px">
5686
+
<?php
5687
+
echo esc_html__("Set the database command types which are allowed for the AI to make. If you leave this field blank, only SELECT operations will be allowed for the AI.", 'aiomatic-automatic-ai-content-writer');
5688
+
?>
5689
+
</div>
5690
+
</div>
5691
+
<b><?php echo esc_html__("Database Command Types The AI Is Allowed To Execute:", 'aiomatic-automatic-ai-content-writer');?></b>
5692
+
</div>
5693
+
</td><td>
5694
+
<div>
5695
+
<select id="database_command_types" multiple name="aiomatic_Chatbot_Settings[database_command_types][]" class="cr_width_full resize_vertical">
5696
+
<?php
5697
+
echo '<option' . (in_array('SELECT', $database_command_types) ? ' selected': '') . ' value="SELECT">SELECT (' . esc_html__("Safe to use", 'aiomatic-automatic-ai-content-writer') . ')</option>';
5698
+
echo '<option' . (in_array('INSERT', $database_command_types) ? ' selected': '') . ' value="INSERT">INSERT (' . esc_html__("Warning: can insert content to the database", 'aiomatic-automatic-ai-content-writer') . ')</option>';
5699
+
echo '<option' . (in_array('UPDATE', $database_command_types) ? ' selected': '') . ' value="UPDATE">UPDATE (' . esc_html__("Warning: can update content in the database", 'aiomatic-automatic-ai-content-writer') . ')</option>';
5700
+
echo '<option' . (in_array('DELETE', $database_command_types) ? ' selected': '') . ' value="DELETE">DELETE (' . esc_html__("Warning: can delete content from the database", 'aiomatic-automatic-ai-content-writer') . ')</option>';
5701
+
?>
5702
+
</select>
5703
+
</div>
5704
+
</td></tr>
5705
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5706
+
<hr/>
5707
+
</td></tr>
5708
+
<tr <?php echo $hide_extensions;?>><td>
5709
+
<div>
5710
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5711
+
<div class="bws_hidden_help_text cr_min_260px">
5712
+
<?php
5713
+
echo esc_html__("Select if you want to enable WordPress function calling extension (God Mode) for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5714
+
?>
5715
+
</div>
5716
+
</div>
5717
+
<b><?php echo esc_html__("'God Mode' Extension (WordPress Function Calling) - BETA:", 'aiomatic-automatic-ai-content-writer');?></b>
5718
+
</div>
5719
+
</td><td>
5720
+
<div>
5721
+
<input type="checkbox" id="god_mode_enable_wp" onchange="extensionsChanged();" name="aiomatic_Chatbot_Settings[god_mode_enable_wp]"<?php
5722
+
if ($god_mode_enable_wp == 'on')
5723
+
echo ' checked ';
5724
+
?>>
5725
+
</div>
5726
+
</td></tr>
5727
+
<tr class="hide_god <?php echo $hide_class;?>"><td>
5728
+
<div>
5729
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5730
+
<div class="bws_hidden_help_text cr_min_260px">
5731
+
<?php
5732
+
echo esc_html__("Add a list of functions which will not be allowed to be executed by the chatbot (a function on each line).", 'aiomatic-automatic-ai-content-writer');
5733
+
?>
5734
+
</div>
5735
+
</div>
5736
+
<b><?php echo esc_html__("Blacklisted WordPress Functions:", 'aiomatic-automatic-ai-content-writer');?></b>
5737
+
</td><td>
5738
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[god_blacklisted_functions]" placeholder='List of blacklisted functions for chatbot god mode'><?php
5739
+
echo esc_textarea($god_blacklisted_functions);
5740
+
?></textarea>
5741
+
</td></tr>
5742
+
<tr class="hide_god <?php echo $hide_class;?>"><td>
5743
+
<div>
5744
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5745
+
<div class="bws_hidden_help_text cr_min_260px">
5746
+
<?php
5747
+
echo esc_html__("Add a list of functions which will be allowed to be executed by the chatbot (a function on each line). If you set a list of functions here, any other function which does not appear on the list will not be allowed to be executed by the god mode chatbot.", 'aiomatic-automatic-ai-content-writer');
5748
+
?>
5749
+
</div>
5750
+
</div>
5751
+
<b><?php echo esc_html__("Whitelisted WordPress Functions:", 'aiomatic-automatic-ai-content-writer');?></b>
5752
+
</td><td>
5753
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[god_whitelisted_functions]" placeholder='List of whitelisted functions for chatbot god mode'><?php
5754
+
echo esc_textarea($god_whitelisted_functions);
5755
+
?></textarea>
5756
+
</td></tr>
5757
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5758
+
<hr/>
5759
+
</td></tr>
5760
+
<tr <?php echo $hide_extensions;?>><td>
5761
+
<div>
5762
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5763
+
<div class="bws_hidden_help_text cr_min_260px">
5764
+
<?php
5765
+
echo esc_html__("Select if you want to enable the 'Toubiz API Integration' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5766
+
?>
5767
+
</div>
5768
+
</div>
5769
+
<b><?php echo esc_html__("'Toubiz API Integration' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5770
+
</div>
5771
+
</td><td>
5772
+
<div>
5773
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_toubiz"
5774
+
<?php
5775
+
$no_tb = false;
5776
+
if (!is_plugin_active('aiomatic-extension-toubiz-api/aiomatic-extension-toubiz-api.php'))
5777
+
{
5778
+
$no_tb = true;
5779
+
}
5780
+
$no_tb_api = false;
5781
+
if (!isset($aiomatic_Main_Settings['toubiz_api']) || trim($aiomatic_Main_Settings['toubiz_api']) == '')
5782
+
{
5783
+
$no_tb_api = true;
5784
+
}
5785
+
if($no_tb == true || $no_tb_api == true)
5786
+
{
5787
+
echo ' disabled';
5788
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_toubiz]"<?php
5789
+
if ($god_mode_enable_toubiz == 'on')
5790
+
echo ' checked ';
5791
+
?>>
5792
+
<?php
5793
+
if($no_tb == true)
5794
+
{
5795
+
echo esc_html__("This option requires the Aimogen Extension: Toubiz API plugin to be active.", 'aiomatic-automatic-ai-content-writer');?>
5796
+
<?php
5797
+
}
5798
+
elseif($no_tb_api == true)
5799
+
{
5800
+
echo esc_html__("You need to add your Toubiz API key in the plugin's 'Settings' menu -> 'API Keys' tab.", 'aiomatic-automatic-ai-content-writer');?>
5801
+
<?php
5802
+
}
5803
+
?>
5804
+
</div>
5805
+
</td></tr>
5806
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5807
+
<hr/>
5808
+
</td></tr>
5809
+
<tr <?php echo $hide_extensions;?>><td>
5810
+
<div>
5811
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5812
+
<div class="bws_hidden_help_text cr_min_260px">
5813
+
<?php
5814
+
echo esc_html__("Select if you want to enable the 'Facebook Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5815
+
?>
5816
+
</div>
5817
+
</div>
5818
+
<b><?php echo esc_html__("'Facebook Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5819
+
</div>
5820
+
</td><td>
5821
+
<div>
5822
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_facebook_post"
5823
+
<?php
5824
+
$no_fb = false;
5825
+
if (!is_plugin_active('fbomatic-facebook-post-generator/fbomatic-facebook-post-generator.php'))
5826
+
{
5827
+
$no_fb = true;
5828
+
}
5829
+
if($no_fb == true)
5830
+
{
5831
+
echo ' disabled';
5832
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_facebook_post]"<?php
5833
+
if ($god_mode_enable_facebook_post == 'on')
5834
+
echo ' checked ';
5835
+
?>>
5836
+
<?php
5837
+
if($no_fb == true)
5838
+
{
5839
+
echo esc_html__("This option requires the F-omatic Automatic Post Generator and Social Network Auto Poster plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/fbomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.</span></td></tr>';
5840
+
}
5841
+
?>
5842
+
</div>
5843
+
</td></tr>
5844
+
<tr class="hide_facebook <?php echo $hide_class;?>"><td>
5845
+
<div>
5846
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5847
+
<div class="bws_hidden_help_text cr_min_260px">
5848
+
<?php
5849
+
echo esc_html__("Select the page associated with your App ID, where you want to publish your posts.", 'aiomatic-automatic-ai-content-writer');
5850
+
?>
5851
+
</div>
5852
+
</div>
5853
+
<b><?php echo esc_html__("Page Where To Publish Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
5854
+
</div>
5855
+
</td><td>
5856
+
<div>
5857
+
<?php
5858
+
$output = '<select id="facebook_post_select" name="aiomatic_Chatbot_Settings[facebook_post_select]" >';
5859
+
$store = get_option('fbomatic_page_ids', false);
5860
+
if($store !== FALSE)
5861
+
{
5862
+
$store = explode(',', $store);
5863
+
$fcount = count($store);
5864
+
for($i = 0; $i < $fcount; $i++)
5865
+
{
5866
+
$exploding = explode('-', $store[$i]);
5867
+
if(!isset($exploding[2]))
5868
+
{
5869
+
continue;
5870
+
}
5871
+
$output .= '<option value="' . esc_html($exploding[0]) . '"';
5872
+
if($exploding[0] == $facebook_post_select)
5873
+
{
5874
+
$output .= " selected";
5875
+
}
5876
+
$output .= '>' . esc_html($exploding[2]) . '</option>';
5877
+
}
5878
+
}
5879
+
else
5880
+
{
5881
+
$output .= '<option disabled value="">' . esc_html__('You need to set up the F-omatic plugin before using this feature!', 'aiomatic-automatic-ai-content-writer') . '</option>';
5882
+
}
5883
+
$output .= '</select>';
5884
+
echo $output;
5885
+
?>
5886
+
</div>
5887
+
</td></tr>
5888
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5889
+
<hr/>
5890
+
</td></tr>
5891
+
<tr <?php echo $hide_extensions;?>><td>
5892
+
<div>
5893
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5894
+
<div class="bws_hidden_help_text cr_min_260px">
5895
+
<?php
5896
+
echo esc_html__("Select if you want to enable the 'Twitter (X) Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5897
+
?>
5898
+
</div>
5899
+
</div>
5900
+
<b><?php echo esc_html__("'Twitter (X) Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5901
+
</div>
5902
+
</td><td>
5903
+
<div>
5904
+
<input type="checkbox" id="god_mode_enable_twitter_post"
5905
+
<?php
5906
+
$no_tw = false;
5907
+
if (!is_plugin_active('twitomatic-twitter-post-generator/twitomatic-twitter-post-generator.php'))
5908
+
{
5909
+
$no_tw = true;
5910
+
}
5911
+
if($no_tw == true)
5912
+
{
5913
+
echo ' disabled';
5914
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_twitter_post]"<?php
5915
+
if ($god_mode_enable_twitter_post == 'on')
5916
+
echo ' checked ';
5917
+
?>>
5918
+
<?php
5919
+
if($no_tw == true)
5920
+
{
5921
+
echo esc_html__("This option requires the Twitomatic Automatic Post Generator and Twitter Auto Poster Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/twitomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.</span></td></tr>';
5922
+
}
5923
+
?>
5924
+
</div>
5925
+
</td></tr>
5926
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5927
+
<hr/>
5928
+
</td></tr>
5929
+
<tr <?php echo $hide_extensions;?>><td>
5930
+
<div>
5931
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5932
+
<div class="bws_hidden_help_text cr_min_260px">
5933
+
<?php
5934
+
echo esc_html__("Select if you want to enable the 'Threads Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5935
+
?>
5936
+
</div>
5937
+
</div>
5938
+
<b><?php echo esc_html__("'Threads Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5939
+
</div>
5940
+
</td><td>
5941
+
<div>
5942
+
<input type="checkbox" id="god_mode_enable_threads_post"
5943
+
<?php
5944
+
$no_tw = false;
5945
+
if (!is_plugin_active('threadsomatic-threads-auto-poster/threadsomatic-threads-auto-poster.php'))
5946
+
{
5947
+
$no_tw = true;
5948
+
}
5949
+
if($no_tw == true)
5950
+
{
5951
+
echo ' disabled';
5952
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_threads_post]"<?php
5953
+
if ($god_mode_enable_threads_post == 'on')
5954
+
echo ' checked ';
5955
+
?>>
5956
+
<?php
5957
+
if($no_tw == true)
5958
+
{
5959
+
echo esc_html__("This option requires the Threadsomatic Plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://wpbay.com/product/threadsomatic-threads-auto-poster/" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
5960
+
}
5961
+
?>
5962
+
</div>
5963
+
</td></tr>
5964
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
5965
+
<hr/>
5966
+
</td></tr>
5967
+
<tr <?php echo $hide_extensions;?>><td>
5968
+
<div>
5969
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
5970
+
<div class="bws_hidden_help_text cr_min_260px">
5971
+
<?php
5972
+
echo esc_html__("Select if you want to enable the 'Instagram Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
5973
+
?>
5974
+
</div>
5975
+
</div>
5976
+
<b><?php echo esc_html__("'Instagram Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
5977
+
</div>
5978
+
</td><td>
5979
+
<div>
5980
+
<input type="checkbox" id="god_mode_enable_instagram_post"
5981
+
<?php
5982
+
$no_tw = false;
5983
+
if (!is_plugin_active('instamatic-instagram-post-generator/instamatic-instagram-post-generator.php'))
5984
+
{
5985
+
$no_tw = true;
5986
+
}
5987
+
if($no_tw == true)
5988
+
{
5989
+
echo ' disabled';
5990
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_instagram_post]"<?php
5991
+
if ($god_mode_enable_instagram_post == 'on')
5992
+
echo ' checked ';
5993
+
?>>
5994
+
<?php
5995
+
if($no_tw == true)
5996
+
{
5997
+
echo esc_html__("This option requires the iMediamatic Automatic Post Generator and Instagram Auto Poster Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/instamatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
5998
+
}
5999
+
?>
6000
+
</div>
6001
+
</td></tr>
6002
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
6003
+
<hr/>
6004
+
</td></tr>
6005
+
<tr <?php echo $hide_extensions;?>><td>
6006
+
<div>
6007
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6008
+
<div class="bws_hidden_help_text cr_min_260px">
6009
+
<?php
6010
+
echo esc_html__("Select if you want to enable the 'Pinterest Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
6011
+
?>
6012
+
</div>
6013
+
</div>
6014
+
<b><?php echo esc_html__("'Pinterest Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
6015
+
</div>
6016
+
</td><td>
6017
+
<div>
6018
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_pinterest_post"
6019
+
<?php
6020
+
$no_tw = false;
6021
+
if (!is_plugin_active('pinterestomatic-pinterest-post-generator/pinterestomatic-pinterest-post-generator.php'))
6022
+
{
6023
+
$no_tw = true;
6024
+
}
6025
+
if($no_tw == true)
6026
+
{
6027
+
echo ' disabled';
6028
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_pinterest_post]"<?php
6029
+
if ($god_mode_enable_pinterest_post == 'on')
6030
+
echo ' checked ';
6031
+
?>>
6032
+
<?php
6033
+
if($no_tw == true)
6034
+
{
6035
+
echo esc_html__("This option requires the Pinterestomatic Automatic Post Generator and Pinterest Auto Poster Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/pinterestomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
6036
+
}
6037
+
?>
6038
+
</div>
6039
+
</td></tr>
6040
+
<tr class="hide_pinterest <?php echo $hide_class;?>"><td>
6041
+
<div>
6042
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6043
+
<div class="bws_hidden_help_text cr_min_260px">
6044
+
<?php
6045
+
echo esc_html__("Select the board associated with your account, where you want to publish your pins.", 'aiomatic-automatic-ai-content-writer');
6046
+
?>
6047
+
</div>
6048
+
</div>
6049
+
<b><?php echo esc_html__("Boards Where To Publish Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
6050
+
</div>
6051
+
</td><td>
6052
+
<div>
6053
+
<?php
6054
+
$output = '<select id="pinterest_post_select" name="aiomatic_Chatbot_Settings[pinterest_post_select]" >';
6055
+
$boards = get_option('pinterestomatic_public_boards', false);
6056
+
if($boards !== FALSE)
6057
+
{
6058
+
if($boards != '' && is_array($boards))
6059
+
{
6060
+
foreach($boards as $id => $name)
6061
+
{
6062
+
$output .= '<option value="' . esc_attr($id) . '"';
6063
+
if ($pinterest_post_select == $id) {
6064
+
$output .= " selected";
6065
+
}
6066
+
$output .= '>' . esc_html($name) . '</option>';
6067
+
}
6068
+
}
6069
+
}
6070
+
else
6071
+
{
6072
+
$output .= '<option disabled value="">' . esc_html__('You need to set up the Pinterestomatic plugin before using this feature!', 'aiomatic-automatic-ai-content-writer') . '</option>';
6073
+
}
6074
+
$output .= '</select>';
6075
+
echo $output;
6076
+
?>
6077
+
</div>
6078
+
</td></tr>
6079
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
6080
+
<hr/>
6081
+
</td></tr>
6082
+
<tr <?php echo $hide_extensions;?>><td>
6083
+
<div>
6084
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6085
+
<div class="bws_hidden_help_text cr_min_260px">
6086
+
<?php
6087
+
echo esc_html__("Select if you want to enable the 'Google My Business Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
6088
+
?>
6089
+
</div>
6090
+
</div>
6091
+
<b><?php echo esc_html__("'Google My Business Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
6092
+
</div>
6093
+
</td><td>
6094
+
<div>
6095
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_google_post"
6096
+
<?php
6097
+
$no_tw = false;
6098
+
if (!is_plugin_active('businessomatic-google-my-business-post-generator/businessomatic-google-my-business-post-generator.php'))
6099
+
{
6100
+
$no_tw = true;
6101
+
}
6102
+
if($no_tw == true)
6103
+
{
6104
+
echo ' disabled';
6105
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_google_post]"<?php
6106
+
if ($god_mode_enable_google_post == 'on')
6107
+
echo ' checked ';
6108
+
?>>
6109
+
<?php
6110
+
if($no_tw == true)
6111
+
{
6112
+
echo esc_html__("This option requires the Businessomatic Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/businessomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
6113
+
}
6114
+
?>
6115
+
</div>
6116
+
</td></tr>
6117
+
<tr class="hide_gmb <?php echo $hide_class;?>"><td>
6118
+
<div>
6119
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6120
+
<div class="bws_hidden_help_text cr_min_260px">
6121
+
<?php
6122
+
echo esc_html__("Select the page associated with your account, where you want to publish your posts.", 'aiomatic-automatic-ai-content-writer');
6123
+
?>
6124
+
</div>
6125
+
</div>
6126
+
<b><?php echo esc_html__("Pages Where To Publish Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
6127
+
</div>
6128
+
</td><td>
6129
+
<div>
6130
+
<select id="business_post_select" name="aiomatic_Chatbot_Settings[business_post_select]" >
6131
+
<?php
6132
+
$store = get_option('businessomatic_my_business_list', false);
6133
+
if($store !== FALSE)
6134
+
{
6135
+
foreach ($store as $index => $val)
6136
+
{
6137
+
?>
6138
+
<option value="<?php echo esc_html($index);?>"
6139
+
<?php
6140
+
if($index == $business_post_select) echo " selected" ?>>
6141
+
<?php echo esc_html($val); ?>
6142
+
</option>
6143
+
<?php
6144
+
}
6145
+
}
6146
+
?>
6147
+
</select>
6148
+
</div>
6149
+
</td></tr>
6150
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
6151
+
<hr/>
6152
+
</td></tr>
6153
+
<tr <?php echo $hide_extensions;?>><td>
6154
+
<div>
6155
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6156
+
<div class="bws_hidden_help_text cr_min_260px">
6157
+
<?php
6158
+
echo esc_html__("Select if you want to enable the 'YouTube Community Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
6159
+
?>
6160
+
</div>
6161
+
</div>
6162
+
<b><?php echo esc_html__("'YouTube Community Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
6163
+
</div>
6164
+
</td><td>
6165
+
<div>
6166
+
<input type="checkbox" id="god_mode_enable_youtube_post"
6167
+
<?php
6168
+
$no_tw = false;
6169
+
if (!is_plugin_active('youtubomatic-youtube-post-generator/youtubomatic-youtube-post-generator.php'))
6170
+
{
6171
+
$no_tw = true;
6172
+
}
6173
+
if($no_tw == true)
6174
+
{
6175
+
echo ' disabled';
6176
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_youtube_post]"<?php
6177
+
if ($god_mode_enable_youtube_post == 'on')
6178
+
echo ' checked ';
6179
+
?>>
6180
+
<?php
6181
+
if($no_tw == true)
6182
+
{
6183
+
echo esc_html__("This option requires the Youtubomatic Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/youtubomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
6184
+
}
6185
+
?>
6186
+
</div>
6187
+
</td></tr>
6188
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
6189
+
<hr/>
6190
+
</td></tr>
6191
+
<tr <?php echo $hide_extensions;?>><td>
6192
+
<div>
6193
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6194
+
<div class="bws_hidden_help_text cr_min_260px">
6195
+
<?php
6196
+
echo esc_html__("Select if you want to enable the 'Reddit Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
6197
+
?>
6198
+
</div>
6199
+
</div>
6200
+
<b><?php echo esc_html__("'Reddit Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
6201
+
</div>
6202
+
</td><td>
6203
+
<div>
6204
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_reddit_post"
6205
+
<?php
6206
+
$no_tw = false;
6207
+
if (!is_plugin_active('redditomatic-reddit-post-generator/redditomatic-reddit-post-generator.php'))
6208
+
{
6209
+
$no_tw = true;
6210
+
}
6211
+
if($no_tw == true)
6212
+
{
6213
+
echo ' disabled';
6214
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_reddit_post]"<?php
6215
+
if ($god_mode_enable_reddit_post == 'on')
6216
+
echo ' checked ';
6217
+
?>>
6218
+
<?php
6219
+
if($no_tw == true)
6220
+
{
6221
+
echo esc_html__("This option requires the Redditomatic Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/redditomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
6222
+
}
6223
+
?>
6224
+
</div>
6225
+
</td></tr>
6226
+
<tr class="hide_reddit <?php echo $hide_class;?>">
6227
+
<td>
6228
+
<div>
6229
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6230
+
<div class="bws_hidden_help_text cr_min_260px">
6231
+
<?php
6232
+
echo esc_html__("Input a list of comma separated subreddit names where you want to automatically post your new post content.", 'aiomatic-automatic-ai-content-writer');
6233
+
?>
6234
+
</div>
6235
+
</div>
6236
+
<b><?php echo esc_html__("Subreddits Where To Post:", 'aiomatic-automatic-ai-content-writer');?></b>
6237
+
</div>
6238
+
</td>
6239
+
<td>
6240
+
<div>
6241
+
<textarea name="aiomatic_Chatbot_Settings[subreddits_list]" placeholder="Please insert a subreddit"><?php
6242
+
echo esc_textarea($subreddits_list);
6243
+
?></textarea>
6244
+
</div>
6245
+
</td>
6246
+
</tr>
6247
+
<tr <?php echo $hide_extensions;?>><td colspan="2">
6248
+
<hr/>
6249
+
</td></tr>
6250
+
<tr <?php echo $hide_extensions;?>><td>
6251
+
<div>
6252
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6253
+
<div class="bws_hidden_help_text cr_min_260px">
6254
+
<?php
6255
+
echo esc_html__("Select if you want to enable the 'LinkedIn Posting' for the Chatbot.", 'aiomatic-automatic-ai-content-writer');
6256
+
?>
6257
+
</div>
6258
+
</div>
6259
+
<b><?php echo esc_html__("'LinkedIn Posting' Extension:", 'aiomatic-automatic-ai-content-writer');?></b>
6260
+
</div>
6261
+
</td><td>
6262
+
<div>
6263
+
<input type="checkbox" onchange="extensionsChanged();" id="god_mode_enable_linkedin_post"
6264
+
<?php
6265
+
$no_tw = false;
6266
+
if (!is_plugin_active('linkedinomatic-linkedin-post-generator/linkedinomatic-linkedin-post-generator.php'))
6267
+
{
6268
+
$no_tw = true;
6269
+
}
6270
+
if($no_tw == true)
6271
+
{
6272
+
echo ' disabled';
6273
+
} ?> name="aiomatic_Chatbot_Settings[god_mode_enable_linkedin_post]"<?php
6274
+
if ($god_mode_enable_linkedin_post == 'on')
6275
+
echo ' checked ';
6276
+
?>>
6277
+
<?php
6278
+
if($no_tw == true)
6279
+
{
6280
+
echo esc_html__("This option requires the Linkedinomatic Plugin for WordPress plugin to be active. Check it", 'aiomatic-automatic-ai-content-writer') . ' <a href="https://1.envato.market/linkedinomatic" target="_blank">' . esc_html__("here", 'aiomatic-automatic-ai-content-writer') . '</a>.';
6281
+
}
6282
+
?>
6283
+
</div>
6284
+
</td></tr>
6285
+
<tr class="hide_linkedin <?php echo $hide_class;?>">
6286
+
<td>
6287
+
<div>
6288
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6289
+
<div class="bws_hidden_help_text cr_min_260px">
6290
+
<?php
6291
+
echo esc_html__("Select the pages associated with your App ID, where you want to publish your posts. To select multiple entries, please hold down the 'Control' key.", 'aiomatic-automatic-ai-content-writer');
6292
+
?>
6293
+
</div>
6294
+
</div>
6295
+
<b><?php echo esc_html__("LinkedIn Page Where to Publish Posts:", 'aiomatic-automatic-ai-content-writer');?></b>
6296
+
</div>
6297
+
</td>
6298
+
<td>
6299
+
<div>
6300
+
<select name="aiomatic_Chatbot_Settings[linkedin_selected_pages]" id="PagesSelect" class="cr_auto">
6301
+
<?php
6302
+
$companies = get_option('linkedinomatic_my_companies', array());
6303
+
if(is_array($companies) && count($companies) > 0)
6304
+
{
6305
+
if(count($companies) > 0)
6306
+
{
6307
+
foreach($companies as $cmp_id => $cmp_name)
6308
+
{
6309
+
if($cmp_name == 'Profile Page')
6310
+
{
6311
+
echo '<option value="' . esc_attr($cmp_id) . '"';
6312
+
if($cmp_id == $linkedin_selected_pages)
6313
+
{
6314
+
echo ' selected';
6315
+
}
6316
+
echo '>' . esc_html($cmp_name) . '</option>';
6317
+
}
6318
+
else
6319
+
{
6320
+
echo '<option value="xxxLinkedinomaticxxx' . esc_attr($cmp_id) . '"';
6321
+
if('xxxLinkedinomaticxxx' . $cmp_id == $linkedin_selected_pages)
6322
+
{
6323
+
echo ' selected';
6324
+
}
6325
+
echo '>' . esc_html($cmp_name) . '</option>';
6326
+
}
6327
+
}
6328
+
}
6329
+
}
6330
+
?>
6331
+
</select>
6332
+
</td>
6333
+
</tr>
6334
+
<?php
6335
+
}
6336
+
?>
6337
+
<tr><td colspan="2">
6338
+
<hr/>
6339
+
</td></tr>
6340
+
<tr><td colspan="2">
6341
+
<h3><?php echo esc_html__("Chatbot Extensions Activation Settings:", 'aiomatic-automatic-ai-content-writer');?></h3>
6342
+
</td></tr>
6343
+
<tr><td>
6344
+
<div>
6345
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6346
+
<div class="bws_hidden_help_text cr_min_260px">
6347
+
<?php
6348
+
echo esc_html__("Select if you want to enable Chatbot Extensions in the chatbot preview from below. This will apply only if regular AI models are used (not AI Assistants - for these, the Chatbot Extensions needs to be enabled from Assistant editing menu). Also, Chatbot Extensions will work only for logged in administrator privileged users.", 'aiomatic-automatic-ai-content-writer');
6349
+
?>
6350
+
</div>
6351
+
</div>
6352
+
<b><?php echo esc_html__("Enable Chatbot Extensions In The Chabot Preview From Below:", 'aiomatic-automatic-ai-content-writer');?></b>
6353
+
</div>
6354
+
</td><td>
6355
+
<div>
6356
+
<input type="checkbox" id="god_preview" name="aiomatic_Chatbot_Settings[god_preview]"<?php
6357
+
if ($god_preview == 'on')
6358
+
echo ' checked ';
6359
+
?>>
6360
+
</div>
6361
+
</td></tr>
6362
+
<tr><td>
6363
+
<div>
6364
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6365
+
<div class="bws_hidden_help_text cr_min_260px">
6366
+
<?php
6367
+
echo esc_html__("Select if you want to enable Chatbot Extensions in the globally injected chatbot, on the entire front end and/or back end of your site. This will apply only if regular AI models are used (not AI Assistants - for these, the Chatbot Extensions needs to be enabled from Assistant editing menu). Also, Chatbot Extensions will work only for logged in administrator privileged users.", 'aiomatic-automatic-ai-content-writer');
6368
+
?>
6369
+
</div>
6370
+
</div>
6371
+
<b><?php echo esc_html__("Enable Chatbot Extensions In The Globally Injected Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
6372
+
</div>
6373
+
</td><td>
6374
+
<div>
6375
+
<select id="god_mode_front_end" name="aiomatic_Chatbot_Settings[god_mode_front_end]" >
6376
+
<?php
6377
+
echo '<option' . ($god_mode_front_end == 'off' ? ' selected': '') . ' value="off">Off</option>';
6378
+
echo '<option' . ($god_mode_front_end == 'front' ? ' selected': '') . ' value="front">Front End</option>';
6379
+
echo '<option' . ($god_mode_front_end == 'back' ? ' selected': '') . ' value="back">Back End</option>';
6380
+
echo '<option' . ($god_mode_front_end == 'both' ? ' selected': '') . ' value="both">Front End & Back End</option>';
6381
+
?>
6382
+
</select>
6383
+
</div>
6384
+
</td></tr>
6385
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
6386
+
?>
6387
+
<tr><td colspan="2">
6388
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
6389
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/6RQn-v9tlek" frameborder="0" allowfullscreen></iframe></div></p>
6390
+
</td></tr>
6391
+
<?php
6392
+
}
6393
+
?>
6394
+
</table>
6395
+
</div>
6396
+
<div id="tab-11" class="tab-content">
6397
+
<table class="widefat">
6398
+
<tr><td colspan="2">
6399
+
<h2><?php echo esc_html__("AI Chatbot Limitations:", 'aiomatic-automatic-ai-content-writer');?></h2>
6400
+
</td></tr>
6401
+
<tr><td>
6402
+
<div>
6403
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6404
+
<div class="bws_hidden_help_text cr_min_260px">
6405
+
<?php
6406
+
echo esc_html__("Set the daily token count for logged in users. Users who are not logged in will not be allowed to submit the form. To disable this feature, leave this field blank.", 'aiomatic-automatic-ai-content-writer');
6407
+
?>
6408
+
</div>
6409
+
</div>
6410
+
<b><?php echo esc_html__("Total Token Cap Per Day For Users (And Restrict Not Logged In Users):", 'aiomatic-automatic-ai-content-writer');?></b>
6411
+
6412
+
</td><td>
6413
+
<input type="number" min="0" step="1" id="user_token_cap_per_day" name="aiomatic_Chatbot_Settings[user_token_cap_per_day]" class="cr_width_full" value="<?php echo esc_html($user_token_cap_per_day);?>" placeholder="User token cap / day">
6414
+
</td></tr>
6415
+
<tr><td>
6416
+
<div>
6417
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6418
+
<div class="bws_hidden_help_text cr_min_260px">
6419
+
<?php
6420
+
echo esc_html__("Set the maximum input length for user messages.", 'aiomatic-automatic-ai-content-writer');
6421
+
?>
6422
+
</div>
6423
+
</div>
6424
+
<b><?php echo esc_html__("Single Message Max Input Length (Characters):", 'aiomatic-automatic-ai-content-writer');?></b>
6425
+
6426
+
</td><td>
6427
+
<input type="number" min="1" step="1" id="max_input_length" name="aiomatic_Chatbot_Settings[max_input_length]" class="cr_width_full" value="<?php echo esc_html($max_input_length);?>" placeholder="Max input length">
6428
+
</td></tr>
6429
+
<tr><td>
6430
+
<div>
6431
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6432
+
<div class="bws_hidden_help_text cr_min_260px">
6433
+
<?php
6434
+
echo esc_html__("Set the maximum chat messages to send as API context. Default is to send as much as possible, to the AI, depending on model accepted token size.", 'aiomatic-automatic-ai-content-writer');
6435
+
?>
6436
+
</div>
6437
+
</div>
6438
+
<b><?php echo esc_html__("Max Chat Messages To Send As API Context:", 'aiomatic-automatic-ai-content-writer');?></b>
6439
+
6440
+
</td><td>
6441
+
<input type="number" min="1" step="1" id="max_message_count" name="aiomatic_Chatbot_Settings[max_message_count]" class="cr_width_full" value="<?php echo esc_html($max_message_count);?>" placeholder="Max context chat message count">
6442
+
</td></tr>
6443
+
<tr><td>
6444
+
<div>
6445
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6446
+
<div class="bws_hidden_help_text cr_min_260px">
6447
+
<?php
6448
+
echo esc_html__("Set the maximum chat message context size, in characters, which will be sent to the AI chatbot..", 'aiomatic-automatic-ai-content-writer');
6449
+
?>
6450
+
</div>
6451
+
</div>
6452
+
<b><?php echo esc_html__("Max Chat Context Size (Characters):", 'aiomatic-automatic-ai-content-writer');?></b>
6453
+
6454
+
</td><td>
6455
+
<input type="number" min="1" step="1" id="max_message_context" name="aiomatic_Chatbot_Settings[max_message_context]" class="cr_width_full" value="<?php echo esc_html($max_message_context);?>" placeholder="Max context chat size">
6456
+
</td></tr>
6457
+
<tr><td>
6458
+
<div>
6459
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6460
+
<div class="bws_hidden_help_text cr_min_260px">
6461
+
<?php
6462
+
echo esc_html__("Select if you want to allow empty chat messages or not", 'aiomatic-automatic-ai-content-writer');
6463
+
?>
6464
+
</div>
6465
+
</div>
6466
+
<b><?php echo esc_html__("Disable Sending Of Empty Chat Messages:", 'aiomatic-automatic-ai-content-writer');?></b>
6467
+
</div>
6468
+
</td><td>
6469
+
<div>
6470
+
<input type="checkbox" id="no_empty" name="aiomatic_Chatbot_Settings[no_empty]"<?php
6471
+
if ($no_empty == 'on')
6472
+
echo ' checked ';
6473
+
?>>
6474
+
</div>
6475
+
</td></tr>
6476
+
<tr><td>
6477
+
<div>
6478
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6479
+
<div class="bws_hidden_help_text cr_min_260px">
6480
+
<?php
6481
+
echo esc_html__("Limits user requests by user IP. Set restriction time and set max requests per restriction time. Set also the restriction time window (in seconds) for the max requests.", 'aiomatic-automatic-ai-content-writer');
6482
+
?>
6483
+
</div>
6484
+
</div>
6485
+
<b><?php echo esc_html__("Limit User Messages - Max Requests / Time Window:", 'aiomatic-automatic-ai-content-writer');?></b>
6486
+
</div>
6487
+
</td><td>
6488
+
<div>
6489
+
<input type="number" min="1" step="1" id="restriction_count" name="aiomatic_Chatbot_Settings[restriction_count]" class="cr_width_25p" value="<?php echo esc_html($restriction_count);?>" placeholder="<?php echo esc_html__("Set max requests", 'aiomatic-automatic-ai-content-writer');?>"> <?php echo esc_html__("requests", 'aiomatic-automatic-ai-content-writer');?> /
6490
+
<input type="number" min="1" id="restriction_time" name="aiomatic_Chatbot_Settings[restriction_time]" class="cr_width_25p" value="<?php echo esc_html($restriction_time);?>" placeholder="<?php echo esc_html__("Set restriction time", 'aiomatic-automatic-ai-content-writer');?>"> <?php echo esc_html__("seconds", 'aiomatic-automatic-ai-content-writer');?>
6491
+
</div>
6492
+
</td></tr>
6493
+
<tr><td>
6494
+
<div>
6495
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6496
+
<div class="bws_hidden_help_text cr_min_260px">
6497
+
<?php
6498
+
echo esc_html__("Set a message to be displayed to restricted users.", 'aiomatic-automatic-ai-content-writer');
6499
+
?>
6500
+
</div>
6501
+
</div>
6502
+
<b><?php echo esc_html__("Error Message When User Exceeded The Limit:", 'aiomatic-automatic-ai-content-writer');?></b>
6503
+
</div>
6504
+
</td><td>
6505
+
<div>
6506
+
<input id="restriction_message" name="aiomatic_Chatbot_Settings[restriction_message]" list="restriction_message" type="text" class="coderevolution_gutenberg_input" value="<?php echo esc_attr($restriction_message);?>" placeholder="You exceeded your requests limit."/>
6507
+
</div>
6508
+
</td></tr>
6509
+
</table>
6510
+
</div>
6511
+
<div id="tab-8" class="tab-content">
6512
+
<table class="widefat">
6513
+
<tr><td colspan="2">
6514
+
<h2><?php echo esc_html__("Chatbot Text-to-Speech/Video Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
6515
+
</td></tr>
6516
+
<?php
6517
+
if ((!isset($aiomatic_Main_Settings['elevenlabs_app_id']) || trim($aiomatic_Main_Settings['elevenlabs_app_id']) == '') && (!isset($aiomatic_Main_Settings['google_app_id']) || trim($aiomatic_Main_Settings['google_app_id']) == '') && (!isset($aiomatic_Main_Settings['did_app_id']) || trim($aiomatic_Main_Settings['did_app_id']) == '') && (!isset($aiomatic_Main_Settings['azure_speech_id']) || trim($aiomatic_Main_Settings['azure_speech_id']) == '') && (!isset($aiomatic_Main_Settings['app_id']) || trim($aiomatic_Main_Settings['app_id']) == ''))
6518
+
{
6519
+
echo '<tr><td colspan="2"><h2>' . esc_html__("You need to enter an ElevenLabs.io API key, OpenAI API key, Azure Speech Services API, D-ID API key or a Google Text-to-Speech API key in the 'API Keys' tab and save settings, to use this feature.", 'aiomatic-automatic-ai-content-writer') . '</h2></td></tr>';
6520
+
}
6521
+
else
6522
+
{
6523
+
if (isset($aiomatic_Main_Settings['elevenlabs_app_id']) && trim($aiomatic_Main_Settings['elevenlabs_app_id']) != '')
6524
+
{
6525
+
echo '<tr><td><b>' . esc_html__("Sync ElevenLabs.io Voices:", 'aiomatic-automatic-ai-content-writer') . '</b></td><td><input type="button" onclick="aiomatic_sync_voices_elevenlabs()" id="elevenlabs_sync" value="Sync"></td></tr>';
6526
+
}
6527
+
if (isset($aiomatic_Main_Settings['google_app_id']) && trim($aiomatic_Main_Settings['google_app_id']) != '')
6528
+
{
6529
+
echo '<tr><td><b>' . esc_html__("Sync Google Text-to-Speech Voices:", 'aiomatic-automatic-ai-content-writer') . '</b></td><td><input type="button" onclick="aiomatic_sync_voices_google()" id="google_sync" value="Sync"></td></tr>';
6530
+
}
6531
+
?>
6532
+
<tr><td>
6533
+
<div>
6534
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6535
+
<div class="bws_hidden_help_text cr_min_260px">
6536
+
<?php
6537
+
echo esc_html__("Select if you want to enable chatbot text to speech/video.", 'aiomatic-automatic-ai-content-writer');
6538
+
?>
6539
+
</div>
6540
+
</div>
6541
+
<b><?php echo esc_html__("Enable Chatbot Text-to-Speech/Video:", 'aiomatic-automatic-ai-content-writer');?></b>
6542
+
</div>
6543
+
</td><td>
6544
+
<div>
6545
+
<select id="chatbot_text_speech" onchange="aiomatic_text_changed()" name="aiomatic_Chatbot_Settings[chatbot_text_speech]" >
6546
+
<?php
6547
+
echo '<option' . ($chatbot_text_speech == 'off' ? ' selected': '') . ' value="off">Off</option>';
6548
+
echo '<option' . ($chatbot_text_speech == 'free' ? ' selected': '') . ' value="free">Browser Text-to-Speech (Free)</option>';
6549
+
if (!isset($aiomatic_Main_Settings['app_id']))
6550
+
{
6551
+
$aiomatic_Main_Settings['app_id'] = '';
6552
+
}
6553
+
$appids = preg_split('/\r\n|\r|\n/', trim($aiomatic_Main_Settings['app_id']));
6554
+
$appids = array_filter($appids);
6555
+
if(empty($appids))
6556
+
{
6557
+
$token = '';
6558
+
}
6559
+
else
6560
+
{
6561
+
$token = $appids[array_rand($appids)];
6562
+
$token = apply_filters('aimogen_openai_api_key', $token);$token = apply_filters('aiomatic_openai_api_key', $token);
6563
+
}
6564
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure')))
6565
+
{
6566
+
echo '<option' . ($chatbot_text_speech == 'openai' ? ' selected': '') . ' value="openai">OpenAI Text-to-Speech</option>';
6567
+
}
6568
+
else
6569
+
{
6570
+
echo '<option' . ($chatbot_text_speech == 'openai' ? ' selected': '') . ' disabled value="openai">OpenAI Text-to-Speech (' . esc_html__("Currently Only OpenAI API is supported for TTS", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6571
+
}
6572
+
if (isset($aiomatic_Main_Settings['elevenlabs_app_id']) && trim($aiomatic_Main_Settings['elevenlabs_app_id']) != '')
6573
+
{
6574
+
echo '<option' . ($chatbot_text_speech == 'elevenlabs' ? ' selected': '') . ' value="elevenlabs">ElevenLabs.io Text-to-Speech</option>';
6575
+
}
6576
+
else
6577
+
{
6578
+
echo '<option' . ($chatbot_text_speech == 'elevenlabs' ? ' selected': '') . ' disabled value="elevenlabs">ElevenLabs.io Text-to-Speech (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6579
+
}
6580
+
if (isset($aiomatic_Main_Settings['google_app_id']) && trim($aiomatic_Main_Settings['google_app_id']) != '')
6581
+
{
6582
+
echo '<option' . ($chatbot_text_speech == 'google' ? ' selected': '') . ' value="google">Google Text-to-Speech</option>';
6583
+
}
6584
+
else
6585
+
{
6586
+
echo '<option' . ($chatbot_text_speech == 'google' ? ' selected': '') . ' disabled value="google">Google Text-to-Speech (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6587
+
}
6588
+
if (isset($aiomatic_Main_Settings['did_app_id']) && trim($aiomatic_Main_Settings['did_app_id']) != '')
6589
+
{
6590
+
echo '<option' . ($chatbot_text_speech == 'did' ? ' selected': '') . ' value="did">D-ID Text-to-Video</option>';
6591
+
echo '<option' . ($chatbot_text_speech == 'didstream' ? ' selected': '') . ' value="didstream">D-ID Text-to-Video Streaming</option>';
6592
+
}
6593
+
else
6594
+
{
6595
+
echo '<option' . ($chatbot_text_speech == 'did' ? ' selected': '') . ' disabled value="did">D-ID Text-to-Video (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6596
+
echo '<option' . ($chatbot_text_speech == 'didstream' ? ' selected': '') . ' disabled value="didstream">D-ID Text-to-Video Streaming (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6597
+
}
6598
+
if (isset($aiomatic_Main_Settings['azure_speech_id']) && trim($aiomatic_Main_Settings['azure_speech_id']) != '')
6599
+
{
6600
+
echo '<option' . ($chatbot_text_speech == 'azure' ? ' selected': '') . ' value="azure">Azure Text-to-Video Streaming</option>';
6601
+
}
6602
+
else
6603
+
{
6604
+
echo '<option' . ($chatbot_text_speech == 'azure' ? ' selected': '') . ' disabled value="azure">Azure Text-to-Video Streaming (' . esc_html__("Enter API key in Settings to enable", 'aiomatic-automatic-ai-content-writer') . ')</option>';
6605
+
}
6606
+
?>
6607
+
</select>
6608
+
</div>
6609
+
</td></tr>
6610
+
<tr class="hideazure"><td>
6611
+
<div>
6612
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6613
+
<div class="bws_hidden_help_text cr_min_260px">
6614
+
<?php
6615
+
echo esc_html__("Select the Azure API key region. The default will be westus2.", 'aiomatic-automatic-ai-content-writer');
6616
+
?>
6617
+
</div>
6618
+
</div>
6619
+
<b><?php echo esc_html__("Azure API Key Region:", 'aiomatic-automatic-ai-content-writer');?></b>
6620
+
</div>
6621
+
</td><td>
6622
+
<div>
6623
+
6624
+
<select id="azure_region" name="aiomatic_Chatbot_Settings[azure_region]">
6625
+
<option value="eastus" <?php if($azure_region == 'eastus'){echo ' selected';}?> >
6626
+
(US) East US
6627
+
</option>
6628
+
<option value="eastus2" <?php if($azure_region == 'eastus2'){echo ' selected';}?> >
6629
+
(US) East US 2
6630
+
</option>
6631
+
<option value="southcentralus" <?php if($azure_region == 'southcentralus'){echo ' selected';}?> >
6632
+
(US) South Central US
6633
+
</option>
6634
+
<option value="westus2" <?php if($azure_region == 'westus2'){echo ' selected';}?> >
6635
+
(US) West US 2
6636
+
</option>
6637
+
<option value="australiaeast" <?php if($azure_region == 'australiaeast'){echo ' selected';}?> >
6638
+
(Asia Pacific) Australia East
6639
+
</option>
6640
+
<option value="southeastasia" <?php if($azure_region == 'southeastasia'){echo ' selected';}?> >
6641
+
(Asia Pacific) Southeast Asia
6642
+
</option>
6643
+
<option value="northeurope" <?php if($azure_region == 'northeurope'){echo ' selected';}?> >
6644
+
(Europe) North Europe
6645
+
</option>
6646
+
<option value="uksouth" <?php if($azure_region == 'uksouth'){echo ' selected';}?> >
6647
+
(Europe) UK South
6648
+
</option>
6649
+
<option value="westeurope" <?php if($azure_region == 'westeurope'){echo ' selected';}?> >
6650
+
(Europe) West Europe
6651
+
</option>
6652
+
<option value="centralus" <?php if($azure_region == 'centralus'){echo ' selected';}?> >
6653
+
(US) Central US
6654
+
</option>
6655
+
<option value="northcentralus" <?php if($azure_region == 'northcentralus'){echo ' selected';}?> >
6656
+
(US) North Central US
6657
+
</option>
6658
+
<option value="westus" <?php if($azure_region == 'westus'){echo ' selected';}?> >
6659
+
(US) West US
6660
+
</option>
6661
+
<option value="southafricanorth" <?php if($azure_region == 'southafricanorth'){echo ' selected';}?> >
6662
+
(Africa) South Africa North
6663
+
</option>
6664
+
<option value="centralindia" <?php if($azure_region == 'centralindia'){echo ' selected';}?> >
6665
+
(Asia Pacific) Central India
6666
+
</option>
6667
+
<option value="eastasia" <?php if($azure_region == 'eastasia'){echo ' selected';}?> >
6668
+
(Asia Pacific) East Asia
6669
+
</option>
6670
+
<option value="japaneast" <?php if($azure_region == 'japaneast'){echo ' selected';}?> >
6671
+
(Asia Pacific) Japan East
6672
+
</option>
6673
+
<option value="jioindiawest" <?php if($azure_region == 'jioindiawest'){echo ' selected';}?> >
6674
+
(Asia Pacific) JIO India West
6675
+
</option>
6676
+
<option value="koreacentral" <?php if($azure_region == 'koreacentral'){echo ' selected';}?> >
6677
+
(Asia Pacific) Korea Central
6678
+
</option>
6679
+
<option value="canadacentral" <?php if($azure_region == 'canadacentral'){echo ' selected';}?> >
6680
+
(Canada) Canada Central
6681
+
</option>
6682
+
<option value="francecentral" <?php if($azure_region == 'francecentral'){echo ' selected';}?> >
6683
+
(Europe) France Central
6684
+
</option>
6685
+
<option value="germanywestcentral" <?php if($azure_region == 'germanywestcentral'){echo ' selected';}?> >
6686
+
(Europe) Germany West Central
6687
+
</option>
6688
+
<option value="norwayeast" <?php if($azure_region == 'norwayeast'){echo ' selected';}?> >
6689
+
(Europe) Norway East
6690
+
</option>
6691
+
<option value="switzerlandnorth" <?php if($azure_region == 'switzerlandnorth'){echo ' selected';}?> >
6692
+
(Europe) Switzerland North
6693
+
</option>
6694
+
<option value="uaenorth" <?php if($azure_region == 'uaenorth'){echo ' selected';}?> >
6695
+
(Middle East) UAE North
6696
+
</option>
6697
+
<option value="brazilsouth" <?php if($azure_region == 'brazilsouth'){echo ' selected';}?> >
6698
+
(South America) Brazil South
6699
+
</option>
6700
+
<option value="centralusstage" <?php if($azure_region == 'centralusstage'){echo ' selected';}?> >
6701
+
(US) Central US (Stage)
6702
+
</option>
6703
+
<option value="eastusstage" <?php if($azure_region == 'eastusstage'){echo ' selected';}?> >
6704
+
(US) East US (Stage)
6705
+
</option>
6706
+
<option value="eastus2stage" <?php if($azure_region == 'eastus2stage'){echo ' selected';}?> >
6707
+
(US) East US 2 (Stage)
6708
+
</option>
6709
+
<option value="northcentralusstage" <?php if($azure_region == 'northcentralusstage'){echo ' selected';}?> >
6710
+
(US) North Central US (Stage)
6711
+
</option>
6712
+
<option value="southcentralusstage" <?php if($azure_region == 'southcentralusstage'){echo ' selected';}?> >
6713
+
(US) South Central US (Stage)
6714
+
</option>
6715
+
<option value="westusstage" <?php if($azure_region == 'westusstage'){echo ' selected';}?> >
6716
+
(US) West US (Stage)
6717
+
</option>
6718
+
<option value="westus2stage" <?php if($azure_region == 'westus2stage'){echo ' selected';}?> >
6719
+
(US) West US 2 (Stage)
6720
+
</option>
6721
+
<option value="asia" <?php if($azure_region == 'asia'){echo ' selected';}?> >
6722
+
Asia
6723
+
</option>
6724
+
<option value="asiapacific" <?php if($azure_region == 'asiapacific'){echo ' selected';}?> >
6725
+
Asia Pacific
6726
+
</option>
6727
+
<option value="australia" <?php if($azure_region == 'australia'){echo ' selected';}?> >
6728
+
Australia
6729
+
</option>
6730
+
<option value="brazil" <?php if($azure_region == 'brazil'){echo ' selected';}?> >
6731
+
Brazil
6732
+
</option>
6733
+
<option value="canada" <?php if($azure_region == 'canada'){echo ' selected';}?> >
6734
+
Canada
6735
+
</option>
6736
+
<option value="europe" <?php if($azure_region == 'europe'){echo ' selected';}?> >
6737
+
Europe
6738
+
</option>
6739
+
<option value="global" <?php if($azure_region == 'global'){echo ' selected';}?> >
6740
+
Global
6741
+
</option>
6742
+
<option value="india" <?php if($azure_region == 'india'){echo ' selected';}?> >
6743
+
India
6744
+
</option>
6745
+
<option value="japan" <?php if($azure_region == 'japan'){echo ' selected';}?> >
6746
+
Japan
6747
+
</option>
6748
+
<option value="uk" <?php if($azure_region == 'uk'){echo ' selected';}?> >
6749
+
United Kingdom
6750
+
</option>
6751
+
<option value="unitedstates" <?php if($azure_region == 'unitedstates'){echo ' selected';}?> >
6752
+
United States
6753
+
</option>
6754
+
<option value="eastasiastage" <?php if($azure_region == 'eastasiastage'){echo ' selected';}?> >
6755
+
(Asia Pacific) East Asia (Stage)
6756
+
</option>
6757
+
<option value="southeastasiastage" <?php if($azure_region == 'southeastasiastage'){echo ' selected';}?> >
6758
+
(Asia Pacific) Southeast Asia (Stage)
6759
+
</option>
6760
+
<option value="centraluseuap" <?php if($azure_region == 'centraluseuap'){echo ' selected';}?> >
6761
+
(US) Central US EUAP
6762
+
</option>
6763
+
<option value="eastus2euap" <?php if($azure_region == 'eastus2euap'){echo ' selected';}?> >
6764
+
(US) East US 2 EUAP
6765
+
</option>
6766
+
<option value="westcentralus" <?php if($azure_region == 'westcentralus'){echo ' selected';}?> >
6767
+
(US) West Central US
6768
+
</option>
6769
+
<option value="westus3" <?php if($azure_region == 'westus3'){echo ' selected';}?> >
6770
+
(US) West US 3
6771
+
</option>
6772
+
<option value="southafricawest" <?php if($azure_region == 'southafricawest'){echo ' selected';}?> >
6773
+
(Africa) South Africa West
6774
+
</option>
6775
+
<option value="australiacentral" <?php if($azure_region == 'australiacentral'){echo ' selected';}?> >
6776
+
(Asia Pacific) Australia Central
6777
+
</option>
6778
+
<option value="australiacentral2" <?php if($azure_region == 'australiacentral2'){echo ' selected';}?> >
6779
+
(Asia Pacific) Australia Central 2
6780
+
</option>
6781
+
<option value="australiasoutheast" <?php if($azure_region == 'australiasoutheast'){echo ' selected';}?> >
6782
+
(Asia Pacific) Australia Southeast
6783
+
</option>
6784
+
<option value="japanwest" <?php if($azure_region == 'japanwest'){echo ' selected';}?> >
6785
+
(Asia Pacific) Japan West
6786
+
</option>
6787
+
<option value="koreasouth" <?php if($azure_region == 'koreasouth'){echo ' selected';}?> >
6788
+
(Asia Pacific) Korea South
6789
+
</option>
6790
+
<option value="southindia" <?php if($azure_region == 'southindia'){echo ' selected';}?> >
6791
+
(Asia Pacific) South India
6792
+
</option>
6793
+
<option value="westindia" <?php if($azure_region == 'westindia'){echo ' selected';}?> >
6794
+
(Asia Pacific) West India
6795
+
</option>
6796
+
<option value="canadaeast" <?php if($azure_region == 'canadaeast'){echo ' selected';}?> >
6797
+
(Canada) Canada East
6798
+
</option>
6799
+
<option value="francesouth" <?php if($azure_region == 'francesouth'){echo ' selected';}?> >
6800
+
(Europe) France South
6801
+
</option>
6802
+
<option value="germanynorth" <?php if($azure_region == 'germanynorth'){echo ' selected';}?> >
6803
+
(Europe) Germany North
6804
+
</option>
6805
+
<option value="norwaywest" <?php if($azure_region == 'norwaywest'){echo ' selected';}?> >
6806
+
(Europe) Norway West
6807
+
</option>
6808
+
<option value="switzerlandwest" <?php if($azure_region == 'switzerlandwest'){echo ' selected';}?> >
6809
+
(Europe) Switzerland West
6810
+
</option>
6811
+
<option value="ukwest" <?php if($azure_region == 'ukwest'){echo ' selected';}?> >
6812
+
(Europe) UK West
6813
+
</option>
6814
+
<option value="uaecentral" <?php if($azure_region == 'uaecentral'){echo ' selected';}?> >
6815
+
(Middle East) UAE Central
6816
+
</option>
6817
+
<option value="brazilsoutheast" <?php if($azure_region == 'brazilsoutheast'){echo ' selected';}?> >
6818
+
(South America) Brazil Southeast
6819
+
</option>
6820
+
</select>
6821
+
6822
+
</div>
6823
+
</td></tr>
6824
+
<tr class="hideazure"><td>
6825
+
<div>
6826
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6827
+
<div class="bws_hidden_help_text cr_min_260px">
6828
+
<?php
6829
+
echo esc_html__("Set the width of the chatbot avatar canvas.", 'aiomatic-automatic-ai-content-writer');
6830
+
?>
6831
+
</div>
6832
+
</div>
6833
+
<b><?php echo esc_html__("Chatbot Avatar Canvas Width:", 'aiomatic-automatic-ai-content-writer');?></b>
6834
+
</div>
6835
+
</td><td>
6836
+
<div>
6837
+
<input type="text" id="canvas_avatar_width" name="aiomatic_Chatbot_Settings[canvas_avatar_width]" class="cr_width_full" value="<?php echo esc_html($canvas_avatar_width);?>" placeholder="1200px">
6838
+
</div>
6839
+
</td></tr>
6840
+
<tr class="hideazure"><td>
6841
+
<div>
6842
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6843
+
<div class="bws_hidden_help_text cr_min_260px">
6844
+
<?php
6845
+
echo esc_html__("Select the chatbot avatar character. Default character is Lisa.", 'aiomatic-automatic-ai-content-writer');
6846
+
?>
6847
+
</div>
6848
+
</div>
6849
+
<b><?php echo esc_html__("Chatbot Avatar Character:", 'aiomatic-automatic-ai-content-writer');?></b>
6850
+
</div>
6851
+
</td><td>
6852
+
<div>
6853
+
6854
+
<select id="azure_character" name="aiomatic_Chatbot_Settings[azure_character]">
6855
+
<option value="lisa" <?php if($azure_character == 'lisa'){echo ' selected';}?> >
6856
+
Lisa
6857
+
</option>
6858
+
<option value="harry" <?php if($azure_character == 'harry'){echo ' selected';}?> >
6859
+
Harry
6860
+
</option>
6861
+
<option value="jeff" <?php if($azure_character == 'jeff'){echo ' selected';}?> >
6862
+
Jeff
6863
+
</option>
6864
+
<option value="lori" <?php if($azure_character == 'lori'){echo ' selected';}?> >
6865
+
Lori
6866
+
</option>
6867
+
<option value="max" <?php if($azure_character == 'max'){echo ' selected';}?> >
6868
+
Max
6869
+
</option>
6870
+
<option value="meg" <?php if($azure_character == 'meg'){echo ' selected';}?> >
6871
+
Meg
6872
+
</option>
6873
+
</select>
6874
+
6875
+
</div>
6876
+
</td></tr><tr class="hideazure"><td>
6877
+
<div>
6878
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6879
+
<div class="bws_hidden_help_text cr_min_260px">
6880
+
<?php
6881
+
echo wp_kses(
6882
+
sprintf(
6883
+
__(
6884
+
'Select the chatbot avatar character style. Each character has a list of supported styles, check details %s. The default is: casual-sitting.',
6885
+
'aiomatic-automatic-ai-content-writer'
6886
+
),
6887
+
'<a href="https://learn.microsoft.com/en-us/azure/ai-services/speech-service/text-to-speech-avatar/avatar-gestures-with-ssml#supported-pre-built-avatar-characters-styles-and-gestures" target="_blank">here</a>'
6888
+
),
6889
+
array(
6890
+
'a' => array(
6891
+
'href' => array(),
6892
+
'target' => array(),
6893
+
),
6894
+
)
6895
+
);
6896
+
?>
6897
+
</div>
6898
+
</div>
6899
+
<b><?php echo esc_html__("Chatbot Avatar Character Style:", 'aiomatic-automatic-ai-content-writer');?></b>
6900
+
</div>
6901
+
</td><td>
6902
+
<div>
6903
+
6904
+
<select id="azure_character_style" name="aiomatic_Chatbot_Settings[azure_character_style]">
6905
+
<option value="casual-sitting" <?php if($azure_character_style == 'casual-sitting'){echo ' selected';}?> >
6906
+
casual-sitting
6907
+
</option>
6908
+
<option value="business" <?php if($azure_character_style == 'business'){echo ' selected';}?> >
6909
+
business
6910
+
</option>
6911
+
<option value="casual" <?php if($azure_character_style == 'casual'){echo ' selected';}?> >
6912
+
casual
6913
+
</option>
6914
+
<option value="youthful" <?php if($azure_character_style == 'youthful'){echo ' selected';}?> >
6915
+
youthful
6916
+
</option>
6917
+
<option value="business" <?php if($azure_character_style == 'business'){echo ' selected';}?> >
6918
+
business
6919
+
</option>
6920
+
<option value="formal" <?php if($azure_character_style == 'formal'){echo ' selected';}?> >
6921
+
formal
6922
+
</option>
6923
+
<option value="graceful-sitting" <?php if($azure_character_style == 'graceful-sitting'){echo ' selected';}?> >
6924
+
graceful-sitting
6925
+
</option>
6926
+
<option value="graceful-standing" <?php if($azure_character_style == 'graceful-standing'){echo ' selected';}?> >
6927
+
graceful-standing
6928
+
</option>
6929
+
<option value="technical-sitting" <?php if($azure_character_style == 'technical-sitting'){echo ' selected';}?> >
6930
+
technical-sitting
6931
+
</option>
6932
+
<option value="technical-standing" <?php if($azure_character_style == 'technical-standing'){echo ' selected';}?> >
6933
+
technical-standing
6934
+
</option>
6935
+
</select>
6936
+
6937
+
</div>
6938
+
</td></tr>
6939
+
<tr class="hideazure"><td>
6940
+
<div>
6941
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6942
+
<div class="bws_hidden_help_text cr_min_260px">
6943
+
<?php
6944
+
echo esc_html__("Select the voice which will be used by the chatbot. Please note that the list of voices may differ depending on the browser. For example, voices in the name of which contains Google will be available only in the Chrome browser. For Egde will be available Microsoft voices.", 'aiomatic-automatic-ai-content-writer');
6945
+
?>
6946
+
</div>
6947
+
</div>
6948
+
<b><?php echo esc_html__("Chatbot Voice:", 'aiomatic-automatic-ai-content-writer');?></b>
6949
+
</div>
6950
+
</td><td>
6951
+
<div>
6952
+
<input type="text" id="azure_voice" name="aiomatic_Chatbot_Settings[azure_voice]" class="cr_width_full" value="<?php echo esc_html($azure_voice);?>" placeholder="en-US-AvaMultilingualNeural">
6953
+
</div>
6954
+
</td></tr>
6955
+
<tr class="hideazure"><td>
6956
+
<div>
6957
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6958
+
<div class="bws_hidden_help_text cr_min_260px">
6959
+
<?php
6960
+
echo esc_html__("Select the voice profile ID.", 'aiomatic-automatic-ai-content-writer');
6961
+
?>
6962
+
</div>
6963
+
</div>
6964
+
<b><?php echo esc_html__("Chatbot Voice Profile ID (Optional):", 'aiomatic-automatic-ai-content-writer');?></b>
6965
+
</div>
6966
+
</td><td>
6967
+
<div>
6968
+
<input type="text" id="azure_voice_profile" name="aiomatic_Chatbot_Settings[azure_voice_profile]" class="cr_width_full" value="<?php echo esc_html($azure_voice_profile);?>" placeholder="Voice profile ID (optional)">
6969
+
</div>
6970
+
</td></tr>
6971
+
<tr class="hideazure"><td>
6972
+
<div>
6973
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6974
+
<div class="bws_hidden_help_text cr_min_260px">
6975
+
<?php
6976
+
echo esc_html__("Set a private endpoint URL for the speech service. Optional.", 'aiomatic-automatic-ai-content-writer');
6977
+
?>
6978
+
</div>
6979
+
</div>
6980
+
<b><?php echo esc_html__("Private Azure Speech Resource Endpoint URL (Optional):", 'aiomatic-automatic-ai-content-writer');?></b>
6981
+
</div>
6982
+
</td><td>
6983
+
<div>
6984
+
<input type="url" id="azure_private_endpoint" name="aiomatic_Chatbot_Settings[azure_private_endpoint]" class="cr_width_full" value="<?php echo esc_html($azure_private_endpoint);?>" placeholder="https://{your_custom_name}.cognitiveservices.azure.com/">
6985
+
</div>
6986
+
</td></tr>
6987
+
<tr class="hideazure"><td>
6988
+
<div>
6989
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
6990
+
<div class="bws_hidden_help_text cr_min_260px">
6991
+
<?php
6992
+
echo esc_html__("Set a Custom Voice Deployment ID (Endpoint ID). Optional.", 'aiomatic-automatic-ai-content-writer');
6993
+
?>
6994
+
</div>
6995
+
</div>
6996
+
<b><?php echo esc_html__("Custom Voice Deployment ID (Endpoint ID) (Optional):", 'aiomatic-automatic-ai-content-writer');?></b>
6997
+
</div>
6998
+
</td><td>
6999
+
<div>
7000
+
<input type="url" id="azure_voice_endpoint" name="aiomatic_Chatbot_Settings[azure_voice_endpoint]" class="cr_width_full" value="<?php echo esc_html($azure_voice_endpoint);?>" placeholder="Voice endpoint ID">
7001
+
</div>
7002
+
</td></tr>
7003
+
<tr class="hidefree"><td>
7004
+
<div>
7005
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7006
+
<div class="bws_hidden_help_text cr_min_260px">
7007
+
<?php
7008
+
echo esc_html__("Select the voice which will be used by the chatbot. Please note that the list of voices may differ depending on the browser. For example, voices in the name of which contains Google will be available only in the Chrome browser. For Egde will be available Microsoft voices.", 'aiomatic-automatic-ai-content-writer');
7009
+
?>
7010
+
</div>
7011
+
</div>
7012
+
<b><?php echo esc_html__("Chatbot Voice:", 'aiomatic-automatic-ai-content-writer');?></b>
7013
+
</div>
7014
+
</td><td>
7015
+
<div>
7016
+
<select id="free_voice" name="aiomatic_Chatbot_Settings[free_voice]">
7017
+
<option value="Google US English;en-US" <?php if($free_voice == 'Google US English;en-US'){echo ' selected';}?> >
7018
+
Google US English, en-US
7019
+
</option><option value="Trinoids;en-US" <?php if($free_voice == 'Trinoids;en-US'){echo ' selected';}?> >
7020
+
Trinoids, en-US
7021
+
</option><option value="Microsoft David - English (United States);en-US" <?php if($free_voice == 'Microsoft David - English (United States);en-US'){echo ' selected';}?> >
7022
+
Microsoft David - English (United States), en-US
7023
+
</option><option value="Microsoft Mark - English (United States);en-US" <?php if($free_voice == 'Microsoft Mark - English (United States);en-US'){echo ' selected';}?> >
7024
+
Microsoft Mark - English (United States), en-US
7025
+
</option><option value="Microsoft Zira - English (United States);en-US" <?php if($free_voice == 'Microsoft Zira - English (United States);en-US'){echo ' selected';}?> >
7026
+
Microsoft Zira - English (United States), en-US
7027
+
</option><option value="Google Deutsch;de-DE" <?php if($free_voice == 'Google Deutsch;de-DE'){echo ' selected';}?> >
7028
+
Google Deutsch, de-DE
7029
+
</option><option value="Google UK English Female;en-GB" <?php if($free_voice == 'Google UK English Female;en-GB'){echo ' selected';}?> >
7030
+
Google UK English Female, en-GB
7031
+
</option><option value="Google UK English Male;en-GB" <?php if($free_voice == 'Google UK English Male;en-GB'){echo ' selected';}?> >
7032
+
Google UK English Male, en-GB
7033
+
</option><option value="Google espanol;es-ES" <?php if($free_voice == 'Google espanol;es-ES'){echo ' selected';}?> >
7034
+
Google espanol, es-ES
7035
+
</option><option value="Google espanol de Estados Unidos;es-US" <?php if($free_voice == 'Google espanol de Estados Unidos;es-US'){echo ' selected';}?> >
7036
+
Google espanol de Estados Unidos, es-US
7037
+
</option><option value="Google francais;fr-FR" <?php if($free_voice == 'Google francais;fr-FR'){echo ' selected';}?> >
7038
+
Google francais, fr-FR
7039
+
</option><option value="Google Bahasa Indonesia;id-ID" <?php if($free_voice == 'Google Bahasa Indonesia;id-ID'){echo ' selected';}?> >
7040
+
Google Bahasa Indonesia, id-ID
7041
+
</option><option value="Google italiano;it-IT" <?php if($free_voice == 'Google italiano;it-IT'){echo ' selected';}?> >
7042
+
Google italiano, it-IT
7043
+
</option><option value="Google Nederlands;nl-NL" <?php if($free_voice == 'Google Nederlands;nl-NL'){echo ' selected';}?> >
7044
+
Google Nederlands, nl-NL
7045
+
</option><option value="Google polski;pl-PL" <?php if($free_voice == 'Google polski;pl-PL'){echo ' selected';}?> >
7046
+
Google polski, pl-PL
7047
+
</option><option value="Google portugues do Brasil;pt-BR" <?php if($free_voice == 'Google portugues do Brasil;pt-BR'){echo ' selected';}?> >
7048
+
Google portugues do Brasil, pt-BR
7049
+
</option></select>
7050
+
</div>
7051
+
</td></tr>
7052
+
<tr class="hidedidstream"><td>
7053
+
<div>
7054
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7055
+
<div class="bws_hidden_help_text cr_min_260px">
7056
+
<?php
7057
+
echo esc_html__("Set the default width of the talking avatar. The default value for this is 300px.", 'aiomatic-automatic-ai-content-writer');
7058
+
?>
7059
+
</div>
7060
+
</div>
7061
+
<b><?php echo esc_html__("AI Talking Avatar Width:", 'aiomatic-automatic-ai-content-writer');?></b>
7062
+
</div>
7063
+
</td><td>
7064
+
<div>
7065
+
<input type="number" min="1" id="did_width" name="aiomatic_Chatbot_Settings[did_width]" class="cr_width_full" value="<?php echo esc_html($did_width);?>" placeholder="300">
7066
+
</div>
7067
+
</td></tr>
7068
+
<tr class="hidedidstream"><td>
7069
+
<div>
7070
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7071
+
<div class="bws_hidden_help_text cr_min_260px">
7072
+
<?php
7073
+
echo esc_html__("Set the default height of the talking avatar. The default value for this is 300px.", 'aiomatic-automatic-ai-content-writer');
7074
+
?>
7075
+
</div>
7076
+
</div>
7077
+
<b><?php echo esc_html__("AI Talking Avatar Height:", 'aiomatic-automatic-ai-content-writer');?></b>
7078
+
</div>
7079
+
</td><td>
7080
+
<div>
7081
+
<input type="number" min="1" id="did_height" name="aiomatic_Chatbot_Settings[did_height]" class="cr_width_full" value="<?php echo esc_html($did_height);?>" placeholder="300">
7082
+
</div>
7083
+
</td></tr>
7084
+
<tr class="hidedid"><td>
7085
+
<div>
7086
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7087
+
<div class="bws_hidden_help_text cr_min_260px">
7088
+
<?php
7089
+
echo esc_html__("The URL of the source image to be animated by the driver video, or a selection from the list of provided studio actors.", 'aiomatic-automatic-ai-content-writer');
7090
+
?>
7091
+
</div>
7092
+
</div>
7093
+
<b><?php echo esc_html__("Actor Source Image URL:", 'aiomatic-automatic-ai-content-writer');?></b>
7094
+
</div>
7095
+
</td><td>
7096
+
<div>
7097
+
<input id="did_image" name="aiomatic_Chatbot_Settings[did_image]" list="did_image_list" type="text" list="did_image" class="coderevolution_gutenberg_input" value="<?php echo esc_attr($did_image);?>" placeholder="Actor URL"/>
7098
+
<datalist id="did_image_list">
7099
+
<option>https://create-images-results.d-id.com/api_docs/assets/noelle.jpeg</option>
7100
+
<option>https://create-images-results.d-id.com/api_docs/assets/amy.png</option>
7101
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Zivva_f/image.png</option>
7102
+
<option>https://create-images-results.d-id.com/DefaultPresenters/William_m/image.jpeg</option>
7103
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Sara_f/image.png</option>
7104
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Magen_f/image.jpeg</option>
7105
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Luna_f/image.jpeg</option>
7106
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Joaquin_m/image.png</option>
7107
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Jenna_f/image.jpeg</option>
7108
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Ibrahim_m/image.png</option>
7109
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Hassan_m/image.jpeg</option>
7110
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Gordon_m/image.jpeg</option>
7111
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Fatha_f/image.png</option>
7112
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Fanna_f/image.png</option>
7113
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Eric_m/image.jpeg</option>
7114
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Emma_f/image.jpeg</option>
7115
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Emily_f/image.jpeg</option>
7116
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Bull_m/image.jpeg</option>
7117
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Brandon_m/image.png</option>
7118
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Billy_m/image.jpeg</option>
7119
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Aria_f/image.png</option>
7120
+
<option>https://create-images-results.d-id.com/DefaultPresenters/Amber_f/image.jpeg</option>
7121
+
</datalist>
7122
+
</div>
7123
+
</td></tr>
7124
+
<tr class="hidedid"><td>
7125
+
<div>
7126
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7127
+
<div class="bws_hidden_help_text cr_min_260px">
7128
+
<?php
7129
+
echo esc_html__("Select a voice you want to use for your video chatbot. You can add voices in the following format: voice_provider:voice_name:voice_config - available voices lists:", 'aiomatic-automatic-ai-content-writer');
7130
+
echo ' <a href="https://speech.microsoft.com/portal/voicegallery" target="_blank">https://speech.microsoft.com/portal/voicegallery</a> - <a href="https://docs.aws.amazon.com/polly/latest/dg/voicelist.html" target="_blank">https://docs.aws.amazon.com/polly/latest/dg/voicelist.html</a>';
7131
+
?>
7132
+
</div>
7133
+
</div>
7134
+
<b><?php echo esc_html__("Select a Voice:", 'aiomatic-automatic-ai-content-writer');?></b>
7135
+
</div>
7136
+
</td><td>
7137
+
<div>
7138
+
<input id="did_voice" name="aiomatic_Chatbot_Settings[did_voice]" type="text" list="did_voice_list" class="coderevolution_gutenberg_input" value="<?php echo esc_attr($did_voice);?>" placeholder="Voice config"/>
7139
+
<datalist id="did_voice_list">
7140
+
<option>microsoft:en-US-JennyNeural:Neutral</option>
7141
+
<option>microsoft:en-US-JennyNeural:Cheerful</option>
7142
+
<option>microsoft:en-US-JennyNeural:Sad</option>
7143
+
<option>microsoft:en-US-JennyNeural:Assistant</option>
7144
+
<option>microsoft:en-US-JennyNeural:Chat</option>
7145
+
<option>microsoft:en-US-JennyNeural:Newscast</option>
7146
+
<option>microsoft:en-US-JennyNeural:Angry</option>
7147
+
<option>microsoft:en-US-JennyNeural:Excited</option>
7148
+
<option>microsoft:en-US-JennyNeural:Friendly</option>
7149
+
<option>microsoft:en-US-JennyNeural:Terrified</option>
7150
+
<option>microsoft:en-US-JennyNeural:Shouting</option>
7151
+
<option>microsoft:en-US-JennyNeural:Unfriendly</option>
7152
+
<option>microsoft:en-US-JennyNeural:Whispering</option>
7153
+
<option>microsoft:en-US-JennyNeural:Hopeful</option>
7154
+
<option>microsoft:en-US-JennyNeural:Default</option>
7155
+
<option>microsoft:en-US-GuyNeural:Default</option>
7156
+
<option>microsoft:en-US-GuyNeural:Newscast</option>
7157
+
<option>microsoft:en-US-GuyNeural:Angry</option>
7158
+
<option>microsoft:en-US-GuyNeural:Cheerful</option>
7159
+
<option>microsoft:en-US-GuyNeural:Sad</option>
7160
+
<option>microsoft:en-US-GuyNeural:Excited</option>
7161
+
<option>microsoft:en-US-GuyNeural:Friendly</option>
7162
+
<option>microsoft:en-US-GuyNeural:Terrified</option>
7163
+
<option>microsoft:en-US-GuyNeural:Shouting</option>
7164
+
<option>microsoft:en-US-GuyNeural:Unfriendly</option>
7165
+
<option>microsoft:en-US-GuyNeural:Whispering</option>
7166
+
<option>microsoft:en-US-GuyNeural:Hopeful</option>
7167
+
<option>microsoft:en-US-AmberNeural</option>
7168
+
<option>microsoft:en-US-AnaNeural</option>
7169
+
<option>microsoft:en-US-AriaNeural:Default</option>
7170
+
<option>microsoft:en-US-AriaNeural:Chat</option>
7171
+
<option>microsoft:en-US-AriaNeural:Cheerful</option>
7172
+
<option>microsoft:en-US-AriaNeural:Empathetic</option>
7173
+
<option>microsoft:en-US-AriaNeural:Angry</option>
7174
+
<option>microsoft:en-US-AriaNeural:Sad</option>
7175
+
<option>microsoft:en-US-AriaNeural:Excited</option>
7176
+
<option>microsoft:en-US-AriaNeural:Friendly</option>
7177
+
<option>microsoft:en-US-AriaNeural:Terrified</option>
7178
+
<option>microsoft:en-US-AriaNeural:Shouting</option>
7179
+
<option>microsoft:en-US-AriaNeural:Unfriendly</option>
7180
+
<option>microsoft:en-US-AriaNeural:Whispering</option>
7181
+
<option>microsoft:en-US-AriaNeural:Hopeful</option>
7182
+
<option>microsoft:en-US-AshleyNeural</option>
7183
+
<option>microsoft:en-US-BrandonNeural</option>
7184
+
<option>microsoft:en-US-ChristopherNeural</option>
7185
+
<option>microsoft:en-US-CoraNeural</option>
7186
+
<option>microsoft:en-US-DavisNeural:Default</option>
7187
+
<option>microsoft:en-US-DavisNeural:Chat</option>
7188
+
<option>microsoft:en-US-DavisNeural:Angry</option>
7189
+
<option>microsoft:en-US-DavisNeural:Cheerful</option>
7190
+
<option>microsoft:en-US-DavisNeural:Excited</option>
7191
+
<option>microsoft:en-US-DavisNeural:Friendly</option>
7192
+
<option>microsoft:en-US-DavisNeural:Hopeful</option>
7193
+
<option>microsoft:en-US-DavisNeural:Sad</option>
7194
+
<option>microsoft:en-US-DavisNeural:Shouting</option>
7195
+
<option>microsoft:en-US-DavisNeural:Terrified</option>
7196
+
<option>microsoft:en-US-DavisNeural:Unfriendly</option>
7197
+
<option>microsoft:en-US-DavisNeural:Whispering</option>
7198
+
<option>microsoft:en-US-ElizabethNeural</option>
7199
+
<option>microsoft:en-US-EricNeural</option>
7200
+
<option>microsoft:en-US-JacobNeural</option>
7201
+
<option>microsoft:en-US-JaneNeural:Default</option>
7202
+
<option>microsoft:en-US-JaneNeural:Cheerful</option>
7203
+
<option>microsoft:en-US-JaneNeural:Angry</option>
7204
+
<option>microsoft:en-US-JaneNeural:Excited</option>
7205
+
<option>microsoft:en-US-JaneNeural:Friendly</option>
7206
+
<option>microsoft:en-US-JaneNeural:Hopeful</option>
7207
+
<option>microsoft:en-US-JaneNeural:Sad</option>
7208
+
<option>microsoft:en-US-JaneNeural:Shouting</option>
7209
+
<option>microsoft:en-US-JaneNeural:Terrified</option>
7210
+
<option>microsoft:en-US-JaneNeural:Unfriendly</option>
7211
+
<option>microsoft:en-US-JaneNeural:Whispering</option>
7212
+
<option>microsoft:en-US-JaneNeural:Default</option>
7213
+
<option>microsoft:en-US-JasonNeural:Default</option>
7214
+
<option>microsoft:en-US-JasonNeural:Angry</option>
7215
+
<option>microsoft:en-US-JasonNeural:Cheerful</option>
7216
+
<option>microsoft:en-US-JasonNeural:Excited</option>
7217
+
<option>microsoft:en-US-JasonNeural:Friendly</option>
7218
+
<option>microsoft:en-US-JasonNeural:Hopeful</option>
7219
+
<option>microsoft:en-US-JasonNeural:Sad</option>
7220
+
<option>microsoft:en-US-JasonNeural:Shouting</option>
7221
+
<option>microsoft:en-US-JasonNeural:Terrified</option>
7222
+
<option>microsoft:en-US-JasonNeural:Unfriendly</option>
7223
+
<option>microsoft:en-US-JasonNeural:Whispering</option>
7224
+
<option>microsoft:en-US-MichelleNeural</option>
7225
+
<option>microsoft:en-US-MonicaNeural</option>
7226
+
<option>microsoft:en-US-NancyNeural:Default</option>
7227
+
<option>microsoft:en-US-NancyNeural:Angry</option>
7228
+
<option>microsoft:en-US-NancyNeural:Cheerful</option>
7229
+
<option>microsoft:en-US-NancyNeural:Excited</option>
7230
+
<option>microsoft:en-US-NancyNeural:Friendly</option>
7231
+
<option>microsoft:en-US-NancyNeural:Hopeful</option>
7232
+
<option>microsoft:en-US-NancyNeural:Sad</option>
7233
+
<option>microsoft:en-US-NancyNeural:Shouting</option>
7234
+
<option>microsoft:en-US-NancyNeural:Terrified</option>
7235
+
<option>microsoft:en-US-NancyNeural:Unfriendly</option>
7236
+
<option>microsoft:en-US-NancyNeural:Whispering</option>
7237
+
<option>microsoft:en-US-RogerNeural</option>
7238
+
<option>microsoft:en-US-SaraNeural:Default</option>
7239
+
<option>microsoft:en-US-SaraNeural:Angry</option>
7240
+
<option>microsoft:en-US-SaraNeural:Cheerful</option>
7241
+
<option>microsoft:en-US-SaraNeural:Excited</option>
7242
+
<option>microsoft:en-US-SaraNeural:Friendly</option>
7243
+
<option>microsoft:en-US-SaraNeural:Hopeful</option>
7244
+
<option>microsoft:en-US-SaraNeural:Sad</option>
7245
+
<option>microsoft:en-US-SaraNeural:Shouting</option>
7246
+
<option>microsoft:en-US-SaraNeural:Terrified</option>
7247
+
<option>microsoft:en-US-SaraNeural:Unfriendly</option>
7248
+
<option>microsoft:en-US-SaraNeural:Whispering</option>
7249
+
<option>microsoft:en-US-SteffanNeural</option>
7250
+
<option>microsoft:en-US-TonyNeural:Default</option>
7251
+
<option>microsoft:en-US-TonyNeural:Angry</option>
7252
+
<option>microsoft:en-US-TonyNeural:Cheerful</option>
7253
+
<option>microsoft:en-US-TonyNeural:Excited</option>
7254
+
<option>microsoft:en-US-TonyNeural:Friendly</option>
7255
+
<option>microsoft:en-US-TonyNeural:Hopeful</option>
7256
+
<option>microsoft:en-US-TonyNeural:Sad</option>
7257
+
<option>microsoft:en-US-TonyNeural:Shouting</option>
7258
+
<option>microsoft:en-US-TonyNeural:Terrified</option>
7259
+
<option>microsoft:en-US-TonyNeural:Unfriendly</option>
7260
+
<option>microsoft:en-US-TonyNeural:Whispering</option>
7261
+
<option>microsoft:en-US-AIGenerate1Neural</option>
7262
+
<option>microsoft:en-US-AIGenerate2Neural</option>
7263
+
<option>amazon:Amy</option>
7264
+
<option>amazon:Emma</option>
7265
+
<option>amazon:Brian</option>
7266
+
<option>amazon:Arthur</option>
7267
+
<option>amazon:Nicole</option>
7268
+
<option>amazon:Olivia</option>
7269
+
<option>amazon:Russell</option>
7270
+
<option>amazon:Ivy</option>
7271
+
<option>amazon:Joanna</option>
7272
+
<option>amazon:Kendra</option>
7273
+
<option>amazon:Kimberly</option>
7274
+
<option>amazon:Salli</option>
7275
+
<option>amazon:Joey</option>
7276
+
<option>amazon:Justin</option>
7277
+
<option>amazon:Kevin</option>
7278
+
<option>amazon:Matthew</option>
7279
+
<option>amazon:Ruth</option>
7280
+
<option>amazon:Stephen</option>
7281
+
<option>amazon:Geraint</option>
7282
+
<option>amazon:Ayanda</option>
7283
+
<option>amazon:Aria</option>
7284
+
<option>amazon:Aditi</option>
7285
+
<option>amazon:Raveena</option>
7286
+
<option>amazon:Kajal</option>
7287
+
<option>amazon:Zeina</option>
7288
+
<option>amazon:Hala</option>
7289
+
<option>amazon:Arlet</option>
7290
+
<option>amazon:Hiujin</option>
7291
+
<option>amazon:Zhiyu</option>
7292
+
<option>amazon:Naja</option>
7293
+
<option>amazon:Mads</option>
7294
+
<option>amazon:Laura</option>
7295
+
<option>amazon:Lotte</option>
7296
+
<option>amazon:Ruben</option>
7297
+
<option>amazon:Suvi</option>
7298
+
<option>amazon:Celine</option>
7299
+
<option>amazon:L??a</option>
7300
+
<option>amazon:Mathieu</option>
7301
+
<option>amazon:R??mi</option>
7302
+
<option>amazon:Chantal</option>
7303
+
<option>amazon:Gabrielle</option>
7304
+
<option>amazon:Liam</option>
7305
+
<option>amazon:Marlene</option>
7306
+
<option>amazon:Vicki</option>
7307
+
<option>amazon:Hans</option>
7308
+
<option>amazon:Daniel</option>
7309
+
<option>amazon:Hannah</option>
7310
+
<option>amazon:Dora</option>
7311
+
<option>amazon:Karl</option>
7312
+
<option>amazon:Carla</option>
7313
+
<option>amazon:Bianca</option>
7314
+
<option>amazon:Giorgio</option>
7315
+
<option>amazon:Adriano</option>
7316
+
<option>amazon:Mizuki</option>
7317
+
<option>amazon:Takumi</option>
7318
+
<option>amazon:Kazuha</option>
7319
+
<option>amazon:Tomoko</option>
7320
+
<option>amazon:Seoyeon</option>
7321
+
<option>amazon:Liv</option>
7322
+
<option>amazon:Ida</option>
7323
+
<option>amazon:Ewa</option>
7324
+
<option>amazon:Maja</option>
7325
+
<option>amazon:Jacek</option>
7326
+
<option>amazon:Jan</option>
7327
+
<option>amazon:Ola</option>
7328
+
<option>amazon:Camila</option>
7329
+
<option>amazon:Vitoria</option>
7330
+
<option>amazon:Ricardo</option>
7331
+
<option>amazon:Thiago</option>
7332
+
<option>amazon:Ines</option>
7333
+
<option>amazon:Cristiano</option>
7334
+
<option>amazon:Carmen</option>
7335
+
<option>amazon:Tatyana</option>
7336
+
<option>amazon:Maxim</option>
7337
+
<option>amazon:Conchita</option>
7338
+
<option>amazon:Lucia</option>
7339
+
<option>amazon:Enrique</option>
7340
+
<option>amazon:Sergio</option>
7341
+
<option>amazon:Mia</option>
7342
+
<option>amazon:Andr??s</option>
7343
+
<option>amazon:Lupe</option>
7344
+
<option>amazon:Penelope</option>
7345
+
<option>amazon:Miguel</option>
7346
+
<option>amazon:Pedro</option>
7347
+
<option>amazon:Astrid</option>
7348
+
<option>amazon:Elin</option>
7349
+
<option>amazon:Filiz</option>
7350
+
<option>amazon:Gwyneth</option>
7351
+
<option>afflorithmics:en-US-JennyNeural</option>
7352
+
<option>elevenlabs:en-US-JennyNeural</option>
7353
+
</datalist>
7354
+
</div>
7355
+
</td></tr>
7356
+
<tr class="hideeleven"><td>
7357
+
<div>
7358
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7359
+
<div class="bws_hidden_help_text cr_min_260px">
7360
+
<?php
7361
+
echo esc_html__("Select a voice you want to use for your chatbot.", 'aiomatic-automatic-ai-content-writer');
7362
+
?>
7363
+
</div>
7364
+
</div>
7365
+
<b><?php echo esc_html__("Select a Voice:", 'aiomatic-automatic-ai-content-writer');?></b>
7366
+
</div>
7367
+
</td><td>
7368
+
<div>
7369
+
<select id="eleven_voice" name="aiomatic_Chatbot_Settings[eleven_voice]" >
7370
+
<?php
7371
+
$eleven_voices = aiomatic_get_eleven_voices();
7372
+
if($eleven_voices === false)
7373
+
{
7374
+
echo '<option value="" disabled>'.esc_html__("Failed to list voices!", 'aiomatic-automatic-ai-content-writer').'</option>';
7375
+
}
7376
+
else
7377
+
{
7378
+
foreach($eleven_voices as $key => $voice)
7379
+
{
7380
+
echo '<option' . ($eleven_voice == esc_attr($key) ? ' selected': '') . ' value="'.esc_attr($key).'">'.esc_html($voice).'</option>';
7381
+
}
7382
+
}
7383
+
?>
7384
+
</select>
7385
+
</div>
7386
+
</td></tr>
7387
+
<tr class="hideeleven"><td>
7388
+
<div>
7389
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7390
+
<div class="bws_hidden_help_text cr_min_260px">
7391
+
<?php
7392
+
echo esc_html__("Set a custom voice ID, if you want to use a custom voice ID from ElevenLabs. This will overwrite the voice ID added from above.", 'aiomatic-automatic-ai-content-writer');
7393
+
?>
7394
+
</div>
7395
+
</div>
7396
+
<b><?php echo esc_html__("Custom Voice ID:", 'aiomatic-automatic-ai-content-writer');?></b>
7397
+
</div>
7398
+
</td><td>
7399
+
<div>
7400
+
<input type="text" id="eleven_voice_custom" name="aiomatic_Chatbot_Settings[eleven_voice_custom]" value="<?php echo esc_html($eleven_voice_custom);?>" placeholder="Custom voice ID">
7401
+
</div>
7402
+
</td></tr>
7403
+
<tr class="hideeleven"><td>
7404
+
<div>
7405
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7406
+
<div class="bws_hidden_help_text cr_min_260px">
7407
+
<?php
7408
+
echo esc_html__("Select the model to be used when generating the voices.", 'aiomatic-automatic-ai-content-writer');
7409
+
?>
7410
+
</div>
7411
+
</div>
7412
+
<b><?php echo esc_html__("Voice AI Model:", 'aiomatic-automatic-ai-content-writer');?></b>
7413
+
</div>
7414
+
</td><td>
7415
+
<div>
7416
+
<select id="eleven_model_id" name="aiomatic_Chatbot_Settings[eleven_model_id]" >
7417
+
<?php
7418
+
echo '<option' . ($eleven_model_id == 'eleven_monolingual_v1' ? ' selected': '') . ' value="eleven_monolingual_v1">eleven_monolingual_v1</option>';
7419
+
echo '<option' . ($eleven_model_id == 'eleven_multilingual_v1' ? ' selected': '') . ' value="eleven_multilingual_v1">eleven_multilingual_v1</option>';
7420
+
echo '<option' . ($eleven_model_id == 'eleven_multilingual_v2' ? ' selected': '') . ' value="eleven_multilingual_v2">eleven_multilingual_v2</option>';
7421
+
?>
7422
+
</select>
7423
+
</div>
7424
+
</td></tr>
7425
+
<tr class="hideeleven"><td>
7426
+
<div>
7427
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7428
+
<div class="bws_hidden_help_text cr_min_260px">
7429
+
<?php
7430
+
echo esc_html__("Select a the Voice stability of the chosen voice. Higher stability ensures consistency but may result in monotony, therefore for longer text, it is recommended to decrease stability. The default value is 0.75", 'aiomatic-automatic-ai-content-writer');
7431
+
?>
7432
+
</div>
7433
+
</div>
7434
+
<b><?php echo esc_html__("Voice Stability:", 'aiomatic-automatic-ai-content-writer');?></b>
7435
+
</div>
7436
+
</td><td>
7437
+
<div>
7438
+
<input type="number" min="0" step="0.01" id="voice_stability" name="aiomatic_Chatbot_Settings[voice_stability]" class="cr_width_full" value="<?php echo esc_html($voice_stability);?>" placeholder="0.75">
7439
+
</div>
7440
+
</td></tr>
7441
+
<tr class="hideeleven"><td>
7442
+
<div>
7443
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7444
+
<div class="bws_hidden_help_text cr_min_260px">
7445
+
<?php
7446
+
echo esc_html__("Boosting voice clarity and target speaker similarity is achieved by high enhancement; however, very high values can produce artifacts, so it's essential to find the optimal setting. The default value is 0.75", 'aiomatic-automatic-ai-content-writer');
7447
+
?>
7448
+
</div>
7449
+
</div>
7450
+
<b><?php echo esc_html__("Voice Similarity Boost:", 'aiomatic-automatic-ai-content-writer');?></b>
7451
+
</div>
7452
+
</td><td>
7453
+
<div>
7454
+
<input type="number" min="0" step="0.01" id="voice_similarity_boost" name="aiomatic_Chatbot_Settings[voice_similarity_boost]" class="cr_width_full" value="<?php echo esc_html($voice_similarity_boost);?>" placeholder="0.75">
7455
+
</div>
7456
+
</td></tr>
7457
+
<tr class="hideeleven"><td>
7458
+
<div>
7459
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7460
+
<div class="bws_hidden_help_text cr_min_260px">
7461
+
<?php
7462
+
echo esc_html__("Boost the characteristics of the voice. Default is disabled.", 'aiomatic-automatic-ai-content-writer');
7463
+
?>
7464
+
</div>
7465
+
</div>
7466
+
<b><?php echo esc_html__("Style Exaggeration:", 'aiomatic-automatic-ai-content-writer');?></b>
7467
+
</div>
7468
+
</td><td>
7469
+
<div>
7470
+
<input type="number" min="0" step="0.01" id="voice_style" name="aiomatic_Chatbot_Settings[voice_style]" class="cr_width_full" value="<?php echo esc_html($voice_style);?>" placeholder="Style exaggeration">
7471
+
</div>
7472
+
</td></tr>
7473
+
<tr class="hideeleven"><td>
7474
+
<div>
7475
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7476
+
<div class="bws_hidden_help_text cr_min_260px">
7477
+
<?php
7478
+
echo esc_html__("Boost the similarity of the synthesized speech and the voice at the cost of some generation speed.", 'aiomatic-automatic-ai-content-writer');
7479
+
?>
7480
+
</div>
7481
+
</div>
7482
+
<b><?php echo esc_html__("Speaker Boost:", 'aiomatic-automatic-ai-content-writer');?></b>
7483
+
</div>
7484
+
</td><td>
7485
+
<div>
7486
+
<input type="checkbox" id="speaker_boost" name="aiomatic_Chatbot_Settings[speaker_boost]"<?php
7487
+
if ($speaker_boost == 'on')
7488
+
echo ' checked ';
7489
+
?>>
7490
+
</div>
7491
+
</td></tr>
7492
+
<tr class="hideopen"><td>
7493
+
<div>
7494
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7495
+
<div class="bws_hidden_help_text cr_min_260px">
7496
+
<?php
7497
+
echo esc_html__("Select the model to be used when generating the voices.", 'aiomatic-automatic-ai-content-writer');
7498
+
?>
7499
+
</div>
7500
+
</div>
7501
+
<b><?php echo esc_html__("Voice AI Model:", 'aiomatic-automatic-ai-content-writer');?></b>
7502
+
</div>
7503
+
</td><td>
7504
+
<div>
7505
+
<select id="open_model_id" name="aiomatic_Chatbot_Settings[open_model_id]" >
7506
+
<?php
7507
+
echo '<option' . ($open_model_id == 'tts-1' ? ' selected': '') . ' value="tts-1">tts-1</option>';
7508
+
echo '<option' . ($open_model_id == 'tts-1-hd' ? ' selected': '') . ' value="tts-1-hd">tts-1-hd</option>';
7509
+
?>
7510
+
</select>
7511
+
</div>
7512
+
</td></tr>
7513
+
<tr class="hideopen"><td>
7514
+
<div>
7515
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7516
+
<div class="bws_hidden_help_text cr_min_260px">
7517
+
<?php
7518
+
echo esc_html__("Select the voice to be used when generating the text to speech.", 'aiomatic-automatic-ai-content-writer');
7519
+
?>
7520
+
</div>
7521
+
</div>
7522
+
<b><?php echo esc_html__("AI Voice Selector:", 'aiomatic-automatic-ai-content-writer');?></b>
7523
+
</div>
7524
+
</td><td>
7525
+
<div>
7526
+
<select id="open_voice" name="aiomatic_Chatbot_Settings[open_voice]" >
7527
+
<?php
7528
+
echo '<option' . ($open_voice == 'alloy' ? ' selected': '') . ' value="alloy">alloy</option>';
7529
+
echo '<option' . ($open_voice == 'echo' ? ' selected': '') . ' value="echo">echo</option>';
7530
+
echo '<option' . ($open_voice == 'fable' ? ' selected': '') . ' value="fable">fable</option>';
7531
+
echo '<option' . ($open_voice == 'nova' ? ' selected': '') . ' value="nova">nova</option>';
7532
+
echo '<option' . ($open_voice == 'onyx' ? ' selected': '') . ' value="onyx">onyx</option>';
7533
+
echo '<option' . ($open_voice == 'shimmer' ? ' selected': '') . ' value="shimmer">shimmer</option>';
7534
+
?>
7535
+
</select>
7536
+
</div>
7537
+
</td></tr>
7538
+
<tr class="hideopen"><td>
7539
+
<div>
7540
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7541
+
<div class="bws_hidden_help_text cr_min_260px">
7542
+
<?php
7543
+
echo esc_html__("Select the output format to be used when generating the text to speech.", 'aiomatic-automatic-ai-content-writer');
7544
+
?>
7545
+
</div>
7546
+
</div>
7547
+
<b><?php echo esc_html__("AI Voice Output Format:", 'aiomatic-automatic-ai-content-writer');?></b>
7548
+
</div>
7549
+
</td><td>
7550
+
<div>
7551
+
<select id="open_format" name="aiomatic_Chatbot_Settings[open_format]" >
7552
+
<?php
7553
+
echo '<option' . ($open_format == 'mp3' ? ' selected': '') . ' value="mp3">mp3</option>';
7554
+
echo '<option' . ($open_format == 'opus' ? ' selected': '') . ' value="opus">opus</option>';
7555
+
echo '<option' . ($open_format == 'aac' ? ' selected': '') . ' value="aac">aac</option>';
7556
+
echo '<option' . ($open_format == 'flac' ? ' selected': '') . ' value="flac">flac</option>';
7557
+
?>
7558
+
</select>
7559
+
</div>
7560
+
</td></tr>
7561
+
<tr class="hideopen"><td>
7562
+
<div>
7563
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7564
+
<div class="bws_hidden_help_text cr_min_260px">
7565
+
<?php
7566
+
echo esc_html__("Select a the Voice speed of the chosen voice. The default value is 1. Min: 0.25, max: 4.", 'aiomatic-automatic-ai-content-writer');
7567
+
?>
7568
+
</div>
7569
+
</div>
7570
+
<b><?php echo esc_html__("Voice Stability:", 'aiomatic-automatic-ai-content-writer');?></b>
7571
+
</div>
7572
+
</td><td>
7573
+
<div>
7574
+
<input type="number" min="0.25" step="0.01" max="4" id="open_speed" name="aiomatic_Chatbot_Settings[open_speed]" class="cr_width_full" value="<?php echo esc_html($open_speed);?>" placeholder="1">
7575
+
</div>
7576
+
</td></tr>
7577
+
<tr class="hidegoogle"><td>
7578
+
<div>
7579
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7580
+
<div class="bws_hidden_help_text cr_min_260px">
7581
+
<?php
7582
+
echo esc_html__("Select a the language of the chosen voice.", 'aiomatic-automatic-ai-content-writer');
7583
+
?>
7584
+
</div>
7585
+
</div>
7586
+
<b><?php echo esc_html__("Voice Language:", 'aiomatic-automatic-ai-content-writer');?></b>
7587
+
</div>
7588
+
</td><td>
7589
+
<div>
7590
+
<select id="voice_language" name="aiomatic_Chatbot_Settings[voice_language]" >
7591
+
<?php
7592
+
$gvlanguages = array(
7593
+
'af-ZA' => 'Afrikaans (South Africa)',
7594
+
'ar-XA' => 'Arabic, multi-region',
7595
+
'id-ID' => 'Indonesian (Indonesia)',
7596
+
'ms-MY' => 'Malay (Malaysia)',
7597
+
'ca-ES' => 'Catalan (Spain)',
7598
+
'da-DK' => 'Danish (Denmark)',
7599
+
'de-DE' => 'German (Germany)',
7600
+
'en-AU' => 'English (Australia)',
7601
+
'en-GB' => 'English (Great Britain)',
7602
+
'en-IN' => 'English (India)',
7603
+
'en-US' => 'English (United States)',
7604
+
'es-ES' => 'Spanish (Spain)',
7605
+
'es-US' => 'Spanish (United States)',
7606
+
'eu-ES' => 'Basque (Spain)',
7607
+
'fil-PH' => 'Filipino (Philippines)',
7608
+
'fr-CA' => 'French (Canada)',
7609
+
'fr-FR' => 'French (France)',
7610
+
'gl-ES' => 'Galician (Spain)',
7611
+
'it-IT' => 'Italian (Italy)',
7612
+
'lv-LV' => 'Latvian (Latvia)',
7613
+
'lt-LT' => 'Lithuanian (Lithuania)',
7614
+
'hu-HU' => 'Hungarian (Hungary)',
7615
+
'nl-NL' => 'Dutch (Netherlands)',
7616
+
'nb-NO' => 'Norwegian Bokm??l (Norway)',
7617
+
'pl-PL' => 'Polish (Poland)',
7618
+
'pt-BR' => 'Portuguese (Brazil)',
7619
+
'pt-PT' => 'Portuguese (Portugal)',
7620
+
'ro-RO' => 'Romanian (Romania)',
7621
+
'sk-SK' => 'Slovak (Slovakia)',
7622
+
'fi-FI' => 'Finnish (Finland)',
7623
+
'sv-SE' => 'Swedish (Sweden)',
7624
+
'vi-VN' => 'Vietnamese (Vietnam)',
7625
+
'tr-TR' => 'Turkish (Turkey)',
7626
+
'is-IS' => 'Icelandic (Iceland)',
7627
+
'cs-CZ' => 'Czech (Czech Republic)',
7628
+
'el-GR' => 'Greek (Greece)',
7629
+
'bg-BG' => 'Bulgarian (Bulgaria)',
7630
+
'ru-RU' => 'Russian (Russia)',
7631
+
'sr-RS' => 'Serbian (Serbia)',
7632
+
'uk-UA' => 'Ukrainian (Ukraine)',
7633
+
'he-IL' => 'Hebrew (Israel)',
7634
+
'mr-IN' => 'Marathi (India)',
7635
+
'hi-IN' => 'Hindi (India)',
7636
+
'bn-IN' => 'Bengali (India)',
7637
+
'gu-IN' => 'Gujarati (India)',
7638
+
'ta-IN' => 'Tamil (India)',
7639
+
'te-IN' => 'Telugu (India)',
7640
+
'kn-IN' => 'Kannada (India)',
7641
+
'ml-IN' => 'Malayalam (India)',
7642
+
'th-TH' => 'Thai (Thailand)',
7643
+
'cmn-TW' => 'Mandarin (Taiwan)',
7644
+
'yue-HK' => 'Cantonese (Hong Kong)',
7645
+
'ja-JP' => 'Japanese (Japan)',
7646
+
'cmn-CN' => 'Mandarin (Mainland China)',
7647
+
'ko-KR' => 'Korean (South Korea)'
7648
+
);
7649
+
foreach($gvlanguages as $key => $lang)
7650
+
{
7651
+
echo '<option' . ($voice_language == esc_attr($key) ? ' selected': '') . ' value="'.esc_attr($key).'">'.esc_html($lang).'</option>';
7652
+
}
7653
+
?>
7654
+
</select>
7655
+
</div>
7656
+
</td></tr>
7657
+
<tr class="hidegoogle"><td>
7658
+
<div>
7659
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7660
+
<div class="bws_hidden_help_text cr_min_260px">
7661
+
<?php
7662
+
echo esc_html__("Select a the name of the chosen voice.", 'aiomatic-automatic-ai-content-writer');
7663
+
?>
7664
+
</div>
7665
+
</div>
7666
+
<b><?php echo esc_html__("Voice Name:", 'aiomatic-automatic-ai-content-writer');?></b>
7667
+
</div>
7668
+
</td><td>
7669
+
<div>
7670
+
<select id="google_voice" name="aiomatic_Chatbot_Settings[google_voice]" >
7671
+
<?php
7672
+
if (!isset($aiomatic_Main_Settings['google_app_id']) || trim($aiomatic_Main_Settings['google_app_id']) == '')
7673
+
{
7674
+
$google_voices = false;
7675
+
}
7676
+
else
7677
+
{
7678
+
$google_voices = aiomatic_get_google_voices($voice_language);
7679
+
}
7680
+
if($google_voices === false)
7681
+
{
7682
+
echo '<option value="" disabled>'.esc_html__("Failed to list voices!", 'aiomatic-automatic-ai-content-writer').'</option>';
7683
+
}
7684
+
else
7685
+
{
7686
+
foreach($google_voices as $key => $voice)
7687
+
{
7688
+
echo '<option' . (($google_voice == esc_attr($voice['name']) || ($google_voice === '' && esc_attr($voice['name']) == 'en-US-Standard-A')) ? ' selected': '') . ' value="'.esc_attr($voice['name']).'">'.esc_html($voice['name']).'</option>';
7689
+
}
7690
+
}
7691
+
?>
7692
+
</select>
7693
+
</div>
7694
+
</td></tr>
7695
+
<tr class="hidegoogle"><td>
7696
+
<div>
7697
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7698
+
<div class="bws_hidden_help_text cr_min_260px">
7699
+
<?php
7700
+
echo esc_html__("Select a the Audio Device Profile of the chosen voice.", 'aiomatic-automatic-ai-content-writer');
7701
+
?>
7702
+
</div>
7703
+
</div>
7704
+
<b><?php echo esc_html__("Audio Device Profile:", 'aiomatic-automatic-ai-content-writer');?></b>
7705
+
</div>
7706
+
</td><td>
7707
+
<div>
7708
+
<select id="audio_profile" name="aiomatic_Chatbot_Settings[audio_profile]" >
7709
+
<?php
7710
+
$gvprofiles = array(
7711
+
'' => esc_html__('Default','aiomatic-automatic-ai-content-writer'),
7712
+
'wearable-class-device' => esc_html__('Smart watch or wearable','aiomatic-automatic-ai-content-writer'),
7713
+
'handset-class-device' => esc_html__('Smartphone','aiomatic-automatic-ai-content-writer'),
7714
+
'headphone-class-device' => esc_html__('Headphones or earbuds','aiomatic-automatic-ai-content-writer'),
7715
+
'small-bluetooth-speaker-class-device' => esc_html__('Small home speaker','aiomatic-automatic-ai-content-writer'),
7716
+
'medium-bluetooth-speaker-class-device' => esc_html__('Smart home speaker','aiomatic-automatic-ai-content-writer'),
7717
+
'large-home-entertainment-class-device' => esc_html__('Home entertainment system or smart TV','aiomatic-automatic-ai-content-writer'),
7718
+
'large-automotive-class-device' => esc_html__('Car speaker','aiomatic-automatic-ai-content-writer'),
7719
+
'telephony-class-application' => esc_html__('Interactive Voice Response (IVR) system','aiomatic-automatic-ai-content-writer')
7720
+
);
7721
+
foreach($gvprofiles as $key => $val)
7722
+
{
7723
+
echo '<option' . ($audio_profile == esc_attr($key) ? ' selected': '') . ' value="'.esc_attr($key).'">'.esc_html($val).'</option>';
7724
+
}
7725
+
?>
7726
+
</select>
7727
+
</div>
7728
+
</td></tr>
7729
+
<tr class="hidegoogle"><td>
7730
+
<div>
7731
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7732
+
<div class="bws_hidden_help_text cr_min_260px">
7733
+
<?php
7734
+
echo esc_html__("Select a the Voice Speed of the chosen voice. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.", 'aiomatic-automatic-ai-content-writer');
7735
+
?>
7736
+
</div>
7737
+
</div>
7738
+
<b><?php echo esc_html__("Voice Speed:", 'aiomatic-automatic-ai-content-writer');?></b>
7739
+
</div>
7740
+
</td><td>
7741
+
<div>
7742
+
<input type="number" min="0.25" max="4" step="0.01" id="voice_speed" name="aiomatic_Chatbot_Settings[voice_speed]" class="cr_width_full" value="<?php echo esc_html($voice_speed);?>" placeholder="Voice speed">
7743
+
</div>
7744
+
</td></tr>
7745
+
<tr class="hidegoogle"><td>
7746
+
<div>
7747
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7748
+
<div class="bws_hidden_help_text cr_min_260px">
7749
+
<?php
7750
+
echo esc_html__("Select a the Voice Pitch of the chosen voice. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.", 'aiomatic-automatic-ai-content-writer');
7751
+
?>
7752
+
</div>
7753
+
</div>
7754
+
<b><?php echo esc_html__("Voice Pitch:", 'aiomatic-automatic-ai-content-writer');?></b>
7755
+
</div>
7756
+
</td><td>
7757
+
<div>
7758
+
<input type="number" min="-20" step="0.1" max="20" id="voice_pitch" name="aiomatic_Chatbot_Settings[voice_pitch]" class="cr_width_full" value="<?php echo esc_html($voice_pitch);?>" placeholder="Voice pitch">
7759
+
</div>
7760
+
</td></tr>
7761
+
<tr class="hidegoogle"><td>
7762
+
<div>
7763
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7764
+
<div class="bws_hidden_help_text cr_min_260px">
7765
+
<?php
7766
+
echo esc_html__("Select a the model of the chosen voice. Note that not all voices support all models. You need to find the right combination which works for you.", 'aiomatic-automatic-ai-content-writer');
7767
+
?>
7768
+
</div>
7769
+
</div>
7770
+
<b><?php echo esc_html__("Voice Model:", 'aiomatic-automatic-ai-content-writer');?></b>
7771
+
</div>
7772
+
</td><td>
7773
+
<div>
7774
+
<select id="google_voice_model" name="aiomatic_Chatbot_Settings[google_voice_model]" >
7775
+
<option value="default"<?php if($google_voice_model == '' || $google_voice_model == 'default') echo ' selected';?>>default</option>
7776
+
<option value="latest_long"<?php if($google_voice_model == 'latest_long') echo ' selected';?>>latest_long</option>
7777
+
<option value="latest_short"<?php if($google_voice_model == 'latest_short') echo ' selected';?>>latest_short</option>
7778
+
<option value="phone_call"<?php if($google_voice_model == 'phone_call') echo ' selected';?>>phone_call</option>
7779
+
<option value="video"<?php if($google_voice_model == 'video') echo ' selected';?>>video</option>
7780
+
<option value="command_and_search"<?php if($google_voice_model == 'command_and_search') echo ' selected';?>>command_and_search</option>
7781
+
<option value="chirp"<?php if($google_voice_model == 'chirp') echo ' selected';?>>chirp</option>
7782
+
<option value="medical_conversation"<?php if($google_voice_model == 'medical_conversation') echo ' selected';?>>medical_conversation</option>
7783
+
<option value="medical_dictation"<?php if($google_voice_model == 'medical_dictation') echo ' selected';?>>medical_dictation</option>
7784
+
</select>
7785
+
</div>
7786
+
</td></tr>
7787
+
<tr><td colspan="2">
7788
+
<h2><?php echo esc_html__("Visualization Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
7789
+
</td></tr>
7790
+
<tr><td>
7791
+
<div>
7792
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7793
+
<div class="bws_hidden_help_text cr_min_260px">
7794
+
<?php
7795
+
echo esc_html__("Select if you want to automatically show a waveform animation of the chatbot speaking.", 'aiomatic-automatic-ai-content-writer');
7796
+
?>
7797
+
</div>
7798
+
</div>
7799
+
<b><?php echo esc_html__("Enable Visual Waveform Animation When The Chatbot Is Speaking:", 'aiomatic-automatic-ai-content-writer');?></b>
7800
+
</div>
7801
+
</td><td>
7802
+
<div>
7803
+
<input type="checkbox" id="chat_waveform" name="aiomatic_Chatbot_Settings[chat_waveform]"<?php if($chatbot_text_speech != 'openai' && $chatbot_text_speech != 'elevenlabs' && $chatbot_text_speech != 'google'){ echo ' disabled ';}
7804
+
if ($chat_waveform == 'on')
7805
+
echo ' checked ';
7806
+
?>>
7807
+
</div>
7808
+
</td></tr>
7809
+
<tr><td>
7810
+
<div>
7811
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7812
+
<div class="bws_hidden_help_text cr_min_260px">
7813
+
<?php
7814
+
echo esc_html__("Select the color of the waveform animation. Default is violet", 'aiomatic-automatic-ai-content-writer');
7815
+
?>
7816
+
</div>
7817
+
</div>
7818
+
<b><?php echo esc_html__("Waveform Animation Color:", 'aiomatic-automatic-ai-content-writer');?></b>
7819
+
</div>
7820
+
</td><td>
7821
+
<div>
7822
+
<input type="color" id="waveform_color" name="aiomatic_Chatbot_Settings[waveform_color]" value="<?php echo esc_html($waveform_color);?>">
7823
+
</div>
7824
+
</td></tr>
7825
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
7826
+
?>
7827
+
<tr><td colspan="2">
7828
+
<h2><?php echo esc_html__("Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
7829
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/OwCsRmsfS-0" frameborder="0" allowfullscreen></iframe></div></p>
7830
+
</td></tr>
7831
+
<tr><td colspan="2">
7832
+
<h2><?php echo esc_html__("D-ID Streaming Video Update:", 'aiomatic-automatic-ai-content-writer');?></h2>
7833
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/oaquPhw3GrQ" frameborder="0" allowfullscreen></iframe></div></p>
7834
+
</td></tr>
7835
+
<?php
7836
+
}
7837
+
}
7838
+
?>
7839
+
</table>
7840
+
</div>
7841
+
<div id="tab-1" class="tab-content">
7842
+
<table class="widefat">
7843
+
<tr><td colspan="2">
7844
+
<h2><?php echo esc_html__("AI Chatbot Default Styling Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
7845
+
</td></tr>
7846
+
<tr><td>
7847
+
<div>
7848
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7849
+
<div class="bws_hidden_help_text cr_min_260px">
7850
+
<?php
7851
+
echo esc_html__("Select if you want to show the chatbot header.", 'aiomatic-automatic-ai-content-writer');
7852
+
?>
7853
+
</div>
7854
+
</div>
7855
+
<b><?php echo esc_html__("Show Chatbot Header:", 'aiomatic-automatic-ai-content-writer');?></b>
7856
+
</div>
7857
+
</td><td>
7858
+
<div>
7859
+
<select id="show_header" name="aiomatic_Chatbot_Settings[show_header]" onchange="headerChanged();" >
7860
+
<?php
7861
+
echo '<option'.($show_header == 'show' ? ' selected': '').' value="show">Show</option>';
7862
+
echo '<option'.($show_header == 'hide' ? ' selected': '').' value="hide">Hide</option>';
7863
+
?>
7864
+
</select>
7865
+
</div>
7866
+
</td></tr>
7867
+
<tr><td>
7868
+
<div>
7869
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7870
+
<div class="bws_hidden_help_text cr_min_260px">
7871
+
<?php
7872
+
echo esc_html__("Select if you want to show the Chat Log TXT or PDF File Download Button.", 'aiomatic-automatic-ai-content-writer');
7873
+
?>
7874
+
</div>
7875
+
</div>
7876
+
<b><?php echo esc_html__("Show Chat Log File Download Button:", 'aiomatic-automatic-ai-content-writer');?></b>
7877
+
</div>
7878
+
</td><td>
7879
+
<div>
7880
+
<select id="show_dltxt" name="aiomatic_Chatbot_Settings[show_dltxt]" onchange="txtbutChanged();" >
7881
+
<?php
7882
+
echo '<option'.($show_dltxt == 'show' ? ' selected': '').' value="show">Show</option>';
7883
+
echo '<option'.($show_dltxt == 'hide' ? ' selected': '').' value="hide">Hide</option>';
7884
+
?>
7885
+
</select>
7886
+
</div>
7887
+
</td></tr>
7888
+
<tr><td>
7889
+
<div>
7890
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7891
+
<div class="bws_hidden_help_text cr_min_260px">
7892
+
<?php
7893
+
echo esc_html__("Select if you want to show the Text-To-Speech Mute Button.", 'aiomatic-automatic-ai-content-writer');
7894
+
?>
7895
+
</div>
7896
+
</div>
7897
+
<b><?php echo esc_html__("Show Text-To-Speech Mute Button:", 'aiomatic-automatic-ai-content-writer');?></b>
7898
+
</div>
7899
+
</td><td>
7900
+
<div>
7901
+
<select
7902
+
<?php
7903
+
if (!isset($aiomatic_Chatbot_Settings['chatbot_text_speech']) || $aiomatic_Chatbot_Settings['chatbot_text_speech'] == 'off' || $aiomatic_Chatbot_Settings['chatbot_text_speech'] == '' )
7904
+
{
7905
+
echo ' disabled title="' . esc_html__("Text-To-Speech feature needs to be active for this feature to work", 'aiomatic-automatic-ai-content-writer') . '"';
7906
+
}
7907
+
?> id="show_mute" name="aiomatic_Chatbot_Settings[show_mute]" onchange="mutebutChanged();" >
7908
+
<?php
7909
+
echo '<option'.($show_mute == 'show' ? ' selected': '').' value="show">Show</option>';
7910
+
echo '<option'.($show_mute == 'hide' ? ' selected': '').' value="hide">Hide</option>';
7911
+
?>
7912
+
</select>
7913
+
</div>
7914
+
</td></tr>
7915
+
<tr><td>
7916
+
<div>
7917
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7918
+
<div class="bws_hidden_help_text cr_min_260px">
7919
+
<?php
7920
+
echo esc_html__("Select if you want to show the Disable Internet Access Button.", 'aiomatic-automatic-ai-content-writer');
7921
+
?>
7922
+
</div>
7923
+
</div>
7924
+
<b><?php echo esc_html__("Show Disable Internet Access Button:", 'aiomatic-automatic-ai-content-writer');?></b>
7925
+
</div>
7926
+
</td><td>
7927
+
<div>
7928
+
<select
7929
+
<?php
7930
+
if(!isset($aiomatic_Main_Settings['internet_chat_short']) || $aiomatic_Main_Settings['internet_chat_short'] != 'on')
7931
+
{
7932
+
echo ' disabled title="' . esc_html__("You need to enable Internet Access For Chatbots for this to work", 'aiomatic-automatic-ai-content-writer') . '"';
7933
+
}
7934
+
?> id="show_internet" name="aiomatic_Chatbot_Settings[show_internet]" onchange="internetChanged();" >
7935
+
<?php
7936
+
echo '<option'.($show_internet == 'show' ? ' selected': '').' value="show">Show</option>';
7937
+
echo '<option'.($show_internet == 'hide' ? ' selected': '').' value="hide">Hide</option>';
7938
+
?>
7939
+
</select>
7940
+
</div>
7941
+
</td></tr>
7942
+
<tr><td>
7943
+
<div>
7944
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7945
+
<div class="bws_hidden_help_text cr_min_260px">
7946
+
<?php
7947
+
echo esc_html__("Select the default Disable Internet Access Button Default State.", 'aiomatic-automatic-ai-content-writer');
7948
+
?>
7949
+
</div>
7950
+
</div>
7951
+
<b><?php echo esc_html__("Disable Internet Access Button Default State:", 'aiomatic-automatic-ai-content-writer');?></b>
7952
+
</div>
7953
+
</td><td>
7954
+
<div>
7955
+
<select
7956
+
<?php
7957
+
if(!isset($aiomatic_Main_Settings['internet_chat_short']) || $aiomatic_Main_Settings['internet_chat_short'] != 'on')
7958
+
{
7959
+
echo ' disabled title="' . esc_html__("You need to enable Internet Access For Chatbots for this to work", 'aiomatic-automatic-ai-content-writer') . '"';
7960
+
}
7961
+
?> id="show_internet_default" name="aiomatic_Chatbot_Settings[show_internet_default]">
7962
+
<?php
7963
+
echo '<option'.($show_internet_default == 'on' ? ' selected': '').' value="on">On</option>';
7964
+
echo '<option'.($show_internet_default == 'off' ? ' selected': '').' value="off">Off</option>';
7965
+
?>
7966
+
</select>
7967
+
</div>
7968
+
</td></tr>
7969
+
<tr><td>
7970
+
<div>
7971
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7972
+
<div class="bws_hidden_help_text cr_min_260px">
7973
+
<?php
7974
+
echo esc_html__("Select if you want to show the Chat Clearing Button.", 'aiomatic-automatic-ai-content-writer');
7975
+
?>
7976
+
</div>
7977
+
</div>
7978
+
<b><?php echo esc_html__("Show Chat Clearing Button:", 'aiomatic-automatic-ai-content-writer');?></b>
7979
+
</div>
7980
+
</td><td>
7981
+
<div>
7982
+
<select id="show_clear" name="aiomatic_Chatbot_Settings[show_clear]" onchange="clearbutChanged();" >
7983
+
<?php
7984
+
echo '<option'.($show_clear == 'show' ? ' selected': '').' value="show">Show</option>';
7985
+
echo '<option'.($show_clear == 'hide' ? ' selected': '').' value="hide">Hide</option>';
7986
+
?>
7987
+
</select>
7988
+
</div>
7989
+
</td></tr>
7990
+
<tr><td>
7991
+
<div>
7992
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
7993
+
<div class="bws_hidden_help_text cr_min_260px">
7994
+
<?php
7995
+
echo esc_html__("Select the chat font size of the chatbot form. Default is 1em", 'aiomatic-automatic-ai-content-writer');
7996
+
?>
7997
+
</div>
7998
+
</div>
7999
+
<b><?php echo esc_html__("Chat Font Size:", 'aiomatic-automatic-ai-content-writer');?></b>
8000
+
</div>
8001
+
</td><td>
8002
+
<div>
8003
+
<select id="font_size" name="aiomatic_Chatbot_Settings[font_size]" onchange="fontSizeChanged();" >
8004
+
<?php
8005
+
echo '<option'.($font_size == '1em' ? ' selected': '').' value="1em">1em</option>';
8006
+
for($i = 10; $i <= 30; $i++){
8007
+
echo '<option'.($font_size == $i . 'px' ? ' selected': '').' value="'.esc_html($i).'px">'.esc_html($i).'px</option>';
8008
+
}
8009
+
?>
8010
+
</select>
8011
+
</div>
8012
+
</td></tr>
8013
+
<tr><td>
8014
+
<div>
8015
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8016
+
<div class="bws_hidden_help_text cr_min_260px">
8017
+
<?php
8018
+
echo esc_html__("Select the width of the chatbot form. For full width, you can set 100% (default value). You can also set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
8019
+
?>
8020
+
</div>
8021
+
</div>
8022
+
<b><?php echo esc_html__("Chat Form Width:", 'aiomatic-automatic-ai-content-writer');?></b>
8023
+
</div>
8024
+
</td><td>
8025
+
<div>
8026
+
<input type="text" id="width" name="aiomatic_Chatbot_Settings[width]" value="<?php echo esc_html($width);?>" placeholder="100%" onchange="widthChanged()">
8027
+
</div>
8028
+
</td></tr>
8029
+
<tr><td>
8030
+
<div>
8031
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8032
+
<div class="bws_hidden_help_text cr_min_260px">
8033
+
<?php
8034
+
echo esc_html__("Select the height of the chatbot form. Default is auto. You can set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
8035
+
?>
8036
+
</div>
8037
+
</div>
8038
+
<b><?php echo esc_html__("Chat Form Height:", 'aiomatic-automatic-ai-content-writer');?></b>
8039
+
</div>
8040
+
</td><td>
8041
+
<div>
8042
+
<input type="text" id="height" name="aiomatic_Chatbot_Settings[height]" value="<?php echo esc_html($height);?>" placeholder="auto" onchange="heightChanged()">
8043
+
</div>
8044
+
</td></tr>
8045
+
<tr><td>
8046
+
<div>
8047
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8048
+
<div class="bws_hidden_help_text cr_min_260px">
8049
+
<?php
8050
+
echo esc_html__("Select the min-height of the chatbot form (when the form is resized, this is the minimum height it will be allowed to get. Default is 250px. You can set values in pixels, like: 400px", 'aiomatic-automatic-ai-content-writer');
8051
+
?>
8052
+
</div>
8053
+
</div>
8054
+
<b><?php echo esc_html__("Chat Form Min-Height:", 'aiomatic-automatic-ai-content-writer');?></b>
8055
+
</div>
8056
+
</td><td>
8057
+
<div>
8058
+
<input type="text" id="minheight" name="aiomatic_Chatbot_Settings[minheight]" value="<?php echo esc_html($minheight);?>" placeholder="250px" onchange="minheightChanged()">
8059
+
</div>
8060
+
</td></tr>
8061
+
<tr><td>
8062
+
<div>
8063
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8064
+
<div class="bws_hidden_help_text cr_min_260px">
8065
+
<?php
8066
+
echo esc_html__("Select the width of the chatbot top avatar.", 'aiomatic-automatic-ai-content-writer');
8067
+
?>
8068
+
</div>
8069
+
</div>
8070
+
<b><?php echo esc_html__("Chat Top Avatar Width:", 'aiomatic-automatic-ai-content-writer');?></b>
8071
+
</div>
8072
+
</td><td>
8073
+
<div>
8074
+
<input type="text" id="topavatar_width" name="aiomatic_Chatbot_Settings[topavatar_width]" value="<?php echo esc_html($topavatar_width);?>" placeholder="44px">
8075
+
</div>
8076
+
</td></tr>
8077
+
<tr><td>
8078
+
<div>
8079
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8080
+
<div class="bws_hidden_help_text cr_min_260px">
8081
+
<?php
8082
+
echo esc_html__("Select the height of the chatbot top avatar.", 'aiomatic-automatic-ai-content-writer');
8083
+
?>
8084
+
</div>
8085
+
</div>
8086
+
<b><?php echo esc_html__("Chat Top Avatar Height:", 'aiomatic-automatic-ai-content-writer');?></b>
8087
+
</div>
8088
+
</td><td>
8089
+
<div>
8090
+
<input type="text" id="topavatar_height" name="aiomatic_Chatbot_Settings[topavatar_height]" value="<?php echo esc_html($topavatar_height);?>" placeholder="44px">
8091
+
</div>
8092
+
</td></tr>
8093
+
<tr><td>
8094
+
<div>
8095
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8096
+
<div class="bws_hidden_help_text cr_min_260px">
8097
+
<?php
8098
+
echo esc_html__("Select the width of the chatbot conversation avatar.", 'aiomatic-automatic-ai-content-writer');
8099
+
?>
8100
+
</div>
8101
+
</div>
8102
+
<b><?php echo esc_html__("Chat Conversation Avatar Width:", 'aiomatic-automatic-ai-content-writer');?></b>
8103
+
</div>
8104
+
</td><td>
8105
+
<div>
8106
+
<input type="text" id="convavatar_width" name="aiomatic_Chatbot_Settings[convavatar_width]" value="<?php echo esc_html($convavatar_width);?>" placeholder="40px">
8107
+
</div>
8108
+
</td></tr>
8109
+
<tr><td>
8110
+
<div>
8111
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8112
+
<div class="bws_hidden_help_text cr_min_260px">
8113
+
<?php
8114
+
echo esc_html__("Select the height of the chatbot conversation avatar.", 'aiomatic-automatic-ai-content-writer');
8115
+
?>
8116
+
</div>
8117
+
</div>
8118
+
<b><?php echo esc_html__("Chat Conversation Avatar Height:", 'aiomatic-automatic-ai-content-writer');?></b>
8119
+
</div>
8120
+
</td><td>
8121
+
<div>
8122
+
<input type="text" id="convavatar_height" name="aiomatic_Chatbot_Settings[convavatar_height]" value="<?php echo esc_html($convavatar_height);?>" placeholder="40px">
8123
+
</div>
8124
+
</td></tr>
8125
+
<tr><td>
8126
+
<div>
8127
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8128
+
<div class="bws_hidden_help_text cr_min_260px">
8129
+
<?php
8130
+
echo esc_html__("Select the width of the chatbot bubbles.", 'aiomatic-automatic-ai-content-writer');
8131
+
?>
8132
+
</div>
8133
+
</div>
8134
+
<b><?php echo esc_html__("Chat Bubble Width:", 'aiomatic-automatic-ai-content-writer');?></b>
8135
+
</div>
8136
+
</td><td>
8137
+
<div>
8138
+
<select id="bubble_width" name="aiomatic_Chatbot_Settings[bubble_width]" class="cr_width_full" onchange="bubbleChanged()">
8139
+
<?php
8140
+
echo '<option' . (($bubble_width == 'full' || empty($bubble_width)) ? ' selected': '') . ' value="full">' . esc_html__("Full Width", 'aiomatic-automatic-ai-content-writer') . '</option>';
8141
+
echo '<option' . ($bubble_width == 'auto' ? ' selected': '') . ' value="auto">' . esc_html__("Resize To Text Width", 'aiomatic-automatic-ai-content-writer') . '</option>';
8142
+
?>
8143
+
</select>
8144
+
</div>
8145
+
</td></tr>
8146
+
<tr><td>
8147
+
<div>
8148
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8149
+
<div class="bws_hidden_help_text cr_min_260px">
8150
+
<?php
8151
+
echo esc_html__("Select the alignment of the chatbot bubbles.", 'aiomatic-automatic-ai-content-writer');
8152
+
?>
8153
+
</div>
8154
+
</div>
8155
+
<b><?php echo esc_html__("Bot Avatar/Chat Bubble Alignment:", 'aiomatic-automatic-ai-content-writer');?></b>
8156
+
</div>
8157
+
</td><td>
8158
+
<div>
8159
+
<select id="bubble_alignment" name="aiomatic_Chatbot_Settings[bubble_alignment]" class="cr_width_full" onchange="bubbleAlignChanged()">
8160
+
<?php
8161
+
echo '<option' . (($bubble_alignment == 'left' || empty($bubble_alignment)) ? ' selected': '') . ' value="left">' . esc_html__("Left", 'aiomatic-automatic-ai-content-writer') . '</option>';
8162
+
echo '<option' . ($bubble_alignment == 'right' ? ' selected': '') . ' value="right">' . esc_html__("Right", 'aiomatic-automatic-ai-content-writer') . '</option>';
8163
+
echo '<option' . ($bubble_alignment == 'center' ? ' selected': '') . ' value="center">' . esc_html__("Center", 'aiomatic-automatic-ai-content-writer') . '</option>';
8164
+
?>
8165
+
</select>
8166
+
</div>
8167
+
</td></tr>
8168
+
<tr><td>
8169
+
<div>
8170
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8171
+
<div class="bws_hidden_help_text cr_min_260px">
8172
+
<?php
8173
+
echo esc_html__("Select the alignment of the user bubbles.", 'aiomatic-automatic-ai-content-writer');
8174
+
?>
8175
+
</div>
8176
+
</div>
8177
+
<b><?php echo esc_html__("User Avatar/Chat Bubble Alignment:", 'aiomatic-automatic-ai-content-writer');?></b>
8178
+
</div>
8179
+
</td><td>
8180
+
<div>
8181
+
<select id="bubble_user_alignment" name="aiomatic_Chatbot_Settings[bubble_user_alignment]" class="cr_width_full" onchange="bubbleUserAlignChanged()">
8182
+
<?php
8183
+
echo '<option' . (($bubble_user_alignment == 'left' || empty($bubble_user_alignment)) ? ' selected': '') . ' value="left">' . esc_html__("Left", 'aiomatic-automatic-ai-content-writer') . '</option>';
8184
+
echo '<option' . ($bubble_user_alignment == 'right' ? ' selected': '') . ' value="right">' . esc_html__("Right", 'aiomatic-automatic-ai-content-writer') . '</option>';
8185
+
echo '<option' . ($bubble_user_alignment == 'center' ? ' selected': '') . ' value="center">' . esc_html__("Center", 'aiomatic-automatic-ai-content-writer') . '</option>';
8186
+
?>
8187
+
</select>
8188
+
</div>
8189
+
</td></tr>
8190
+
<tr><td>
8191
+
<div>
8192
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8193
+
<div class="bws_hidden_help_text cr_min_260px">
8194
+
<?php
8195
+
echo esc_html__("Select if you want to show the chatbot avatar in the conversation?", 'aiomatic-automatic-ai-content-writer');
8196
+
?>
8197
+
</div>
8198
+
</div>
8199
+
<b><?php echo esc_html__("Show AI Chatbot Avatar In Conversation:", 'aiomatic-automatic-ai-content-writer');?></b>
8200
+
</div>
8201
+
</td><td>
8202
+
<div>
8203
+
<select id="show_ai_avatar" name="aiomatic_Chatbot_Settings[show_ai_avatar]" class="cr_width_full" onchange="showAiAvatarChanged();" >
8204
+
<?php
8205
+
echo '<option'.($show_ai_avatar == 'show' ? ' selected': '').' value="show">Show</option>';
8206
+
echo '<option'.($show_ai_avatar == 'hide' ? ' selected': '').' value="hide">Hide</option>';
8207
+
?>
8208
+
</select>
8209
+
</div>
8210
+
</td></tr>
8211
+
<tr><td>
8212
+
<div>
8213
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8214
+
<div class="bws_hidden_help_text cr_min_260px">
8215
+
<?php
8216
+
echo esc_html__("Select if you want to show the chatbot avatar in the conversation?", 'aiomatic-automatic-ai-content-writer');
8217
+
?>
8218
+
</div>
8219
+
</div>
8220
+
<b><?php echo esc_html__("Show User Chatbot Avatar In Conversation:", 'aiomatic-automatic-ai-content-writer');?></b>
8221
+
</div>
8222
+
</td><td>
8223
+
<div>
8224
+
<select id="show_user_avatar" name="aiomatic_Chatbot_Settings[show_user_avatar]" class="cr_width_full" onchange="showUserAvatarChanged();" >
8225
+
<?php
8226
+
echo '<option'.($show_user_avatar == 'show' ? ' selected': '').' value="show">Show</option>';
8227
+
echo '<option'.($show_user_avatar == 'hide' ? ' selected': '').' value="hide">Hide</option>';
8228
+
?>
8229
+
</select>
8230
+
</div>
8231
+
</td></tr>
8232
+
<tr><td>
8233
+
<div>
8234
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8235
+
<div class="bws_hidden_help_text cr_min_260px">
8236
+
<?php
8237
+
echo esc_html__("Set your own custom header text for the chatbot.", 'aiomatic-automatic-ai-content-writer');
8238
+
?>
8239
+
</div>
8240
+
</div>
8241
+
<b><?php echo esc_html__("Chatbot Custom Header Text:", 'aiomatic-automatic-ai-content-writer');?></b>
8242
+
</div>
8243
+
</td><td>
8244
+
<div>
8245
+
<?php
8246
+
$settings = array(
8247
+
'textarea_name' => 'aiomatic_Chatbot_Settings[custom_header]',
8248
+
'media_buttons' => true,
8249
+
'quicktags' => true,
8250
+
'tabindex' => '4',
8251
+
'editor_height' => 80,
8252
+
'teeny' => false
8253
+
);
8254
+
wp_editor( $custom_header, 'custom_header', $settings );
8255
+
?>
8256
+
</div>
8257
+
</td></tr>
8258
+
<tr><td>
8259
+
<div>
8260
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8261
+
<div class="bws_hidden_help_text cr_min_260px">
8262
+
<?php
8263
+
echo esc_html__("Set your own custom footer text for the chatbot.", 'aiomatic-automatic-ai-content-writer');
8264
+
?>
8265
+
</div>
8266
+
</div>
8267
+
<b><?php echo esc_html__("Chatbot Custom Footer Text:", 'aiomatic-automatic-ai-content-writer');?></b>
8268
+
</div>
8269
+
</td><td>
8270
+
<div>
8271
+
<?php
8272
+
$settings = array(
8273
+
'textarea_name' => 'aiomatic_Chatbot_Settings[custom_footer]',
8274
+
'media_buttons' => true,
8275
+
'quicktags' => true,
8276
+
'tabindex' => '4',
8277
+
'editor_height' => 80,
8278
+
'teeny' => false
8279
+
);
8280
+
wp_editor( $custom_footer, 'custom_footer', $settings );
8281
+
?>
8282
+
</div>
8283
+
</td></tr>
8284
+
<tr><td>
8285
+
<div>
8286
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8287
+
<div class="bws_hidden_help_text cr_min_260px">
8288
+
<?php
8289
+
echo esc_html__("Set your own custom CSS code for the chatbot.", 'aiomatic-automatic-ai-content-writer');
8290
+
?>
8291
+
</div>
8292
+
</div>
8293
+
<b><?php echo esc_html__("Chatbot Custom CSS Code:", 'aiomatic-automatic-ai-content-writer');?></b>
8294
+
</div>
8295
+
</td><td>
8296
+
<div>
8297
+
<?php
8298
+
$settings = array(
8299
+
'textarea_name' => 'aiomatic_Chatbot_Settings[custom_css]',
8300
+
'media_buttons' => true,
8301
+
'quicktags' => true,
8302
+
'tabindex' => '4',
8303
+
'editor_height' => 80,
8304
+
'teeny' => false
8305
+
);
8306
+
wp_editor( $custom_css, 'custom_css', $settings );
8307
+
?>
8308
+
</div>
8309
+
</td></tr>
8310
+
<tr><td colspan="2"><h2><?php echo esc_html__("AI Chatbot Coloring Options:", 'aiomatic-automatic-ai-content-writer');?></h2></td></tr>
8311
+
<tr><td>
8312
+
<div>
8313
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8314
+
<div class="bws_hidden_help_text cr_min_260px">
8315
+
<?php
8316
+
echo esc_html__("Select the background color of the chatbot form. Default is #f7f7f9", 'aiomatic-automatic-ai-content-writer');
8317
+
?>
8318
+
</div>
8319
+
</div>
8320
+
<b><?php echo esc_html__("Form Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8321
+
</div>
8322
+
</td><td>
8323
+
<div>
8324
+
<input type="color" id="general_background" name="aiomatic_Chatbot_Settings[general_background]" value="<?php echo esc_html($general_background);?>" onchange="backgroundChanged2()">
8325
+
</div>
8326
+
</td></tr>
8327
+
<tr><td>
8328
+
<div>
8329
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8330
+
<div class="bws_hidden_help_text cr_min_260px">
8331
+
<?php
8332
+
echo esc_html__("Select the background color of the chatbot form. Default is #f7f7f9", 'aiomatic-automatic-ai-content-writer');
8333
+
?>
8334
+
</div>
8335
+
</div>
8336
+
<b><?php echo esc_html__("Input Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8337
+
</div>
8338
+
</td><td>
8339
+
<div>
8340
+
<input type="color" id="background" name="aiomatic_Chatbot_Settings[background]" value="<?php echo esc_html($background);?>" onchange="backgroundChanged()">
8341
+
</div>
8342
+
</td></tr>
8343
+
<tr><td>
8344
+
<div>
8345
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8346
+
<div class="bws_hidden_help_text cr_min_260px">
8347
+
<?php
8348
+
echo esc_html__("Select the font color of the user chatbot form. Default is white", 'aiomatic-automatic-ai-content-writer');
8349
+
?>
8350
+
</div>
8351
+
</div>
8352
+
<b><?php echo esc_html__("User Font Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8353
+
</div>
8354
+
</td><td>
8355
+
<div>
8356
+
<input type="color" id="user_font_color" name="aiomatic_Chatbot_Settings[user_font_color]" value="<?php echo esc_html($user_font_color);?>" onchange="userfontcolorChanged()">
8357
+
</div>
8358
+
</td></tr>
8359
+
<tr><td>
8360
+
<div>
8361
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8362
+
<div class="bws_hidden_help_text cr_min_260px">
8363
+
<?php
8364
+
echo esc_html__("Select the font color of the user baloon chatbot form. Default is #0084ff", 'aiomatic-automatic-ai-content-writer');
8365
+
?>
8366
+
</div>
8367
+
</div>
8368
+
<b><?php echo esc_html__("User Baloon Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8369
+
</div>
8370
+
</td><td>
8371
+
<div>
8372
+
<input type="color" id="user_background_color" name="aiomatic_Chatbot_Settings[user_background_color]" value="<?php echo esc_html($user_background_color);?>" onchange="userbackgroundcolorChanged()">
8373
+
</div>
8374
+
</td></tr>
8375
+
<tr><td>
8376
+
<div>
8377
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8378
+
<div class="bws_hidden_help_text cr_min_260px">
8379
+
<?php
8380
+
echo esc_html__("Select the font color of the AI chatbot form. Default is black", 'aiomatic-automatic-ai-content-writer');
8381
+
?>
8382
+
</div>
8383
+
</div>
8384
+
<b><?php echo esc_html__("AI Font Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8385
+
</div>
8386
+
</td><td>
8387
+
<div>
8388
+
<input type="color" id="ai_font_color" name="aiomatic_Chatbot_Settings[ai_font_color]" value="<?php echo esc_html($ai_font_color);?>" onchange="aifontcolorChanged()">
8389
+
</div>
8390
+
</td></tr>
8391
+
<tr><td>
8392
+
<div>
8393
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8394
+
<div class="bws_hidden_help_text cr_min_260px">
8395
+
<?php
8396
+
echo esc_html__("Select the font color of the AI baloon chatbot form. Default is #f0f0f0", 'aiomatic-automatic-ai-content-writer');
8397
+
?>
8398
+
</div>
8399
+
</div>
8400
+
<b><?php echo esc_html__("AI Baloon Background Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8401
+
</div>
8402
+
</td><td>
8403
+
<div>
8404
+
<input type="color" id="ai_background_color" name="aiomatic_Chatbot_Settings[ai_background_color]" value="<?php echo esc_html($ai_background_color);?>" onchange="aibackgroundcolorChanged()">
8405
+
</div>
8406
+
</td></tr>
8407
+
<tr><td>
8408
+
<div>
8409
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8410
+
<div class="bws_hidden_help_text cr_min_260px">
8411
+
<?php
8412
+
echo esc_html__("Select the border color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
8413
+
?>
8414
+
</div>
8415
+
</div>
8416
+
<b><?php echo esc_html__("Input Border Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8417
+
</div>
8418
+
</td><td>
8419
+
<div>
8420
+
<input type="color" id="input_border_color" name="aiomatic_Chatbot_Settings[input_border_color]" value="<?php echo esc_html($input_border_color);?>" onchange="bordercolorChanged()">
8421
+
</div>
8422
+
</td></tr>
8423
+
<tr><td>
8424
+
<div>
8425
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8426
+
<div class="bws_hidden_help_text cr_min_260px">
8427
+
<?php
8428
+
echo esc_html__("Select the text color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
8429
+
?>
8430
+
</div>
8431
+
</div>
8432
+
<b><?php echo esc_html__("Input Text Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8433
+
</div>
8434
+
</td><td>
8435
+
<div>
8436
+
<input type="color" id="input_text_color" name="aiomatic_Chatbot_Settings[input_text_color]" value="<?php echo esc_html($input_text_color);?>" onchange="inputtextcolorChanged()">
8437
+
</div>
8438
+
</td></tr>
8439
+
<tr><td>
8440
+
<div>
8441
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8442
+
<div class="bws_hidden_help_text cr_min_260px">
8443
+
<?php
8444
+
echo esc_html__("Select the placeholder color for the input field. Default is #e1e3e6", 'aiomatic-automatic-ai-content-writer');
8445
+
?>
8446
+
</div>
8447
+
</div>
8448
+
<b><?php echo esc_html__("Input Placeholder Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8449
+
</div>
8450
+
</td><td>
8451
+
<div>
8452
+
<input type="color" id="input_placeholder_color" name="aiomatic_Chatbot_Settings[input_placeholder_color]" value="<?php echo esc_html($input_placeholder_color);?>" onchange="inputplaceholdercolorChanged()">
8453
+
</div>
8454
+
</td></tr>
8455
+
<tr><td>
8456
+
<div>
8457
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8458
+
<div class="bws_hidden_help_text cr_min_260px">
8459
+
<?php
8460
+
echo esc_html__("Select the persona name color for the input field. Default is #3c434a", 'aiomatic-automatic-ai-content-writer');
8461
+
?>
8462
+
</div>
8463
+
</div>
8464
+
<b><?php echo esc_html__("Persona Name Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8465
+
</div>
8466
+
</td><td>
8467
+
<div>
8468
+
<input type="color" id="persona_name_color" name="aiomatic_Chatbot_Settings[persona_name_color]" value="<?php echo esc_html($persona_name_color);?>" onchange="personanamecolorChanged()">
8469
+
</div>
8470
+
</td></tr>
8471
+
<tr><td>
8472
+
<div>
8473
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8474
+
<div class="bws_hidden_help_text cr_min_260px">
8475
+
<?php
8476
+
echo esc_html__("Select the persona role color for the input field. Default is #3c434a", 'aiomatic-automatic-ai-content-writer');
8477
+
?>
8478
+
</div>
8479
+
</div>
8480
+
<b><?php echo esc_html__("Persona Role Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8481
+
</div>
8482
+
</td><td>
8483
+
<div>
8484
+
<input type="color" id="persona_role_color" name="aiomatic_Chatbot_Settings[persona_role_color]" value="<?php echo esc_html($persona_role_color);?>" onchange="personarolecolorChanged()">
8485
+
</div>
8486
+
</td></tr>
8487
+
<tr><td>
8488
+
<div>
8489
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8490
+
<div class="bws_hidden_help_text cr_min_260px">
8491
+
<?php
8492
+
echo esc_html__("Select the color of the submit button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
8493
+
?>
8494
+
</div>
8495
+
</div>
8496
+
<b><?php echo esc_html__("Submit Button Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8497
+
</div>
8498
+
</td><td>
8499
+
<div>
8500
+
<input type="color" id="submit_color" name="aiomatic_Chatbot_Settings[submit_color]" value="<?php echo esc_html($submit_color);?>" onchange="submitcolorChanged()">
8501
+
</div>
8502
+
</td></tr>
8503
+
<tr><td>
8504
+
<div>
8505
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8506
+
<div class="bws_hidden_help_text cr_min_260px">
8507
+
<?php
8508
+
echo esc_html__("Select the text color of the submit button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
8509
+
?>
8510
+
</div>
8511
+
</div>
8512
+
<b><?php echo esc_html__("Submit Button Text Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8513
+
</div>
8514
+
</td><td>
8515
+
<div>
8516
+
<input type="color" id="submit_text_color" name="aiomatic_Chatbot_Settings[submit_text_color]" value="<?php echo esc_html($submit_text_color);?>" onchange="submittextcolorChanged()">
8517
+
</div>
8518
+
</td></tr>
8519
+
<tr><td>
8520
+
<div>
8521
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8522
+
<div class="bws_hidden_help_text cr_min_260px">
8523
+
<?php
8524
+
echo esc_html__("Select the color of the voice button. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
8525
+
?>
8526
+
</div>
8527
+
</div>
8528
+
<b><?php echo esc_html__("Voice Button Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8529
+
</div>
8530
+
</td><td>
8531
+
<div>
8532
+
<input type="color" id="voice_color" name="aiomatic_Chatbot_Settings[voice_color]" value="<?php echo esc_html($voice_color);?>" onchange="voicecolorChanged()">
8533
+
</div>
8534
+
</td></tr>
8535
+
<tr><td>
8536
+
<div>
8537
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8538
+
<div class="bws_hidden_help_text cr_min_260px">
8539
+
<?php
8540
+
echo esc_html__("Select the color of the voice button when activated. Default is #55a7e2", 'aiomatic-automatic-ai-content-writer');
8541
+
?>
8542
+
</div>
8543
+
</div>
8544
+
<b><?php echo esc_html__("Voice Button Activated Color:", 'aiomatic-automatic-ai-content-writer');?></b>
8545
+
</div>
8546
+
</td><td>
8547
+
<div>
8548
+
<input type="color" id="voice_color_activated" name="aiomatic_Chatbot_Settings[voice_color_activated]" value="<?php echo esc_html($voice_color_activated);?>" onchange="voicecolorChanged()">
8549
+
</div>
8550
+
</td></tr>
8551
+
<tr><td>
8552
+
<div>
8553
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8554
+
<div class="bws_hidden_help_text cr_min_260px">
8555
+
<?php
8556
+
echo esc_html__("Select the looks of your chatbot.", 'aiomatic-automatic-ai-content-writer');
8557
+
?>
8558
+
</div>
8559
+
</div>
8560
+
<b><?php echo esc_html__("Chatbot Theme:", 'aiomatic-automatic-ai-content-writer');?></b><br/>
8561
+
</div>
8562
+
</td><td>
8563
+
<div>
8564
+
<select id="chat_theme" name="aiomatic_Chatbot_Settings[chat_theme]" onchange="themeChanged();" class="cr_width_full">
8565
+
<?php
8566
+
echo '<option'.($chat_theme == '' ? ' selected': '').' value="">No Change</option>';
8567
+
echo '<option'.($chat_theme == 'light' ? ' selected': '').' value="light">Light</option>';
8568
+
echo '<option'.($chat_theme == 'dark' ? ' selected': '').' value="dark">Dark</option>';
8569
+
echo '<option'.($chat_theme == 'midnight' ? ' selected': '').' value="midnight">Midnight</option>';
8570
+
echo '<option'.($chat_theme == 'sunrise' ? ' selected': '').' value="sunrise">Sunrise</option>';
8571
+
echo '<option'.($chat_theme == 'ocean' ? ' selected': '').' value="ocean">Ocean</option>';
8572
+
echo '<option'.($chat_theme == 'forest' ? ' selected': '').' value="forest">Forest</option>';
8573
+
echo '<option'.($chat_theme == 'winter' ? ' selected': '').' value="winter">Winter</option>';
8574
+
echo '<option'.($chat_theme == 'twilight' ? ' selected': '').' value="twilight">Twilight</option>';
8575
+
echo '<option'.($chat_theme == 'desert' ? ' selected': '').' value="desert">Desert</option>';
8576
+
echo '<option'.($chat_theme == 'cosmic' ? ' selected': '').' value="cosmic">Cosmic</option>';
8577
+
echo '<option'.($chat_theme == 'rose' ? ' selected': '').' value="rose">Rose</option>';
8578
+
echo '<option'.($chat_theme == 'tropical' ? ' selected': '').' value="tropical">Tropical</option>';
8579
+
echo '<option'.($chat_theme == 'facebook' ? ' selected': '').' value="facebook">Facebook</option>';
8580
+
echo '<option'.($chat_theme == 'twitter' ? ' selected': '').' value="twitter">Twitter</option>';
8581
+
echo '<option'.($chat_theme == 'instagram' ? ' selected': '').' value="instagram">Instagram</option>';
8582
+
echo '<option'.($chat_theme == 'whatsapp' ? ' selected': '').' value="whatsapp">WhatsApp</option>';
8583
+
echo '<option'.($chat_theme == 'linkedin' ? ' selected': '').' value="linkedin">LinkedIn</option>';
8584
+
if($aiomatic_themes->have_posts())
8585
+
{
8586
+
foreach ($aiomatic_themes->posts as $aiomatic_theme)
8587
+
{
8588
+
echo '<option'.($chat_theme == $aiomatic_theme->ID ? ' selected': '').' value="' . $aiomatic_theme->ID . '">'. esc_html($aiomatic_theme->post_title) . '</option>';
8589
+
}
8590
+
}
8591
+
?>
8592
+
</select>
8593
+
</div>
8594
+
</td></tr>
8595
+
<tr><td colspan="2">
8596
+
<h2><?php echo esc_html__("Chatbot Theme Management:", 'aiomatic-automatic-ai-content-writer');?></h2>
8597
+
</td></tr>
8598
+
<tr><td>
8599
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8600
+
<div class="bws_hidden_help_text cr_min_260px">
8601
+
<?php
8602
+
echo esc_html__("Save new color themes from current color settings.", 'aiomatic-automatic-ai-content-writer');
8603
+
?>
8604
+
</div>
8605
+
</div>
8606
+
<b><?php echo esc_html__("Save New Theme From Current Colors:", 'aiomatic-automatic-ai-content-writer');?></b></td>
8607
+
<td>
8608
+
<button href="#" id="aiomatic_save_theme" class="page-title-action"><?php
8609
+
echo esc_html__("Save New Theme", 'aiomatic-automatic-ai-content-writer');
8610
+
?></button>
8611
+
</td></tr>
8612
+
<tr><td>
8613
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8614
+
<div class="bws_hidden_help_text cr_min_260px">
8615
+
<?php
8616
+
echo esc_html__("Delete an existing theme from the listed themes.", 'aiomatic-automatic-ai-content-writer');
8617
+
?>
8618
+
</div>
8619
+
</div>
8620
+
<b><?php echo esc_html__("Delete Existing Theme:", 'aiomatic-automatic-ai-content-writer');?></b></td>
8621
+
<td>
8622
+
<?php
8623
+
if($aiomatic_themes->have_posts())
8624
+
{
8625
+
echo '<select id="chat_theme_delete" class="cr_width_60p">';
8626
+
echo '<option value="" selected disabled>'. esc_html__("Select a theme to delete", 'aiomatic-automatic-ai-content-writer') . '</option>';
8627
+
foreach ($aiomatic_themes->posts as $aiomatic_theme)
8628
+
{
8629
+
echo '<option value="' . $aiomatic_theme->ID . '">'. esc_html($aiomatic_theme->post_title) . '</option>';
8630
+
}
8631
+
echo '</select>';
8632
+
}
8633
+
else
8634
+
{
8635
+
echo '<select id="chat_theme_delete" class="cr_width_60p">';
8636
+
echo '<option value="" selected disabled>'. esc_html__("No saved themes available", 'aiomatic-automatic-ai-content-writer') . '</option>';
8637
+
echo '</select>';
8638
+
}
8639
+
?>
8640
+
<button href="#"<?php if(!$aiomatic_themes->have_posts()){ echo ' disabled';}?> id="aiomatic_delete_theme" class="cr_float_right page-title-action"><?php
8641
+
echo esc_html__("Delete Selected Theme", 'aiomatic-automatic-ai-content-writer');
8642
+
?></button>
8643
+
</td></tr>
8644
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
8645
+
?>
8646
+
<tr><td colspan="2">
8647
+
<h2><?php echo esc_html__("Chatbot Themes Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
8648
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/M1uwngrumrg" frameborder="0" allowfullscreen></iframe></div></p>
8649
+
</td></tr>
8650
+
<?php
8651
+
}
8652
+
?>
8653
+
</table>
8654
+
</div>
8655
+
<div id="tab-2" class="tab-content">
8656
+
<table class="widefat">
8657
+
<tr><td colspan="2">
8658
+
<h2><?php echo esc_html__("Blocked Keywords Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
8659
+
</td></tr>
8660
+
<tr><td>
8661
+
<div>
8662
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8663
+
<div class="bws_hidden_help_text cr_min_260px">
8664
+
<?php
8665
+
echo esc_html__("Set a list of blocked words which will be filtered out from the chat (replaced with ***).", 'aiomatic-automatic-ai-content-writer');
8666
+
?>
8667
+
</div>
8668
+
</div>
8669
+
<b><?php echo esc_html__("Blocked Words From Chat Input:", 'aiomatic-automatic-ai-content-writer');?></b>
8670
+
</div>
8671
+
</td><td>
8672
+
<div>
8673
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[blocked_words]" placeholder="Comma separated list of blocked words"><?php
8674
+
echo esc_textarea($blocked_words);
8675
+
?></textarea>
8676
+
</div>
8677
+
</td></tr>
8678
+
<tr><td colspan="2">
8679
+
<h2><?php echo esc_html__("AI Chatbot Moderation Options:", 'aiomatic-automatic-ai-content-writer');?></h2>
8680
+
</td></tr>
8681
+
<tr><td>
8682
+
<div>
8683
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8684
+
<div class="bws_hidden_help_text cr_min_260px">
8685
+
<?php
8686
+
echo esc_html__("Select if you want to enable chatbot moderation", 'aiomatic-automatic-ai-content-writer');
8687
+
?>
8688
+
</div>
8689
+
</div>
8690
+
<b><?php echo esc_html__("Enable User Message Moderation:", 'aiomatic-automatic-ai-content-writer');?></b>
8691
+
</div>
8692
+
</td><td>
8693
+
<div>
8694
+
<input type="checkbox" id="enable_moderation" name="aiomatic_Chatbot_Settings[enable_moderation]"<?php
8695
+
if ($enable_moderation == 'on')
8696
+
echo ' checked ';
8697
+
?>>
8698
+
</div>
8699
+
</td></tr>
8700
+
<tr><td>
8701
+
<div>
8702
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8703
+
<div class="bws_hidden_help_text cr_min_260px">
8704
+
<?php
8705
+
echo esc_html__("Select the AI model you want to use for moderation.", 'aiomatic-automatic-ai-content-writer');
8706
+
?>
8707
+
</div>
8708
+
</div>
8709
+
<b><?php echo esc_html__("AI Moderation Model:", 'aiomatic-automatic-ai-content-writer');?></b>
8710
+
</div>
8711
+
</td><td>
8712
+
<div>
8713
+
<select id="moderation_model" name="aiomatic_Chatbot_Settings[moderation_model]" class="cr_width_full">
8714
+
<?php
8715
+
echo '<option' . ($moderation_model == 'omni-moderation-latest' ? ' selected': '') . ' value="omni-moderation-latest">omni-moderation-latest</option>';
8716
+
?>
8717
+
</select>
8718
+
</div>
8719
+
</td></tr>
8720
+
<tr><td>
8721
+
<div>
8722
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8723
+
<div class="bws_hidden_help_text cr_min_260px">
8724
+
<?php
8725
+
echo esc_html__("Select the message which will appear to users when their input is flagged.", 'aiomatic-automatic-ai-content-writer');
8726
+
?>
8727
+
</div>
8728
+
</div>
8729
+
<b><?php echo esc_html__("Flagged Text Message:", 'aiomatic-automatic-ai-content-writer');?></b>
8730
+
</div>
8731
+
</td><td>
8732
+
<div>
8733
+
<textarea rows="1" name="aiomatic_Chatbot_Settings[flagged_message]" placeholder="Your message has been flagged as potentially harmful or inappropriate. Please review your language and content to ensure it aligns with our values of respect and sensitivity towards others. Thank you for your cooperation."><?php
8734
+
echo esc_textarea($flagged_message);
8735
+
?></textarea>
8736
+
</div>
8737
+
</td></tr>
8738
+
</table>
8739
+
</div>
8740
+
<div id="tab-3" class="tab-content">
8741
+
<table class="widefat">
8742
+
<tr><td colspan="2">
8743
+
<h2><?php echo esc_html__("AI Chatbot Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
8744
+
</td></tr>
8745
+
<tr><td>
8746
+
<div>
8747
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8748
+
<div class="bws_hidden_help_text cr_min_260px">
8749
+
<?php
8750
+
echo esc_html__("Select if you want to make the chatbot respond with full text or do you want to enable response streaming, which is the recommended method to be used. In this case, the response will appear in real time, as it is generated by the AI (similar to ChatGPT). You can also use a typing effect, so text will appear gradually, but in this case, the response will start to appear only after the AI sent the full response to the plugin. This is also required for the text-to-speech feature of the plugin.", 'aiomatic-automatic-ai-content-writer');
8751
+
?>
8752
+
</div>
8753
+
</div>
8754
+
<b><?php echo esc_html__("Enable Chatbot Instant Responses:", 'aiomatic-automatic-ai-content-writer');?></b>
8755
+
<?php
8756
+
if(aiomatic_starts_with($chat_model, 'gpt-5-pro') && $instant_response == 'stream')
8757
+
{
8758
+
echo '<span class="cr_red"> ' . esc_html__("Note: GPT-5-Pro models do not support response streaming. Please select another option.", 'aiomatic-automatic-ai-content-writer') . '</span>';
8759
+
}
8760
+
?>
8761
+
</div>
8762
+
</td><td>
8763
+
<div>
8764
+
<select id="instant_response" name="aiomatic_Chatbot_Settings[instant_response]" class="cr_width_full" onchange="instantResponseChanged();">
8765
+
<?php
8766
+
echo '<option' . ($instant_response == 'on' ? ' selected': '') . ' value="on">'. esc_html__("Instant Response", 'aiomatic-automatic-ai-content-writer') . '</option>';
8767
+
if (!isset($aiomatic_Main_Settings['app_id']))
8768
+
{
8769
+
$aiomatic_Main_Settings['app_id'] = '';
8770
+
}
8771
+
$appids = preg_split('/\r\n|\r|\n/', trim($aiomatic_Main_Settings['app_id']));
8772
+
$appids = array_filter($appids);
8773
+
if(empty($appids))
8774
+
{
8775
+
$token = '';
8776
+
}
8777
+
else
8778
+
{
8779
+
$token = $appids[array_rand($appids)];
8780
+
$token = apply_filters('aimogen_openai_api_key', $token);$token = apply_filters('aiomatic_openai_api_key', $token);
8781
+
}
8782
+
echo '<option' . ($instant_response == 'stream' ? ' selected': '') . ' value="stream">'. esc_html__("Response Streaming (Recommended)", 'aiomatic-automatic-ai-content-writer') . '</option>';
8783
+
echo '<option' . ($instant_response == 'off' ? ' selected': '') . ' value="off">'. esc_html__("Typewriter Effect", 'aiomatic-automatic-ai-content-writer') . '</option>';
8784
+
?>
8785
+
</select>
8786
+
</div>
8787
+
</td></tr>
8788
+
<tr class="hideStreamer"><td>
8789
+
<div>
8790
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8791
+
<div class="bws_hidden_help_text cr_min_260px">
8792
+
<?php
8793
+
echo esc_html__("Select if you want to allow users to stop response creation when AI message streaming in progress.", 'aiomatic-automatic-ai-content-writer');
8794
+
?>
8795
+
</div>
8796
+
</div>
8797
+
<b><?php echo esc_html__("Allow Users To Stop Response Creation When Streaming:", 'aiomatic-automatic-ai-content-writer');?></b>
8798
+
</div>
8799
+
</td><td>
8800
+
<div>
8801
+
<input type="checkbox" id="allow_stream_stop" name="aiomatic_Chatbot_Settings[allow_stream_stop]"<?php
8802
+
if ($allow_stream_stop == 'on')
8803
+
echo ' checked ';
8804
+
?>>
8805
+
</div>
8806
+
</td></tr>
8807
+
<tr><td>
8808
+
<div>
8809
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8810
+
<div class="bws_hidden_help_text cr_min_260px">
8811
+
<?php
8812
+
echo esc_html__("Select if you want to disable modern response processing in the chatbot.", 'aiomatic-automatic-ai-content-writer');
8813
+
?>
8814
+
</div>
8815
+
</div>
8816
+
<b><?php echo esc_html__("Disable Chatbot Modern Response Processing:", 'aiomatic-automatic-ai-content-writer');?></b>
8817
+
</div>
8818
+
</td><td>
8819
+
<div>
8820
+
<input type="checkbox" id="disable_modern_chat" name="aiomatic_Chatbot_Settings[disable_modern_chat]"<?php
8821
+
if ($disable_modern_chat == 'on')
8822
+
echo ' checked ';
8823
+
?>>
8824
+
</div>
8825
+
</td></tr>
8826
+
<tr><td>
8827
+
<div>
8828
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8829
+
<div class="bws_hidden_help_text cr_min_260px">
8830
+
<?php
8831
+
echo esc_html__("Select if you want to enable the copying of messages, if users click the message bubbles.", 'aiomatic-automatic-ai-content-writer');
8832
+
?>
8833
+
</div>
8834
+
</div>
8835
+
<b><?php echo esc_html__("Enable Message Copying By Clicking It:", 'aiomatic-automatic-ai-content-writer');?></b>
8836
+
</div>
8837
+
</td><td>
8838
+
<div>
8839
+
<input type="checkbox" id="enable_copy" name="aiomatic_Chatbot_Settings[enable_copy]"<?php
8840
+
if ($enable_copy == 'on')
8841
+
echo ' checked ';
8842
+
?>>
8843
+
</div>
8844
+
</td></tr>
8845
+
<tr><td>
8846
+
<div>
8847
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8848
+
<div class="bws_hidden_help_text cr_min_260px">
8849
+
<?php
8850
+
echo esc_html__("Select if you want to enable the editing of chat messages, if users click the message bubbles.", 'aiomatic-automatic-ai-content-writer');
8851
+
?>
8852
+
</div>
8853
+
</div>
8854
+
<b><?php echo esc_html__("Enable Chat Message Editing By Clicking It:", 'aiomatic-automatic-ai-content-writer');?></b>
8855
+
</div>
8856
+
</td><td>
8857
+
<div>
8858
+
<select id="chat_editing" name="aiomatic_Chatbot_Settings[chat_editing]" class="cr_width_full">
8859
+
<?php
8860
+
echo '<option' . ((empty($chat_editing) || $chat_editing == 'disabled') ? ' selected': '') . ' value="disabled">' . esc_html__("Disabled", 'aiomatic-automatic-ai-content-writer') . '</option>';
8861
+
echo '<option' . ($chat_editing == 'user' ? ' selected': '') . ' value="user">' . esc_html__("User Messages Only", 'aiomatic-automatic-ai-content-writer') . '</option>';
8862
+
echo '<option' . ($chat_editing == 'chatbot' ? ' selected': '') . ' value="chatbot">' . esc_html__("Chatbot Messages Only", 'aiomatic-automatic-ai-content-writer') . '</option>';
8863
+
echo '<option' . ($chat_editing == 'all' ? ' selected': '') . ' value="all">' . esc_html__("All Messages", 'aiomatic-automatic-ai-content-writer') . '</option>';
8864
+
?>
8865
+
</select>
8866
+
</div>
8867
+
</td></tr>
8868
+
<tr><td>
8869
+
<div>
8870
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8871
+
<div class="bws_hidden_help_text cr_min_260px">
8872
+
<?php
8873
+
echo esc_html__("Select if you want to automatically scroll the window to bottom on new messages.", 'aiomatic-automatic-ai-content-writer');
8874
+
?>
8875
+
</div>
8876
+
</div>
8877
+
<b><?php echo esc_html__("Scroll To Bottom Of The Form On New Messages:", 'aiomatic-automatic-ai-content-writer');?></b>
8878
+
</div>
8879
+
</td><td>
8880
+
<div>
8881
+
<input type="checkbox" id="scroll_bot" name="aiomatic_Chatbot_Settings[scroll_bot]"<?php
8882
+
if ($scroll_bot == 'on')
8883
+
echo ' checked ';
8884
+
?>>
8885
+
</div>
8886
+
</td></tr>
8887
+
<tr><td>
8888
+
<div>
8889
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8890
+
<div class="bws_hidden_help_text cr_min_260px">
8891
+
<?php
8892
+
echo wp_kses(
8893
+
sprintf(
8894
+
__(
8895
+
'Select a sound effect to be played when a message is sent in the chatbot. To disable this feature, leave this settings field blank. You can get free sound effects from %s.',
8896
+
'aiomatic-automatic-ai-content-writer'
8897
+
),
8898
+
'<a href="https://pixabay.com/sound-effects/search/notification/?order=ec" target="_blank">Pixabay</a>'
8899
+
),
8900
+
array(
8901
+
'a' => array(
8902
+
'href' => array(),
8903
+
'target' => array(),
8904
+
),
8905
+
)
8906
+
);
8907
+
?>
8908
+
</div>
8909
+
</div>
8910
+
<b><?php echo esc_html__("Chatbot 'Send Message' Sound Effect:", 'aiomatic-automatic-ai-content-writer');?></b>
8911
+
</div>
8912
+
</td><td>
8913
+
<div>
8914
+
<input type="text" placeholder="<?php echo esc_html__("Upload your 'Send Message' sound effect file using the button from below", 'aiomatic-automatic-ai-content-writer');?>" id="send_message_sound" name="aiomatic_Chatbot_Settings[send_message_sound]" value="<?php echo esc_attr($send_message_sound); ?>" />
8915
+
<button class="button" id="aiomatic_upload_send_sound_button"><?php echo esc_html__("Upload a 'Send Message' sound effect", 'aiomatic-automatic-ai-content-writer');?></button>
8916
+
</div>
8917
+
</td></tr>
8918
+
<tr><td>
8919
+
<div>
8920
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8921
+
<div class="bws_hidden_help_text cr_min_260px">
8922
+
<?php
8923
+
echo wp_kses(
8924
+
sprintf(
8925
+
__(
8926
+
'Select a sound effect to be played when a message is received in the chatbot. To disable this feature, leave this settings field blank. You can get free sound effects from %s.',
8927
+
'aiomatic-automatic-ai-content-writer'
8928
+
),
8929
+
'<a href="https://pixabay.com/sound-effects/search/notification/?order=ec" target="_blank">Pixabay</a>'
8930
+
),
8931
+
array(
8932
+
'a' => array(
8933
+
'href' => array(),
8934
+
'target' => array(),
8935
+
),
8936
+
)
8937
+
);
8938
+
8939
+
?>
8940
+
</div>
8941
+
</div>
8942
+
<b><?php echo esc_html__("Chatbot 'Receive Message' Sound Effect:", 'aiomatic-automatic-ai-content-writer');?></b>
8943
+
</div>
8944
+
</td><td>
8945
+
<div>
8946
+
<input type="text" placeholder="<?php echo esc_html__("Upload your 'Receive Message' sound effect file using the button from below", 'aiomatic-automatic-ai-content-writer');?>" id="receive_message_sound" name="aiomatic_Chatbot_Settings[receive_message_sound]" value="<?php echo esc_attr($receive_message_sound); ?>" />
8947
+
<button class="button" id="aiomatic_upload_receive_sound_button"><?php echo esc_html__("Upload a 'Receive Message' sound effect", 'aiomatic-automatic-ai-content-writer');?></button>
8948
+
</div>
8949
+
</td></tr>
8950
+
<tr><td>
8951
+
<div>
8952
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8953
+
<div class="bws_hidden_help_text cr_min_260px">
8954
+
<?php
8955
+
echo esc_html__("Set a number of milliseconds to set as a delay for the chatbot. You can also set an interval between two values (in ms), case in which, the chatbot will select a random number of milliseconds from that interval, at each response.", 'aiomatic-automatic-ai-content-writer');
8956
+
?>
8957
+
</div>
8958
+
</div>
8959
+
<b><?php echo esc_html__("Chatbot Response Delay (ms):", 'aiomatic-automatic-ai-content-writer');?></b>
8960
+
</div>
8961
+
</td><td>
8962
+
<div>
8963
+
<input type="text" placeholder="<?php echo esc_html__("Example: 100-500", 'aiomatic-automatic-ai-content-writer');?>" id="response_delay" name="aiomatic_Chatbot_Settings[response_delay]" value="<?php echo esc_attr($response_delay); ?>" />
8964
+
</div>
8965
+
</td></tr>
8966
+
<tr><td>
8967
+
<div>
8968
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8969
+
<div class="bws_hidden_help_text cr_min_260px">
8970
+
<?php
8971
+
echo esc_html__("Set a number of milliseconds to set as a delay for the typewriter. A lower delay will result in faster typing, a higer delay will result in slower typing speeds. Default is 50", 'aiomatic-automatic-ai-content-writer');
8972
+
?>
8973
+
</div>
8974
+
</div>
8975
+
<b><?php echo esc_html__("Typewriter Delay (ms):", 'aiomatic-automatic-ai-content-writer');?></b>
8976
+
</div>
8977
+
</td><td>
8978
+
<div>
8979
+
<input type="text" placeholder="<?php echo esc_html__("50", 'aiomatic-automatic-ai-content-writer');?>" id="typewriter_delay" name="aiomatic_Chatbot_Settings[typewriter_delay]" value="<?php echo esc_attr($typewriter_delay); ?>" />
8980
+
</div>
8981
+
</td></tr>
8982
+
<tr><td>
8983
+
<div>
8984
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
8985
+
<div class="bws_hidden_help_text cr_min_260px">
8986
+
<?php
8987
+
echo esc_html__("Select if you want to enable the voice input feature for the chatbot.", 'aiomatic-automatic-ai-content-writer');
8988
+
?>
8989
+
</div>
8990
+
</div>
8991
+
<b><?php echo esc_html__("Enable Chatbot Voice Input:", 'aiomatic-automatic-ai-content-writer');?></b>
8992
+
</div>
8993
+
</td><td>
8994
+
<div>
8995
+
<input type="checkbox" id="voice_input" onchange="voiceChanged();" name="aiomatic_Chatbot_Settings[voice_input]"<?php
8996
+
if ($voice_input == 'on')
8997
+
echo ' checked ';
8998
+
?>>
8999
+
</div>
9000
+
</td></tr>
9001
+
<tr class="hideVoice"><td>
9002
+
<div>
9003
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9004
+
<div class="bws_hidden_help_text cr_min_260px">
9005
+
<?php
9006
+
echo esc_html__("Select if you want to automatically submit form after speech recognition is complete.", 'aiomatic-automatic-ai-content-writer');
9007
+
?>
9008
+
</div>
9009
+
</div>
9010
+
<b><?php echo esc_html__("Enable Chat Auto-Submit On Voice Input Completion:", 'aiomatic-automatic-ai-content-writer');?></b>
9011
+
</div>
9012
+
</td><td>
9013
+
<div>
9014
+
<input type="checkbox" id="auto_submit_voice" name="aiomatic_Chatbot_Settings[auto_submit_voice]"<?php
9015
+
if ($auto_submit_voice == 'on')
9016
+
echo ' checked ';
9017
+
?>>
9018
+
</div>
9019
+
</td></tr>
9020
+
<tr>
9021
+
<td>
9022
+
<div>
9023
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9024
+
<div class="bws_hidden_help_text cr_min_260px">
9025
+
<?php
9026
+
echo esc_html__("Select the file format how you want to allow users to download chatbot conversations to file.", 'aiomatic-automatic-ai-content-writer');
9027
+
?>
9028
+
</div>
9029
+
</div>
9030
+
<b><?php echo esc_html__("Download Chat Conversation To File As:", 'aiomatic-automatic-ai-content-writer');?></b>
9031
+
</td>
9032
+
<td class="cr_min_width_200">
9033
+
<select id="chat_download_format" name="aiomatic_Chatbot_Settings[chat_download_format]" class="cr_width_full">
9034
+
<?php
9035
+
echo '<option' . ($chat_download_format == 'txt' ? ' selected': '') . ' value="txt">Txt</option>';
9036
+
if (!is_plugin_active('aiomatic-extension-pdf-files/aiomatic-extension-pdf-files.php'))
9037
+
{
9038
+
echo '<option disabled title="Feature not available, check the \'PDF Chat\' tab for details" value="pdf">Pdf</option>';
9039
+
}
9040
+
else
9041
+
{
9042
+
echo '<option' . ($chat_download_format == 'pdf' ? ' selected': '') . ' value="pdf">Pdf</option>';
9043
+
}
9044
+
?>
9045
+
</select>
9046
+
</td>
9047
+
</tr>
9048
+
<tr>
9049
+
<td>
9050
+
<div>
9051
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9052
+
<div class="bws_hidden_help_text cr_min_260px">
9053
+
<?php
9054
+
echo esc_html__("Select the default chat mode (image or text).", 'aiomatic-automatic-ai-content-writer');
9055
+
?>
9056
+
</div>
9057
+
</div>
9058
+
<b><?php echo esc_html__("Default Chat Mode:", 'aiomatic-automatic-ai-content-writer');?></b>
9059
+
</td>
9060
+
<td class="cr_min_width_200">
9061
+
<select id="chat_mode" name="aiomatic_Chatbot_Settings[chat_mode]" class="cr_width_full">
9062
+
<?php
9063
+
echo '<option' . ($chat_mode == 'text' ? ' selected': '') . ' value="text">Text</option>';
9064
+
echo '<option' . ($chat_mode == 'images' ? ' selected': '') . ' value="images">Image</option>';
9065
+
?>
9066
+
</select>
9067
+
</td>
9068
+
</tr>
9069
+
<tr>
9070
+
<td>
9071
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9072
+
<div class="bws_hidden_help_text cr_min_260px">
9073
+
<?php
9074
+
echo esc_html__("Select if you want to convert markdown to HTML in AI generated content.", 'aiomatic-automatic-ai-content-writer');
9075
+
?>
9076
+
</div>
9077
+
</div>
9078
+
<b><?php echo esc_html__("Convert Markdown To HTML In AI Generated Content:", 'aiomatic-automatic-ai-content-writer');?></b>
9079
+
</td>
9080
+
<td>
9081
+
<select id="markdown_parse" name="aiomatic_Chatbot_Settings[markdown_parse]" class="cr_width_full">
9082
+
<?php
9083
+
echo '<option' . ($markdown_parse == 'on' ? ' selected': '') . ' value="on">On</option>';
9084
+
echo '<option' . ($markdown_parse == 'off' ? ' selected': '') . ' value="off">Off</option>';
9085
+
?>
9086
+
</select>
9087
+
</td>
9088
+
</tr><tr>
9089
+
<td>
9090
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9091
+
<div class="bws_hidden_help_text cr_min_260px">
9092
+
<?php
9093
+
echo esc_html__("Enable Katex integration to render mathematical expressions.", 'aiomatic-automatic-ai-content-writer');
9094
+
?>
9095
+
</div>
9096
+
</div>
9097
+
<b><?php echo esc_html__("Enable Katex (Mathematical Expressions Rendering):", 'aiomatic-automatic-ai-content-writer');?></b>
9098
+
</td>
9099
+
<td>
9100
+
<select id="katex_parse" name="aiomatic_Chatbot_Settings[katex_parse]" class="cr_width_full">
9101
+
<?php
9102
+
echo '<option' . ($katex_parse == 'on' ? ' selected': '') . ' value="on">On</option>';
9103
+
echo '<option' . ($katex_parse == 'off' ? ' selected': '') . ' value="off">Off</option>';
9104
+
?>
9105
+
</select>
9106
+
</td>
9107
+
</tr>
9108
+
<tr>
9109
+
<td>
9110
+
<div>
9111
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9112
+
<div class="bws_hidden_help_text cr_min_260px">
9113
+
<?php
9114
+
echo esc_html__("Select if you want the chatbot to remember older messages sent and allow users to navigate between older messages using the up/down arrow keys from the keyboard.", 'aiomatic-automatic-ai-content-writer');
9115
+
?>
9116
+
</div>
9117
+
</div>
9118
+
<b><?php echo esc_html__("Up/Down Keys Show Older Messages In Chat:", 'aiomatic-automatic-ai-content-writer');?></b>
9119
+
</td>
9120
+
<td class="cr_min_width_200">
9121
+
<select id="updown_navigate" name="aiomatic_Chatbot_Settings[updown_navigate]" class="cr_width_full">
9122
+
<?php
9123
+
echo '<option' . ($updown_navigate == 'on' ? ' selected': '') . ' value="on">On</option>';
9124
+
echo '<option' . ($updown_navigate == 'off' ? ' selected': '') . ' value="off">Off</option>';
9125
+
?>
9126
+
</select>
9127
+
</td>
9128
+
</tr>
9129
+
<tr>
9130
+
<td>
9131
+
<div>
9132
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9133
+
<div class="bws_hidden_help_text cr_min_260px">
9134
+
<?php
9135
+
echo esc_html__("Select if you want to allow editing of prompts when templates are used", 'aiomatic-automatic-ai-content-writer');
9136
+
?>
9137
+
</div>
9138
+
</div>
9139
+
<b><?php echo esc_html__("Prompts Editable By Users:", 'aiomatic-automatic-ai-content-writer');?></b>
9140
+
</td>
9141
+
<td class="cr_min_width_200">
9142
+
<select id="prompt_editable" name="aiomatic_Chatbot_Settings[prompt_editable]" class="cr_width_full">
9143
+
<?php
9144
+
echo '<option' . ($prompt_editable == 'on' ? ' selected': '') . ' value="on">On</option>';
9145
+
echo '<option' . ($prompt_editable == 'off' ? ' selected': '') . ' value="off">Off</option>';
9146
+
?>
9147
+
</select>
9148
+
</td>
9149
+
</tr>
9150
+
<tr>
9151
+
<th class="cr_min_width_200">
9152
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9153
+
<div class="bws_hidden_help_text cr_min_260px">
9154
+
<?php
9155
+
echo esc_html__("This will be appended to each prompt sent by the plugin to the AI Chatbots.", 'aiomatic-automatic-ai-content-writer');
9156
+
?>
9157
+
</div>
9158
+
</div>
9159
+
<b><?php echo esc_html__("Append Text To All Textual AI Prompts From AI Chatbots:", 'aiomatic-automatic-ai-content-writer');?></b>
9160
+
</th>
9161
+
<td>
9162
+
<textarea rows="2" cols="70" name="aiomatic_Chatbot_Settings[chatbot_append]" placeholder="Global AI Chatbot prompt append text" class="cr_width_full"><?php echo esc_textarea($chatbot_append);?></textarea>
9163
+
</td>
9164
+
</tr>
9165
+
<tr>
9166
+
<th class="cr_min_width_200">
9167
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9168
+
<div class="bws_hidden_help_text cr_min_260px">
9169
+
<?php
9170
+
echo esc_html__("This will be prepended to each prompt sent by the plugin to the AI Chatbots.", 'aiomatic-automatic-ai-content-writer');
9171
+
?>
9172
+
</div>
9173
+
</div>
9174
+
<b><?php echo esc_html__("Prepend Text To All Textual AI Prompts From AI Chatbots:", 'aiomatic-automatic-ai-content-writer');?></b>
9175
+
</th>
9176
+
<td>
9177
+
<textarea rows="2" cols="70" name="aiomatic_Chatbot_Settings[chatbot_prepend]" placeholder="Global AI Chatbot prompt prepend text" class="cr_width_full"><?php echo esc_textarea($chatbot_prepend);?></textarea>
9178
+
</td>
9179
+
</tr>
9180
+
<tr><td colspan="2">
9181
+
<h2><?php echo esc_html__("Prompt Templates & Conversation Starters:", 'aiomatic-automatic-ai-content-writer');?></h2>
9182
+
</td></tr>
9183
+
<tr><td>
9184
+
<div>
9185
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9186
+
<div class="bws_hidden_help_text cr_min_260px">
9187
+
<?php
9188
+
echo esc_html__("Select if you want to show to users of the chatbot an initial list of conversations starters, which appear as clickable buttons, for easier starting of conversations. Delimit multiple starters using ; characters.", 'aiomatic-automatic-ai-content-writer');
9189
+
?>
9190
+
</div>
9191
+
</div>
9192
+
<b><?php echo esc_html__("Conversation Starters:", 'aiomatic-automatic-ai-content-writer');?></b>
9193
+
</div>
9194
+
</td><td>
9195
+
<div>
9196
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[conversation_starters]" placeholder="Tell me a joke!;What can you do?;How's the weather today?;Help me with something."><?php
9197
+
echo esc_textarea($conversation_starters);
9198
+
?></textarea>
9199
+
</div>
9200
+
</td></tr>
9201
+
<tr><td>
9202
+
<div>
9203
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9204
+
<div class="bws_hidden_help_text cr_min_260px">
9205
+
<?php
9206
+
echo esc_html__("Select if you want to enable the prompts to be user editable. You should use this feature only together with the prompt templates feature. These are different from Conversation Starters, as these will not disappear after the first message is sent in the chatbot.", 'aiomatic-automatic-ai-content-writer');
9207
+
?>
9208
+
</div>
9209
+
</div>
9210
+
<b><?php echo esc_html__("Prompt Templates:", 'aiomatic-automatic-ai-content-writer');?></b>
9211
+
</div>
9212
+
</td><td>
9213
+
<div>
9214
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[prompt_templates]" placeholder="Tell me a joke!;What can you do?;How's the weather today?;Help me with something."><?php
9215
+
echo esc_textarea($prompt_templates);
9216
+
?></textarea>
9217
+
</div>
9218
+
</td></tr>
9219
+
<tr><td colspan="2">
9220
+
<h2><?php echo esc_html__("AI Vision Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9221
+
</td></tr>
9222
+
<tr>
9223
+
<td>
9224
+
<div>
9225
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9226
+
<div class="bws_hidden_help_text cr_min_260px">
9227
+
<?php
9228
+
echo esc_html__("Set an expiration date for uploaded files from AI Vision feature in the chatbot - after the files expired, they will be automatically deleted. You can set dates in this format: +1 day, +2 days, etc. To disable this feature, leave it empty.", 'aiomatic-automatic-ai-content-writer');
9229
+
?>
9230
+
</div>
9231
+
</div>
9232
+
<b><?php echo esc_html__("Chatbot AI Vision Uploaded Files Expiration Date:", 'aiomatic-automatic-ai-content-writer');?></b>
9233
+
</td>
9234
+
<td class="cr_min_width_200">
9235
+
<input type="text" name="aiomatic_Chatbot_Settings[file_expiration]" class="cr_width_full" value="<?php echo esc_html($file_expiration);?>" placeholder="Example: +1 day">
9236
+
</td>
9237
+
</tr>
9238
+
<tr><td colspan="2">
9239
+
<h2><?php echo esc_html__("AI Image Chatbot Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9240
+
</td></tr>
9241
+
<tr>
9242
+
<td>
9243
+
<div>
9244
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9245
+
<div class="bws_hidden_help_text cr_min_260px">
9246
+
<?php
9247
+
echo esc_html__("Select the image size for the AI image chatbot.", 'aiomatic-automatic-ai-content-writer');
9248
+
?>
9249
+
</div>
9250
+
</div>
9251
+
<b><?php echo esc_html__("AI Image Chatbot Image Size:", 'aiomatic-automatic-ai-content-writer');?></b>
9252
+
</td>
9253
+
<td class="cr_min_width_200">
9254
+
<select autocomplete="off" id="sizeid" name="aiomatic_Chatbot_Settings[image_chat_size]" class="cr_width_full">
9255
+
<option value="256x256" <?php if($image_chat_size == '256x256'){echo ' selected';}?> ><?php echo esc_html__("256x256", 'aiomatic-automatic-ai-content-writer');?></option>
9256
+
<option value="512x512" <?php if($image_chat_size == '512x512'){echo ' selected';}?> ><?php echo esc_html__("512x512", 'aiomatic-automatic-ai-content-writer');?></option>
9257
+
<option value="1024x1024" <?php if($image_chat_size == '1024x1024'){echo ' selected';}?> ><?php echo esc_html__("1024x1024", 'aiomatic-automatic-ai-content-writer');?></option>
9258
+
</select>
9259
+
</td>
9260
+
</tr>
9261
+
<tr>
9262
+
<td>
9263
+
<div>
9264
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9265
+
<div class="bws_hidden_help_text cr_min_260px">
9266
+
<?php
9267
+
echo esc_html__("Select the image model for the AI image chatbot.", 'aiomatic-automatic-ai-content-writer');
9268
+
?>
9269
+
</div>
9270
+
</div>
9271
+
<b><?php echo esc_html__("AI Image Model:", 'aiomatic-automatic-ai-content-writer');?></b>
9272
+
</td>
9273
+
<td class="cr_min_width_200">
9274
+
<select autocomplete="off" id="model" name="aiomatic_Chatbot_Settings[image_chat_model]" class="cr_width_full">
9275
+
<?php
9276
+
foreach(AIMOGEN_DALLE_IMAGE_MODELS as $modelx)
9277
+
{
9278
+
echo '<option value="' . esc_html($modelx) .'"';
9279
+
if ($modelx == $image_chat_model) { echo ' selected'; }
9280
+
echo '>' . esc_html($modelx) . '</option>';
9281
+
}
9282
+
?>
9283
+
</select>
9284
+
</td>
9285
+
</tr>
9286
+
<tr><td colspan="2">
9287
+
<h2><?php echo esc_html__("GDPR Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9288
+
</td></tr>
9289
+
<tr><td>
9290
+
<div>
9291
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9292
+
<div class="bws_hidden_help_text cr_min_260px">
9293
+
<?php
9294
+
echo esc_html__("Select if you want to show a GDPR data protection overlay on chatbots before users can start using them.", 'aiomatic-automatic-ai-content-writer');
9295
+
?>
9296
+
</div>
9297
+
</div>
9298
+
<b><?php echo esc_html__("Require GDPR Consent Before Users Can Access The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
9299
+
</div>
9300
+
</td><td>
9301
+
<div>
9302
+
<input type="checkbox" id="show_gdpr" name="aiomatic_Chatbot_Settings[show_gdpr]"<?php
9303
+
if ($show_gdpr == 'on')
9304
+
echo ' checked ';
9305
+
?>>
9306
+
</div>
9307
+
</td></tr>
9308
+
<tr><td>
9309
+
<div>
9310
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9311
+
<div class="bws_hidden_help_text cr_min_260px">
9312
+
<?php
9313
+
echo esc_html__("Set the chatbot consent text. You can use the following shortcode here: %%privacy_policy_url%% - the default is: By using this chatbot, you consent to the collection and use of your data as outlined in our <a href='%%privacy_policy_url%%' target='_blank'>Privacy Policy</a>. Your data will only be used to assist with your inquiry.", 'aiomatic-automatic-ai-content-writer');
9314
+
?>
9315
+
</div>
9316
+
</div>
9317
+
<b><?php echo esc_html__("Privacy Policy Notice:", 'aiomatic-automatic-ai-content-writer');?></b>
9318
+
</div>
9319
+
</td><td>
9320
+
<div>
9321
+
<input type="text" id="gdpr_notice" name="aiomatic_Chatbot_Settings[gdpr_notice]" class="cr_width_full" value="<?php echo esc_html($gdpr_notice);?>" placeholder="Privacy policy notice">
9322
+
</div>
9323
+
</td></tr>
9324
+
<tr><td>
9325
+
<div>
9326
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9327
+
<div class="bws_hidden_help_text cr_min_260px">
9328
+
<?php
9329
+
echo esc_html__("Set the chatbot consent checkbox label. The default is: I agree to the terms.", 'aiomatic-automatic-ai-content-writer');
9330
+
?>
9331
+
</div>
9332
+
</div>
9333
+
<b><?php echo esc_html__("Privacy Policy Consent Checkbox Label:", 'aiomatic-automatic-ai-content-writer');?></b>
9334
+
</div>
9335
+
</td><td>
9336
+
<div>
9337
+
<input type="text" id="gdpr_checkbox" name="aiomatic_Chatbot_Settings[gdpr_checkbox]" class="cr_width_full" value="<?php echo esc_html($gdpr_checkbox);?>" placeholder="Privacy policy checkbox label">
9338
+
</div>
9339
+
</td></tr>
9340
+
<tr><td>
9341
+
<div>
9342
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9343
+
<div class="bws_hidden_help_text cr_min_260px">
9344
+
<?php
9345
+
echo esc_html__("Set the chatbot consent button text. The default is: Start chatting", 'aiomatic-automatic-ai-content-writer');
9346
+
?>
9347
+
</div>
9348
+
</div>
9349
+
<b><?php echo esc_html__("Privacy Policy Consent Button Text:", 'aiomatic-automatic-ai-content-writer');?></b>
9350
+
</div>
9351
+
</td><td>
9352
+
<div>
9353
+
<input type="text" id="gdpr_button" name="aiomatic_Chatbot_Settings[gdpr_button]" class="cr_width_full" value="<?php echo esc_html($gdpr_button);?>" placeholder="Privacy policy button text">
9354
+
</div>
9355
+
</td></tr>
9356
+
<tr><td colspan="2">
9357
+
<h2><?php echo esc_html__("Experimental Features:", 'aiomatic-automatic-ai-content-writer');?></h2>
9358
+
</td></tr>
9359
+
<tr><td>
9360
+
<div>
9361
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9362
+
<div class="bws_hidden_help_text cr_min_260px">
9363
+
<?php
9364
+
echo esc_html__("Select if you want to allow the chatbot to send HTML responses and the plugin to execute and parse these HTML responses. This is an experimental feature, enable it only if you know what you are doing.", 'aiomatic-automatic-ai-content-writer');
9365
+
?>
9366
+
</div>
9367
+
</div>
9368
+
<b><?php echo esc_html__("Enable Chatbot Full HTML Response Processing:", 'aiomatic-automatic-ai-content-writer');?></b>
9369
+
</div>
9370
+
</td><td>
9371
+
<div>
9372
+
<input type="checkbox" id="enable_html" name="aiomatic_Chatbot_Settings[enable_html]"<?php
9373
+
if ($enable_html == 'on')
9374
+
echo ' checked ';
9375
+
?>>
9376
+
</div>
9377
+
</td></tr>
9378
+
<tr><td>
9379
+
<div>
9380
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9381
+
<div class="bws_hidden_help_text cr_min_260px">
9382
+
<?php
9383
+
echo esc_html__("Select if you want to remove JavaScript code from the chatbot's HTML responses.", 'aiomatic-automatic-ai-content-writer');
9384
+
?>
9385
+
</div>
9386
+
</div>
9387
+
<b><?php echo esc_html__("Strip JavaScript From Chatbot HTML Responses:", 'aiomatic-automatic-ai-content-writer');?></b>
9388
+
</div>
9389
+
</td><td>
9390
+
<div>
9391
+
<input type="checkbox" id="strip_js" name="aiomatic_Chatbot_Settings[strip_js]"<?php
9392
+
if ($strip_js == 'on')
9393
+
echo ' checked ';
9394
+
?>>
9395
+
</div>
9396
+
</td></tr>
9397
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
9398
+
?>
9399
+
<tr><td colspan="2">
9400
+
<h2><?php echo esc_html__("Privacy Policy Notice Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
9401
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/6y6XCrAG72U" frameborder="0" allowfullscreen></iframe></div></p>
9402
+
</td></tr>
9403
+
<?php
9404
+
}
9405
+
?>
9406
+
</table>
9407
+
</div>
9408
+
<div id="tab-4" class="tab-content">
9409
+
<table class="widefat">
9410
+
<tr><td colspan="2">
9411
+
<h2><?php echo esc_html__("More API Parameters:", 'aiomatic-automatic-ai-content-writer');?></h2>
9412
+
</td></tr>
9413
+
<tr><td>
9414
+
<div>
9415
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9416
+
<div class="bws_hidden_help_text cr_min_260px">
9417
+
<?php
9418
+
echo esc_html__("Set the maximum number of tokens the chatbot should use for the content creation.", 'aiomatic-automatic-ai-content-writer');
9419
+
?>
9420
+
</div>
9421
+
</div>
9422
+
<b><?php echo esc_html__("Chatbot Max Token Count:", 'aiomatic-automatic-ai-content-writer');?></b>
9423
+
9424
+
</td><td>
9425
+
<input type="number" min="1" step="1" id="max_tokens" name="aiomatic_Chatbot_Settings[max_tokens]" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?>class="cr_width_full" value="<?php echo esc_html($max_tokens);?>" placeholder="Max token count">
9426
+
</td></tr>
9427
+
<tr><td>
9428
+
<div>
9429
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9430
+
<div class="bws_hidden_help_text cr_min_260px">
9431
+
<?php
9432
+
echo esc_html__("What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or top_p but not both.", 'aiomatic-automatic-ai-content-writer');
9433
+
?>
9434
+
</div>
9435
+
</div>
9436
+
<b><?php echo esc_html__("Chatbot Temperature:", 'aiomatic-automatic-ai-content-writer');?></b>
9437
+
9438
+
</td><td>
9439
+
<input type="number" min="0" step="0.01" id="temperature" max="2" name="aiomatic_Chatbot_Settings[temperature]" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?>class="cr_width_full" value="<?php echo esc_html($temperature);?>" placeholder="1">
9440
+
</td></tr><tr><td>
9441
+
<div>
9442
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9443
+
<div class="bws_hidden_help_text cr_min_260px">
9444
+
<?php
9445
+
echo esc_html__("An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.", 'aiomatic-automatic-ai-content-writer');
9446
+
?>
9447
+
</div>
9448
+
</div>
9449
+
<b><?php echo esc_html__("Chatbot Top_p:", 'aiomatic-automatic-ai-content-writer');?></b>
9450
+
9451
+
</td><td>
9452
+
<input type="number" min="0" step="0.01" max="1" id="top_p" name="aiomatic_Chatbot_Settings[top_p]" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?>class="cr_width_full" value="<?php echo esc_html($top_p);?>" placeholder="1">
9453
+
</td></tr><tr><td>
9454
+
<div>
9455
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9456
+
<div class="bws_hidden_help_text cr_min_260px">
9457
+
<?php
9458
+
echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", 'aiomatic-automatic-ai-content-writer');
9459
+
?>
9460
+
</div>
9461
+
</div>
9462
+
<b><?php echo esc_html__("Presence Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
9463
+
9464
+
</td><td>
9465
+
<input type="number" min="-2" step="0.01" max="2" id="presence_penalty" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?>name="aiomatic_Chatbot_Settings[presence_penalty]" class="cr_width_full" value="<?php echo esc_html($presence_penalty);?>" placeholder="0">
9466
+
</td></tr><tr><td>
9467
+
<div>
9468
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9469
+
<div class="bws_hidden_help_text cr_min_260px">
9470
+
<?php
9471
+
echo esc_html__("Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", 'aiomatic-automatic-ai-content-writer');
9472
+
?>
9473
+
</div>
9474
+
</div>
9475
+
<b><?php echo esc_html__("Frequency Penalty:", 'aiomatic-automatic-ai-content-writer');?></b>
9476
+
9477
+
</td><td>
9478
+
<input type="number" min="-2" step="0.01" max="2" id="frequency_penalty" <?php if ($assistant_id != ''){echo 'disabled title="Disabled when using AI Assistants"';}?>name="aiomatic_Chatbot_Settings[frequency_penalty]" class="cr_width_full" value="<?php echo esc_html($frequency_penalty);?>" placeholder="0">
9479
+
</td></tr><tr><td>
9480
+
<div>
9481
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9482
+
<div class="bws_hidden_help_text cr_min_260px">
9483
+
<?php
9484
+
echo esc_html__("If you check this checkbox, the plugin will store all prompts used in the plugin, to allow model dillution and other features on OpenAI API's part.", 'aiomatic-automatic-ai-content-writer');
9485
+
?>
9486
+
</div>
9487
+
</div>
9488
+
<b><?php echo esc_html__("Store AI Prompts On OpenAI's Part:", 'aiomatic-automatic-ai-content-writer');?></b>
9489
+
9490
+
</td><td>
9491
+
<select id="store_data" name="aiomatic_Chatbot_Settings[store_data]" >
9492
+
<?php
9493
+
echo '<option' . ($store_data == 'off' ? ' selected': '') . ' value="off">Off</option>';
9494
+
echo '<option' . ($store_data == 'on' ? ' selected': '') . ' value="on">On</option>';
9495
+
?>
9496
+
</select>
9497
+
</td></tr>
9498
+
</table>
9499
+
</div>
9500
+
<div id="tab-5" class="tab-content">
9501
+
<table class="widefat">
9502
+
<tr><td colspan="2">
9503
+
<h2><?php echo esc_html__("Global Chatbots Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9504
+
</td></tr>
9505
+
<tr><td>
9506
+
<div>
9507
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9508
+
<div class="bws_hidden_help_text cr_min_260px">
9509
+
<?php
9510
+
echo esc_html__("Select if you want to inject the chatbot globally, to the entire front end and/or back end of your site.", 'aiomatic-automatic-ai-content-writer');
9511
+
?>
9512
+
</div>
9513
+
</div>
9514
+
<b><?php echo esc_html__("Inject Chatbot Globally To Your Site:", 'aiomatic-automatic-ai-content-writer');?></b>
9515
+
</div>
9516
+
</td><td>
9517
+
<div>
9518
+
<select id="enable_front_end" onchange="aiomatic_global_changed();" name="aiomatic_Chatbot_Settings[enable_front_end]" >
9519
+
<?php
9520
+
echo '<option' . ($enable_front_end == 'off' ? ' selected': '') . ' value="off">Off</option>';
9521
+
echo '<option' . ($enable_front_end == 'front' ? ' selected': '') . ' value="front">Front End</option>';
9522
+
echo '<option' . ($enable_front_end == 'back' ? ' selected': '') . ' value="back">Back End</option>';
9523
+
echo '<option' . ($enable_front_end == 'both' ? ' selected': '') . ' value="both">Front End & Back End</option>';
9524
+
?>
9525
+
</select>
9526
+
</div>
9527
+
</td></tr>
9528
+
<tr class="hideInject"><td>
9529
+
<div>
9530
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9531
+
<div class="bws_hidden_help_text cr_min_260px">
9532
+
<?php
9533
+
echo esc_html__("Select where you want to show the embedded chatbot.", 'aiomatic-automatic-ai-content-writer');
9534
+
?>
9535
+
</div>
9536
+
</div>
9537
+
<b><?php echo esc_html__("Chatbot Location:", 'aiomatic-automatic-ai-content-writer');?></b>
9538
+
</div>
9539
+
</td><td>
9540
+
<div>
9541
+
<select id="window_location" name="aiomatic_Chatbot_Settings[window_location]" >
9542
+
<?php
9543
+
echo '<option' . ($window_location == 'bottom-right' ? ' selected': '') . ' value="bottom-right">Bottom Right</option>';
9544
+
echo '<option' . ($window_location == 'bottom-left' ? ' selected': '') . ' value="bottom-left">Bottom Left</option>';
9545
+
echo '<option' . ($window_location == 'top-right' ? ' selected': '') . ' value="top-right">Top Right</option>';
9546
+
echo '<option' . ($window_location == 'top-left' ? ' selected': '') . ' value="top-left">Top Left</option>';
9547
+
?>
9548
+
</select>
9549
+
</div>
9550
+
</td></tr>
9551
+
<tr class="hideInject"><td>
9552
+
<div>
9553
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9554
+
<div class="bws_hidden_help_text cr_min_260px">
9555
+
<?php
9556
+
echo esc_html__("Set the width of the chatbot form embedded. Default is 460px", 'aiomatic-automatic-ai-content-writer');
9557
+
?>
9558
+
</div>
9559
+
</div>
9560
+
<b><?php echo esc_html__("Chatbot Width:", 'aiomatic-automatic-ai-content-writer');?></b>
9561
+
</div>
9562
+
</td><td>
9563
+
<div>
9564
+
<input type="text" id="window_width" name="aiomatic_Chatbot_Settings[window_width]" class="cr_width_full" value="<?php echo esc_html($window_width);?>" placeholder="400px">
9565
+
</div>
9566
+
</td></tr>
9567
+
<tr class="hideInject"><td colspan="2">
9568
+
<h2><?php echo esc_html__("Chatbot Auto Opening Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9569
+
</td></tr>
9570
+
<tr class="hideInject"><td>
9571
+
<div>
9572
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9573
+
<div class="bws_hidden_help_text cr_min_260px">
9574
+
<?php
9575
+
echo esc_html__("Select if you want to automatically open the globally injected chatbot at page load. To disabled this feature, leave it blank.", 'aiomatic-automatic-ai-content-writer');
9576
+
?>
9577
+
</div>
9578
+
</div>
9579
+
<b class="font-700"><?php echo esc_html__("Auto Open Chatbot On Page Load:", 'aiomatic-automatic-ai-content-writer');?></b>
9580
+
</div>
9581
+
</td><td>
9582
+
<div>
9583
+
<input type="checkbox" id="page_load_chat" name="aiomatic_Chatbot_Settings[page_load_chat]"<?php
9584
+
if ($page_load_chat == 'on')
9585
+
echo ' checked ';
9586
+
?> onchange="pageLoadChanged();">
9587
+
</div>
9588
+
</td></tr>
9589
+
<tr class="hideInject hideLoad"><td>
9590
+
<div>
9591
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9592
+
<div class="bws_hidden_help_text cr_min_260px">
9593
+
<?php
9594
+
echo esc_html__("Set a delay in milliseconds for the chatbot auto opening.", 'aiomatic-automatic-ai-content-writer');
9595
+
?>
9596
+
</div>
9597
+
</div>
9598
+
<b><?php echo esc_html__("Chatbot Auto Open Delay (ms):", 'aiomatic-automatic-ai-content-writer');?></b>
9599
+
</div>
9600
+
</td><td>
9601
+
<div>
9602
+
<input type="number" min="0" step="1" id="page_load_chat_delay" name="aiomatic_Chatbot_Settings[page_load_chat_delay]" class="cr_width_full" value="<?php echo esc_html($page_load_chat_delay);?>" placeholder="1000 ms">
9603
+
</div>
9604
+
</td></tr>
9605
+
<tr class="hideInject hideLoad"><td>
9606
+
<div>
9607
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9608
+
<div class="bws_hidden_help_text cr_min_260px">
9609
+
<?php
9610
+
echo esc_html__("Select if you want to auto open chat only once per visitor.", 'aiomatic-automatic-ai-content-writer');
9611
+
?>
9612
+
</div>
9613
+
</div>
9614
+
<b><?php echo esc_html__("Auto Open Once Per Visitor:", 'aiomatic-automatic-ai-content-writer');?></b>
9615
+
</div>
9616
+
</td><td>
9617
+
<div>
9618
+
<input type="checkbox" id="page_load_chat_once" name="aiomatic_Chatbot_Settings[page_load_chat_once]"<?php
9619
+
if ($page_load_chat_once == 'on')
9620
+
echo ' checked ';
9621
+
?> onchange="pageLoadChanged();">
9622
+
</div>
9623
+
</td></tr>
9624
+
<tr class="hideInject hideLoad"><td>
9625
+
<div>
9626
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9627
+
<div class="bws_hidden_help_text cr_min_260px">
9628
+
<?php
9629
+
echo esc_html__("Select if you want to trigger this action only on these URLs.", 'aiomatic-automatic-ai-content-writer');
9630
+
?>
9631
+
</div>
9632
+
</div>
9633
+
<b><?php echo esc_html__("Trigger On These URLs Only:", 'aiomatic-automatic-ai-content-writer');?></b>
9634
+
</div>
9635
+
</td><td>
9636
+
<div>
9637
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_load_chat_urls]" placeholder="URL list, each on a new line"><?php
9638
+
echo esc_textarea($page_load_chat_urls);
9639
+
?></textarea>
9640
+
</div>
9641
+
</td></tr>
9642
+
<tr class="hideInject hideLoad"><td>
9643
+
<div>
9644
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9645
+
<div class="bws_hidden_help_text cr_min_260px">
9646
+
<?php
9647
+
echo esc_html__("Select if you want to set a custom bot message on trigger.", 'aiomatic-automatic-ai-content-writer');
9648
+
?>
9649
+
</div>
9650
+
</div>
9651
+
<b><?php echo esc_html__("Bot Message On Trigger:", 'aiomatic-automatic-ai-content-writer');?></b>
9652
+
</div>
9653
+
</td><td>
9654
+
<div>
9655
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_load_chat_message]" placeholder="Your custom bot message"><?php
9656
+
echo esc_textarea($page_load_chat_message);
9657
+
?></textarea>
9658
+
</div>
9659
+
</td></tr>
9660
+
<tr class="hideInject"><td>
9661
+
<div>
9662
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9663
+
<div class="bws_hidden_help_text cr_min_260px">
9664
+
<?php
9665
+
echo esc_html__("Select if you want to automatically open the globally injected chatbot at page exit intent (when the mouse moves outside the window).", 'aiomatic-automatic-ai-content-writer');
9666
+
?>
9667
+
</div>
9668
+
</div>
9669
+
<b class="font-700"><?php echo esc_html__("Auto Open Chatbot On Page Exit Intent:", 'aiomatic-automatic-ai-content-writer');?></b>
9670
+
</div>
9671
+
</td><td>
9672
+
<div>
9673
+
<input type="checkbox" id="page_exit_chat" name="aiomatic_Chatbot_Settings[page_exit_chat]"<?php
9674
+
if ($page_exit_chat == 'on')
9675
+
echo ' checked ';
9676
+
?> onchange="pageExitChanged();">
9677
+
</div>
9678
+
</td></tr>
9679
+
<tr class="hideInject hideExit"><td>
9680
+
<div>
9681
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9682
+
<div class="bws_hidden_help_text cr_min_260px">
9683
+
<?php
9684
+
echo esc_html__("Select if you want to auto open chat only once per visitor.", 'aiomatic-automatic-ai-content-writer');
9685
+
?>
9686
+
</div>
9687
+
</div>
9688
+
<b><?php echo esc_html__("Auto Open Once Per Visitor:", 'aiomatic-automatic-ai-content-writer');?></b>
9689
+
</div>
9690
+
</td><td>
9691
+
<div>
9692
+
<input type="checkbox" id="page_exit_chat_once" name="aiomatic_Chatbot_Settings[page_exit_chat_once]"<?php
9693
+
if ($page_exit_chat_once == 'on')
9694
+
echo ' checked ';
9695
+
?> onchange="pageLoadChanged();">
9696
+
</div>
9697
+
</td></tr>
9698
+
<tr class="hideInject hideExit"><td>
9699
+
<div>
9700
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9701
+
<div class="bws_hidden_help_text cr_min_260px">
9702
+
<?php
9703
+
echo esc_html__("Select if you want to trigger this action only on these URLs.", 'aiomatic-automatic-ai-content-writer');
9704
+
?>
9705
+
</div>
9706
+
</div>
9707
+
<b><?php echo esc_html__("Trigger On These URLs Only:", 'aiomatic-automatic-ai-content-writer');?></b>
9708
+
</div>
9709
+
</td><td>
9710
+
<div>
9711
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_exit_chat_urls]" placeholder="URL list, each on a new line"><?php
9712
+
echo esc_textarea($page_exit_chat_urls);
9713
+
?></textarea>
9714
+
</div>
9715
+
</td></tr>
9716
+
<tr class="hideInject hideExit"><td>
9717
+
<div>
9718
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9719
+
<div class="bws_hidden_help_text cr_min_260px">
9720
+
<?php
9721
+
echo esc_html__("Select if you want to set a custom bot message on trigger.", 'aiomatic-automatic-ai-content-writer');
9722
+
?>
9723
+
</div>
9724
+
</div>
9725
+
<b><?php echo esc_html__("Bot Message On Trigger:", 'aiomatic-automatic-ai-content-writer');?></b>
9726
+
</div>
9727
+
</td><td>
9728
+
<div>
9729
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_exit_chat_message]" placeholder="Your custom bot message"><?php
9730
+
echo esc_textarea($page_exit_chat_message);
9731
+
?></textarea>
9732
+
</div>
9733
+
</td></tr>
9734
+
<tr class="hideInject"><td>
9735
+
<div>
9736
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9737
+
<div class="bws_hidden_help_text cr_min_260px">
9738
+
<?php
9739
+
echo esc_html__("Select if you want to automatically open the globally injected chatbot at page scroll.", 'aiomatic-automatic-ai-content-writer');
9740
+
?>
9741
+
</div>
9742
+
</div>
9743
+
<b class="font-700"><?php echo esc_html__("Auto Open Chatbot On Page Scroll:", 'aiomatic-automatic-ai-content-writer');?></b>
9744
+
</div>
9745
+
</td><td>
9746
+
<div>
9747
+
<input type="checkbox" id="page_scroll_chat" name="aiomatic_Chatbot_Settings[page_scroll_chat]"<?php
9748
+
if ($page_scroll_chat == 'on')
9749
+
echo ' checked ';
9750
+
?> onchange="pageScrollChanged();">
9751
+
</div>
9752
+
</td></tr>
9753
+
<tr class="hideInject hideScroll"><td>
9754
+
<div>
9755
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9756
+
<div class="bws_hidden_help_text cr_min_260px">
9757
+
<?php
9758
+
echo esc_html__("Set the page scroll percentage at which you want to open the chatbot. Default is 50.", 'aiomatic-automatic-ai-content-writer');
9759
+
?>
9760
+
</div>
9761
+
</div>
9762
+
<b><?php echo esc_html__("Page Scroll Percentage:", 'aiomatic-automatic-ai-content-writer');?></b>
9763
+
</div>
9764
+
</td><td>
9765
+
<div>
9766
+
<input type="number" min="0" step="1" max="100" id="page_scroll_chat_percent" name="aiomatic_Chatbot_Settings[page_scroll_chat_percent]" class="cr_width_full" value="<?php echo esc_html($page_scroll_chat_percent);?>" placeholder="<?php echo esc_html__("50", 'aiomatic-automatic-ai-content-writer');?>">
9767
+
</div>
9768
+
</td></tr>
9769
+
<tr class="hideInject hideScroll"><td>
9770
+
<div>
9771
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9772
+
<div class="bws_hidden_help_text cr_min_260px">
9773
+
<?php
9774
+
echo esc_html__("Select if you want to auto open chat only once per visitor.", 'aiomatic-automatic-ai-content-writer');
9775
+
?>
9776
+
</div>
9777
+
</div>
9778
+
<b><?php echo esc_html__("Auto Open Once Per Visitor:", 'aiomatic-automatic-ai-content-writer');?></b>
9779
+
</div>
9780
+
</td><td>
9781
+
<div>
9782
+
<input type="checkbox" id="page_scroll_chat_once" name="aiomatic_Chatbot_Settings[page_scroll_chat_once]"<?php
9783
+
if ($page_scroll_chat_once == 'on')
9784
+
echo ' checked ';
9785
+
?> onchange="pageLoadChanged();">
9786
+
</div>
9787
+
</td></tr>
9788
+
<tr class="hideInject hideScroll"><td>
9789
+
<div>
9790
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9791
+
<div class="bws_hidden_help_text cr_min_260px">
9792
+
<?php
9793
+
echo esc_html__("Select if you want to trigger this action only on these URLs.", 'aiomatic-automatic-ai-content-writer');
9794
+
?>
9795
+
</div>
9796
+
</div>
9797
+
<b><?php echo esc_html__("Trigger On These URLs Only:", 'aiomatic-automatic-ai-content-writer');?></b>
9798
+
</div>
9799
+
</td><td>
9800
+
<div>
9801
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_scroll_chat_urls]" placeholder="URL list, each on a new line"><?php
9802
+
echo esc_textarea($page_scroll_chat_urls);
9803
+
?></textarea>
9804
+
</div>
9805
+
</td></tr>
9806
+
<tr class="hideInject hideScroll"><td>
9807
+
<div>
9808
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9809
+
<div class="bws_hidden_help_text cr_min_260px">
9810
+
<?php
9811
+
echo esc_html__("Select if you want to set a custom bot message on trigger.", 'aiomatic-automatic-ai-content-writer');
9812
+
?>
9813
+
</div>
9814
+
</div>
9815
+
<b><?php echo esc_html__("Bot Message On Trigger:", 'aiomatic-automatic-ai-content-writer');?></b>
9816
+
</div>
9817
+
</td><td>
9818
+
<div>
9819
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_scroll_chat_message]" placeholder="Your custom bot message"><?php
9820
+
echo esc_textarea($page_scroll_chat_message);
9821
+
?></textarea>
9822
+
</div>
9823
+
</td></tr>
9824
+
<tr class="hideInject"><td>
9825
+
<div>
9826
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9827
+
<div class="bws_hidden_help_text cr_min_260px">
9828
+
<?php
9829
+
echo esc_html__("Select if you want to automatically open the globally injected chatbot at page inactivity.", 'aiomatic-automatic-ai-content-writer');
9830
+
?>
9831
+
</div>
9832
+
</div>
9833
+
<b class="font-700"><?php echo esc_html__("Auto Open Chatbot On Page Inactivity:", 'aiomatic-automatic-ai-content-writer');?></b>
9834
+
</div>
9835
+
</td><td>
9836
+
<div>
9837
+
<input type="checkbox" id="page_inactive_chat" name="aiomatic_Chatbot_Settings[page_inactive_chat]"<?php
9838
+
if ($page_inactive_chat == 'on')
9839
+
echo ' checked ';
9840
+
?> onchange="pageInactiveChanged();">
9841
+
</div>
9842
+
</td></tr>
9843
+
<tr class="hideInject"><td>
9844
+
<div>
9845
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9846
+
<div class="bws_hidden_help_text cr_min_260px">
9847
+
<?php
9848
+
echo esc_html__("Select if you want to display a message inviting people to chat.", 'aiomatic-automatic-ai-content-writer');
9849
+
?>
9850
+
</div>
9851
+
</div>
9852
+
<b class="font-700"><?php echo esc_html__("Display A Message Inviting People To Chat:", 'aiomatic-automatic-ai-content-writer');?></b>
9853
+
</div>
9854
+
</td><td>
9855
+
<div>
9856
+
<input type="text" id="chatbot_invite_message" name="aiomatic_Chatbot_Settings[chatbot_invite_message]" class="cr_width_full" value="<?php echo esc_html($chatbot_invite_message);?>" placeholder="Chat with me!">
9857
+
</div>
9858
+
</td></tr>
9859
+
<tr class="hideInject hideInactive"><td>
9860
+
<div>
9861
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9862
+
<div class="bws_hidden_help_text cr_min_260px">
9863
+
<?php
9864
+
echo esc_html__("Set the page inactivity time after which you want to open the chatbot. Default is 30000.", 'aiomatic-automatic-ai-content-writer');
9865
+
?>
9866
+
</div>
9867
+
</div>
9868
+
<b><?php echo esc_html__("Page Inactivity Time (ms):", 'aiomatic-automatic-ai-content-writer');?></b>
9869
+
</div>
9870
+
</td><td>
9871
+
<div>
9872
+
<input type="number" min="0" step="1" id="page_inactive_chat_time" name="aiomatic_Chatbot_Settings[page_inactive_chat_time]" class="cr_width_full" value="<?php echo esc_html($page_inactive_chat_time);?>" placeholder="<?php echo esc_html__("Inactivity timeout (ms)", 'aiomatic-automatic-ai-content-writer');?>">
9873
+
</div>
9874
+
</td></tr>
9875
+
<tr class="hideInject hideInactive"><td>
9876
+
<div>
9877
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9878
+
<div class="bws_hidden_help_text cr_min_260px">
9879
+
<?php
9880
+
echo esc_html__("Select if you want to auto open chat only once per visitor.", 'aiomatic-automatic-ai-content-writer');
9881
+
?>
9882
+
</div>
9883
+
</div>
9884
+
<b><?php echo esc_html__("Auto Open Once Per Visitor:", 'aiomatic-automatic-ai-content-writer');?></b>
9885
+
</div>
9886
+
</td><td>
9887
+
<div>
9888
+
<input type="checkbox" id="page_inactive_chat_once" name="aiomatic_Chatbot_Settings[page_inactive_chat_once]"<?php
9889
+
if ($page_inactive_chat_once == 'on')
9890
+
echo ' checked ';
9891
+
?> onchange="pageLoadChanged();">
9892
+
</div>
9893
+
</td></tr>
9894
+
<tr class="hideInject hideInactive"><td>
9895
+
<div>
9896
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9897
+
<div class="bws_hidden_help_text cr_min_260px">
9898
+
<?php
9899
+
echo esc_html__("Select if you want to trigger this action only on these URLs.", 'aiomatic-automatic-ai-content-writer');
9900
+
?>
9901
+
</div>
9902
+
</div>
9903
+
<b><?php echo esc_html__("Trigger On These URLs Only:", 'aiomatic-automatic-ai-content-writer');?></b>
9904
+
</div>
9905
+
</td><td>
9906
+
<div>
9907
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_inactive_chat_urls]" placeholder="URL list, each on a new line"><?php
9908
+
echo esc_textarea($page_inactive_chat_urls);
9909
+
?></textarea>
9910
+
</div>
9911
+
</td></tr>
9912
+
<tr class="hideInject hideInactive"><td>
9913
+
<div>
9914
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9915
+
<div class="bws_hidden_help_text cr_min_260px">
9916
+
<?php
9917
+
echo esc_html__("Select if you want to set a custom bot message on trigger.", 'aiomatic-automatic-ai-content-writer');
9918
+
?>
9919
+
</div>
9920
+
</div>
9921
+
<b><?php echo esc_html__("Bot Message On Trigger:", 'aiomatic-automatic-ai-content-writer');?></b>
9922
+
</div>
9923
+
</td><td>
9924
+
<div>
9925
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[page_inactive_chat_message]" placeholder="Your custom bot message"><?php
9926
+
echo esc_textarea($page_inactive_chat_message);
9927
+
?></textarea>
9928
+
</div>
9929
+
</td></tr>
9930
+
<tr class="hideInject"><td colspan="2">
9931
+
<h2><?php echo esc_html__("Chatbot Icon Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
9932
+
</td></tr>
9933
+
<tr class="hideInject"><td>
9934
+
<div>
9935
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9936
+
<div class="bws_hidden_help_text cr_min_260px">
9937
+
<?php
9938
+
echo esc_html__("Set a icon which will open the chatbot.", 'aiomatic-automatic-ai-content-writer');
9939
+
?>
9940
+
</div>
9941
+
</div>
9942
+
<b><?php echo esc_html__("Chatbot Open Icon:", 'aiomatic-automatic-ai-content-writer');?></b>
9943
+
</div>
9944
+
</td><td>
9945
+
<div>
9946
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="0"<?php
9947
+
if ($chatbot_icon == '0')
9948
+
echo ' checked ';
9949
+
?>><img src="<?php echo esc_url(plugins_url('icons/0.png', __FILE__));?>" width="32" height="32"><br>
9950
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="1"<?php
9951
+
if ($chatbot_icon == '1')
9952
+
echo ' checked ';
9953
+
?>><img src="<?php echo esc_url(plugins_url('icons/1.png', __FILE__));?>" width="32" height="32"><br>
9954
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="2"<?php
9955
+
if ($chatbot_icon == '2')
9956
+
echo ' checked ';
9957
+
?>><img src="<?php echo esc_url(plugins_url('icons/2.png', __FILE__));?>" width="32" height="32"><br>
9958
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="3"<?php
9959
+
if ($chatbot_icon == '3')
9960
+
echo ' checked ';
9961
+
?>><img src="<?php echo esc_url(plugins_url('icons/3.png', __FILE__));?>" width="32" height="32"><br>
9962
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="4"<?php
9963
+
if ($chatbot_icon == '4')
9964
+
echo ' checked ';
9965
+
?>><img src="<?php echo esc_url(plugins_url('icons/4.png', __FILE__));?>" width="32" height="32"><br>
9966
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="5"<?php
9967
+
if ($chatbot_icon == '5')
9968
+
echo ' checked ';
9969
+
?>><img src="<?php echo esc_url(plugins_url('icons/5.png', __FILE__));?>" width="32" height="32"><br>
9970
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="6"<?php
9971
+
if ($chatbot_icon == '6')
9972
+
echo ' checked ';
9973
+
?>><img src="<?php echo esc_url(plugins_url('icons/6.png', __FILE__));?>" width="32" height="32"><br>
9974
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="7"<?php
9975
+
if ($chatbot_icon == '7')
9976
+
echo ' checked ';
9977
+
?>><img src="<?php echo esc_url(plugins_url('icons/7.png', __FILE__));?>" width="32" height="32"><br>
9978
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="8"<?php
9979
+
if ($chatbot_icon == '8')
9980
+
echo ' checked ';
9981
+
?>><img src="<?php echo esc_url(plugins_url('icons/8.png', __FILE__));?>" width="32" height="32"><br>
9982
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="9"<?php
9983
+
if ($chatbot_icon == '9')
9984
+
echo ' checked ';
9985
+
?>><img src="<?php echo esc_url(plugins_url('icons/9.png', __FILE__));?>" width="32" height="32"><br>
9986
+
<input type="radio" name="aiomatic_Chatbot_Settings[chatbot_icon]" value="x"<?php
9987
+
if ($chatbot_icon == 'x')
9988
+
echo ' checked ';
9989
+
?>><?php echo esc_html__("Your Own HTML Or Image URL:", 'aiomatic-automatic-ai-content-writer');?><input type="text" value="<?php echo esc_html($chatbot_icon_html);?>" placeholder="Your HTML content" name="aiomatic_Chatbot_Settings[chatbot_icon_html]" />
9990
+
</div>
9991
+
</td></tr>
9992
+
<tr class="hideInject"><td>
9993
+
<div>
9994
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
9995
+
<div class="bws_hidden_help_text cr_min_260px">
9996
+
<?php
9997
+
echo esc_html__("Set the width of the chatbot open icon. Default is the real size of the uploaded image.", 'aiomatic-automatic-ai-content-writer');
9998
+
?>
9999
+
</div>
10000
+
</div>
10001
+
<b><?php echo esc_html__("Chatbot Open Icon Width:", 'aiomatic-automatic-ai-content-writer');?></b>
10002
+
</div>
10003
+
</td><td>
10004
+
<div>
10005
+
<input type="text" id="open_width" name="aiomatic_Chatbot_Settings[open_width]" class="cr_width_full" value="<?php echo esc_html($open_width);?>" placeholder="Open icon width">
10006
+
</div>
10007
+
</td></tr>
10008
+
<tr class="hideInject"><td colspan="2">
10009
+
<h2><?php echo esc_html__("Default Global Chatbot Settings:", 'aiomatic-automatic-ai-content-writer');?></h2>
10010
+
</td></tr>
10011
+
<tr class="hideInject"><td>
10012
+
<div>
10013
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10014
+
<div class="bws_hidden_help_text cr_min_260px">
10015
+
<?php
10016
+
echo esc_html__("Set a custom chatbot shortcode to be used when displaying the globally injected shortcode. To inject the default chatbot, leave this field blank.", 'aiomatic-automatic-ai-content-writer');
10017
+
?>
10018
+
</div>
10019
+
</div>
10020
+
<b><?php echo esc_html__("Custom Chatbot Shortcode To Be Injected Globally:", 'aiomatic-automatic-ai-content-writer');?></b>
10021
+
</div>
10022
+
</td><td>
10023
+
<div>
10024
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[custom_global_shortcode]" placeholder="<?php echo esc_html__("Add a custom chatbot shortcode to be injected globally to your site (optional)", 'aiomatic-automatic-ai-content-writer');?>"><?php
10025
+
echo esc_textarea($custom_global_shortcode);
10026
+
?></textarea>
10027
+
</div>
10028
+
</td></tr>
10029
+
<tr class="hideInject"><td colspan="2">
10030
+
<h2><?php echo esc_html__("Default Global Chatbot Restrictions:", 'aiomatic-automatic-ai-content-writer');?></h2>
10031
+
</td></tr>
10032
+
<tr class="hideInject"><td>
10033
+
<div>
10034
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10035
+
<div class="bws_hidden_help_text cr_min_260px">
10036
+
<?php
10037
+
echo esc_html__("Set a list of URL where to not show the chatbot. You can enter multiple URLs, each on a new line.", 'aiomatic-automatic-ai-content-writer');
10038
+
?>
10039
+
</div>
10040
+
</div>
10041
+
<b><?php echo esc_html__("Do Not Show The Chatbot On These URLs:", 'aiomatic-automatic-ai-content-writer');?></b>
10042
+
</div>
10043
+
</td><td>
10044
+
<div>
10045
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[not_show_urls]" placeholder="URL list, each on a new line"><?php
10046
+
echo esc_textarea($not_show_urls);
10047
+
?></textarea>
10048
+
</div>
10049
+
</td></tr>
10050
+
<tr class="hideInject"><td>
10051
+
<div>
10052
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10053
+
<div class="bws_hidden_help_text cr_min_260px">
10054
+
<?php
10055
+
echo esc_html__("Set a list of URL only where to show the chatbot. You can enter multiple URLs, each on a new line. If you enter a list of URLs, the chatbot will be shown only on these URls and not on any other URLs from your site.", 'aiomatic-automatic-ai-content-writer');
10056
+
?>
10057
+
</div>
10058
+
</div>
10059
+
<b><?php echo esc_html__("Show The Chatbot Only On These URLs:", 'aiomatic-automatic-ai-content-writer');?></b>
10060
+
</div>
10061
+
</td><td>
10062
+
<div>
10063
+
<textarea rows="2" name="aiomatic_Chatbot_Settings[only_show_urls]" placeholder="URL list, each on a new line"><?php
10064
+
echo esc_textarea($only_show_urls);
10065
+
?></textarea>
10066
+
</div>
10067
+
</td></tr>
10068
+
<tr class="hideInject"><td>
10069
+
<div>
10070
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10071
+
<div class="bws_hidden_help_text cr_min_260px">
10072
+
<?php
10073
+
echo esc_html__("Set the hour period of each day, when you want to show the chatbot embedded on your site. Your current server time is: ", 'aiomatic-automatic-ai-content-writer') . esc_html(date("h:i A"));
10074
+
?>
10075
+
</div>
10076
+
</div>
10077
+
<b><?php echo esc_html__("Show The Chatbot Between Specific Hours Each Day:", 'aiomatic-automatic-ai-content-writer');?></b>
10078
+
</div>
10079
+
</td><td>
10080
+
<div>
10081
+
<input type="time" id="min_time" name="aiomatic_Chatbot_Settings[min_time]" value="<?php
10082
+
echo esc_attr($min_time);
10083
+
?>" placeholder="Show the Chatbot Only After This Hour"> - <input type="time" id="max_time" name="aiomatic_Chatbot_Settings[max_time]" value="<?php
10084
+
echo esc_attr($max_time);
10085
+
?>" placeholder="Show the Chatbot Only Before This Hour">
10086
+
</div>
10087
+
</td></tr>
10088
+
<tr class="hideInject"><td>
10089
+
<div>
10090
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10091
+
<div class="bws_hidden_help_text cr_min_260px">
10092
+
<?php
10093
+
echo esc_html__("Set the days of the week, when you want to always show the chatbot (regardless of the above hour limitations).", 'aiomatic-automatic-ai-content-writer');
10094
+
?>
10095
+
</div>
10096
+
</div>
10097
+
<b><?php echo esc_html__("Days When To Always Show The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
10098
+
</div>
10099
+
</td><td>
10100
+
<div>
10101
+
<select id="always_show" multiple name="aiomatic_Chatbot_Settings[always_show][]" class="cr_width_full resize_vertical">
10102
+
<?php
10103
+
echo '<option' . (in_array('Monday', $always_show) ? ' selected': '') . ' value="Monday">Monday</option>';
10104
+
echo '<option' . (in_array('Tuesday', $always_show) ? ' selected': '') . ' value="Tuesday">Tuesday</option>';
10105
+
echo '<option' . (in_array('Wednesday', $always_show) ? ' selected': '') . ' value="Wednesday">Wednesday</option>';
10106
+
echo '<option' . (in_array('Thursday', $always_show) ? ' selected': '') . ' value="Thursday">Thursday</option>';
10107
+
echo '<option' . (in_array('Friday', $always_show) ? ' selected': '') . ' value="Friday">Friday</option>';
10108
+
echo '<option' . (in_array('Saturday', $always_show) ? ' selected': '') . ' value="Saturday">Saturday</option>';
10109
+
echo '<option' . (in_array('Sunday', $always_show) ? ' selected': '') . ' value="Sunday">Sunday</option>';
10110
+
?>
10111
+
</select>
10112
+
</div>
10113
+
</td></tr>
10114
+
<tr class="hideInject"><td>
10115
+
<div>
10116
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10117
+
<div class="bws_hidden_help_text cr_min_260px">
10118
+
<?php
10119
+
echo esc_html__("Set the days of the week, when you want to never show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10120
+
?>
10121
+
</div>
10122
+
</div>
10123
+
<b><?php echo esc_html__("Days When To Never Show The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
10124
+
</div>
10125
+
</td><td>
10126
+
<div>
10127
+
<select id="never_show" multiple name="aiomatic_Chatbot_Settings[never_show][]" class="cr_width_full resize_vertical">
10128
+
<?php
10129
+
echo '<option' . (in_array('Monday', $never_show) ? ' selected': '') . ' value="Monday">Monday</option>';
10130
+
echo '<option' . (in_array('Tuesday', $never_show) ? ' selected': '') . ' value="Tuesday">Tuesday</option>';
10131
+
echo '<option' . (in_array('Wednesday', $never_show) ? ' selected': '') . ' value="Wednesday">Wednesday</option>';
10132
+
echo '<option' . (in_array('Thursday', $never_show) ? ' selected': '') . ' value="Thursday">Thursday</option>';
10133
+
echo '<option' . (in_array('Friday', $never_show) ? ' selected': '') . ' value="Friday">Friday</option>';
10134
+
echo '<option' . (in_array('Saturday', $never_show) ? ' selected': '') . ' value="Saturday">Saturday</option>';
10135
+
echo '<option' . (in_array('Sunday', $never_show) ? ' selected': '') . ' value="Sunday">Sunday</option>';
10136
+
?>
10137
+
</select>
10138
+
</div>
10139
+
</td></tr>
10140
+
<tr class="hideInject"><td>
10141
+
<div>
10142
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10143
+
<div class="bws_hidden_help_text cr_min_260px">
10144
+
<?php
10145
+
echo esc_html__("Select the WordPress content where to not show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10146
+
?>
10147
+
</div>
10148
+
</div>
10149
+
<b><?php echo esc_html__("Do Not Show The Chatbot On This WordPress Content:", 'aiomatic-automatic-ai-content-writer');?></b>
10150
+
</div>
10151
+
</td><td>
10152
+
<div>
10153
+
<select id="no_show_content_wp" multiple name="aiomatic_Chatbot_Settings[no_show_content_wp][]" class="resize_vertical cr_width_full">
10154
+
<?php
10155
+
$selected = is_array( $no_show_content_wp ) ? $no_show_content_wp : [ '*' ];
10156
+
echo aiomatic_get_wordpress_content($selected);
10157
+
?>
10158
+
</select>
10159
+
</div>
10160
+
</td></tr>
10161
+
<tr class="hideInject"><td>
10162
+
<div>
10163
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10164
+
<div class="bws_hidden_help_text cr_min_260px">
10165
+
<?php
10166
+
echo esc_html__("Select the WordPress content only where to show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10167
+
?>
10168
+
</div>
10169
+
</div>
10170
+
<b><?php echo esc_html__("Show The Chatbot Only On This WordPress Content:", 'aiomatic-automatic-ai-content-writer');?></b>
10171
+
</div>
10172
+
</td><td>
10173
+
<div>
10174
+
<select id="show_content_wp" multiple name="aiomatic_Chatbot_Settings[show_content_wp][]" class="resize_vertical cr_width_full">
10175
+
<?php
10176
+
$selected = is_array( $show_content_wp ) ? $show_content_wp : [ '*' ];
10177
+
echo aiomatic_get_wordpress_content($selected);
10178
+
?>
10179
+
</select>
10180
+
</div>
10181
+
</td></tr>
10182
+
<tr class="hideInject"><td>
10183
+
<div>
10184
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10185
+
<div class="bws_hidden_help_text cr_min_260px">
10186
+
<?php
10187
+
echo esc_html__("Select the languages for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10188
+
?>
10189
+
</div>
10190
+
</div>
10191
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Languages:", 'aiomatic-automatic-ai-content-writer');?></b>
10192
+
</div>
10193
+
</td><td>
10194
+
<div>
10195
+
<select id="no_show_locales" multiple name="aiomatic_Chatbot_Settings[no_show_locales][]" class="resize_vertical cr_width_full">
10196
+
<?php
10197
+
$selected = is_array( $no_show_locales ) ? $no_show_locales : [ '' ];
10198
+
echo aiomatic_get_locales_content($selected);
10199
+
?>
10200
+
</select>
10201
+
</div>
10202
+
</td></tr>
10203
+
<tr class="hideInject"><td>
10204
+
<div>
10205
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10206
+
<div class="bws_hidden_help_text cr_min_260px">
10207
+
<?php
10208
+
echo esc_html__("Select the languages for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10209
+
?>
10210
+
</div>
10211
+
</div>
10212
+
<b><?php echo esc_html__("Show The Chatbot Only For These Languages:", 'aiomatic-automatic-ai-content-writer');?></b>
10213
+
</div>
10214
+
</td><td>
10215
+
<div>
10216
+
<select id="show_locales" multiple name="aiomatic_Chatbot_Settings[show_locales][]" class="resize_vertical cr_width_full">
10217
+
<?php
10218
+
$selected = is_array( $show_locales ) ? $show_locales : [ '' ];
10219
+
echo aiomatic_get_locales_content($selected);
10220
+
?>
10221
+
</select>
10222
+
</div>
10223
+
</td></tr>
10224
+
<tr class="hideInject"><td>
10225
+
<div>
10226
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10227
+
<div class="bws_hidden_help_text cr_min_260px">
10228
+
<?php
10229
+
echo esc_html__("Select the user roles for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10230
+
?>
10231
+
</div>
10232
+
</div>
10233
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These User Roles:", 'aiomatic-automatic-ai-content-writer');?></b>
10234
+
</div>
10235
+
</td><td>
10236
+
<div>
10237
+
<select id="no_show_roles" multiple name="aiomatic_Chatbot_Settings[no_show_roles][]" class="resize_vertical cr_width_full">
10238
+
<?php
10239
+
$selected = is_array( $no_show_roles ) ? $no_show_roles : [ '' ];
10240
+
echo aiomatic_get_user_roles_content($selected);
10241
+
?>
10242
+
</select>
10243
+
</div>
10244
+
</td></tr>
10245
+
<tr class="hideInject"><td>
10246
+
<div>
10247
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10248
+
<div class="bws_hidden_help_text cr_min_260px">
10249
+
<?php
10250
+
echo esc_html__("Select the user roles for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10251
+
?>
10252
+
</div>
10253
+
</div>
10254
+
<b><?php echo esc_html__("Show The Chatbot Only For These User Roles:", 'aiomatic-automatic-ai-content-writer');?></b>
10255
+
</div>
10256
+
</td><td>
10257
+
<div>
10258
+
<select id="show_roles" multiple name="aiomatic_Chatbot_Settings[show_roles][]" class="resize_vertical cr_width_full">
10259
+
<?php
10260
+
$selected = is_array( $show_roles ) ? $show_roles : [ '' ];
10261
+
echo aiomatic_get_user_roles_content($selected);
10262
+
?>
10263
+
</select>
10264
+
</div>
10265
+
</td></tr>
10266
+
<tr class="hideInject"><td>
10267
+
<div>
10268
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10269
+
<div class="bws_hidden_help_text cr_min_260px">
10270
+
<?php
10271
+
echo esc_html__("Select the devices for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10272
+
?>
10273
+
</div>
10274
+
</div>
10275
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Devices:", 'aiomatic-automatic-ai-content-writer');?></b>
10276
+
</div>
10277
+
</td><td>
10278
+
<div>
10279
+
<select id="no_show_devices" multiple name="aiomatic_Chatbot_Settings[no_show_devices][]" class="resize_vertical cr_width_full">
10280
+
<?php
10281
+
$selected = is_array( $no_show_devices ) ? $no_show_devices : [ '' ];
10282
+
echo aiomatic_get_devices_content($selected);
10283
+
?>
10284
+
</select>
10285
+
</div>
10286
+
</td></tr>
10287
+
<tr class="hideInject"><td>
10288
+
<div>
10289
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10290
+
<div class="bws_hidden_help_text cr_min_260px">
10291
+
<?php
10292
+
echo esc_html__("Select the devices for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10293
+
?>
10294
+
</div>
10295
+
</div>
10296
+
<b><?php echo esc_html__("Show The Chatbot Only For These Devices:", 'aiomatic-automatic-ai-content-writer');?></b>
10297
+
</div>
10298
+
</td><td>
10299
+
<div>
10300
+
<select id="show_devices" multiple name="aiomatic_Chatbot_Settings[show_devices][]" class="resize_vertical cr_width_full">
10301
+
<?php
10302
+
$selected = is_array( $show_devices ) ? $show_devices : [ '' ];
10303
+
echo aiomatic_get_devices_content($selected);
10304
+
?>
10305
+
</select>
10306
+
</div>
10307
+
</td></tr>
10308
+
<tr class="hideInject"><td>
10309
+
<div>
10310
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10311
+
<div class="bws_hidden_help_text cr_min_260px">
10312
+
<?php
10313
+
echo esc_html__("Select the Operating Systems for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10314
+
?>
10315
+
</div>
10316
+
</div>
10317
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Operating Systems:", 'aiomatic-automatic-ai-content-writer');?></b>
10318
+
</div>
10319
+
</td><td>
10320
+
<div>
10321
+
<select id="no_show_oses" multiple name="aiomatic_Chatbot_Settings[no_show_oses][]" class="resize_vertical cr_width_full">
10322
+
<?php
10323
+
$selected = is_array( $no_show_oses ) ? $no_show_oses : [ '' ];
10324
+
echo aiomatic_get_oses_content($selected);
10325
+
?>
10326
+
</select>
10327
+
</div>
10328
+
</td></tr>
10329
+
<tr class="hideInject"><td>
10330
+
<div>
10331
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10332
+
<div class="bws_hidden_help_text cr_min_260px">
10333
+
<?php
10334
+
echo esc_html__("Select the Operating Systems for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10335
+
?>
10336
+
</div>
10337
+
</div>
10338
+
<b><?php echo esc_html__("Show The Chatbot Only For These Operating Systems:", 'aiomatic-automatic-ai-content-writer');?></b>
10339
+
</div>
10340
+
</td><td>
10341
+
<div>
10342
+
<select id="show_oses" multiple name="aiomatic_Chatbot_Settings[show_oses][]" class="resize_vertical cr_width_full">
10343
+
<?php
10344
+
$selected = is_array( $show_oses ) ? $show_oses : [ '' ];
10345
+
echo aiomatic_get_oses_content($selected);
10346
+
?>
10347
+
</select>
10348
+
</div>
10349
+
</td></tr>
10350
+
<tr class="hideInject"><td>
10351
+
<div>
10352
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10353
+
<div class="bws_hidden_help_text cr_min_260px">
10354
+
<?php
10355
+
echo esc_html__("Select the Browsers for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10356
+
?>
10357
+
</div>
10358
+
</div>
10359
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Browsers:", 'aiomatic-automatic-ai-content-writer');?></b>
10360
+
</div>
10361
+
</td><td>
10362
+
<div>
10363
+
<select id="no_show_browsers" multiple name="aiomatic_Chatbot_Settings[no_show_browsers][]" class="resize_vertical cr_width_full">
10364
+
<?php
10365
+
$selected = is_array( $no_show_browsers ) ? $no_show_browsers : [ '' ];
10366
+
echo aiomatic_get_browsers_content($selected);
10367
+
?>
10368
+
</select>
10369
+
</div>
10370
+
</td></tr>
10371
+
<tr class="hideInject"><td>
10372
+
<div>
10373
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10374
+
<div class="bws_hidden_help_text cr_min_260px">
10375
+
<?php
10376
+
echo esc_html__("Select the Browsers for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10377
+
?>
10378
+
</div>
10379
+
</div>
10380
+
<b><?php echo esc_html__("Show The Chatbot Only For These Browsers:", 'aiomatic-automatic-ai-content-writer');?></b>
10381
+
</div>
10382
+
</td><td>
10383
+
<div>
10384
+
<select id="show_browsers" multiple name="aiomatic_Chatbot_Settings[show_browsers][]" class="resize_vertical cr_width_full">
10385
+
<?php
10386
+
$selected = is_array( $show_browsers ) ? $show_browsers : [ '' ];
10387
+
echo aiomatic_get_browsers_content($selected);
10388
+
?>
10389
+
</select>
10390
+
</div>
10391
+
</td></tr>
10392
+
<tr class="hideInject"><td>
10393
+
<div>
10394
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10395
+
<div class="bws_hidden_help_text cr_min_260px">
10396
+
<?php
10397
+
echo esc_html__("Select the IP Addresses for which the chatbot will not be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer');
10398
+
?>
10399
+
</div>
10400
+
</div>
10401
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These IP Addresses:", 'aiomatic-automatic-ai-content-writer');?></b>
10402
+
</div>
10403
+
</td><td>
10404
+
<div><textarea rows="2" name="aiomatic_Chatbot_Settings[no_show_ips]" placeholder="<?php echo esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer');?>"><?php
10405
+
echo esc_textarea($no_show_ips);
10406
+
?></textarea>
10407
+
</div>
10408
+
</td></tr>
10409
+
<tr class="hideInject"><td>
10410
+
<div>
10411
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10412
+
<div class="bws_hidden_help_text cr_min_260px">
10413
+
<?php
10414
+
echo esc_html__("Select the IP Addresses for only which the chatbot will be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer');
10415
+
?>
10416
+
</div>
10417
+
</div>
10418
+
<b><?php echo esc_html__("Show The Chatbot Only For These IP Addresses:", 'aiomatic-automatic-ai-content-writer');?></b>
10419
+
</div>
10420
+
</td><td>
10421
+
<div><textarea rows="2" name="aiomatic_Chatbot_Settings[show_ips]" placeholder="<?php echo esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer');?>"><?php
10422
+
echo esc_textarea($show_ips);
10423
+
?></textarea>
10424
+
</div>
10425
+
</td></tr>
10426
+
<tr class="hideInject"><td colspan="2">
10427
+
<h2><?php echo esc_html__("Additional Global Chatbot Rules:", 'aiomatic-automatic-ai-content-writer');?></h2>
10428
+
</td></tr>
10429
+
<tr class="hideInject"><td colspan="2">
10430
+
<table class="widefat">
10431
+
<tr class="aiomatic-title-holder">
10432
+
<td>
10433
+
<input name="aiomatic_chat_nonce" type="hidden" value="<?php echo esc_html(wp_create_nonce('aiomatic_chat_nonce'));?>">
10434
+
<input type="hidden" id="aiomatic_chat_json" name="aiomatic_Chatbot_Settings[aiomatic_chat_json]" value="<?php echo esc_attr($aiomatic_chat_json);?>">
10435
+
<hr/>
10436
+
<div class="table-responsive">
10437
+
<div id="grid-keywords-chatbot-aiomatic">
10438
+
<div class="grid-keywords-heading-aiomatic aiomatic-middle">
10439
+
<?php echo esc_html__("ID", 'aiomatic-automatic-ai-content-writer');?>
10440
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10441
+
<div class="bws_hidden_help_text cr_min_260px">
10442
+
<?php
10443
+
echo esc_html__("This is the ID of the rule.", 'aiomatic-automatic-ai-content-writer');
10444
+
?>
10445
+
</div>
10446
+
</div>
10447
+
</div>
10448
+
<div class="grid-keywords-heading-aiomatic aiomatic-middle">
10449
+
<?php echo '[aimogen-chat-form] ' . esc_html__("Shortcode", 'aiomatic-automatic-ai-content-writer');?>
10450
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10451
+
<div class="bws_hidden_help_text cr_min_260px">
10452
+
<?php
10453
+
echo esc_html__("Set the chatbot shortcode which will be used for the global website injection.", 'aiomatic-automatic-ai-content-writer');
10454
+
?>
10455
+
</div>
10456
+
</div>
10457
+
</div>
10458
+
<div class="grid-keywords-heading-aiomatic aiomatic-middle">
10459
+
<?php echo esc_html__("Settings", 'aiomatic-automatic-ai-content-writer');?>
10460
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10461
+
<div class="bws_hidden_help_text cr_min_260px">
10462
+
<?php
10463
+
echo esc_html__("Set more configurations and restrictions for this chatbot.", 'aiomatic-automatic-ai-content-writer');
10464
+
?>
10465
+
</div>
10466
+
</div>
10467
+
</div>
10468
+
<div class="grid-keywords-heading-aiomatic aiomatic-middle">
10469
+
<?php echo esc_html__("Del", 'aiomatic-automatic-ai-content-writer');?>
10470
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10471
+
<div class="bws_hidden_help_text cr_min_260px">
10472
+
<?php
10473
+
echo esc_html__("Do you want to delete this rule?", 'aiomatic-automatic-ai-content-writer');
10474
+
?>
10475
+
</div>
10476
+
</div>
10477
+
</div>
10478
+
<?php
10479
+
echo aiomatic_expand_chatbot_rules($aiomatic_chat_json);
10480
+
$chuniqid = uniqid();
10481
+
?>
10482
+
<div>
10483
+
<hr/>
10484
+
</div>
10485
+
<div>
10486
+
<hr/>
10487
+
</div>
10488
+
<div>
10489
+
<hr/>
10490
+
</div>
10491
+
<div>
10492
+
<hr/>
10493
+
</div>
10494
+
<div class="cr_center"><input type="text" id="<?php echo esc_html($chuniqid);?>rule_description" onchange="anyNewChatChanged();" placeholder="Rule ID" value="" class="cr_width_full"/></div>
10495
+
<div class="cr_center"><textarea rows="1" data-id="<?php echo esc_html($chuniqid);?>" id="<?php echo esc_html($chuniqid);?>shortcode" onchange="anyNewChatChanged();" class="chatbotShortcodeImportant cr_width_full" placeholder="<?php echo esc_html__("Please insert the chatbot shortcode to be injected globally", 'aiomatic-automatic-ai-content-writer');?>"></textarea></div>
10496
+
<div class="cr_center">
10497
+
<input type="button" id="mybtnchatfzr" value="Settings" onclick="document.getElementById('mymodalchatfzr').style.display = 'block';">
10498
+
<div id="mymodalchatfzr" class="codemodalfzr">
10499
+
<div class="codemodalfzr-content">
10500
+
<div class="codemodalfzr-header">
10501
+
<span id="aiomatic_chat_close" class="codeclosefzr" onclick="document.getElementById('mymodalchatfzr').style.display = 'none';">×</span>
10502
+
<h2><span class="cr_color_white"><?php echo esc_html__("New Rule", 'aiomatic-automatic-ai-content-writer');?></span> <?php echo esc_html__("Advanced Settings", 'aiomatic-automatic-ai-content-writer');?></h2>
10503
+
</div>
10504
+
<div class="codemodalfzr-body">
10505
+
<div class="table-responsive">
10506
+
<table class="responsive table cr_main_table_nowr">
10507
+
<tr class="hideInject"><td>
10508
+
<div>
10509
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10510
+
<div class="bws_hidden_help_text cr_min_260px">
10511
+
<?php
10512
+
echo esc_html__("Set a list of URL where to not show the chatbot. You can enter multiple URLs, each on a new line.", 'aiomatic-automatic-ai-content-writer');
10513
+
?>
10514
+
</div>
10515
+
</div>
10516
+
<b><?php echo esc_html__("Do Not Show The Chatbot On These URLs:", 'aiomatic-automatic-ai-content-writer');?></b>
10517
+
</div>
10518
+
</td><td>
10519
+
<div>
10520
+
<textarea rows="2" id="<?php echo esc_html($chuniqid);?>not_show_urls" onchange="anyNewChatChanged();" placeholder="URL list, each on a new line"></textarea>
10521
+
</div>
10522
+
</td></tr>
10523
+
<tr class="hideInject"><td>
10524
+
<div>
10525
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10526
+
<div class="bws_hidden_help_text cr_min_260px">
10527
+
<?php
10528
+
echo esc_html__("Set a list of URL only where to show the chatbot. You can enter multiple URLs, each on a new line. If you enter a list of URLs, the chatbot will be shown only on these URls and not on any other URLs from your site.", 'aiomatic-automatic-ai-content-writer');
10529
+
?>
10530
+
</div>
10531
+
</div>
10532
+
<b><?php echo esc_html__("Show The Chatbot Only On These URLs:", 'aiomatic-automatic-ai-content-writer');?></b>
10533
+
</div>
10534
+
</td><td>
10535
+
<div>
10536
+
<textarea rows="2" id="<?php echo esc_html($chuniqid);?>only_show_urls" onchange="anyNewChatChanged();" placeholder="URL list, each on a new line"></textarea>
10537
+
</div>
10538
+
</td></tr>
10539
+
<tr class="hideInject"><td>
10540
+
<div>
10541
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10542
+
<div class="bws_hidden_help_text cr_min_260px">
10543
+
<?php
10544
+
echo esc_html__("Set the hour period of each day, when you want to show the chatbot embedded on your site. Your current server time is: ", 'aiomatic-automatic-ai-content-writer') . esc_html(date("h:i A"));
10545
+
?>
10546
+
</div>
10547
+
</div>
10548
+
<b><?php echo esc_html__("Show The Chatbot Between Specific Hours Each Day:", 'aiomatic-automatic-ai-content-writer');?></b>
10549
+
</div>
10550
+
</td><td>
10551
+
<div>
10552
+
<input type="time" id="<?php echo esc_html($chuniqid);?>min_time" onchange="anyNewChatChanged();" value="" placeholder="Show the Chatbot Only After This Hour"> -
10553
+
<input type="time" id="<?php echo esc_html($chuniqid);?>max_time" onchange="anyNewChatChanged();" value="" placeholder="Show the Chatbot Only Before This Hour">
10554
+
</div>
10555
+
</td></tr>
10556
+
<tr class="hideInject"><td>
10557
+
<div>
10558
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10559
+
<div class="bws_hidden_help_text cr_min_260px">
10560
+
<?php
10561
+
echo esc_html__("Set the days of the week, when you want to always show the chatbot (regardless of the above hour limitations).", 'aiomatic-automatic-ai-content-writer');
10562
+
?>
10563
+
</div>
10564
+
</div>
10565
+
<b><?php echo esc_html__("Days When To Always Show The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
10566
+
</div>
10567
+
</td><td>
10568
+
<div>
10569
+
<select multiple id="<?php echo esc_html($chuniqid);?>always_show" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">
10570
+
<?php
10571
+
echo '<option value="Monday">Monday</option>';
10572
+
echo '<option value="Tuesday">Tuesday</option>';
10573
+
echo '<option value="Wednesday">Wednesday</option>';
10574
+
echo '<option value="Thursday">Thursday</option>';
10575
+
echo '<option value="Friday">Friday</option>';
10576
+
echo '<option value="Saturday">Saturday</option>';
10577
+
echo '<option value="Sunday">Sunday</option>';
10578
+
?>
10579
+
</select>
10580
+
</div>
10581
+
</td></tr>
10582
+
<tr class="hideInject"><td>
10583
+
<div>
10584
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10585
+
<div class="bws_hidden_help_text cr_min_260px">
10586
+
<?php
10587
+
echo esc_html__("Set the days of the week, when you want to never show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10588
+
?>
10589
+
</div>
10590
+
</div>
10591
+
<b><?php echo esc_html__("Days When To Never Show The Chatbot:", 'aiomatic-automatic-ai-content-writer');?></b>
10592
+
</div>
10593
+
</td><td>
10594
+
<div>
10595
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>never_show" class="resize_vertical cr_width_full">
10596
+
<?php
10597
+
echo '<option value="Monday">Monday</option>';
10598
+
echo '<option value="Tuesday">Tuesday</option>';
10599
+
echo '<option value="Wednesday">Wednesday</option>';
10600
+
echo '<option value="Thursday">Thursday</option>';
10601
+
echo '<option value="Friday">Friday</option>';
10602
+
echo '<option value="Saturday">Saturday</option>';
10603
+
echo '<option value="Sunday">Sunday</option>';
10604
+
?>
10605
+
</select>
10606
+
</div>
10607
+
</td></tr>
10608
+
<tr class="hideInject"><td>
10609
+
<div>
10610
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10611
+
<div class="bws_hidden_help_text cr_min_260px">
10612
+
<?php
10613
+
echo esc_html__("Select the WordPress content where to not show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10614
+
?>
10615
+
</div>
10616
+
</div>
10617
+
<b><?php echo esc_html__("Do Not Show The Chatbot On This WordPress Content:", 'aiomatic-automatic-ai-content-writer');?></b>
10618
+
</div>
10619
+
</td><td>
10620
+
<div>
10621
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_content_wp" class="resize_vertical cr_width_full">
10622
+
<?php
10623
+
$selected = [];
10624
+
echo aiomatic_get_wordpress_content($selected);
10625
+
?>
10626
+
</select>
10627
+
</div>
10628
+
</td></tr>
10629
+
<tr class="hideInject"><td>
10630
+
<div>
10631
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10632
+
<div class="bws_hidden_help_text cr_min_260px">
10633
+
<?php
10634
+
echo esc_html__("Select the WordPress content only where to show the chatbot.", 'aiomatic-automatic-ai-content-writer');
10635
+
?>
10636
+
</div>
10637
+
</div>
10638
+
<b><?php echo esc_html__("Show The Chatbot Only On This WordPress Content:", 'aiomatic-automatic-ai-content-writer');?></b>
10639
+
</div>
10640
+
</td><td>
10641
+
<div>
10642
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_content_wp" class="resize_vertical cr_width_full">
10643
+
<?php
10644
+
echo aiomatic_get_wordpress_content($selected);
10645
+
?>
10646
+
</select>
10647
+
</div>
10648
+
</td></tr>
10649
+
<tr class="hideInject"><td>
10650
+
<div>
10651
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10652
+
<div class="bws_hidden_help_text cr_min_260px">
10653
+
<?php
10654
+
echo esc_html__("Select the languages for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10655
+
?>
10656
+
</div>
10657
+
</div>
10658
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Languages:", 'aiomatic-automatic-ai-content-writer');?></b>
10659
+
</div>
10660
+
</td><td>
10661
+
<div>
10662
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_locales" class="resize_vertical cr_width_full">
10663
+
<?php
10664
+
echo aiomatic_get_locales_content($selected);
10665
+
?>
10666
+
</select>
10667
+
</div>
10668
+
</td></tr>
10669
+
<tr class="hideInject"><td>
10670
+
<div>
10671
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10672
+
<div class="bws_hidden_help_text cr_min_260px">
10673
+
<?php
10674
+
echo esc_html__("Select the languages for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10675
+
?>
10676
+
</div>
10677
+
</div>
10678
+
<b><?php echo esc_html__("Show The Chatbot Only For These Languages:", 'aiomatic-automatic-ai-content-writer');?></b>
10679
+
</div>
10680
+
</td><td>
10681
+
<div>
10682
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_locales" class="resize_vertical cr_width_full">
10683
+
<?php
10684
+
echo aiomatic_get_locales_content($selected);
10685
+
?>
10686
+
</select>
10687
+
</div>
10688
+
</td></tr>
10689
+
<tr class="hideInject"><td>
10690
+
<div>
10691
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10692
+
<div class="bws_hidden_help_text cr_min_260px">
10693
+
<?php
10694
+
echo esc_html__("Select the user roles for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10695
+
?>
10696
+
</div>
10697
+
</div>
10698
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These User Roles:", 'aiomatic-automatic-ai-content-writer');?></b>
10699
+
</div>
10700
+
</td><td>
10701
+
<div>
10702
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_roles" class="resize_vertical cr_width_full">
10703
+
<?php
10704
+
echo aiomatic_get_user_roles_content($selected);
10705
+
?>
10706
+
</select>
10707
+
</div>
10708
+
</td></tr>
10709
+
<tr class="hideInject"><td>
10710
+
<div>
10711
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10712
+
<div class="bws_hidden_help_text cr_min_260px">
10713
+
<?php
10714
+
echo esc_html__("Select the user roles for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10715
+
?>
10716
+
</div>
10717
+
</div>
10718
+
<b><?php echo esc_html__("Show The Chatbot Only For These User Roles:", 'aiomatic-automatic-ai-content-writer');?></b>
10719
+
</div>
10720
+
</td><td>
10721
+
<div>
10722
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_roles" class="resize_vertical cr_width_full">
10723
+
<?php
10724
+
echo aiomatic_get_user_roles_content($selected);
10725
+
?>
10726
+
</select>
10727
+
</div>
10728
+
</td></tr>
10729
+
<tr class="hideInject"><td>
10730
+
<div>
10731
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10732
+
<div class="bws_hidden_help_text cr_min_260px">
10733
+
<?php
10734
+
echo esc_html__("Select the devices for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10735
+
?>
10736
+
</div>
10737
+
</div>
10738
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Devices:", 'aiomatic-automatic-ai-content-writer');?></b>
10739
+
</div>
10740
+
</td><td>
10741
+
<div>
10742
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_devices" class="resize_vertical cr_width_full">
10743
+
<?php
10744
+
echo aiomatic_get_devices_content($selected);
10745
+
?>
10746
+
</select>
10747
+
</div>
10748
+
</td></tr>
10749
+
<tr class="hideInject"><td>
10750
+
<div>
10751
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10752
+
<div class="bws_hidden_help_text cr_min_260px">
10753
+
<?php
10754
+
echo esc_html__("Select the devices for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10755
+
?>
10756
+
</div>
10757
+
</div>
10758
+
<b><?php echo esc_html__("Show The Chatbot Only For These Devices:", 'aiomatic-automatic-ai-content-writer');?></b>
10759
+
</div>
10760
+
</td><td>
10761
+
<div>
10762
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_devices" class="resize_vertical cr_width_full">
10763
+
<?php
10764
+
echo aiomatic_get_devices_content($selected);
10765
+
?>
10766
+
</select>
10767
+
</div>
10768
+
</td></tr>
10769
+
<tr class="hideInject"><td>
10770
+
<div>
10771
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10772
+
<div class="bws_hidden_help_text cr_min_260px">
10773
+
<?php
10774
+
echo esc_html__("Select the Operating Systems for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10775
+
?>
10776
+
</div>
10777
+
</div>
10778
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Operating Systems:", 'aiomatic-automatic-ai-content-writer');?></b>
10779
+
</div>
10780
+
</td><td>
10781
+
<div>
10782
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_oses" class="resize_vertical cr_width_full">
10783
+
<?php
10784
+
echo aiomatic_get_oses_content($selected);
10785
+
?>
10786
+
</select>
10787
+
</div>
10788
+
</td></tr>
10789
+
<tr class="hideInject"><td>
10790
+
<div>
10791
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10792
+
<div class="bws_hidden_help_text cr_min_260px">
10793
+
<?php
10794
+
echo esc_html__("Select the Operating Systems for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10795
+
?>
10796
+
</div>
10797
+
</div>
10798
+
<b><?php echo esc_html__("Show The Chatbot Only For These Operating Systems:", 'aiomatic-automatic-ai-content-writer');?></b>
10799
+
</div>
10800
+
</td><td>
10801
+
<div>
10802
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_oses" class="resize_vertical cr_width_full">
10803
+
<?php
10804
+
echo aiomatic_get_oses_content($selected);
10805
+
?>
10806
+
</select>
10807
+
</div>
10808
+
</td></tr>
10809
+
<tr class="hideInject"><td>
10810
+
<div>
10811
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10812
+
<div class="bws_hidden_help_text cr_min_260px">
10813
+
<?php
10814
+
echo esc_html__("Select the Browsers for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer');
10815
+
?>
10816
+
</div>
10817
+
</div>
10818
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These Browsers:", 'aiomatic-automatic-ai-content-writer');?></b>
10819
+
</div>
10820
+
</td><td>
10821
+
<div>
10822
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>no_show_browsers" class="resize_vertical cr_width_full">
10823
+
<?php
10824
+
echo aiomatic_get_browsers_content($selected);
10825
+
?>
10826
+
</select>
10827
+
</div>
10828
+
</td></tr>
10829
+
<tr class="hideInject"><td>
10830
+
<div>
10831
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10832
+
<div class="bws_hidden_help_text cr_min_260px">
10833
+
<?php
10834
+
echo esc_html__("Select the Browsers for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer');
10835
+
?>
10836
+
</div>
10837
+
</div>
10838
+
<b><?php echo esc_html__("Show The Chatbot Only For These Browsers:", 'aiomatic-automatic-ai-content-writer');?></b>
10839
+
</div>
10840
+
</td><td>
10841
+
<div>
10842
+
<select multiple onchange="anyNewChatChanged();" id="<?php echo esc_html($chuniqid);?>show_browsers" class="resize_vertical cr_width_full">
10843
+
<?php
10844
+
echo aiomatic_get_browsers_content($selected);
10845
+
?>
10846
+
</select>
10847
+
</div>
10848
+
</td></tr>
10849
+
<tr class="hideInject"><td>
10850
+
<div>
10851
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10852
+
<div class="bws_hidden_help_text cr_min_260px">
10853
+
<?php
10854
+
echo esc_html__("Select the IP Addresses for which the chatbot will not be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer');
10855
+
?>
10856
+
</div>
10857
+
</div>
10858
+
<b><?php echo esc_html__("Do Not Show The Chatbot For These IP Addresses:", 'aiomatic-automatic-ai-content-writer');?></b>
10859
+
</div>
10860
+
</td><td>
10861
+
<div><textarea rows="2" id="<?php echo esc_html($chuniqid);?>no_show_ips" onchange="anyNewChatChanged();" placeholder="<?php echo esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer');?>"></textarea>
10862
+
</div>
10863
+
</td></tr>
10864
+
<tr class="hideInject"><td>
10865
+
<div>
10866
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10867
+
<div class="bws_hidden_help_text cr_min_260px">
10868
+
<?php
10869
+
echo esc_html__("Select the IP Addresses for only which the chatbot will be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer');
10870
+
?>
10871
+
</div>
10872
+
</div>
10873
+
<b><?php echo esc_html__("Show The Chatbot Only For These IP Addresses:", 'aiomatic-automatic-ai-content-writer');?></b>
10874
+
</div>
10875
+
</td><td>
10876
+
<div><textarea rows="2" id="<?php echo esc_html($chuniqid);?>show_ips" onchange="anyNewChatChanged();" placeholder="<?php echo esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer');?>"></textarea>
10877
+
</div>
10878
+
</td></tr>
10879
+
</table>
10880
+
</div>
10881
+
</div>
10882
+
<div class="codemodalfzr-footer">
10883
+
<br/>
10884
+
<h3 class="cr_inline"><?php echo esc_html__("Aimogen Global Chatbots", 'aiomatic-automatic-ai-content-writer');?></h3>
10885
+
<span id="aiomatic_chat_ok" class="codeokfzr cr_inline" onclick="document.getElementById('mymodalchatfzr').style.display = 'none';">OK </span>
10886
+
<br/><br/>
10887
+
</div>
10888
+
</div>
10889
+
</div>
10890
+
</div>
10891
+
<div class="cr_center"><span class="cr_gray20">X</span></div>
10892
+
</div>
10893
+
</div>
10894
+
<hr/>
10895
+
<p class="crsubmit"><input type="submit" name="btnSubmitkw" id="btnSubmitkw" class="button button-primary" onclick="unsaved = false;localStorage.setItem('scrollpos', window.scrollY);" value="<?php echo esc_html__("Save Additional Chatbot Injection Rules", 'aiomatic-automatic-ai-content-writer');?>"/></p>
10896
+
</td></tr></table>
10897
+
</td></tr>
10898
+
<?php if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
10899
+
?>
10900
+
<tr><td colspan="2">
10901
+
<h2><?php echo esc_html__("Tutorial Videos:", 'aiomatic-automatic-ai-content-writer');?></h2>
10902
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/iE9LUaHDFNE" frameborder="0" allowfullscreen></iframe></div></p>
10903
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/qoRX4SIGXjA" frameborder="0" allowfullscreen></iframe></div></p>
10904
+
</td></tr>
10905
+
<?php
10906
+
}
10907
+
?>
10908
+
</table>
10909
+
</div>
10910
+
10911
+
<div id="tab-6" class="tab-content">
10912
+
<br/>
10913
+
<table class="widefat">
10914
+
<tr>
10915
+
<td>
10916
+
<div>
10917
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10918
+
<div class="bws_hidden_help_text cr_min_260px">
10919
+
<?php
10920
+
echo esc_html__("Select if you want to enable the persistent chat mode. Chats will be saved in the database and can be viewed from the 'Limits and Statistics' menu of the plugin. If you want to enable the Vector Database persistent chat functionality, you need to add your API key for a Vector Database Service in the plugin's 'Settings' menu. Also, you need to enable embeddings for the chatbot, from the 'Settings' menu -> 'Embeddings' tab -> 'Enable Embeddings For' -> check the 'Chatbot Shortcodes' checkbox -> save settings.", 'aiomatic-automatic-ai-content-writer');
10921
+
?>
10922
+
</div>
10923
+
</div>
10924
+
<b><?php echo esc_html__("Remember Chat Conversations (Persistent Chat):", 'aiomatic-automatic-ai-content-writer');?></b>
10925
+
</td>
10926
+
<td class="cr_min_width_200">
10927
+
<select id="persistent" name="aiomatic_Chatbot_Settings[persistent]" class="cr_width_full" onchange="aiomatic_persistent_changed();">
10928
+
<?php
10929
+
echo '<option' . ($persistent == 'off' ? ' selected': '') . ' value="off">' . esc_html__("Off", 'aiomatic-automatic-ai-content-writer') . '</option>';
10930
+
echo '<option' . ($persistent == 'history' ? ' selected': '');
10931
+
if($assistant_id != '')
10932
+
{
10933
+
echo ' disabled title="Disabled when using AI Assistants"';
10934
+
}
10935
+
echo ' value="history">' . esc_html__("Remember Multiple Conversations And Allow Switching Between Them (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
10936
+
echo '<option' . ($persistent == 'on' ? ' selected': '') . ' value="on">' . esc_html__("Load Last Conversation And Save Chat Logs (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
10937
+
echo '<option' . ($persistent == 'logs' ? ' selected': '') . ' value="logs">' . esc_html__("Only Save Chat Logs (Using Local Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
10938
+
echo '<option' . ($persistent == 'vector' ? ' selected': '') . ' value="vector"';
10939
+
if($pinecone_app_id == '' && $qdrant_app_id == '')
10940
+
{
10941
+
echo ' disabled title="' . esc_html__('You need to set up a Pinecone or a Qdrant API keys in plugin settings for this to work', 'aiomatic-automatic-ai-content-writer') . '"';
10942
+
}
10943
+
echo '>' . esc_html__("Auto Create Embeddings From User Messages (Vector Database Storage)", 'aiomatic-automatic-ai-content-writer') . '</option>';
10944
+
?>
10945
+
</select>
10946
+
</td>
10947
+
</tr>
10948
+
<tr class="hidePersistent">
10949
+
<td>
10950
+
<div>
10951
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10952
+
<div class="bws_hidden_help_text cr_min_260px">
10953
+
<?php
10954
+
echo esc_html__("Select if you want to enable the persistent chat mode also for not logged in users.", 'aiomatic-automatic-ai-content-writer');
10955
+
?>
10956
+
</div>
10957
+
</div>
10958
+
<b><?php echo esc_html__("Enable Persistent Chat Also For Not Logged In Users:", 'aiomatic-automatic-ai-content-writer');?></b>
10959
+
</td>
10960
+
<td class="cr_min_width_200">
10961
+
<select id="persistent_guests" name="aiomatic_Chatbot_Settings[persistent_guests]" class="cr_width_full">
10962
+
<?php
10963
+
echo '<option' . ($persistent_guests == 'off' ? ' selected': '') . ' value="off">Off</option>';
10964
+
echo '<option' . ($persistent_guests == 'on' ? ' selected': '') . ' value="on">On</option>';
10965
+
?>
10966
+
</select>
10967
+
</td>
10968
+
</tr>
10969
+
<tr class="hidePersistent">
10970
+
<td>
10971
+
<div>
10972
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10973
+
<div class="bws_hidden_help_text cr_min_260px">
10974
+
<?php
10975
+
echo esc_html__("Set the time frame how long should the conversation logs for not logged in users be remembered. If this is not set, the chat logs will be remembered without an expiration date.", 'aiomatic-automatic-ai-content-writer');
10976
+
?>
10977
+
</div>
10978
+
</div>
10979
+
<b><?php echo esc_html__("Chat Logs Expiration Time For Not Logged In Users (Seconds):", 'aiomatic-automatic-ai-content-writer');?></b>
10980
+
</td>
10981
+
<td class="cr_min_width_200">
10982
+
<input type="number" min="1" step="1" id="remember_chat_transient" name="aiomatic_Chatbot_Settings[remember_chat_transient]" class="cr_width_full" value="<?php echo esc_html($remember_chat_transient);?>" placeholder="<?php echo esc_html__("Expiration time (seconds)", 'aiomatic-automatic-ai-content-writer');?>">
10983
+
</td>
10984
+
</tr>
10985
+
<tr class="hideHistory">
10986
+
<td>
10987
+
<div>
10988
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
10989
+
<div class="bws_hidden_help_text cr_min_260px">
10990
+
<?php
10991
+
echo esc_html__("Select the maximum number of chat log entries logged in users can keep. If the limit is reached, the oldest entry is automatically deleted.", 'aiomatic-automatic-ai-content-writer');
10992
+
?>
10993
+
</div>
10994
+
</div>
10995
+
<b><?php echo esc_html__("Maximum Stored Conversations Count For Logged In Users:", 'aiomatic-automatic-ai-content-writer');?></b>
10996
+
</td>
10997
+
<td class="cr_min_width_200">
10998
+
<input type="number" min="1" step="1" id="max_chat_log_login" name="aiomatic_Chatbot_Settings[max_chat_log_login]" class="cr_width_full" value="<?php echo esc_html($max_chat_log_login);?>" placeholder="Max chat log entry count">
10999
+
</td>
11000
+
</tr>
11001
+
<tr class="hideHistory">
11002
+
<td>
11003
+
<div>
11004
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11005
+
<div class="bws_hidden_help_text cr_min_260px">
11006
+
<?php
11007
+
echo esc_html__("Select the maximum number of chat log entries not logged in users can keep. If the limit is reached, the oldest entry is automatically deleted.", 'aiomatic-automatic-ai-content-writer');
11008
+
?>
11009
+
</div>
11010
+
</div>
11011
+
<b><?php echo esc_html__("Maximum Stored Conversations Count For Not Logged In Users:", 'aiomatic-automatic-ai-content-writer');?></b>
11012
+
</td>
11013
+
<td class="cr_min_width_200">
11014
+
<input type="number" min="1" step="1" id="max_chat_log_not_login" name="aiomatic_Chatbot_Settings[max_chat_log_not_login]" class="cr_width_full" value="<?php echo esc_html($max_chat_log_not_login);?>" placeholder="Max chat log entry count">
11015
+
</td>
11016
+
</tr>
11017
+
</table>
11018
+
<br/>
11019
+
<?php
11020
+
$current_page = (aiomatic_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
11021
+
if ( isset( $_GET['action'] ) && isset( $_GET['user_id'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'user_meta_manager_' . $_GET['action'] . '_' . $_GET['user_id'] ) )
11022
+
{
11023
+
$user_id = urldecode($_GET['user_id']);
11024
+
$action = urldecode( $_GET['action'] );
11025
+
if(isset($_GET['conv_id']))
11026
+
{
11027
+
$conv_id = urldecode($_GET['conv_id']);
11028
+
}
11029
+
else
11030
+
{
11031
+
$conv_id = '';
11032
+
}
11033
+
if ( $action == 'delete_meta' )
11034
+
{
11035
+
if(is_numeric($user_id) && $user_id > 0)
11036
+
{
11037
+
if($assistant_id != '')
11038
+
{
11039
+
delete_user_meta( $user_id, 'aiomatic_assistant_history_thread' );
11040
+
}
11041
+
else
11042
+
{
11043
+
delete_user_meta( $user_id, 'aiomatic_chat_history' . $conv_id );
11044
+
}
11045
+
}
11046
+
else
11047
+
{
11048
+
if($assistant_id != '')
11049
+
{
11050
+
delete_transient('aiomatic_assistant_history_thread_' . $user_id);
11051
+
}
11052
+
else
11053
+
{
11054
+
delete_transient('aiomatic_chat_history_' . $conv_id . '_' . $user_id);
11055
+
}
11056
+
}
11057
+
$xcurrent_page = preg_replace('#&user_id=([^&]*)#', '', $current_page);
11058
+
echo "<script>location.href='" . $xcurrent_page . "';</script>";
11059
+
}
11060
+
elseif ( $action == 'delete_all_meta' )
11061
+
{
11062
+
$paged = 1;
11063
+
$users_per_page = 20;
11064
+
$users = array();
11065
+
do
11066
+
{
11067
+
$users_query = new WP_User_Query(
11068
+
array(
11069
+
'meta_query' => array(
11070
+
array(
11071
+
'key' => 'aiomatic_chat_history',
11072
+
'compare_key' => 'LIKE'
11073
+
)
11074
+
),
11075
+
'number' => $users_per_page,
11076
+
'paged' => $paged,
11077
+
)
11078
+
);
11079
+
$paged++;
11080
+
$rezuser = $users_query->get_results();
11081
+
$users = array_merge($rezuser, $users);
11082
+
}
11083
+
while(!empty($rezuser));
11084
+
$transi_count = 0;
11085
+
if($assistant_id != '')
11086
+
{
11087
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_assistant_history_thread_.+', PHP_INT_MAX, $transi_count);
11088
+
}
11089
+
else
11090
+
{
11091
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_chat_history_.+', PHP_INT_MAX, $transi_count);
11092
+
}
11093
+
foreach ( $users as $user )
11094
+
{
11095
+
$user_id = $user->ID;
11096
+
$all_meta = get_user_meta($user_id, '', true);
11097
+
$my_meta = array_filter($all_meta, function($key){
11098
+
return strpos($key, 'aiomatic_chat_history') === 0;
11099
+
}, ARRAY_FILTER_USE_KEY);
11100
+
foreach($my_meta as $key => $zmeta)
11101
+
{
11102
+
$pref = explode('aiomatic_chat_history', $key);
11103
+
if(isset($pref[1]))
11104
+
{
11105
+
delete_user_meta($user_id, $key);
11106
+
}
11107
+
}
11108
+
}
11109
+
foreach ( $all_transients as $transient_name => $transient_value )
11110
+
{
11111
+
if($assistant_id != '')
11112
+
{
11113
+
preg_match_all('#aiomatic_assistant_history_thread_([\s\S]+)#i', $transient_name, $trmatches);
11114
+
if(isset($trmatches[2][0]))
11115
+
{
11116
+
$user_id = $trmatches[2][0];
11117
+
$conv_id = $trmatches[1][0];
11118
+
delete_transient('aiomatic_assistant_history_thread_' . $user_id);
11119
+
}
11120
+
}
11121
+
else
11122
+
{
11123
+
preg_match_all('#aiomatic_chat_history_([^_]+)_([\s\S]+)#i', $transient_name, $trmatches);
11124
+
if(isset($trmatches[2][0]))
11125
+
{
11126
+
$user_id = $trmatches[2][0];
11127
+
$conv_id = $trmatches[1][0];
11128
+
delete_transient('aiomatic_chat_history_' . $conv_id . '_' . $user_id);
11129
+
}
11130
+
}
11131
+
}
11132
+
$zcurrent_page = preg_replace('#&action=delete_all_meta#', '', $current_page);
11133
+
$zcurrent_page = preg_replace('#&conv_id=([^&]*?)&#', '&', $zcurrent_page);
11134
+
echo '<a href="' . $zcurrent_page . '" class="button">' . esc_html__('Back to List', 'aiomatic-automatic-ai-content-writer') . '</a>';
11135
+
}
11136
+
}
11137
+
11138
+
$paged = 1;
11139
+
if ( isset( $_GET['paged'] ) ) {
11140
+
$paged = intval( $_GET['paged'] );
11141
+
}
11142
+
$users_per_page = 20;
11143
+
if ( isset( $_GET['users_per_page'] ) ) {
11144
+
$users_per_page = intval( $_GET['users_per_page'] );
11145
+
if($users_per_page <= 0)
11146
+
{
11147
+
$users_per_page = 20;
11148
+
}
11149
+
}
11150
+
if($assistant_id != '')
11151
+
{
11152
+
$users_query = new WP_User_Query(
11153
+
array(
11154
+
'meta_query' => array(
11155
+
array(
11156
+
'key' => 'aiomatic_assistant_history_thread',
11157
+
'compare_key' => 'LIKE'
11158
+
)
11159
+
),
11160
+
'number' => $users_per_page,
11161
+
'paged' => $paged,
11162
+
)
11163
+
);
11164
+
}
11165
+
else
11166
+
{
11167
+
$users_query = new WP_User_Query(
11168
+
array(
11169
+
'meta_query' => array(
11170
+
array(
11171
+
'key' => 'aiomatic_chat_history',
11172
+
'compare_key' => 'LIKE'
11173
+
)
11174
+
),
11175
+
'number' => $users_per_page,
11176
+
'paged' => $paged,
11177
+
)
11178
+
);
11179
+
}
11180
+
$transi_count = 0;
11181
+
if($assistant_id != '')
11182
+
{
11183
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_assistant_history_thread_.+', PHP_INT_MAX, $transi_count);
11184
+
}
11185
+
else
11186
+
{
11187
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_chat_history_.+', PHP_INT_MAX, $transi_count);
11188
+
}
11189
+
$total_users = $users_query->get_total();
11190
+
$total_items = $total_users + $transi_count;
11191
+
$total_pages = ceil( ($total_users + $transi_count) / $users_per_page );
11192
+
$users = $users_query->get_results();
11193
+
echo '<div class="wrap">';
11194
+
echo '<h1>' . esc_html__('User Conversation Manager', 'aiomatic-automatic-ai-content-writer') . '</h1>';
11195
+
echo '<table class="wp-list-table widefat fixed striped users">';
11196
+
echo '<thead>';
11197
+
echo '<tr>';
11198
+
echo '<th scope="col" id="username" class="manage-column column-username column-primary">Username/IP</th>';
11199
+
echo '<th scope="col" id="username" class="manage-column column-username column-primary">Chat ID</th>';
11200
+
echo '<th scope="col" id="email" class="manage-column column-email">Email</th>';
11201
+
echo '<th scope="col" id="actions" class="manage-column column-actions">Actions</th>';
11202
+
echo '</tr>';
11203
+
echo '</thead>';
11204
+
echo '<tbody id="the-list">';
11205
+
if(count($users) == 0 && count($all_transients) == 0)
11206
+
{
11207
+
echo '</tbody></table><br/><br/>' . esc_html__('No persistent chat messages found. You can enable this feature if you use the following shortcode to add a persistent AI chat to your page: [aimogen-chat-form persistent="on"]', 'aiomatic-automatic-ai-content-writer') . '</div>';
11208
+
}
11209
+
else
11210
+
{
11211
+
$displayed = 0;
11212
+
$users = aiomatic_array_unique($users);
11213
+
foreach ( $users as $user ) {
11214
+
$displayed++;
11215
+
$user_id = $user->ID;
11216
+
$username = $user->user_login;
11217
+
$email = $user->user_email;
11218
+
if($assistant_id != '')
11219
+
{
11220
+
$zmeta = get_user_meta($user_id, 'aiomatic_assistant_history_thread', true);
11221
+
if(!empty($zmeta))
11222
+
{
11223
+
echo '<tr>';
11224
+
echo '<td class="username column-username has-row-actions column-primary" data-colname="Username">' . esc_html( $username ) . '</td>';
11225
+
echo '<td class="chatid column-chatid" data-colname="ChatID">' . esc_html($zmeta) . '</td>';
11226
+
echo '<td class="email column-email" data-colname="Email">' . esc_html( $email ) . '</td>';
11227
+
echo '<td class="actions column-actions" data-colname="Actions">';
11228
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'view_meta', 'user_id' => $user_id, 'conv_id' => $zmeta, '_wpnonce' => wp_create_nonce( 'user_meta_manager_view_meta_' . $user_id ) ), $current_page )) . '">View</a> | ';
11229
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'download_meta', 'user_id' => $user_id, 'conv_id' => $zmeta, '_wpnonce' => wp_create_nonce( 'user_meta_manager_download_meta_' . $user_id ) ), $current_page )) . '">Download</a> | ';
11230
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'delete_meta', 'user_id' => $user_id, 'conv_id' => $zmeta, '_wpnonce' => wp_create_nonce( 'user_meta_manager_delete_meta_' . $user_id ) ), $current_page )) . '">Delete</a>';
11231
+
echo '</td>';
11232
+
echo '</tr>';
11233
+
}
11234
+
}
11235
+
else
11236
+
{
11237
+
$all_meta = get_user_meta($user_id, '', true);
11238
+
$my_meta = array_filter($all_meta, function($key){
11239
+
return strpos($key, 'aiomatic_chat_history') === 0;
11240
+
}, ARRAY_FILTER_USE_KEY);
11241
+
foreach($my_meta as $key => $zmeta)
11242
+
{
11243
+
$pref = explode('aiomatic_chat_history', $key);
11244
+
if(isset($pref[1]))
11245
+
{
11246
+
echo '<tr>';
11247
+
echo '<td class="username column-username has-row-actions column-primary" data-colname="Username">' . esc_html( $username ) . '</td>';
11248
+
echo '<td class="chatid column-chatid" data-colname="ChatID">' . esc_html($pref[1]) . '</td>';
11249
+
echo '<td class="email column-email" data-colname="Email">' . esc_html( $email ) . '</td>';
11250
+
echo '<td class="actions column-actions" data-colname="Actions">';
11251
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'view_meta', 'user_id' => $user_id, 'conv_id' => $pref[1], '_wpnonce' => wp_create_nonce( 'user_meta_manager_view_meta_' . $user_id ) ), $current_page )) . '">View</a> | ';
11252
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'download_meta', 'user_id' => $user_id, 'conv_id' => $pref[1], '_wpnonce' => wp_create_nonce( 'user_meta_manager_download_meta_' . $user_id ) ), $current_page )) . '">Download</a> | ';
11253
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'delete_meta', 'user_id' => $user_id, 'conv_id' => $pref[1], '_wpnonce' => wp_create_nonce( 'user_meta_manager_delete_meta_' . $user_id ) ), $current_page )) . '">Delete</a>';
11254
+
echo '</td>';
11255
+
echo '</tr>';
11256
+
}
11257
+
}
11258
+
}
11259
+
}
11260
+
if($displayed < $users_per_page)
11261
+
{
11262
+
$skip_cnt = 0;
11263
+
if(count($users) == 0)
11264
+
{
11265
+
$skip_cnt = $users_per_page * ($paged - 1);
11266
+
$skip_cnt = $skip_cnt - $total_users;
11267
+
}
11268
+
$skipped = 0;
11269
+
foreach ( $all_transients as $transient_name => $transient_value )
11270
+
{
11271
+
if($skip_cnt > 0)
11272
+
{
11273
+
if($skipped < $skip_cnt)
11274
+
{
11275
+
$skipped++;
11276
+
continue;
11277
+
}
11278
+
}
11279
+
if($assistant_id != '')
11280
+
{
11281
+
preg_match_all('#aiomatic_assistant_history_thread_([\s\S]+)#i', $transient_name, $trmatches);
11282
+
if(isset($trmatches[1][0]))
11283
+
{
11284
+
$displayed++;
11285
+
$user_id = $trmatches[1][0];
11286
+
$username = $trmatches[1][0];
11287
+
$email = '-';
11288
+
echo '<tr>';
11289
+
echo '<td class="username column-username has-row-actions column-primary" data-colname="Username">' . esc_html($username) . '</td>';
11290
+
echo '<td class="chatid column-chatid" data-colname="ChatID">' . esc_html($transient_value) . '</td>';
11291
+
echo '<td class="email column-email" data-colname="Email">' . esc_html( $email ) . '</td>';
11292
+
echo '<td class="actions column-actions" data-colname="Actions">';
11293
+
echo '<a href="' . add_query_arg( array( 'action' => 'view_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($transient_value), '_wpnonce' => wp_create_nonce( 'user_meta_manager_view_meta_' . $user_id ) ), $current_page ) . '">View</a> | ';
11294
+
echo '<a href="' . add_query_arg( array( 'action' => 'download_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($transient_value), '_wpnonce' => wp_create_nonce( 'user_meta_manager_download_meta_' . $user_id ) ), $current_page ) . '">Download</a> | ';
11295
+
echo '<a href="' . add_query_arg( array( 'action' => 'delete_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($transient_value), '_wpnonce' => wp_create_nonce( 'user_meta_manager_delete_meta_' . $user_id ) ), $current_page ) . '">Delete</a>';
11296
+
echo '</td>';
11297
+
echo '</tr>';
11298
+
if($displayed >= $users_per_page)
11299
+
{
11300
+
break;
11301
+
}
11302
+
}
11303
+
}
11304
+
else
11305
+
{
11306
+
preg_match_all('#aiomatic_chat_history_([^_]+)_([\s\S]+)#i', $transient_name, $trmatches);
11307
+
if(isset($trmatches[2][0]))
11308
+
{
11309
+
$displayed++;
11310
+
$user_id = $trmatches[2][0];
11311
+
$username = $trmatches[2][0];
11312
+
$chatid = $trmatches[1][0];
11313
+
$email = '-';
11314
+
echo '<tr>';
11315
+
echo '<td class="username column-username has-row-actions column-primary" data-colname="Username">' . esc_html($username) . '</td>';
11316
+
echo '<td class="chatid column-chatid" data-colname="ChatID">' . esc_html($chatid) . '</td>';
11317
+
echo '<td class="email column-email" data-colname="Email">' . esc_html( $email ) . '</td>';
11318
+
echo '<td class="actions column-actions" data-colname="Actions">';
11319
+
echo '<a href="' . add_query_arg( array( 'action' => 'view_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($chatid), '_wpnonce' => wp_create_nonce( 'user_meta_manager_view_meta_' . $user_id ) ), $current_page ) . '">View</a> | ';
11320
+
echo '<a href="' . add_query_arg( array( 'action' => 'download_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($chatid), '_wpnonce' => wp_create_nonce( 'user_meta_manager_download_meta_' . $user_id ) ), $current_page ) . '">Download</a> | ';
11321
+
echo '<a href="' . add_query_arg( array( 'action' => 'delete_meta', 'user_id' => urlencode($user_id), 'conv_id' => urlencode($chatid), '_wpnonce' => wp_create_nonce( 'user_meta_manager_delete_meta_' . $user_id ) ), $current_page ) . '">Delete</a>';
11322
+
echo '</td>';
11323
+
echo '</tr>';
11324
+
if($displayed >= $users_per_page)
11325
+
{
11326
+
break;
11327
+
}
11328
+
}
11329
+
}
11330
+
}
11331
+
}
11332
+
echo '</tbody>';
11333
+
echo '</table>';
11334
+
echo '<div class="tablenav bottom">';
11335
+
echo '<div class="tablenav-pages">';
11336
+
echo '<span class="displaying-num">' . esc_html($total_items) . ' items (' . esc_html($total_users) . '/' . esc_html($transi_count) . ')</span>';
11337
+
echo '<span class="pagination-links">';
11338
+
if($paged > 1)
11339
+
{
11340
+
echo '<a href="' . esc_url(add_query_arg( array( 'paged' => $paged - 1 ), $current_page )) . '">' . esc_html__('Prev', 'aiomatic-automatic-ai-content-writer') . '</a> ';
11341
+
}
11342
+
for ( $i = 1; $i <= $total_pages; $i++ )
11343
+
{
11344
+
$class = ( $i == $paged ) ? ' current' : '';
11345
+
echo '<a class="' . esc_html($class) . '" href="' . esc_url(add_query_arg( array( 'paged' => $i ), $current_page )) . '">' . esc_html($i) . '</a> ';
11346
+
}
11347
+
if($paged < $total_pages)
11348
+
{
11349
+
echo '<a href="' . esc_url(add_query_arg( array( 'paged' => $paged + 1 ), $current_page )) . '">' . esc_html__('Next', 'aiomatic-automatic-ai-content-writer') . '</a> ';
11350
+
}
11351
+
echo '</span>';
11352
+
echo '</div>';
11353
+
echo '</div>';
11354
+
if($displayed > 0)
11355
+
{
11356
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'download_all_meta', 'user_id' => urlencode($user_id), 'conv_id' => 'all', '_wpnonce' => wp_create_nonce( 'user_meta_manager_download_all_meta_' . $user_id ) ), $current_page )) . '" class="button">' . esc_html__('Download All Conversations', 'aiomatic-automatic-ai-content-writer') . '</a>';
11357
+
echo ' ';
11358
+
echo '<a href="' . esc_url(add_query_arg( array( 'action' => 'delete_all_meta', 'user_id' => urlencode($user_id), 'conv_id' => 'all', '_wpnonce' => wp_create_nonce( 'user_meta_manager_delete_all_meta_' . $user_id ) ), $current_page )) . '" class="button">' . esc_html__('Delete All Conversations', 'aiomatic-automatic-ai-content-writer') . '</a>';
11359
+
}
11360
+
echo '</div>';
11361
+
if ( isset( $_GET['action'] ) && isset( $_GET['user_id'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'user_meta_manager_' . $_GET['action'] . '_' . $_GET['user_id'] ) )
11362
+
{
11363
+
$user_id = urldecode( $_GET['user_id'] );
11364
+
$action = urldecode( $_GET['action'] );
11365
+
$conv_id = urldecode( $_GET['conv_id'] );
11366
+
if ( $action == 'delete_meta' )
11367
+
{
11368
+
echo '<div class="notice notice-success is-dismissible">';
11369
+
echo '<p>' . esc_html__('User conversation data has been deleted.', 'aiomatic-automatic-ai-content-writer') . '</p>';
11370
+
echo '</div>';
11371
+
}
11372
+
elseif ( $action == 'view_meta' )
11373
+
{
11374
+
if(is_numeric($user_id))
11375
+
{
11376
+
if($assistant_id != '')
11377
+
{
11378
+
$thread_id = get_user_meta($user_id, 'aiomatic_assistant_history_thread', true);
11379
+
if(!empty($thread_id))
11380
+
{
11381
+
try
11382
+
{
11383
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure') && trim($aiomatic_Main_Settings['api_selector']) != 'custom'))
11384
+
{
11385
+
$conv_meta = '';
11386
+
require_once (dirname(__FILE__) . "/aiomatic-assistants-api.php");
11387
+
$old_messages = aiomatic_openai_list_messages($token, $thread_id, 100, 'asc');
11388
+
if(isset($old_messages['data']) && is_array($old_messages['data']))
11389
+
{
11390
+
foreach($old_messages['data'] as $om)
11391
+
{
11392
+
if(isset($om['content'][0]['text']['value']))
11393
+
{
11394
+
if($om['role'] == 'user')
11395
+
{
11396
+
$conv_meta .= '<div class="ai-wrapper">';
11397
+
if($bubble_user_alignment != 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11398
+
{
11399
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11400
+
}
11401
+
$conv_meta .= '<div class="ai-bubble ai-mine">' . $om['content'][0]['text']['value'] . '</div>';
11402
+
if($bubble_user_alignment == 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11403
+
{
11404
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11405
+
}
11406
+
$conv_meta .= '</div>';
11407
+
}
11408
+
elseif($om['role'] == 'assistant')
11409
+
{
11410
+
$conv_meta .= '<div class="ai-wrapper">';
11411
+
if($bubble_alignment != 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11412
+
{
11413
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11414
+
}
11415
+
$conv_meta .= '<div class="ai-bubble ai-other">' . $om['content'][0]['text']['value'] . '</div>';
11416
+
if($bubble_alignment == 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11417
+
{
11418
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11419
+
}
11420
+
$conv_meta .= '</div>';
11421
+
}
11422
+
}
11423
+
}
11424
+
}
11425
+
}
11426
+
}
11427
+
catch(Exception $e)
11428
+
{
11429
+
$conv_meta = '';
11430
+
}
11431
+
}
11432
+
else
11433
+
{
11434
+
$conv_meta = '';
11435
+
}
11436
+
}
11437
+
else
11438
+
{
11439
+
$conv_meta = get_user_meta($user_id, 'aiomatic_chat_history' . $conv_id, true);
11440
+
}
11441
+
}
11442
+
else
11443
+
{
11444
+
if($assistant_id != '')
11445
+
{
11446
+
$thread_id = get_transient('aiomatic_assistant_history_thread_' . $user_id);
11447
+
if(!empty($thread_id))
11448
+
{
11449
+
try
11450
+
{
11451
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure') && trim($aiomatic_Main_Settings['api_selector']) != 'custom'))
11452
+
{
11453
+
$conv_meta = '';
11454
+
require_once (dirname(__FILE__) . "/aiomatic-assistants-api.php");
11455
+
$old_messages = aiomatic_openai_list_messages($token, $thread_id, 100, 'asc');
11456
+
if(isset($old_messages['data']) && is_array($old_messages['data']))
11457
+
{
11458
+
foreach($old_messages['data'] as $om)
11459
+
{
11460
+
if(isset($om['content'][0]['text']['value']))
11461
+
{
11462
+
if($om['role'] == 'user')
11463
+
{
11464
+
$conv_meta .= '<div class="ai-wrapper">';
11465
+
if($bubble_user_alignment != 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11466
+
{
11467
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11468
+
}
11469
+
$conv_meta .= '<div class="ai-bubble ai-mine">' . $om['content'][0]['text']['value'] . '</div>';
11470
+
if($bubble_user_alignment == 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11471
+
{
11472
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11473
+
}
11474
+
$conv_meta .= '</div>';
11475
+
}
11476
+
elseif($om['role'] == 'assistant')
11477
+
{
11478
+
$conv_meta .= '<div class="ai-wrapper">';
11479
+
if($bubble_alignment != 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11480
+
{
11481
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11482
+
}
11483
+
$conv_meta .= '<div class="ai-bubble ai-other">' . $om['content'][0]['text']['value'] . '</div>';
11484
+
if($bubble_alignment == 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11485
+
{
11486
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11487
+
}
11488
+
$conv_meta .= '</div>';
11489
+
}
11490
+
}
11491
+
}
11492
+
}
11493
+
}
11494
+
}
11495
+
catch(Exception $e)
11496
+
{
11497
+
$conv_meta = '';
11498
+
}
11499
+
}
11500
+
else
11501
+
{
11502
+
$conv_meta = '';
11503
+
}
11504
+
}
11505
+
else
11506
+
{
11507
+
$conv_meta = get_transient('aiomatic_chat_history_' . $conv_id . '_' . $user_id);
11508
+
}
11509
+
}
11510
+
if($conv_meta === false)
11511
+
{
11512
+
$conv_meta = '';
11513
+
}
11514
+
if(is_array($conv_meta))
11515
+
{
11516
+
$conv_meta = array_pop($conv_meta);
11517
+
if(isset($conv_meta['data']))
11518
+
{
11519
+
$conv_meta = $conv_meta['data'];
11520
+
if(empty($conv_meta))
11521
+
{
11522
+
$conv_meta = '';
11523
+
}
11524
+
}
11525
+
else
11526
+
{
11527
+
$conv_meta = '';
11528
+
}
11529
+
}
11530
+
echo '<div class="wrap">';
11531
+
echo '<h1>' . esc_html__('View User Conversation', 'aiomatic-automatic-ai-content-writer') . '</h1>';
11532
+
echo '<div id="aiomatic_chat_history_log" class="aiomatic_chat_history_log ai-chat form-control" title="' . esc_html__('Click on a bubble to copy its content!', 'aiomatic-automatic-ai-content-writer') . '">
11533
+
<table class="form-table">';
11534
+
echo '<tbody>';
11535
+
echo '<tr>';
11536
+
echo '<td>' . wp_kses_post($conv_meta) . '</td>';
11537
+
echo '</tr>';
11538
+
echo '</tbody>';
11539
+
echo '</table></div>';
11540
+
$zcurrent_page = preg_replace('#&action=view_meta#', '', $current_page);
11541
+
$zcurrent_page = preg_replace('#&conv_id=([^&]*?)&#', '&', $zcurrent_page);
11542
+
echo '<a href="' . esc_html($zcurrent_page) . '" class="button">' . esc_html__('Back to List', 'aiomatic-automatic-ai-content-writer') . '</a>';
11543
+
echo '</div>';
11544
+
}
11545
+
elseif ( $action == 'download_meta' )
11546
+
{
11547
+
if(is_numeric($user_id))
11548
+
{
11549
+
if($assistant_id != '')
11550
+
{
11551
+
$thread_id = get_user_meta($user_id, 'aiomatic_assistant_history_thread', true);
11552
+
if(!empty($thread_id))
11553
+
{
11554
+
try
11555
+
{
11556
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure') && trim($aiomatic_Main_Settings['api_selector']) != 'custom'))
11557
+
{
11558
+
$conv_meta = '';
11559
+
require_once (dirname(__FILE__) . "/aiomatic-assistants-api.php");
11560
+
$old_messages = aiomatic_openai_list_messages($token, $thread_id, 100, 'asc');
11561
+
if(isset($old_messages['data']) && is_array($old_messages['data']))
11562
+
{
11563
+
foreach($old_messages['data'] as $om)
11564
+
{
11565
+
if(isset($om['content'][0]['text']['value']))
11566
+
{
11567
+
if($om['role'] == 'user')
11568
+
{
11569
+
$conv_meta .= '<div class="ai-wrapper">';
11570
+
if($bubble_user_alignment != 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11571
+
{
11572
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11573
+
}
11574
+
$conv_meta .= '<div class="ai-bubble ai-mine">' . $om['content'][0]['text']['value'] . '</div>';
11575
+
if($bubble_user_alignment == 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11576
+
{
11577
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11578
+
}
11579
+
$conv_meta .= '</div>';
11580
+
}
11581
+
elseif($om['role'] == 'assistant')
11582
+
{
11583
+
$conv_meta .= '<div class="ai-wrapper">';
11584
+
if($bubble_alignment != 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11585
+
{
11586
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11587
+
}
11588
+
$conv_meta .= '<div class="ai-bubble ai-other">' . $om['content'][0]['text']['value'] . '</div>';
11589
+
if($bubble_alignment == 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11590
+
{
11591
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11592
+
}
11593
+
$conv_meta .= '</div>';
11594
+
}
11595
+
}
11596
+
}
11597
+
}
11598
+
}
11599
+
}
11600
+
catch(Exception $e)
11601
+
{
11602
+
$conv_meta = '';
11603
+
}
11604
+
}
11605
+
else
11606
+
{
11607
+
$conv_meta = '';
11608
+
}
11609
+
}
11610
+
else
11611
+
{
11612
+
$conv_meta = get_user_meta($user_id, 'aiomatic_chat_history' . $conv_id, true);
11613
+
}
11614
+
}
11615
+
else
11616
+
{
11617
+
if($assistant_id != '')
11618
+
{
11619
+
$thread_id = get_transient('aiomatic_assistant_history_thread_' . $user_id);
11620
+
if(!empty($thread_id))
11621
+
{
11622
+
try
11623
+
{
11624
+
if(!aiomatic_is_aiomaticapi_key($token) && (!isset($aiomatic_Main_Settings['api_selector']) || (trim($aiomatic_Main_Settings['api_selector']) != 'azure') && trim($aiomatic_Main_Settings['api_selector']) != 'custom'))
11625
+
{
11626
+
$conv_meta = '';
11627
+
require_once (dirname(__FILE__) . "/aiomatic-assistants-api.php");
11628
+
$old_messages = aiomatic_openai_list_messages($token, $thread_id, 100, 'asc');
11629
+
if(isset($old_messages['data']) && is_array($old_messages['data']))
11630
+
{
11631
+
foreach($old_messages['data'] as $om)
11632
+
{
11633
+
if(isset($om['content'][0]['text']['value']))
11634
+
{
11635
+
if($om['role'] == 'user')
11636
+
{
11637
+
$conv_meta .= '<div class="ai-wrapper">';
11638
+
if($bubble_user_alignment != 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11639
+
{
11640
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11641
+
}
11642
+
$conv_meta .= '<div class="ai-bubble ai-mine">' . $om['content'][0]['text']['value'] . '</div>';
11643
+
if($bubble_user_alignment == 'right' && !empty($avatar_url_user) && $show_user_avatar == 'show')
11644
+
{
11645
+
$return_me .= '<div class="ai-avatar ai-mine"></div>';
11646
+
}
11647
+
$conv_meta .= '</div>';
11648
+
}
11649
+
elseif($om['role'] == 'assistant')
11650
+
{
11651
+
$conv_meta .= '<div class="ai-wrapper">';
11652
+
if($bubble_alignment != 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11653
+
{
11654
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11655
+
}
11656
+
$conv_meta .= '<div class="ai-bubble ai-other">' . $om['content'][0]['text']['value'] . '</div>';
11657
+
if($bubble_alignment == 'right' && !empty($avatar_url) && $show_ai_avatar == 'show')
11658
+
{
11659
+
$return_me .= '<div class="ai-avatar ai-other"></div>';
11660
+
}
11661
+
$conv_meta .= '</div>';
11662
+
}
11663
+
}
11664
+
}
11665
+
}
11666
+
}
11667
+
}
11668
+
catch(Exception $e)
11669
+
{
11670
+
$conv_meta = '';
11671
+
}
11672
+
}
11673
+
else
11674
+
{
11675
+
$conv_meta = '';
11676
+
}
11677
+
}
11678
+
else
11679
+
{
11680
+
$conv_meta = get_transient('aiomatic_chat_history_' . $conv_id . '_' . $user_id);
11681
+
}
11682
+
}
11683
+
if(is_array($conv_meta))
11684
+
{
11685
+
$conv_meta = json_encode($conv_meta);
11686
+
}
11687
+
$conv_meta = str_replace('<div class="ai-bubble ai-mine">', 'User: ', $conv_meta);
11688
+
$conv_meta = str_replace('<div class="ai-bubble ai-other">', 'AI: ', $conv_meta);
11689
+
$conv_meta = str_replace('<div class="ai-avatar ai-mine"></div>', '', $conv_meta);
11690
+
$conv_meta = str_replace('<div class="ai-avatar ai-other"></div>', '', $conv_meta);
11691
+
$conv_meta = preg_replace('#<div class="ai-wrapper">([\s\S]*?)<\/div>#i', '$1', $conv_meta);
11692
+
$conv_meta = str_replace('</div>', '\r\n', $conv_meta);
11693
+
$conv_meta = str_replace('<br>', '\r\n', $conv_meta);
11694
+
if($conv_meta === false)
11695
+
{
11696
+
$conv_meta = '';
11697
+
}
11698
+
echo '<script type="text/javascript">function aiomatic_toBinary(string) {
11699
+
const codeUnits = Uint16Array.from(
11700
+
{ length: string.length },
11701
+
(element, index) => string.charCodeAt(index)
11702
+
);
11703
+
const charCodes = new Uint8Array(codeUnits.buffer);
11704
+
11705
+
let result = "";
11706
+
charCodes.forEach((char) => {
11707
+
result += String.fromCharCode(char);
11708
+
});
11709
+
return result;
11710
+
}try{var blists = aiomatic_toBinary("' . addslashes($conv_meta) . '");var encodedString = btoa(blists);var hiddenElement = document.createElement(\'a\');hiddenElement.href = \'data:text/attachment;base64,\' + encodedString;hiddenElement.target = \'_blank\';hiddenElement.download = \'chat-log-' . esc_html($user_id) . '.txt\';hiddenElement.click();}catch(e){alert(e);}</script>';
11711
+
$zcurrent_page = preg_replace('#&action=download_meta#', '', $current_page);
11712
+
$zcurrent_page = preg_replace('#&conv_id=([^&]*?)&#', '&', $zcurrent_page);
11713
+
echo '<a href="' . esc_html($zcurrent_page) . '" class="button">' . esc_html__('Back to List', 'aiomatic-automatic-ai-content-writer') . '</a>';
11714
+
}
11715
+
elseif ( $action == 'download_all_meta' )
11716
+
{
11717
+
$paged = 1;
11718
+
$users_per_page = 20;
11719
+
$users = array();
11720
+
do
11721
+
{
11722
+
$users_query = new WP_User_Query(
11723
+
array(
11724
+
'meta_query' => array(
11725
+
array(
11726
+
'key' => 'aiomatic_chat_history',
11727
+
'compare_key' => 'LIKE'
11728
+
)
11729
+
),
11730
+
'number' => $users_per_page,
11731
+
'paged' => $paged,
11732
+
)
11733
+
);
11734
+
$paged++;
11735
+
$rezuser = $users_query->get_results();
11736
+
$users = array_merge($rezuser, $users);
11737
+
}
11738
+
while(!empty($rezuser));
11739
+
$transi_count = 0;
11740
+
if($assistant_id != '')
11741
+
{
11742
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_assistant_history_thread_.+', PHP_INT_MAX, $transi_count);
11743
+
}
11744
+
else
11745
+
{
11746
+
$all_transients = aiomatic_get_transients_by_regex('aiomatic_chat_history_.+', PHP_INT_MAX, $transi_count);
11747
+
}
11748
+
$full_chat_log = '';
11749
+
foreach ( $users as $user )
11750
+
{
11751
+
$user_id = $user->ID;
11752
+
$all_meta = get_user_meta($user_id, '', true);
11753
+
$my_meta = array_filter($all_meta, function($key){
11754
+
return strpos($key, 'aiomatic_chat_history') === 0;
11755
+
}, ARRAY_FILTER_USE_KEY);
11756
+
foreach($my_meta as $key => $zmeta)
11757
+
{
11758
+
$pref = explode('aiomatic_chat_history', $key);
11759
+
if(isset($pref[1]))
11760
+
{
11761
+
$conv_id = $pref[1];
11762
+
$conv_meta = get_user_meta($user_id, 'aiomatic_chat_history' . $conv_id, true);
11763
+
if(is_array($conv_meta))
11764
+
{
11765
+
$conv_meta = json_encode($conv_meta);
11766
+
}
11767
+
if($conv_meta === false)
11768
+
{
11769
+
$conv_meta = '';
11770
+
}
11771
+
$conv_meta = str_replace('<div class="ai-bubble ai-mine">', 'User: ', $conv_meta);
11772
+
$conv_meta = str_replace('<div class="ai-bubble ai-other">', 'AI: ', $conv_meta);
11773
+
$conv_meta = str_replace('<div class="ai-avatar ai-mine"></div>', '', $conv_meta);
11774
+
$conv_meta = str_replace('<div class="ai-avatar ai-other"></div>', '', $conv_meta);
11775
+
$conv_meta = preg_replace('#<div class="ai-wrapper">([\s\S]*?)<\/div>#i', '$1', $conv_meta);
11776
+
$conv_meta = str_replace('</div>', '\r\n', $conv_meta);
11777
+
$conv_meta = str_replace('<br>', '\r\n', $conv_meta);
11778
+
$full_chat_log .= 'Logged-in User ID: ' . $user_id . '\r\n';
11779
+
$full_chat_log .= 'Conversation ID: ' . $conv_id . '\r\n';
11780
+
$full_chat_log .= '---------------------' . '\r\n';
11781
+
$full_chat_log .= $conv_meta . '\r\n';
11782
+
$full_chat_log .= '---------------------' . '\r\n' . '\r\n';
11783
+
}
11784
+
}
11785
+
}
11786
+
foreach ( $all_transients as $transient_name => $transient_value )
11787
+
{
11788
+
if($assistant_id != '')
11789
+
{
11790
+
preg_match_all('#aiomatic_assistant_history_thread_([\s\S]+)#i', $transient_name, $trmatches);
11791
+
if(isset($trmatches[2][0]))
11792
+
{
11793
+
$user_id = $trmatches[2][0];
11794
+
$conv_id = $trmatches[1][0];
11795
+
$conv_meta = get_transient('aiomatic_assistant_history_thread_' . $user_id);
11796
+
if(is_array($conv_meta))
11797
+
{
11798
+
$conv_meta = json_encode($conv_meta);
11799
+
}
11800
+
if($conv_meta === false)
11801
+
{
11802
+
$conv_meta = '';
11803
+
}
11804
+
$conv_meta = str_replace('<div class="ai-bubble ai-mine">', 'User: ', $conv_meta);
11805
+
$conv_meta = str_replace('<div class="ai-bubble ai-other">', 'AI: ', $conv_meta);
11806
+
$conv_meta = str_replace('<div class="ai-avatar ai-mine"></div>', '', $conv_meta);
11807
+
$conv_meta = str_replace('<div class="ai-avatar ai-other"></div>', '', $conv_meta);
11808
+
$conv_meta = preg_replace('#<div class="ai-wrapper">([\s\S]*?)<\/div>#i', '$1', $conv_meta);
11809
+
$conv_meta = str_replace('</div>', '\r\n', $conv_meta);
11810
+
$conv_meta = str_replace('<br>', '\r\n', $conv_meta);
11811
+
$full_chat_log .= 'Guest ID: ' . $user_id . '\r\n';
11812
+
$full_chat_log .= 'Conversation ID: ' . $conv_id . '\r\n';
11813
+
$full_chat_log .= '---------------------' . '\r\n';
11814
+
$full_chat_log .= $conv_meta . '\r\n';
11815
+
$full_chat_log .= '---------------------' . '\r\n' . '\r\n';
11816
+
}
11817
+
}
11818
+
else
11819
+
{
11820
+
preg_match_all('#aiomatic_chat_history_([^_]+)_([\s\S]+)#i', $transient_name, $trmatches);
11821
+
if(isset($trmatches[2][0]))
11822
+
{
11823
+
$user_id = $trmatches[2][0];
11824
+
$conv_id = $trmatches[1][0];
11825
+
$conv_meta = get_transient('aiomatic_chat_history_' . $conv_id . '_' . $user_id);
11826
+
if(is_array($conv_meta))
11827
+
{
11828
+
$conv_meta = json_encode($conv_meta);
11829
+
}
11830
+
if($conv_meta === false)
11831
+
{
11832
+
$conv_meta = '';
11833
+
}
11834
+
$conv_meta = str_replace('<div class="ai-bubble ai-mine">', 'User: ', $conv_meta);
11835
+
$conv_meta = str_replace('<div class="ai-bubble ai-other">', 'AI: ', $conv_meta);
11836
+
$conv_meta = str_replace('<div class="ai-avatar ai-mine"></div>', '', $conv_meta);
11837
+
$conv_meta = str_replace('<div class="ai-avatar ai-other"></div>', '', $conv_meta);
11838
+
$conv_meta = preg_replace('#<div class="ai-wrapper">([\s\S]*?)<\/div>#i', '$1', $conv_meta);
11839
+
$conv_meta = str_replace('</div>', '\r\n', $conv_meta);
11840
+
$conv_meta = str_replace('<br>', '\r\n', $conv_meta);
11841
+
$full_chat_log .= 'Guest ID: ' . $user_id . '\r\n';
11842
+
$full_chat_log .= 'Conversation ID: ' . $conv_id . '\r\n';
11843
+
$full_chat_log .= '---------------------' . '\r\n';
11844
+
$full_chat_log .= $conv_meta . '\r\n';
11845
+
$full_chat_log .= '---------------------' . '\r\n' . '\r\n';
11846
+
}
11847
+
}
11848
+
}
11849
+
echo '<script type="text/javascript">function aiomatic_toBinary(string) {
11850
+
const codeUnits = Uint16Array.from(
11851
+
{ length: string.length },
11852
+
(element, index) => string.charCodeAt(index)
11853
+
);
11854
+
const charCodes = new Uint8Array(codeUnits.buffer);
11855
+
11856
+
let result = "";
11857
+
charCodes.forEach((char) => {
11858
+
result += String.fromCharCode(char);
11859
+
});
11860
+
return result;
11861
+
}try{var blists = aiomatic_toBinary("' . addslashes($full_chat_log) . '");var encodedString = btoa(blists);var hiddenElement = document.createElement(\'a\');hiddenElement.href = \'data:text/attachment;base64,\' + encodedString;hiddenElement.target = \'_blank\';hiddenElement.download = \'full-chat-log.txt\';hiddenElement.click();}catch(e){alert(e);}</script>';
11862
+
$zcurrent_page = preg_replace('#&action=download_all_meta#', '', $current_page);
11863
+
$zcurrent_page = preg_replace('#&conv_id=([^&]*?)&#', '&', $zcurrent_page);
11864
+
echo '<a href="' . esc_html($zcurrent_page) . '" class="button">' . esc_html__('Back to List', 'aiomatic-automatic-ai-content-writer') . '</a>';
11865
+
}
11866
+
}
11867
+
}
11868
+
if(!isset($aiomatic_Main_Settings['hide_videos']) || trim($aiomatic_Main_Settings['hide_videos']) != 'on'){
11869
+
?>
11870
+
<h2><?php echo esc_html__("Multiple Conversation History Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
11871
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/5UC_l8YEAiI" frameborder="0" allowfullscreen></iframe></div></p>
11872
+
<h2><?php echo esc_html__("Basic Usage Tutorial Video:", 'aiomatic-automatic-ai-content-writer');?></h2>
11873
+
<p class="cr_center"><div class="embedtool"><iframe src="https://www.youtube.com/embed/mD_7oaCt2eM" frameborder="0" allowfullscreen></iframe></div></p>
11874
+
<?php
11875
+
}
11876
+
?>
11877
+
</div>
11878
+
</div>
11879
+
<div><p class="crsubmit"><input type="submit" name="btnSubmit" id="btnSubmit" class="button button-primary" onclick="if(hasRedBorder()){event.preventDefault();alert('Bot Workflow Configuration String contains errors, please fix it in the \'Bot Workflows\' tab!');}else{unsaved = false;}" value="<?php echo esc_html__("Save Settings", 'aiomatic-automatic-ai-content-writer');?>"/></p></div>
11880
+
</form>
11881
+
</div>
11882
+
<div id="mymodalfzr" class="codemodalfzr">
11883
+
<div class="codemodalfzr-content">
11884
+
<div class="codemodalfzr-header">
11885
+
<span id="aiomatic_close" class="codeclosefzr">×</span>
11886
+
<h2><span class="cr_color_white"><?php echo esc_html__("Add New Persona", 'aiomatic-automatic-ai-content-writer');?></span></h2>
11887
+
</div>
11888
+
<div class="codemodalfzr-body">
11889
+
<div class="table-responsive">
11890
+
<form action="#" method="post" autocomplete="off" id="aiomatic_personas_form">
11891
+
<br/>
11892
+
<input type="hidden" name="action" value="aiomatic_personas">
11893
+
<input type="hidden" name="nonce" value="<?php echo esc_html(wp_create_nonce('aiomatic_personas'));?>">
11894
+
<h1><strong><?php echo esc_html__("Add New Persona:", 'aiomatic-automatic-ai-content-writer');?></strong></h1>
11895
+
<h4><?php echo esc_html__("Persona Name*", 'aiomatic-automatic-ai-content-writer');?>:<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11896
+
<div class="bws_hidden_help_text cr_min_260px">
11897
+
<?php
11898
+
echo esc_html__("Set the name of this persona.", 'aiomatic-automatic-ai-content-writer');
11899
+
?>
11900
+
</div>
11901
+
</div></h4>
11902
+
<textarea rows="1" id="aiomatic-persona-title" name="aiomatic-persona-title" class="aiomatic-full-size" placeholder="Persona name" required></textarea>
11903
+
<br/>
11904
+
<h4><?php echo esc_html__("Persona Role", 'aiomatic-automatic-ai-content-writer');?>:<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11905
+
<div class="bws_hidden_help_text cr_min_260px">
11906
+
<?php
11907
+
echo esc_html__("Set the role of this persona.", 'aiomatic-automatic-ai-content-writer');
11908
+
?>
11909
+
</div>
11910
+
</div></h4>
11911
+
<textarea rows="1" id="aiomatic-persona-description" name="aiomatic-persona-description" class="aiomatic-full-size" placeholder="Persona role"></textarea>
11912
+
<br/>
11913
+
<h4><?php echo esc_html__("Persona Context Prompt*", 'aiomatic-automatic-ai-content-writer');?>:
11914
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11915
+
<div class="bws_hidden_help_text cr_min_260px">
11916
+
<?php
11917
+
echo esc_html__("Set the prompt which will be sent to the AI. Add a context to the AI chatbot, so it knows how to act and how to respond to customers. You can define here the language, tone of voice and role of the AI persona. Any other settings will also be able to be defined here. This text will be preppended to each conversation, to teach the AI some additional info about you or its behavior. This text will not be displayed to users, it will be only sent to the chatbot. You can also use shortcodes in this field. List of supported shortcodes: %%post_title%%, %%post_content%%, %%post_content_plain_text%%, %%post_excerpt%%, %%post_cats%%, %%post_tags%%, %%featured_image%%, %%blog_title%%, %%author_name%%, %%current_date_time%%, %%post_link%%, %%random_sentence%%, %%random_sentence2%%, %%user_name%%, %%user_email%%, %%user_display_name%%, %%user_role%%, %%user_id%%, %%user_firstname%%, %%user_lastname%%, %%user_url%%, %%user_description%%. You can also use custom fields (post meta) that it's assigned to posts using custom shortcodes in this format: %%!custom_field_slug!%%. You can also use custom user meta fields (user meta) which is assigned to users using custom shortcodes in this format: %%~custom_field_slug~%%. Example: if you wish to add data that is imported from the custom field post_data, you should use this shortcode: %%!post_data!%%. The length of this command should not be greater than the max token count set in the settings for the seed command - Update: %%related_questions_KEYWORD%% is also supported, to get a list of PAA questions for the KEYWORD you want to use. Update: nested shortcodes also supported (shortcodes generated by rules from other plugins).", 'aiomatic-automatic-ai-content-writer');
11918
+
?>
11919
+
</div>
11920
+
</div></h4>
11921
+
<textarea rows="4" id="aiomatic-persona-prompt" name="aiomatic-persona-prompt" class="aiomatic-full-size" placeholder="Persona context prompt" required></textarea>
11922
+
<br/>
11923
+
<h4><?php echo esc_html__("Persona First Message", 'aiomatic-automatic-ai-content-writer');?>:
11924
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11925
+
<div class="bws_hidden_help_text cr_min_260px">
11926
+
<?php
11927
+
echo esc_html__("Set the first message of this persona.", 'aiomatic-automatic-ai-content-writer');
11928
+
?>
11929
+
</div>
11930
+
</div></h4>
11931
+
<textarea rows="4" id="aiomatic-persona-first-message" name="aiomatic-persona-first-message" class="aiomatic-full-size" placeholder="Persona first message"></textarea>
11932
+
<br/>
11933
+
<h4><?php echo esc_html__("Persona AI Model", 'aiomatic-automatic-ai-content-writer');?>:
11934
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11935
+
<div class="bws_hidden_help_text cr_min_260px">
11936
+
<?php
11937
+
echo esc_html__("Set the AI model to be used by the persona.", 'aiomatic-automatic-ai-content-writer');
11938
+
?>
11939
+
</div>
11940
+
</div></h4>
11941
+
<select id="aiomatic-persona-model" name="aiomatic-persona-model" class="aiomatic-full-size">
11942
+
<?php
11943
+
foreach($all_models as $modelx)
11944
+
{
11945
+
echo '<option value="' . esc_html($modelx) .'"';
11946
+
echo '>' . esc_html($modelx);
11947
+
if(aiomatic_is_vision_model($modelx, ''))
11948
+
{
11949
+
echo esc_html__(" (Vision)", 'aiomatic-automatic-ai-content-writer');
11950
+
}
11951
+
echo esc_html(aiomatic_get_model_provider($modelx));
11952
+
echo '</option>';
11953
+
}
11954
+
?>
11955
+
</select>
11956
+
<br/>
11957
+
<h4><?php echo esc_html__("Persona Avatar", 'aiomatic-automatic-ai-content-writer');?>:
11958
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11959
+
<div class="bws_hidden_help_text cr_min_260px">
11960
+
<?php
11961
+
echo esc_html__("Set the avatar of the chatbot persona.", 'aiomatic-automatic-ai-content-writer');
11962
+
?>
11963
+
</div>
11964
+
</div></h4>
11965
+
<div class="coderevolution_gutenberg_input"><img id="aiomatic-preview-image-new"/></div>
11966
+
<input type="hidden" name="aiomatic-persona-avatar" id="aiomatic_image_id_new" value="" />
11967
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Select an avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_manager_new"/>
11968
+
<input type='button' class="button-primary" value="<?php esc_attr_e( 'Clear avatar', 'aiomatic-automatic-ai-content-writer' ); ?>" id="aiomatic_media_clear_new"/>
11969
+
<br/><br/>
11970
+
<hr/>
11971
+
<button id="aiomatic-personas-save-button" class="button button-primary"><?php echo esc_html__("Save", 'aiomatic-automatic-ai-content-writer');?></button>
11972
+
<div class="aiomatic-personas-success"></div>
11973
+
<br/>
11974
+
</form>
11975
+
</div>
11976
+
</div>
11977
+
</div>
11978
+
</div>
11979
+
11980
+
<div id="mymodalfzr_backup" class="codemodalfzr">
11981
+
<div class="codemodalfzr-content">
11982
+
<div class="codemodalfzr-header">
11983
+
<span id="aiomatic_close_backup" class="codeclosefzr">×</span>
11984
+
<h2><span class="cr_color_white"><?php echo esc_html__("Backup/Restore Personas", 'aiomatic-automatic-ai-content-writer');?></span></h2>
11985
+
</div>
11986
+
<div class="codemodalfzr-body">
11987
+
<div class="table-responsive">
11988
+
<br/>
11989
+
<?php
11990
+
$aiomaticMaxFileSize = wp_max_upload_size();
11991
+
?>
11992
+
<hr/>
11993
+
<div class="aiomatic-loader-bubble">
11994
+
<h3 class="margin5"><?php echo esc_html__("Restore Personas From File", 'aiomatic-automatic-ai-content-writer');?>:
11995
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
11996
+
<div class="bws_hidden_help_text cr_min_260px">
11997
+
<?php
11998
+
echo esc_html__("Hit this button and you can restore personas from file.", 'aiomatic-automatic-ai-content-writer');
11999
+
?>
12000
+
</div>
12001
+
</div></h3>
12002
+
<div class="aiomatic_persona_upload_form">
12003
+
<table class="form-table">
12004
+
<tbody>
12005
+
<tr>
12006
+
<th scope="row"><?php
12007
+
echo esc_html__("Backup File (*.json)", 'aiomatic-automatic-ai-content-writer');
12008
+
?></th>
12009
+
<td>
12010
+
<input type="file" id="aiomatic_persona_upload" accept=".json">
12011
+
</td>
12012
+
</tr>
12013
+
<tr>
12014
+
<th scope="row"><?php
12015
+
echo esc_html__("Overwrite Existing", 'aiomatic-automatic-ai-content-writer');
12016
+
?></th>
12017
+
<td>
12018
+
<input type="checkbox" id="aiomatic_overwrite" value="on">
12019
+
</td>
12020
+
</tr>
12021
+
<tr>
12022
+
<td colspan="2">
12023
+
<div class="aiomatic_upload_success aiomatic_none margin5 colorgr"><?php
12024
+
echo esc_html__("File uploaded successfully you can view it in the persona listing tab.", 'aiomatic-automatic-ai-content-writer');
12025
+
?></div>
12026
+
<div class="aiomatic_progress aiomatic_none"><span></span><small><?php
12027
+
echo esc_html__("Uploading", 'aiomatic-automatic-ai-content-writer');
12028
+
?></small></div>
12029
+
<div class="aiomatic-error-msg"></div>
12030
+
</td>
12031
+
</tr>
12032
+
<tr>
12033
+
<td colspan="2">
12034
+
<button class="button button-primary coderevolution_block_input" id="aiomatic_persona_button"><?php echo esc_html__("Import Personas From File", 'aiomatic-automatic-ai-content-writer');?></button><br>
12035
+
<p class="cr_center"><?php
12036
+
echo esc_html__("Maximum upload file size", 'aiomatic-automatic-ai-content-writer');
12037
+
?>: <?php echo esc_html(size_format($aiomaticMaxFileSize));?>
12038
+
</p>
12039
+
</td>
12040
+
</tr>
12041
+
</tbody>
12042
+
</table>
12043
+
</div>
12044
+
</div>
12045
+
<br/>
12046
+
<hr/>
12047
+
<div class="aiomatic-loader-bubble">
12048
+
<div>
12049
+
<h3>
12050
+
<?php echo esc_html__('Backup Current Personas To File:', 'aiomatic-automatic-ai-content-writer');?>
12051
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12052
+
<div class="bws_hidden_help_text cr_min_260px">
12053
+
<?php
12054
+
echo esc_html__("Hit this button and you can backup the current personas to file.", 'aiomatic-automatic-ai-content-writer');
12055
+
?>
12056
+
</div>
12057
+
</div>
12058
+
</h3>
12059
+
<form method="post" onsubmit="return confirm('Are you sure you want to download personas to file?');"><input name="aiomatic_nonce" type="hidden" value="<?php echo esc_html(wp_create_nonce('aiomatic_personas'));?>"><input name="aiomatic_download_personas_to_file" type="submit" class="button button-primary coderevolution_block_input" value="Backup Personas To File"></form>
12060
+
</div>
12061
+
</div>
12062
+
<br/>
12063
+
<hr/>
12064
+
<div class="aiomatic-loader-bubble">
12065
+
<h3 class="margin5"><?php echo esc_html__("Import Default Personas (This Can Take For A While)", 'aiomatic-automatic-ai-content-writer');?>:
12066
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12067
+
<div class="bws_hidden_help_text cr_min_260px">
12068
+
<?php
12069
+
echo esc_html__("Hit this button and the plugin will create the default personas which come bundled with the plugin.", 'aiomatic-automatic-ai-content-writer');
12070
+
?>
12071
+
</div>
12072
+
</div></h3>
12073
+
<table class="form-table">
12074
+
<tbody>
12075
+
<tr>
12076
+
<td colspan="2">
12077
+
<button class="button button-primary coderevolution_block_input" id="aiomatic_persona_default_button"><?php echo esc_html__("Import Default Personas", 'aiomatic-automatic-ai-content-writer');?></button><br>
12078
+
</td>
12079
+
</tr>
12080
+
</tbody>
12081
+
</table>
12082
+
</div>
12083
+
<hr/>
12084
+
</div>
12085
+
</div>
12086
+
</div>
12087
+
</div>
12088
+
<hr/>
12089
+
<div class="wrap">
12090
+
<h2 class="cr_image_center"><?php echo esc_html__("Chatbot Preview", 'aiomatic-automatic-ai-content-writer');?></h2>
12091
+
<?php
12092
+
$preview_settings = array( 'live_preview' => 'yes', 'temperature' => '', 'top_p' => '', 'presence_penalty' => '', 'frequency_penalty' => '', 'model' => '', 'instant_response' => '', 'show_in_window' => 'off' );
12093
+
if($god_preview == 'on')
12094
+
{
12095
+
$preview_settings['enable_god_mode'] = 'yes';
12096
+
}
12097
+
echo aiomatic_chat_shortcode($preview_settings);
12098
+
?>
12099
+
</div>
12100
+
<br/><br/>
12101
+
<hr/>
12102
+
<div class="cr_image_center"><?php echo esc_html__("To add the chat bot to your website, please include the shortcode [aimogen-chat-form] in the desired location on your site.", 'aiomatic-automatic-ai-content-writer');?></div>
12103
+
<?php
12104
+
}
12105
+
function aiomatic_expand_chatbot_rules($aiomatic_chat_json)
12106
+
{
12107
+
$rules = json_decode($aiomatic_chat_json);
12108
+
if($rules == false)
12109
+
{
12110
+
return '';
12111
+
}
12112
+
$output = '';
12113
+
$cont = 0;
12114
+
if (!empty($rules)) {
12115
+
foreach ($rules as $dataid => $value)
12116
+
{
12117
+
$uniqum = $value->index;
12118
+
$data = $value->data;
12119
+
$uniq = uniqid();
12120
+
if(empty($data->rule_description))
12121
+
{
12122
+
$data->rule_description = $uniqum;
12123
+
}
12124
+
$output .= '<div class="cr_center aiuniq-' . esc_html($uniq) . '"><input type="text" id="' . $uniqum . 'rule_description" onchange="anyNewChatChanged();" placeholder="Rule ID" value="' . esc_html($data->rule_description) . '" class="cr_width_full"/></div>
12125
+
<div class="cr_center aiuniq-' . esc_html($uniq) . '"><textarea rows="1" data-id="' . $value->index . '" id="' . $uniqum . 'shortcode" onchange="anyNewChatChanged();" placeholder="' . esc_html__('Input the chatbot shortcode which will be embedded globally to your site', 'aiomatic-automatic-ai-content-writer') . '" class="chatbotShortcodeImportant cr_width_full" required>' . esc_textarea(stripslashes($data->shortcode)) . '</textarea></div>
12126
+
<div class="cr_center aiuniq-' . esc_html($uniq) . '">
12127
+
<input type="button" id="mybtnchatfzr' . esc_html($cont) . '" value="Settings" onclick="document.getElementById(\'mymodalchatfzr' . esc_html($cont) . '\').style.display = \'block\';">
12128
+
<div id="mymodalchatfzr' . esc_html($cont) . '" class="codemodalfzr">
12129
+
<div class="codemodalfzr-content">
12130
+
<div class="codemodalfzr-header">
12131
+
<span id="aiomatic_chat_close' . esc_html($cont) . '" class="codeclosefzr" onclick="document.getElementById(\'mymodalchatfzr' . esc_html($cont) . '\').style.display = \'none\';">×</span>
12132
+
<h2><span class="cr_color_white">' . esc_html__("Rule ID ", 'aiomatic-automatic-ai-content-writer') . esc_html(stripslashes($dataid)) . '</span> ' . esc_html__("Advanced Settings", 'aiomatic-automatic-ai-content-writer') . '</h2>
12133
+
</div>
12134
+
<div class="codemodalfzr-body">
12135
+
<div class="table-responsive">
12136
+
<table class="responsive table cr_main_table_nowr">
12137
+
12138
+
<tr class="hideInject"><td>
12139
+
<div>
12140
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12141
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set a list of URL where to not show the chatbot. You can enter multiple URLs, each on a new line.", 'aiomatic-automatic-ai-content-writer') . '
12142
+
</div>
12143
+
</div>
12144
+
<b>' . esc_html__("Do Not Show The Chatbot On These URLs:", 'aiomatic-automatic-ai-content-writer') . '</b>
12145
+
</div>
12146
+
</td><td>
12147
+
<div>
12148
+
<textarea rows="2" id="' . $uniqum . 'not_show_urls" onchange="anyNewChatChanged();" placeholder="URL list, each on a new line">' . esc_textarea($data->not_show_urls) . '</textarea>
12149
+
</div>
12150
+
</td></tr>
12151
+
<tr class="hideInject"><td>
12152
+
<div>
12153
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12154
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set a list of URL only where to show the chatbot. You can enter multiple URLs, each on a new line. If you enter a list of URLs, the chatbot will be shown only on these URls and not on any other URLs from your site.", 'aiomatic-automatic-ai-content-writer') . '
12155
+
</div>
12156
+
</div>
12157
+
<b>' . esc_html__("Show The Chatbot Only On These URLs:", 'aiomatic-automatic-ai-content-writer') . '</b>
12158
+
</div>
12159
+
</td><td>
12160
+
<div>
12161
+
<textarea rows="2" id="' . $uniqum . 'only_show_urls" onchange="anyNewChatChanged();" placeholder="URL list, each on a new line">' . esc_textarea($data->only_show_urls) . '</textarea>
12162
+
</div>
12163
+
</td></tr>
12164
+
<tr class="hideInject"><td>
12165
+
<div>
12166
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12167
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the hour period of each day, when you want to show the chatbot embedded on your site. Your current server time is: ", 'aiomatic-automatic-ai-content-writer') . date("h:i A") . '
12168
+
</div>
12169
+
</div>
12170
+
<b>' . esc_html__("Show The Chatbot Between Specific Hours Each Day:", 'aiomatic-automatic-ai-content-writer') . '</b>
12171
+
</div>
12172
+
</td><td>
12173
+
<div>
12174
+
<input type="time" id="' . $uniqum . 'min_time" onchange="anyNewChatChanged();" value="' . esc_attr($data->min_time) . '" placeholder="Show the Chatbot Only After This Hour"> - <input type="time" id="' . $uniqum . 'max_time" value="' . esc_attr($data->max_time) . '" placeholder="Show the Chatbot Only Before This Hour">
12175
+
</div>
12176
+
</td></tr>
12177
+
<tr class="hideInject"><td>
12178
+
<div>
12179
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12180
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the days of the week, when you want to always show the chatbot (regardless of the above hour limitations).", 'aiomatic-automatic-ai-content-writer') . '
12181
+
</div>
12182
+
</div>
12183
+
<b>' . esc_html__("Days When To Always Show The Chatbot:", 'aiomatic-automatic-ai-content-writer') . '</b>
12184
+
</div>
12185
+
</td><td>
12186
+
<div>
12187
+
<select multiple id="' . $uniqum . 'always_show" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">' .
12188
+
'<option' . (in_array('Monday', $data->always_show) ? ' selected': '') . ' value="Monday">Monday</option>' .
12189
+
'<option' . (in_array('Tuesday', $data->always_show) ? ' selected': '') . ' value="Tuesday">Tuesday</option>' .
12190
+
'<option' . (in_array('Wednesday', $data->always_show) ? ' selected': '') . ' value="Wednesday">Wednesday</option>' .
12191
+
'<option' . (in_array('Thursday', $data->always_show) ? ' selected': '') . ' value="Thursday">Thursday</option>' .
12192
+
'<option' . (in_array('Friday', $data->always_show) ? ' selected': '') . ' value="Friday">Friday</option>' .
12193
+
'<option' . (in_array('Saturday', $data->always_show) ? ' selected': '') . ' value="Saturday">Saturday</option>' .
12194
+
'<option' . (in_array('Sunday', $data->always_show) ? ' selected': '') . ' value="Sunday">Sunday</option>' .
12195
+
'</select>
12196
+
</div>
12197
+
</td></tr>
12198
+
<tr class="hideInject"><td>
12199
+
<div>
12200
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12201
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Set the days of the week, when you want to never show the chatbot.", 'aiomatic-automatic-ai-content-writer') . '
12202
+
</div>
12203
+
</div>
12204
+
<b>' . esc_html__("Days When To Never Show The Chatbot:", 'aiomatic-automatic-ai-content-writer') . '</b>
12205
+
</div>
12206
+
</td><td>
12207
+
<div>
12208
+
<select multiple id="' . $uniqum . 'never_show" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">' .
12209
+
'<option' . (in_array('Monday', $data->never_show) ? ' selected': '') . ' value="Monday">Monday</option>' .
12210
+
'<option' . (in_array('Tuesday', $data->never_show) ? ' selected': '') . ' value="Tuesday">Tuesday</option>' .
12211
+
'<option' . (in_array('Wednesday', $data->never_show) ? ' selected': '') . ' value="Wednesday">Wednesday</option>' .
12212
+
'<option' . (in_array('Thursday', $data->never_show) ? ' selected': '') . ' value="Thursday">Thursday</option>' .
12213
+
'<option' . (in_array('Friday', $data->never_show) ? ' selected': '') . ' value="Friday">Friday</option>' .
12214
+
'<option' . (in_array('Saturday', $data->never_show) ? ' selected': '') . ' value="Saturday">Saturday</option>' .
12215
+
'<option' . (in_array('Sunday', $data->never_show) ? ' selected': '') . ' value="Sunday">Sunday</option>' .
12216
+
'</select>
12217
+
</div>
12218
+
</td></tr>
12219
+
<tr class="hideInject"><td>
12220
+
<div>
12221
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12222
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the WordPress content where to not show the chatbot.", 'aiomatic-automatic-ai-content-writer') . '
12223
+
</div>
12224
+
</div>
12225
+
<b>' . esc_html__("Do Not Show The Chatbot On This WordPress Content:", 'aiomatic-automatic-ai-content-writer') . '</b>
12226
+
</div>
12227
+
</td><td>
12228
+
<div>
12229
+
<select multiple id="' . $uniqum . 'no_show_content_wp" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12230
+
$selected = is_array( $data->no_show_content_wp ) ? $data->no_show_content_wp : [ '*' ];
12231
+
$output .= aiomatic_get_wordpress_content($selected);
12232
+
$output .= '</select>
12233
+
</div>
12234
+
</td></tr>
12235
+
<tr class="hideInject"><td>
12236
+
<div>
12237
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12238
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the WordPress content only where to show the chatbot.", 'aiomatic-automatic-ai-content-writer') . '
12239
+
</div>
12240
+
</div>
12241
+
<b>' . esc_html__("Show The Chatbot Only On This WordPress Content:", 'aiomatic-automatic-ai-content-writer') . '</b>
12242
+
</div>
12243
+
</td><td>
12244
+
<div>
12245
+
<select multiple id="' . $uniqum . 'show_content_wp" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12246
+
$selected = is_array( $data->show_content_wp ) ? $data->show_content_wp : [ '*' ];
12247
+
$output .= aiomatic_get_wordpress_content($selected);
12248
+
$output .= '</select>
12249
+
</div>
12250
+
</td></tr>
12251
+
<tr class="hideInject"><td>
12252
+
<div>
12253
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12254
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the languages for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer') . '
12255
+
</div>
12256
+
</div>
12257
+
<b>' . esc_html__("Do Not Show The Chatbot For These Languages:", 'aiomatic-automatic-ai-content-writer') . '</b>
12258
+
</div>
12259
+
</td><td>
12260
+
<div>
12261
+
<select multiple id="' . $uniqum . 'no_show_locales" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12262
+
$selected = is_array( $data->no_show_locales ) ? $data->no_show_locales : [ '' ];
12263
+
$output .= aiomatic_get_locales_content($selected);
12264
+
$output .= '</select>
12265
+
</div>
12266
+
</td></tr>
12267
+
<tr class="hideInject"><td>
12268
+
<div>
12269
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12270
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the languages for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer') . '
12271
+
</div>
12272
+
</div>
12273
+
<b>' . esc_html__("Show The Chatbot Only For These Languages:", 'aiomatic-automatic-ai-content-writer') . '</b>
12274
+
</div>
12275
+
</td><td>
12276
+
<div>
12277
+
<select multiple id="' . $uniqum . 'show_locales" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12278
+
$selected = is_array( $data->show_locales ) ? $data->show_locales : [ '' ];
12279
+
$output .= aiomatic_get_locales_content($selected);
12280
+
$output .= '</select>
12281
+
</div>
12282
+
</td></tr>
12283
+
<tr class="hideInject"><td>
12284
+
<div>
12285
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12286
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the user roles for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer') . '
12287
+
</div>
12288
+
</div>
12289
+
<b>' . esc_html__("Do Not Show The Chatbot For These User Roles:", 'aiomatic-automatic-ai-content-writer') . '</b>
12290
+
</div>
12291
+
</td><td>
12292
+
<div>
12293
+
<select multiple id="' . $uniqum . 'no_show_roles" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12294
+
$selected = is_array( $data->no_show_roles ) ? $data->no_show_roles : [ '' ];
12295
+
$output .= aiomatic_get_user_roles_content($selected);
12296
+
$output .= '</select>
12297
+
</div>
12298
+
</td></tr>
12299
+
<tr class="hideInject"><td>
12300
+
<div>
12301
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12302
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the user roles for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer') . '
12303
+
</div>
12304
+
</div>
12305
+
<b>' . esc_html__("Show The Chatbot Only For These User Roles:", 'aiomatic-automatic-ai-content-writer') . '</b>
12306
+
</div>
12307
+
</td><td>
12308
+
<div>
12309
+
<select multiple id="' . $uniqum . 'show_roles" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12310
+
$selected = is_array( $data->show_roles ) ? $data->show_roles : [ '' ];
12311
+
$output .= aiomatic_get_user_roles_content($selected);
12312
+
$output .= '</select>
12313
+
</div>
12314
+
</td></tr>
12315
+
<tr class="hideInject"><td>
12316
+
<div>
12317
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12318
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the devices for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer') . '
12319
+
</div>
12320
+
</div>
12321
+
<b>' . esc_html__("Do Not Show The Chatbot For These Devices:", 'aiomatic-automatic-ai-content-writer') . '</b>
12322
+
</div>
12323
+
</td><td>
12324
+
<div>
12325
+
<select multiple id="' . $uniqum . 'no_show_devices" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12326
+
$selected = is_array( $data->no_show_devices ) ? $data->no_show_devices : [ '' ];
12327
+
$output .= aiomatic_get_devices_content($selected);
12328
+
$output .= '</select>
12329
+
</div>
12330
+
</td></tr>
12331
+
<tr class="hideInject"><td>
12332
+
<div>
12333
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12334
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the devices for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer') . '
12335
+
</div>
12336
+
</div>
12337
+
<b>' . esc_html__("Show The Chatbot Only For These Devices:", 'aiomatic-automatic-ai-content-writer') . '</b>
12338
+
</div>
12339
+
</td><td>
12340
+
<div>
12341
+
<select multiple id="' . $uniqum . 'show_devices" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12342
+
$selected = is_array( $data->show_devices ) ? $data->show_devices : [ '' ];
12343
+
$output .= aiomatic_get_devices_content($selected);
12344
+
$output .= '</select>
12345
+
</div>
12346
+
</td></tr>
12347
+
<tr class="hideInject"><td>
12348
+
<div>
12349
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12350
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the Operating Systems for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer') . '
12351
+
</div>
12352
+
</div>
12353
+
<b>' . esc_html__("Do Not Show The Chatbot For These Operating Systems:", 'aiomatic-automatic-ai-content-writer') . '</b>
12354
+
</div>
12355
+
</td><td>
12356
+
<div>
12357
+
<select multiple id="' . $uniqum . 'no_show_oses" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12358
+
$selected = is_array( $data->no_show_oses ) ? $data->no_show_oses : [ '' ];
12359
+
$output .= aiomatic_get_oses_content($selected);
12360
+
$output .= '</select>
12361
+
</div>
12362
+
</td></tr>
12363
+
<tr class="hideInject"><td>
12364
+
<div>
12365
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12366
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the Operating Systems for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer') . '
12367
+
</div>
12368
+
</div>
12369
+
<b>' . esc_html__("Show The Chatbot Only For These Operating Systems:", 'aiomatic-automatic-ai-content-writer') . '</b>
12370
+
</div>
12371
+
</td><td>
12372
+
<div>
12373
+
<select multiple id="' . $uniqum . 'show_oses" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12374
+
$selected = is_array( $data->show_oses ) ? $data->show_oses : [ '' ];
12375
+
$output .= aiomatic_get_oses_content($selected);
12376
+
$output .= '</select>
12377
+
</div>
12378
+
</td></tr>
12379
+
<tr class="hideInject"><td>
12380
+
<div>
12381
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12382
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the Browsers for which the chatbot will not be shown.", 'aiomatic-automatic-ai-content-writer') . '
12383
+
</div>
12384
+
</div>
12385
+
<b>' . esc_html__("Do Not Show The Chatbot For These Browsers:", 'aiomatic-automatic-ai-content-writer') . '</b>
12386
+
</div>
12387
+
</td><td>
12388
+
<div>
12389
+
<select multiple id="' . $uniqum . 'no_show_browsers" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12390
+
$selected = is_array( $data->no_show_browsers ) ? $data->no_show_browsers : [ '' ];
12391
+
$output .= aiomatic_get_browsers_content($selected);
12392
+
$output .= '</select>
12393
+
</div>
12394
+
</td></tr>
12395
+
<tr class="hideInject"><td>
12396
+
<div>
12397
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12398
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the Browsers for only which the chatbot will be shown.", 'aiomatic-automatic-ai-content-writer') . '
12399
+
</div>
12400
+
</div>
12401
+
<b>' . esc_html__("Show The Chatbot Only For These Browsers:", 'aiomatic-automatic-ai-content-writer') . '</b>
12402
+
</div>
12403
+
</td><td>
12404
+
<div>
12405
+
<select multiple id="' . $uniqum . 'show_browsers" onchange="anyNewChatChanged();" class="resize_vertical cr_width_full">';
12406
+
$selected = is_array( $data->show_browsers ) ? $data->show_browsers : [ '' ];
12407
+
$output .= aiomatic_get_browsers_content($selected);
12408
+
$output .= '</select>
12409
+
</div>
12410
+
</td></tr>
12411
+
<tr class="hideInject"><td>
12412
+
<div>
12413
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12414
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the IP Addresses for which the chatbot will not be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer') . '
12415
+
</div>
12416
+
</div>
12417
+
<b>' . esc_html__("Do Not Show The Chatbot For These IP Addresses:", 'aiomatic-automatic-ai-content-writer') . '</b>
12418
+
</div>
12419
+
</td><td>
12420
+
<div><textarea rows="2" id="' . $uniqum . 'no_show_ips" onchange="anyNewChatChanged();" placeholder="' . esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer') . '">' . esc_textarea($data->no_show_ips) . '</textarea>
12421
+
</div>
12422
+
</td></tr>
12423
+
<tr class="hideInject"><td>
12424
+
<div>
12425
+
<div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle">
12426
+
<div class="bws_hidden_help_text cr_min_260px">' . esc_html__("Select the IP Addresses for only which the chatbot will be shown. List of IP addresses or IP ranges. Examples: 46.33.233.31, 46.0-46.1", 'aiomatic-automatic-ai-content-writer') . '
12427
+
</div>
12428
+
</div>
12429
+
<b>' . esc_html__("Show The Chatbot Only For These IP Addresses:", 'aiomatic-automatic-ai-content-writer') . '</b>
12430
+
</div>
12431
+
</td><td>
12432
+
<div><textarea rows="2" id="' . $uniqum . 'show_ips" onchange="anyNewChatChanged();" placeholder="' . esc_html__("IP Addresses / Ranges", 'aiomatic-automatic-ai-content-writer') . '">' . esc_textarea($data->show_ips) . '</textarea>
12433
+
</div>
12434
+
</td></tr>
12435
+
</table>
12436
+
</div>
12437
+
</div>
12438
+
<div class="codemodalfzr-footer">
12439
+
<br/>
12440
+
<h3 class="cr_inline">Aimogen Chatbot Injection</h3><span id="aiomatic_chat_ok' . esc_html($cont) . '" class="codeokfzr cr_inline" onclick="document.getElementById(\'mymodalchatfzr' . esc_html($cont) . '\').style.display = \'none\';">OK </span>
12441
+
<br/><br/>
12442
+
</div>
12443
+
</div>
12444
+
</div>
12445
+
</div>
12446
+
<div class="cr_center aiuniq-' . esc_html($uniq) . '"><span data-id="' . esc_html($uniq) . '" class="wpaiomatic-delete">X</span></div>';
12447
+
$cont++;
12448
+
}
12449
+
}
12450
+
return $output;
12451
+
}
12452
+
?>