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
8function prefs_tiki_list()
9{
10	return [
11		'tiki_version_check_frequency' => [
12			'name' => tra('Check frequency'),
13			'description' => tra('How often Tiki should check for updates. This field applies only if "Check for updates automatically" is enabled. '),
14			'hint' => tra('Click "Check for Updates Now" to perform an update check.'),
15			'type' => 'list',
16			'perspective' => false,
17			'options' => [
18				'86400' => tra('Each day'),
19				'604800' => tra('Each week'),
20				'2592000' => tra('Each month'),
21			],
22			'dependencies' => [
23				'feature_version_checks',
24			],
25			'default' => 604800,
26			'tags' => ['basic'],
27		],
28		'tiki_release_cycle' => [
29			'name' => tr('Upgrade cycle'),
30			'description' => tra('Tiki upgrade frequency for this site to check against.'),
31			'type' => 'list',
32			'default' => 'regular',
33			'dependencies' => [
34				'feature_version_checks',
35			],
36			'options' => [
37				'regular' => tr('Regular (8 months)'),
38				'longterm' => tr('Long-Term Support'),
39			],
40			'help' => 'Version+Lifecycle',
41		],
42		'tiki_minify_javascript' => [
43			'name' => tra('Minify JavaScript'),
44			'description' => tra('Compress JavaScript files used in the page into a single file to be distributed statically. Changes to JavaScript files will require cache to be cleared. Uses http://code.google.com/p/minify/'),
45			'type' => 'flag',
46			'perspective' => false,
47			'default' => 'n',
48			'tags' => ['basic'],
49		],
50		'tiki_minify_late_js_files' => [
51			'name' => tra('Minify late JavaScript'),
52			'description' => tra('Compress extra JavaScript files used in the page after tiki-setup into a separate file which may vary from page to page.'),
53			'type' => 'flag',
54			'perspective' => false,
55			'default' => 'n',
56		],
57		'tiki_minify_css' => [
58			'name' => tra('Minify CSS'),
59			'description' => tra('Compress CSS files (notably by removing white space). Changes to CSS files will require cache to be cleared.') . ' ' . tra('Uses http://code.google.com/p/minify/'),
60			'type' => 'flag',
61			'perspective' => false,
62			'default' => 'n',
63			'tags' => ['basic'],
64		],
65		'tiki_minify_css_single_file' => [
66			'name' => tra('Minify CSS into a single file'),
67			'description' => tra('In addition to reducing the size of the CSS files, reduce the number of files by consolidating them.'),
68			'type' => 'flag',
69			'perspective' => false,
70			'warning' => tra('This setting may not work out of the box for all styles. Import needs to use @import url("...") and not @import "..."'),
71			'default' => 'n',
72			'tags' => ['basic'],
73		],
74		'tiki_prefix_css' => [
75			'name' => tra('Prefix CSS'),
76			'description' => tra('Use -prefix-free JavaScript library to add vendor specific css prefixes.'),
77			'type' => 'flag',
78			'perspective' => false,
79			'default' => 'n',
80			'tags' => ['experimental'],
81			'warning' => tra('May be replaced by a server-side option soon.'),
82		],
83		'tiki_same_day_time_only' => [
84			'name' => tra('Skip date for same day'),
85			'description' => tra('When displaying short date and time, skip date for today. Only time will be displayed.'),
86			'type' => 'flag',
87			'default' => 'y',
88			'tags' => ['basic'],
89		],
90		'tiki_cachecontrol_session' => [
91			'name' => tra('Cache-control header'),
92			'description' => tra('Custom HTTP header to use when a session is active'),
93			'type' => 'text',
94			'filter' => 'striptags',
95			'hint' => tra('Example: no-cache, pre-check=0, post-check=0'),
96			'default' => '',
97		],
98		'tiki_cachecontrol_nosession' => [
99			'name' => tra('Cache-control header (no session)'),
100			'description' => tra('Custom HTTP header to use when no session is active'),
101			'type' => 'text',
102			'filter' => 'striptags',
103			'dependencies' => [ 'session_silent' ],
104			'default' => '',
105		],
106		'tiki_cdn' => [
107			'name' => tra('Content delivery networks'),
108			'description' => tra('Use alternate domains to serve static files from this Tiki site to avoid sending cookies, improve local caching and generally improve user-experience performance.'),
109			'hint' => tra('List of URI prefixes to include before static files (one per line), for example: http://cdn1.example.com'),
110			'help' => 'Content+Delivery+Network',
111			'type' => 'textarea',
112			'size' => 4,
113			'filter' => 'url',
114			'default' => '',
115		],
116		'tiki_cdn_ssl' => [
117			'name' => tra('Content delivery networks in SSL'),
118			'description' => tra('Use alternate domains to serve static files from this Tiki site to avoid sending cookies, improve local caching and generally improve user-experience performance. Leave empty to disable CDN in SSL mode.'),
119			'hint' => tra('List of URI prefixes to include before static files (one per line), for example: https://sslcdn1.example.com'),
120			'help' => 'Content+Delivery+Network',
121			'type' => 'textarea',
122			'size' => 4,
123			'filter' => 'url',
124			'default' => '',
125		],
126		'tiki_cdn_check' => [
127			'name' => tra('Check CDN files exists'),
128			'description' => tra('Check that minified JS and CSS files exist before including them in the page.'),
129			'help' => 'Content+Delivery+Network',
130			'type' => 'flag',
131			'filter' => 'alpha',
132			'default' => 'y',
133		],
134		'tiki_domain_prefix' => [
135			'name' => tra('Domain prefix handling'),
136			'description' => tra('Strip or automatically add the "www." prefix on domain names to standardize URLs.'),
137			'type' => 'list',
138			'options' => [
139				'unchanged' => tra('Leave as-is'),
140				'strip' => tra('Remove the www'),
141				'force' => tra('Add the www'),
142			],
143			'default' => 'unchanged',
144			'tags' => ['basic'],
145		],
146		'tiki_domain_redirects' => [
147			'name' => tra('Domain redirects'),
148			'description' => tra('When the site is accessed through specific domain names, redirect to an alternate domain preserving the URL. Useful for domain name transitions, like tikiwiki.org to tiki.org.'),
149			'type' => 'textarea',
150			'hint' => tra('One entry per line, with each entry a comma-separated list: old domain, new domain'),
151			'size' => 8,
152			'default' => '',
153		],
154		'tiki_check_file_content' => [
155			'name' => tra('Validate uploaded file content'),
156			'description' => tra('Do not trust user input and open the files to verify their content.'),
157			'type' => 'flag',
158			'extensions' => ['fileinfo'],
159			'default' => 'y',
160		],
161		'tiki_allow_trust_input' => [
162			'name' => tra('Allow the tiki_p_trust_input permission.'),
163			'description' => tra('Bypass user input filtering.'),
164			'warning' => tra('Note: all permissions are granted to the Admins group including this one, so if you enable this you may expose your site to XSS (Cross Site Scripting) attacks for admin users.'),
165			'type' => 'flag',
166			'default' => 'n',
167		],
168		'tiki_object_selector_threshold' => [
169			'name' => tr('Object selector threshold'),
170			'description' => tr('Number of records after which the object selectors will request searching instead of selecting from a list.'),
171			'type' => 'text',
172			'size' => 6,
173			'default' => 250,
174			'units' => tra('records'),
175			'filter' => 'int',
176		],
177		'tiki_object_selector_searchfield' => [
178			'name' => tr('Object selector search field'),
179			'description' => tr('Field or (comma separated) fields to search when filtering in an object selector. e.g. "%0" (default "%1")', 'content', 'title'),
180			'type' => 'text',
181			'default' => 'title',
182			'filter' => 'text',
183		],
184		'tiki_key' => [
185			'name' => tr('Client key for this site'),
186			'type' => 'text',
187			'description' => tra('This must match the shared key entered in the Master’s key field.'),
188			'size' => 32,
189			'filter' => 'text',
190			'default' => '',
191		],
192	];
193}
194