PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.1.0
Forumax – AI Powered Advanced Community Forum Plugin v2.1.0
2.5.1 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 All 31 releases
bbp-core / includes / admin / options / options_topics.php

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

388 lines 11.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Create a section.
4 CSF::createSection(
5 $prefix,
6 [
7 'title' => __('Forum Topics', 'forumax'),
8 'id' => 'topics_fields',
9 'icon' => 'dashicons dashicons-menu-alt3',
10 'fields' => [
11 [
12 'title' => esc_html__('Title Prefix', 'forumax'),
13 'id' => 'topic_title_prefix',
14 'type' => 'text',
15 'default' => esc_html__('Q:', 'forumax')
16 ],
17 [
18 'id' => 'is_solved_topics',
19 'type' => 'switcher',
20 'default' => true,
21 'title' => __('Solved Topics', 'forumax'),
22 'subtitle' => __('Enable/ Disable Solved Topics feature.', 'forumax'),
23 ],
24 [
25 'id' => 'is_auto_approval_topics',
26 'type' => 'switcher',
27 'default' => true,
28 'title' => __('Auto Approval', 'forumax'),
29 'subtitle' => __('Enable/ Disable Auto Approval feature.', 'forumax'),
30 'class' => 'st-pro-notice',
31 ],
32 [
33 'id' => 'topic_pending_notice',
34 'type' => 'text',
35 'title' => __('Pending Notice', 'forumax'),
36 'default' => __('Your topic is awaiting for moderation.', 'forumax'),
37 'dependency' => ['is_auto_approval_topics', '==', false],
38 'class' => 'st-pro-notice',
39 ],
40 [
41 'id' => 'anonymous_topic',
42 'type' => 'switcher',
43 'title' => __('Anonymous Topic', 'forumax'),
44 'subtitle' => __('Allow anonymous to create topics.', 'forumax'),
45 'class' => 'st-pro-notice',
46 ],
47 [
48 'id' => 'anonymous_topic_label',
49 'type' => 'text',
50 'title' => __('Anonymous Label', 'forumax'),
51 'default' => __('Post Anonymously', 'forumax'),
52 'dependency' => ['anonymous_topic', '==', 'true',],
53 'class' => 'st-pro-notice',
54 ],
55
56 [
57 'type' => 'subheading',
58 'title' => __('Reaction', 'forumax'),
59 ],
60
61 [
62 'id' => 'topics_react_voting',
63 'type' => 'switcher',
64 'title' => __('React Reactions', 'forumax'),
65 'subtitle' => __('To enable or disable the react reactions.', 'forumax'),
66 'class' => 'st-promax-notice',
67 'default' => false
68 ],
69 [
70 'id' => 'topics_react_label',
71 'type' => 'text',
72 'title' => __('React Button Text', 'forumax'),
73 'default' => __('React', 'forumax'),
74 'class' => 'st-promax-notice',
75 'dependency' => ['topics_react_voting', '==', 'true',]
76 ],
77
78 [
79 'id' => 'reactions',
80 'type' => 'group',
81 'title' => __('Emoji Reactions', 'forumax'),
82 'subtitle' => __('Manage or add emoji reactions.', 'forumax'),
83 'class' => 'st-promax-notice',
84 'fields' => [
85 [
86 'id' => 'icon',
87 'type' => 'text',
88 'title' => __('Icon (Emoji)', 'forumax'),
89 ],
90 [
91 'id' => 'label',
92 'type' => 'text',
93 'title' => __('Label', 'forumax'),
94 ],
95 ],
96 'default' => [
97 ['icon' => '👍', 'label' => 'Like'],
98 ['icon' => '👎', 'label' => 'Dislike'],
99 ['icon' => '❤️', 'label' => 'Love'],
100 ['icon' => '😂', 'label' => 'Haha'],
101 ['icon' => '😮', 'label' => 'Wow'],
102 ['icon' => '😢', 'label' => 'Sad'],
103 ['icon' => '😡', 'label' => 'Angry'],
104 ],
105 'dependency' => ['topics_react_voting', '==', 'true',],
106 'button_title' => __('Add Reaction', 'forumax'),
107 'button_remove' => true,
108 'add_title' => __('Add New Reaction', 'forumax'),
109 'remove_title' => __('Remove Reaction', 'forumax'),
110 'accordion_title_auto' => true,
111 'accordion_title_number' => true,
112 'accordion_title_prefix' => __('Reaction:', 'forumax'),
113 ],
114 [
115 'type' => 'subheading',
116 'title' => __('Same Topic Voting', 'forumax'),
117 ],
118 [
119 'id' => 'same_topic_voting',
120 'type' => 'switcher',
121 'title' => __('Enable / Disable', 'forumax'),
122 'class' => 'st-pro-notice',
123 ],
124 [
125 'id' => 'same_topic_settings',
126 'type' => 'tabbed',
127 'title' => __('Settings', 'forumax'),
128 'subtitle' => __('Customize voting button text and color for single topic.', 'forumax'),
129 'dependency' => ['same_topic_voting', '==', 'true',],
130 'tabs' => array(
131 array(
132 'title' => __('Button', 'forumax'),
133 'fields' => array(
134 [
135 'id' => 'same_topic_voting_label',
136 'type' => 'text',
137 'title' => __('Label', 'forumax'),
138 'default' => __('I have the same question', 'forumax'),
139 'class' => 'st-pro-notice'
140 ],
141 [
142 'id' => 'same_topic_color',
143 'type' => 'link_color',
144 'title' => __('Color', 'forumax'),
145 'output' => '.bbpc-same-topic-btn',
146 'output_mode' => 'color',
147 'output_important' => true,
148 'class' => 'st-pro-notice'
149 ],
150 [
151 'id' => 'same_topic_bg_color_normal',
152 'type' => 'background',
153 'title' => __('Background', 'forumax'),
154 'background_image' => false,
155 'background_attachment' => false,
156 'background_position' => false,
157 'background_repeat' => false,
158 'background_size' => false,
159 'output' => '.bbpc-same-topic-btn',
160 'output_mode' => 'background',
161 'output_important' => true,
162 'class' => 'st-pro-notice'
163 ],
164 [
165 'id' => 'same_topic_bg_color_hover',
166 'type' => 'background',
167 'title' => __('Hover Background', 'forumax'),
168 'background_image' => false,
169 'background_attachment' => false,
170 'background_position' => false,
171 'background_repeat' => false,
172 'background_size' => false,
173 'output' => '.bbpc-same-topic-btn:hover',
174 'output_mode' => 'background',
175 'output_important' => true,
176 'class' => 'st-pro-notice'
177 ]
178 )
179 ),
180 array(
181 'title' => __('Success', 'forumax'),
182 'fields' => array(
183 [
184 'id' => 'same_topic_voting_success',
185 'type' => 'text',
186 'title' => __('Text', 'forumax'),
187 'default' => __('Updated vote successfully', 'forumax'),
188 'class' => 'st-pro-notice'
189 ],
190 [
191 'id' => 'same_topic_success_color',
192 'type' => 'link_color',
193 'title' => __('Color', 'forumax'),
194 'default' => array(
195 'color' => '#4a4a4a',
196 'hover' => '#4a4a4a',
197 ),
198 'output' => '.same-topic-voting-notice',
199 'output_mode' => 'color',
200 'output_important' => true,
201 'class' => 'st-pro-notice'
202 ],
203 [
204 'id' => 'same_topic_bg_success_color',
205 'type' => 'background',
206 'title' => __('Background', 'forumax'),
207 'background_image' => false,
208 'background_attachment' => false,
209 'background_position' => false,
210 'background_repeat' => false,
211 'background_size' => false,
212 'default' => [
213 'background-color' => '#f9f9f9'
214 ],
215 'output' => '.same-topic-voting-notice',
216 'output_mode' => 'background',
217 'output_important' => true,
218 'class' => 'st-pro-notice'
219 ],
220 [
221 'id' => 'same_topic_bg_success_color_hover',
222 'type' => 'background',
223 'title' => __('Hover Background', 'forumax'),
224 'background_image' => false,
225 'background_attachment' => false,
226 'background_position' => false,
227 'background_repeat' => false,
228 'background_size' => false,
229 'default' => [
230 'background-color' => '#f9f9f9'
231 ],
232 'output' => '.same-topic-voting-notice:hover',
233 'output_mode' => 'background',
234 'output_important' => true,
235 'class' => 'st-pro-notice'
236 ]
237 )
238 )
239 )
240 ],
241 [
242 'type' => 'heading',
243 'title' => esc_html__('Sharing Topics', 'forumax'),
244 ],
245 [
246 'id' => 'is_social_links',
247 'type' => 'switcher',
248 'title' => esc_html__('Share Button', 'forumax'),
249 'text_on' => esc_html__('Enabled', 'forumax'),
250 'text_off' => esc_html__('Disabled', 'forumax'),
251 'text_width' => 92,
252 'default' => true
253 ],
254 [
255 'id' => 'share_btn_label',
256 'type' => 'text',
257 'title' => esc_html__('Share Button Label', 'forumax'),
258 'default' => esc_html__('Share this Topic', 'forumax'),
259 'dependency' => array(
260 array('is_copy_link', '==', '1'),
261 array('is_social_links', '==', '1'),
262 )
263 ],
264 [
265 'id' => 'is_copy_link',
266 'type' => 'switcher',
267 'title' => esc_html__('Copy Link Button', 'forumax'),
268 'dependency' => array('is_social_links', '==', '1'),
269 'text_width' => 72,
270 'default' => true,
271 ],
272 [
273 'id' => 'copy_link_label',
274 'type' => 'text',
275 'title' => esc_html__('Copy Link Label', 'forumax'),
276 'default' => esc_html__('Or copy link', 'forumax'),
277 'dependency' => array(
278 array('is_copy_link', '==', '1'),
279 array('is_social_links', '==', '1'),
280 )
281 ],
282 [
283 'id' => 'copy_link_text_success',
284 'type' => 'text',
285 'title' => esc_html__('Success Message', 'forumax'),
286 'default' => esc_html__('URL copied to clipboard', 'forumax'),
287 'dependency' => array(
288 array('is_copy_link', '==', '1'),
289 array('is_social_links', '==', '1'),
290 )
291 ],
292 [
293 'type' => 'heading',
294 'title' => __('Real-Time Alert', 'forumax'),
295 ],
296 [
297 'id' => 'real_time_alerts_enabled',
298 'type' => 'switcher',
299 'title' => __('Real-Time Chat Notice', 'forumax'),
300 'default' => false,
301 'class' => 'st-promax-notice',
302 ],
303 [
304 'id' => 'real_time_alerts_label',
305 'type' => 'text',
306 'title' => __('Alert Label', 'forumax'),
307 'default' => __('See %d new topics', 'forumax'),
308 'desc' => __('Use %d for the number of topics.', 'forumax'),
309 'dependency' => ['real_time_alerts_enabled', '==', 'true'],
310 'class' => 'st-promax-notice',
311 ],
312 [
313 'id' => 'real_time_alerts_interval',
314 'type' => 'number',
315 'title' => __('Polling Interval (seconds)', 'forumax'),
316 'default' => 30,
317 'min' => 5,
318 'max' => 300,
319 'dependency' => ['real_time_alerts_enabled', '==', 'true'],
320 'class' => 'st-promax-notice',
321 ],
322 [
323 'id' => 'topic_subscription',
324 'title' => esc_html__('Subscription', 'forumax'),
325 'subtitle' => esc_html__('Subscription settings for logged out users.', 'forumax'),
326 'type' => 'subheading'
327 ],
328 [
329 'title' => esc_html__('Enable / Disable', 'forumax'),
330 'id' => 'is_topic_subscription',
331 'type' => 'switcher',
332 'text_on' => esc_html__('Show', 'forumax'),
333 'text_off' => esc_html__('Hide', 'forumax'),
334 'default' => '1',
335 'text_width' => 80,
336 ],
337 [
338 'title' => esc_html__('Subscribe Button', 'forumax'),
339 'id' => 'logout_subscription_btn',
340 'type' => 'text',
341 'default' => esc_html__('Subscribe', 'forumax'),
342 'dependency' => array( 'is_topic_subscription', '==', '1' )
343 ],
344 [
345 'title' => esc_html__('Title', 'forumax'),
346 'id' => 'subscription_modal_title',
347 'type' => 'text',
348 'default' => esc_html__('Login to the community', 'forumax'),
349 'dependency' => array( 'is_topic_subscription', '==', '1' )
350 ],
351 [
352 'title' => esc_html__('Subtitle', 'forumax'),
353 'id' => 'subscription_modal_subtitle',
354 'type' => 'text',
355 'default' => esc_html__('You must be logged in to subscribe to this topic.', 'forumax'),
356 'dependency' => array( 'is_topic_subscription', '==', '1' )
357 ],
358 [
359 'title' => esc_html__('Login Button', 'forumax'),
360 'id' => 'logout_login_btn',
361 'type' => 'text',
362 'default' => esc_html__('Login', 'forumax'),
363 'dependency' => array( 'is_topic_subscription', '==', '1' )
364 ],
365 [
366 'title' => esc_html__('Login Type', 'forumax'),
367 'id' => 'login_url_type',
368 'type' => 'select',
369 'default' => 'default',
370 'options' => array(
371 'default' => esc_html__('Default Login', 'forumax'),
372 'custom' => esc_html__('Custom Page', 'forumax'),
373 ),
374 'dependency' => array( 'is_topic_subscription', '==', '1' )
375 ],
376 [
377 'title' => esc_html__('Select Page', 'forumax'),
378 'id' => 'login_page',
379 'type' => 'select',
380 'options' => 'pages',
381 'dependency' => array(
382 array( 'login_url_type', '==', 'custom' ),
383 array( 'is_topic_subscription', '==', '1' ),
384 )
385 ]
386 ]
387 ]
388 );