1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8use Tiki\Package\VendorHelper;
9
10function prefs_fgal_list()
11{
12	//set fgal_default_view options
13	$defaultViews = [
14		'list' => tra('List'),
15		'browse' => tra('Browse'),
16		'page' => tra('Page')
17	];
18	global $prefs;
19	if (! empty($prefs['fgal_elfinder_feature']) && $prefs['fgal_elfinder_feature'] === 'y') {
20		$defaultViews = $defaultViews + ['finder' => tra('Finder view')];
21	}
22	//set show options for list prefs
23	$showOptions = [
24		'n' => tra('Hide'),
25		'y' => tra('Show as a column'),
26		'o' => tra('Show in popup box'),
27		'a' => tra('Both'),
28	];
29
30	return [
31		'fgal_podcast_dir' => [
32			'name' => tra('Podcast directory'),
33			'description' => tra('File system directory for storing podcast files'),
34			'type' => 'text',
35			'help' => 'File+Gallery+Config',
36			'size' => 50,
37			'hint' => tra('The server must be able to read/write the directory.') . ' ' . tra('Required for podcasts.'),
38			'perspective' => false,
39			'default' => 'files/',
40		],
41		'fgal_batch_dir' => [
42			'name' => tra('Path'),
43			'type' => 'text',
44			'help' => 'File+Gallery+config',
45			'size' => 50,
46			'hint' => tra('To enable and use directory batch loading, set up a web-readable directory (preferably outside the web space). Then upload files to that directory, such as with SCP, FTP, etc') . ' ' . tra('The server must be able to read the directory.') . ' ' . tra('The directory can be outside the web space.'),
47			'perspective' => false,
48			'default' => '',
49		],
50		'fgal_prevent_negative_score' => [
51			'name' => tra('Prevent download if score becomes negative'),
52			'description' => tra('If using Tiki Score system, users with a negative score cannot download files.'),
53			'type' => 'flag',
54			'help' => 'File+Gallery+config',
55			'default' => 'n',
56			'dependencies' => ['feature_score'],
57		],
58		'fgal_limit_hits_per_file' => [
59			'name' => tra('Allow download limit per file'),
60			'description' => tra(''),
61			'type' => 'flag',
62			'help' => 'File+Gallery+config',
63			'default' => 'n',
64		],
65		'fgal_allow_duplicates' => [
66			'name' => tra('Allow file duplicates'),
67			'description' => tra('Allow the same file to be uploaded more than once.'),
68			'type' => 'list',
69			'help' => 'File+Gallery+config',
70			'perspective' => false,
71			'options' => [
72							  'n' => tra('Never'),
73							  'y' => tra('Yes, even in the same gallery'),
74							  'different_galleries' => tra('Only in different galleries')
75			],
76			'default' => 'y',
77		],
78		'fgal_display_zip_option' => [
79			'name' => tra('Display ZIP option in gallery'),
80			'description' => tra('Users can upload a .zip (archive file). Tiki will automatically un-zip the archive and add each file to the gallery..'),
81			'type' => 'flag',
82			'help' => 'File+Gallery+config',
83			'default' => 'n',
84		],
85		'fgal_match_regex' => [
86			'name' => tra('Must match'),
87
88			'description' => tra('A regular expression that must be matched to accept the file example A-Za-z* (filename can only have a-z letters)
89For example, if you want to require that uploads must have a wordprocessing file extension, you could enter .*.(odt|sxw|doc|dot|rtf|wpt|frm|wpd|txt|ODT|SXW|DOC|DOT|RTF|WPT|FRM|WPD|TXT)'),
90			'type' => 'text',
91			'size' => 50,
92			'default' => '',
93		],
94		'fgal_nmatch_regex' => [
95			'name' => tra('Cannot match'),
96			'description' => tra('A regular expression that, if matched, causes the file to be rejected. For example, .gif rejects gif images. Note that the period must be escaped since a regular expression is being used. If you don’t know anything about regular expressions just leave the fields blank and all the files will be accepted.'),
97			'type' => 'text',
98			'size' => 50,
99			'default' => '',
100		],
101		'fgal_quota' => [
102			'name' => tra('Quota for all files and archives'),
103			'description' => tra('The total size of files uploaded to all the file galleries or to a specific file gallery can be limited. The quota for a file gallery applies to that file gallery and all the file galleries under it.
104When the limit is reached, no more files can be uploaded. The user will see an explanatory error message. An email can be sent via the Mail notifications feature.)'),
105			'shorthint' => tra('0 for unlimited'),
106			'type' => 'text',
107			'units' => tra('megabytes'),
108			'size' => 7,
109			'default' => 0,
110		],
111		'fgal_quota_per_fgal' => [
112			'name' => tra('Quota for each file gallery'),
113			'description' => tra('A different quota can be defined for each file gallery.'),
114			'type' => 'flag',
115			'default' => 'n',
116		],
117		'fgal_quota_default' => [
118			'name' => tra('Default quota for each new gallery'),
119			'shorthint' => tra('0 for unlimited'),
120			'type' => 'text',
121			'units' => tra('megabytes'),
122			'size' => 7,
123			'default' => 0,
124		],
125		'fgal_quota_show' => [
126			'name' => tra('Show quota bar in the list page'),
127			'type' => 'list',
128			'options' => [
129				'n' 			=> tra('Never'),
130				'bar_and_text' 	=> tra('Yes, display bar and detail text'),
131				'y' 			=> tra('Yes, display only bar'),
132				'text_only'		=> tra('Yes, display only text')
133			],
134			'default' => 'y',
135		],
136		'fgal_use_db' => [
137			'name' => tra('Storage'),
138			'description' => tra('Specify if uploaded files should be stored in the database or file directory.'),
139			'type' => 'list',
140			'perspective' => false,
141			'options' => [
142				'y' => tra('Store in database'),
143				'n' => tra('Store in directory'),
144			],
145			'default' => 'y',
146			'tags' => ['basic'],
147		],
148		'fgal_use_dir' => [
149			'name' => tra('Path to the directory to store file gallery files'),
150			'description' => tra("Specify a directory on this server, for example: /var/www/  It's recommended that this directory not be web-accessible. PHP must be able to read/write to the directory."),
151			'type' => 'text',
152			'size' => 50,
153			'perspective' => false,
154			'default' => 'storage/fgal/',
155			'tags' => ['basic'],
156		],
157		'fgal_search_in_content' => [
158			'name' => tra('Searchable file gallery content'),
159			'description' => tra('Include the search form on the current gallery page just after "Find"'),
160			'type' => 'flag',
161			'default' => 'n',
162		],
163		'fgal_search' => [
164			'name' => tra('Include a search form in file galleries'),
165			'type' => 'flag',
166			'default' => 'y',
167		],
168		'fgal_list_ratio_hits' => [
169			'name' => tra('Display hits ratio to maximum'),
170			'description' => tra('Display hits with a ratio of hits to maximum hits'),
171			'type' => 'flag',
172			'default' => 'n',
173		],
174		'fgal_display_properties' => [
175			'name' => tra('Display properties in the context menu'),
176			'type' => 'flag',
177			'default' => 'y',
178		],
179		'fgal_display_replace' => [
180			'name' => tra('Display "Replace" in the context menu'),
181			'type' => 'flag',
182			'default' => 'y',
183		],
184		'fgal_delete_after' => [
185			'name' => tra('Automatic deletion of old files'),
186			'description' => tra('The user will have an option when uploading a file to specify the time after which the file is deleted'),
187			'type' => 'flag',
188			'warning' => tra('A cron job must be set up in order to delete the files.'),
189			'help' => 'File+Gallery+Config',
190			'default' => 'n',
191		],
192		'fgal_checked' => [
193			'name' => tra('Allow action on multiple files or galleries'),
194			'description' => tra('Include "Remove" as an option for the checkbox action in file galleries'),
195			'type' => 'flag',
196			'help' => 'File+Gallery+Config',
197			'default' => 'y',
198		],
199		'fgal_delete_after_email' => [
200			'name' => tra('Deletion emails notification'),
201			'description' => tra('Email addresses (comma-separated) to receive a copy of each deleted file'),
202			'type' => 'text',
203			'default' => '',
204		],
205		'fgal_keep_fileId' => [
206			'name' => tra('Keep the same fileId for the latest version of a file'),
207			'description' => tra('If the checkbox is checked, the file ID of the latest version of a file stays the same. A link to the file will always link to the latest version. If not checked, each version of the file is assigned its own file ID, so a link to the file will be to a specific version of the file'),
208			'type' => 'flag',
209			'default' => 'y',
210		],
211		'fgal_show_thumbactions' => [
212			'name' => tra('Show thumbnail actions'),
213			'description' => tra('Show the checkbox and wrench icon for file actions menu when not displaying details'),
214			'type' => 'flag',
215			'default' => 'y',
216		],
217		'fgal_thumb_max_size' => [
218			'name' => tra('Maximum thumbnail size'),
219			'description' => tra('Maximum width or height for image thumbnails'),
220			'units' => tra('pixels'),
221			'type' => 'text',
222			'size' => 5,
223			'default' => 120,
224		],
225		'fgal_enable_auto_indexing' => [
226			'name' => tra('Automatic indexing of file content'),
227			'description' => tra('Uses command line tools to extract the information from the files based on their MIME types.'),
228			'default' => 'n',
229			'type' => 'flag',
230		],
231		'fgal_asynchronous_indexing' => [
232			'name' => tra('Asynchronous indexing'),
233			'type' => 'flag',
234			'default' => 'y',
235		],
236		'fgal_upload_from_source' => [
237			'name' => tra('Upload files from remote source'),
238			'description' => tra('Enable copying files to file galleries from a URL that will be polled for new revisions.'),
239			'type' => 'flag',
240			'default' => 'n',
241			'tags' => ['advanced'],
242			'dependencies' => ['fgal_keep_fileId'],
243		],
244		'fgal_source_refresh_frequency' => [
245			'name' => tra('Remote source refresh frequency limit'),
246			'description' => tra('Minimum number of seconds to elapse between remote source checks to prevent flooding the server with requests.'),
247			'hint' => tr('Set to zero to disable refresh'),
248			'type' => 'text',
249			'filter' => 'int',
250			'size' => 5,
251			'units' => tra('seconds'),
252			'default' => 3600,
253		],
254		'fgal_source_show_refresh' => [
255			'name' => tra('Display controls to attempt a file refresh'),
256			'description' => tra('Let users trigger a refresh attempt from the remote host.'),
257			'type' => 'flag',
258			'default' => 'n',
259		],
260		'fgal_tracker_existing_search' => [
261			'name' => tra('Allow searching for existing files in the tracker files field'),
262			'description' => tra('Search files using the search index.'),
263			'type' => 'flag',
264			'default' => 'y',
265			'dependencies' => ['feature_search'],
266		],
267		'fgal_fix_mime_type' => [
268			'name' => tra('Set MIME type based on file suffix'),
269			'description' => tra('Sets the MIME type of an image file according to the file suffix when it is incorrectly detected as application/octet-stream'),
270			'type' => 'flag',
271			'default' => 'n',
272			'tags' => ['experimental'],
273			'help' => 'File+Gallery+config',
274		],
275		'fgal_clean_xml_always' => [
276			'name' => tra('Clean XML Always'),
277			'description' => tra('Sanitize XML based files such as SVG for all users.'),
278			'type' => 'flag',
279			'default' => 'y',
280			'help' => 'File+Gallery+config',
281			'permission' => [
282				'textFilter' => 'upload_javascript',
283			],
284		],
285		'fgal_allow_svg' => [
286			'name' => tra('Allow SVG file upload'),
287			'description' => tra('Because SVG files may contain malicious code and compromise system security, specifically grant permission to upload SVG files..'),
288			'type' => 'flag',
289			'default' => 'n',
290			'help' => 'File+Gallery+config',
291			'keywords' => 'svg upload',
292			'permission' => [
293				'textFilter' => 'upload_svg',
294			],
295		],
296		'fgal_browse_name_max_length' => [
297			'name' => tra('Maximum name length'),
298			'description' => tra('Length to which to truncate file names in browse view.'),
299			'type' => 'text',
300			'filter' => 'int',
301			'units' => tra('characters'),
302			'size' => 5,
303			'default' => 40,
304		],
305		'fgal_image_max_size_x' => [
306			'name' => tra('Maximum width of images'),
307			'description' => tra('Default maximum width of images in galleries.'),
308			'type' => 'text',
309			'filter' => 'int',
310			'shorthint' => tr('0 for unlimited'),
311			'units' => tra('pixels'),
312			'size' => 5,
313			'default' => 0,
314		],
315		'fgal_image_max_size_y' => [
316			'name' => tra('Maximum height of images'),
317			'description' => tra('Default maximum height of images in galleries.'),
318			'type' => 'text',
319			'filter' => 'int',
320			'shorthint' => tr('0 for unlimited'),
321			'units' => tra('pixels'),
322			'size' => 5,
323			'default' => 0,
324		],
325		'fgal_elfinder_feature' => [
326			'name' => tra('Use elFinder UI'),
327			'description' => tra('Alternative file manager with drag and drop capability'),
328			'type' => 'flag',
329			'filter' => 'alpha',
330			'default' => 'n',
331			'help' => 'elFinder',
332			'dependencies' => ['feature_jquery_ui'],
333		],
334		'fgal_elfinder_on_toolbar' => [
335			'name' => tra('Use elFinder on Toolbars'),
336			'description' => tra('Use elFinder in the popup on toolbar FileGallery buttons'),
337			'type' => 'flag',
338			'filter' => 'alpha',
339			'default' => 'y',
340			'help' => 'elFinder',
341			'dependencies' => ['fgal_elfinder_feature'],
342		],
343		'fgal_elfinder_debug' => [
344			'name' => tra('Enable elFinder debug mode'),
345			'description' => tra('Shows errors and warnings in the elFinder window and adds debugging information to service calls.'),
346			'type' => 'flag',
347			'filter' => 'alpha',
348			'default' => 'n',
349			'help' => 'elFinder',
350			'dependencies' => ['fgal_elfinder_feature'],
351		],
352		'fgal_viewerjs_feature' => [
353			'name' => tra('Use Viewer JS'),
354			'description' => tra('Uses ViewerJS from http://viewerjs.org if available (needs a separate install due to licensing restrictions), and allows displaying ODF files (odt, ods, odp) as well as pdf in web pages'),
355			'type' => 'flag',
356			'filter' => 'alpha',
357			'default' => 'n',
358			'help' => 'ViewerJS',
359			'tags' => ['deprecated'],
360			'warning' => tra('This feature will be removed after Tiki18 and before Tiki19'),
361		],
362		'fgal_viewerjs_uri' => [
363			'name' => tra('Viewer JS URI'),
364			'description' => tra('Where ViewerJS is installed'),
365			'type' => 'text',
366			'filter' => 'url',
367			'default' => 'files/viewerjs/ViewerJS/index.html',
368			'help' => 'ViewerJS',
369			'tags' => ['deprecated'],
370			'dependencies' => ['fgal_viewerjs_feature'],
371			'warning' => tra('This feature will be removed after Tiki18 and before Tiki19'),
372		],
373		'fgal_pdfjs_feature' => [
374			'name' => tr('Use PDF.js'),
375			'description' => tr('Uses PDF.js to display PDF files in web pages'),
376			'type' => 'flag',
377			'default' => 'n',
378			'help' => 'PDF.js-viewer',
379			'packages_required' => ['npm-asset/pdfjs-dist-viewer-min' => VendorHelper::getAvailableVendorPath('pdfjsviewer', '/npm-asset/pdfjs-dist-viewer-min/build/minified/build/pdf.js')],
380		],
381		'fgal_default_view' => [
382			'name' => tra('Default view'),
383			'type' => 'list',
384			'options' => $defaultViews,
385			'default' => 'list',
386		],
387		'fgal_sortField' => [
388			'name' => tra('Default sort field'),
389			'type' => 'list',
390			'options' => [
391				'created' => tra('Creation Date'),
392				'name' => tra('Name'),
393				'lastModif' => tra('Last modification date'),
394				'hits' => tra('Hits'),
395				'user' => tra('Owner'),
396				'description' => tra('Description'),
397				'id' => tra('ID'),
398			],
399			'default' => 'created',
400		],
401		'fgal_sortDirection' => [
402			'name' => tra('Default sort direction'),
403			'type' => 'radio',
404			'options' => [
405				'desc' => tra('Descending'),
406				'asc' => tra('Ascending'),
407			],
408			'default' => 'desc',
409		],
410		'fgal_icon_fileId' => [
411			'name' => tra('Gallery icon'),
412			'description' => tra('Enter the ID of any file in any gallery to be used as the icon for this gallery in browse view'),
413			'type' => 'text',
414			'filter' => 'digits',
415			'default' => '',
416		],
417		'fgal_show_explorer' => [
418			'name' => tra('Show explorer'),
419			'type' => 'flag',
420			'default' => 'y',
421		],
422		'fgal_show_path' => [
423			'name' => tra('Show path'),
424			'type' => 'flag',
425			'default' => 'y',
426		],
427		'fgal_show_slideshow' => [
428			'name' => tra('Show slideshow'),
429			'type' => 'flag',
430			'default' => 'n',
431		],
432		'fgal_show_ocr_state' => [
433			'name' => tra('Show OCR Status'),
434			'type' => 'list',
435			'options' => $showOptions,
436			'default' => 'n',
437		],
438		'fgal_list_id' => [
439			'name' => tra('ID'),
440			'type' => 'list',
441			'options' => $showOptions,
442			'default' => 'o',
443		],
444		'fgal_list_type' => [
445			'name' => tra('Type'),
446			'type' => 'list',
447			'options' => $showOptions,
448			'default' => 'y',
449		],
450		'fgal_list_name' => [
451			'name' => tra('Name'),
452			'type' => 'list',
453			'options' => [
454				'a' => tra('Name-filename'),
455				'n' => tra('Name only'),
456				'f' => tra('Filename only'),
457			],
458			'default' => 'n',
459		],
460		'fgal_list_description' => [
461			'name' => tra('Description'),
462			'type' => 'list',
463			'options' => $showOptions,
464			'default' => 'o',
465		],
466		'fgal_list_size' => [
467			'name' => tra('Size'),
468			'type' => 'list',
469			'options' => $showOptions,
470			'default' => 'y',
471		],
472		'fgal_list_created' => [
473			'name' => tra('Created / Uploaded'),
474			'type' => 'list',
475			'options' => $showOptions,
476			'default' => 'o',
477		],
478		'fgal_list_lastModif' => [
479			'name' => tra('Last modified'),
480			'type' => 'list',
481			'options' => $showOptions,
482			'default' => 'y',
483		],
484		'fgal_list_creator' => [
485			'name' => tra('Uploaded by'),
486			'type' => 'list',
487			'options' => $showOptions,
488			'default' => 'o',
489		],
490		'fgal_list_author' => [
491			'name' => tra('Creator'),
492			'type' => 'list',
493			'options' => $showOptions,
494			'default' => 'o',
495		],
496		'fgal_list_last_user' => [
497			'name' => tra('Last modified by'),
498			'type' => 'list',
499			'options' => $showOptions,
500			'default' => 'o',
501		],
502		'fgal_list_comment' => [
503			'name' => tra('Comment'),
504
505			'type' => 'list',
506			'options' => $showOptions,
507			'default' => 'o',
508		],
509		'fgal_list_files' => [
510			'name' => tra('Files'),
511			'type' => 'list',
512			'options' => $showOptions,
513			'default' => 'o',
514		],
515		'fgal_list_hits' => [
516			'name' => tra('Hits'),
517			'type' => 'list',
518			'options' => $showOptions,
519			'default' => 'o',
520			'dependencies' => ['feature_stats'],
521		],
522		'fgal_list_lastDownload' => [
523			'name' => tra('Last download'),
524			'type' => 'list',
525			'options' => $showOptions,
526			'default' => 'n',
527		],
528		'fgal_list_lockedby' => [
529			'name' => tra('Locked by'),
530			'type' => 'list',
531			'options' => $showOptions + ['i' => tra('Show icon in column')],
532			'default' => 'a',
533		],
534		'fgal_list_backlinks' => [
535			'name' => tra('Backlinks'),
536			'description' => tra('Present a list of pages that link to the current page.'),
537			'type' => 'list',
538			'help' => 'Backlinks',
539			'options' => $showOptions,
540			'default' => 'n',
541		],
542		'fgal_list_deleteAfter' => [
543			'name' => tra('Delete after'),
544			'type' => 'list',
545			'options' => [
546				'n' => tra('Hide'),
547				'y' => tra('Show as a column'),
548			],
549			'default' => 'n',
550		],
551		'fgal_list_share' => [
552			'name' => tra('Share'),
553			'type' => 'list',
554			'options' => $showOptions,
555			'default' => 'n',
556		],
557		'fgal_list_source' => [
558			'name' => tra('Source'),
559			'type' => 'list',
560			'options' => $showOptions,
561			'default' => 'n',
562		],
563		'fgal_list_id_admin' => [
564			'name' => tra('ID'),
565			'type' => 'list',
566			'options' => $showOptions,
567			'default' => 'y',
568		],
569		'fgal_list_type_admin' => [
570			'name' => tra('Type'),
571			'type' => 'list',
572			'options' => $showOptions,
573			'default' => 'y',
574		],
575		'fgal_list_name_admin' => [
576			'name' => tra('Name'),
577			'type' => 'list',
578			'options' => [
579				'a' => tra('Name-filename'),
580				'n' => tra('Name only'),
581				'f' => tra('Filename only'),
582			],
583			'default' => 'n',
584		],
585		'fgal_list_description_admin' => [
586			'name' => tra('Description'),
587			'type' => 'list',
588			'options' => $showOptions,
589			'default' => 'o',
590		],
591		'fgal_list_size_admin' => [
592			'name' => tra('Size'),
593			'type' => 'list',
594			'options' => $showOptions,
595			'default' => 'y',
596		],
597		'fgal_list_created_admin' => [
598			'name' => tra('Created / Uploaded'),
599			'type' => 'list',
600			'options' => $showOptions,
601			'default' => 'o',
602		],
603		'fgal_list_lastModif_admin' => [
604			'name' => tra('Last modified'),
605			'type' => 'list',
606			'options' => $showOptions,
607			'default' => 'y',
608		],
609		'fgal_list_creator_admin' => [
610			'name' => tra('Uploaded by'),
611			'type' => 'list',
612			'options' => $showOptions,
613			'default' => 'o',
614		],
615		'fgal_list_author_admin' => [
616			'name' => tra('Creator'),
617			'type' => 'list',
618			'options' => $showOptions,
619			'default' => 'o',
620		],
621		'fgal_list_last_user_admin' => [
622			'name' => tra('Last modified by'),
623			'type' => 'list',
624			'options' => $showOptions,
625			'default' => 'o',
626		],
627		'fgal_list_comment_admin' => [
628			'name' => tra('Comment'),
629			'type' => 'list',
630			'options' => $showOptions,
631			'default' => 'o',
632		],
633		'fgal_list_files_admin' => [
634			'name' => tra('Files'),
635			'type' => 'list',
636			'options' => $showOptions,
637			'default' => 'o',
638		],
639		'fgal_list_hits_admin' => [
640			'name' => tra('Hits'),
641			'type' => 'list',
642			'options' => $showOptions,
643			'default' => 'o',
644		],
645		'fgal_list_lastDownload_admin' => [
646			'name' => tra('Last download'),
647			'type' => 'list',
648			'options' => $showOptions,
649			'default' => 'n',
650		],
651		'fgal_list_lockedby_admin' => [
652			'name' => tra('Locked by'),
653			'type' => 'list',
654			'options' => $showOptions + ['i' => tra('Show icon in column')],
655			'default' => 'n',
656		],
657		'fgal_list_backlinks_admin' => [
658			'name' => tra('Backlinks'),
659			'description' => tra('Present a list of pages that link to the current page.'),
660			'help' => 'Backlinks',
661			'type' => 'list',
662			'options' => $showOptions,
663			'default' => 'y',
664		],
665		'fgal_list_deleteAfter_admin' => [
666			'name' => tra('Delete after'),
667			'type' => 'list',
668			'options' => $showOptions,
669			'default' => '',
670		],
671		'fgal_list_share_admin' => [
672			'name' => tra('Share'),
673			'type' => 'list',
674			'options' => $showOptions,
675			'default' => '',
676		],
677		'fgal_list_source_admin' => [
678			'name' => tra('Source'),
679			'type' => 'list',
680			'options' => $showOptions,
681			'default' => '',
682		],
683		'fgal_convert_documents_pdf' => [
684			'name' => tra('View or export office documents as PDF'),
685			'description' => tra('If enabled allows to view documents without download or to export documents as PDF files'),
686			'type' => 'flag',
687			'keywords' => 'convert files documents pdf',
688			'default' => 'n',
689			'tags' => ['basic'],
690			'packages_required' => ['media-alchemyst/media-alchemyst' => 'Unoconv\Unoconv'],
691		],
692		'fgal_maximum_image_width_preview' => [
693			'name' => tra('Maximum width of file preview in pixels'),
694			'description' => tra('The maximum value of width in pixels for the files preview in the popover.'),
695			'size' => 4,
696			'type' => 'text',
697			'filter' => 'int',
698			'default' => '250'
699		],
700		'fgal_export_diagram_on_image_save' => [
701			'name' => tra('Export diagram image on save'),
702			'description' => tra('If enabled, diagrams will be cached in PNG format when saved or edited.'),
703			'type' => 'flag',
704			'default' => 'y'
705		],
706		'fgal_use_casperjs_to_export_images' => [
707			'name' => tra('Use locally CasperJS to export images'),
708			'description' => tra('If enabled, diagrams can be exported using CasperJS.'),
709			'type' => 'flag',
710			'default' => 'n',
711			'packages_required' => ['jerome-breton/casperjs-installer' => 'CasperJsInstaller\Installer'],
712		],
713		'fgal_use_drawio_services_to_export_images' => [
714			'name' => tra('Use draw.io public services to export images'),
715			'description' => tra('When exporting PDFs, if this setting is enabled, diagram images will be fetched using Drawio\'s services if not in cache. This basically works like a fallback.'),
716			'type' => 'flag',
717			'default' => 'n'
718		],
719	];
720}
721