PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.1.0
Forumax – AI Powered Advanced Community Forum Plugin v2.1.0
2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 All 30 releases
bbp-core / includes / admin / options / options_chat.php

options_chat.php in Forumax – AI Powered Advanced Community Forum Plugin 2.1.0, at includes/admin/options/options_chat.php

195 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Chat Settings
4 *
5 * CSF settings section for the chat feature.
6 *
7 * @package Forumax
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 CSF::createSection(
15 $prefix,
16 array(
17 'id' => 'chat_opt',
18 'title' => __( 'Chat', 'forumax' ),
19 'icon' => 'dashicons dashicons-format-chat',
20 'fields' => array(
21 // Main Toggle.
22 array(
23 'type' => 'subheading',
24 'content' => __( 'Chat System', 'forumax' ),
25 ),
26
27 array(
28 'id' => 'forumax_chat_enabled',
29 'type' => 'switcher',
30 'title' => __( 'Enable Chat', 'forumax' ),
31 'subtitle' => __( 'Enable the private messaging chat system for forum users.', 'forumax' ),
32 'default' => false,
33 'class' => 'st-promax-notice',
34 ),
35
36 // File Upload Settings.
37 array(
38 'type' => 'subheading',
39 'content' => __( 'File Attachments', 'forumax' ),
40 'dependency' => array( 'forumax_chat_enabled', '==', true ),
41 ),
42
43 array(
44 'id' => 'forumax_chat_file_upload',
45 'type' => 'switcher',
46 'title' => __( 'Enable File Uploads', 'forumax' ),
47 'subtitle' => __( 'Allow users to send file attachments in chat.', 'forumax' ),
48 'default' => true,
49 'dependency' => array( 'forumax_chat_enabled', '==', true ),
50 'class' => 'st-promax-notice',
51 ),
52
53 array(
54 'id' => 'forumax_chat_max_file_size',
55 'type' => 'slider',
56 'title' => __( 'Max File Size', 'forumax' ),
57 'subtitle' => __( 'Maximum file size for attachments.', 'forumax' ),
58 'unit' => 'MB',
59 'min' => 1,
60 'max' => 20,
61 'step' => 1,
62 'default' => 5,
63 'dependency' => array(
64 array( 'forumax_chat_enabled', '==', true ),
65 array( 'forumax_chat_file_upload', '==', true ),
66 ),
67 'class' => 'st-promax-notice',
68 ),
69
70 array(
71 'id' => 'forumax_chat_allowed_file_types',
72 'type' => 'checkbox',
73 'title' => __( 'Allowed File Types', 'forumax' ),
74 'subtitle' => __( 'Select which file types can be uploaded in chat.', 'forumax' ),
75 'inline' => true,
76 'options' => array(
77 'jpg' => __( 'JPG', 'forumax' ),
78 'jpeg' => __( 'JPEG', 'forumax' ),
79 'png' => __( 'PNG', 'forumax' ),
80 'gif' => __( 'GIF', 'forumax' ),
81 'webp' => __( 'WebP', 'forumax' ),
82 'pdf' => __( 'PDF', 'forumax' ),
83 'doc' => __( 'DOC', 'forumax' ),
84 'docx' => __( 'DOCX', 'forumax' ),
85 'zip' => __( 'ZIP', 'forumax' ),
86 'mp4' => __( 'MP4', 'forumax' ),
87 'webm' => __( 'WebM', 'forumax' ),
88 ),
89 'default' => array( 'jpg', 'jpeg', 'png', 'gif', 'webp', 'pdf', 'doc', 'docx', 'zip', 'mp4', 'webm' ),
90 'dependency' => array(
91 array( 'forumax_chat_enabled', '==', true ),
92 array( 'forumax_chat_file_upload', '==', true ),
93 ),
94 'class' => 'st-promax-notice',
95 ),
96
97 // Emoji Settings.
98 array(
99 'type' => 'subheading',
100 'content' => __( 'Emoji', 'forumax' ),
101 'dependency' => array( 'forumax_chat_enabled', '==', true ),
102 ),
103
104 array(
105 'id' => 'forumax_chat_emoji',
106 'type' => 'switcher',
107 'title' => __( 'Enable Emoji Picker', 'forumax' ),
108 'subtitle' => __( 'Show emoji picker in chat input area.', 'forumax' ),
109 'default' => true,
110 'dependency' => array( 'forumax_chat_enabled', '==', true ),
111 'class' => 'st-promax-notice',
112 ),
113
114 // UI Settings.
115 array(
116 'type' => 'subheading',
117 'content' => __( 'Appearance', 'forumax' ),
118 'dependency' => array( 'forumax_chat_enabled', '==', true ),
119 ),
120
121 array(
122 'id' => 'forumax_chat_user_bubble_color',
123 'type' => 'color',
124 'title' => __( 'User Message Bubble', 'forumax' ),
125 'subtitle' => __( 'Background color for messages sent by the user.', 'forumax' ),
126 'default' => '#0866ff',
127 'output' => ':root',
128 'output_mode' => '--forumax-chat-bubble-user',
129 'output_important' => true,
130 'dependency' => array( 'forumax_chat_enabled', '==', true ),
131 'class' => 'st-promax-notice',
132 ),
133
134 array(
135 'id' => 'forumax_chat_other_bubble_color',
136 'type' => 'color',
137 'title' => __( 'Other User Message Bubble', 'forumax' ),
138 'subtitle' => __( 'Background color for messages received from other users.', 'forumax' ),
139 'default' => '#eeeeee',
140 'output' => ':root',
141 'output_mode' => '--forumax-chat-bubble-other',
142 'output_important' => true,
143 'dependency' => array( 'forumax_chat_enabled', '==', true ),
144 'class' => 'st-promax-notice',
145 ),
146
147 // Chat Assistants Settings.
148 array(
149 'type' => 'subheading',
150 'content' => __( 'Chat Assistants', 'forumax' ),
151 'dependency' => array( 'forumax_chat_enabled', '==', true ),
152 ),
153
154 array(
155 'id' => 'forumax_chat_assistants_enabled',
156 'type' => 'switcher',
157 'title' => __( 'Enable Chat Assistants', 'forumax' ),
158 'subtitle' => __( 'Allow designated moderators/keymasters to reply to any user in chat. These users will appear in the conversations list for everyone.', 'forumax' ),
159 'default' => false,
160 'dependency' => array( 'forumax_chat_enabled', '==', true ),
161 'class' => 'st-promax-notice',
162 ),
163
164 array(
165 'id' => 'forumax_chat_assistants',
166 'type' => 'select',
167 'title' => __( 'Select Assistants', 'forumax' ),
168 'subtitle' => __( 'Select users who can assist anyone in chat. Only moderators and keymasters are shown.', 'forumax' ),
169 'placeholder' => __( 'Select assistants...', 'forumax' ),
170 'options' => 'frmx_get_moderator_users',
171 'multiple' => true,
172 'chosen' => true,
173 'dependency' => array(
174 array( 'forumax_chat_enabled', '==', true ),
175 array( 'forumax_chat_assistants_enabled', '==', true ),
176 ),
177 'class' => 'st-promax-notice',
178 ),
179
180 array(
181 'id' => 'forumax_chat_assistants_label',
182 'type' => 'text',
183 'title' => __( 'Assistants Section Label', 'forumax' ),
184 'subtitle' => __( 'Label shown above assistants in the conversations list.', 'forumax' ),
185 'default' => __( 'Support Team', 'forumax' ),
186 'dependency' => array(
187 array( 'forumax_chat_enabled', '==', true ),
188 array( 'forumax_chat_assistants_enabled', '==', true ),
189 ),
190 'class' => 'st-promax-notice',
191 ),
192 ),
193 )
194 );
195