-
Notifications
You must be signed in to change notification settings - Fork 0
/
unc_config.inc.php
312 lines (305 loc) · 14.6 KB
/
unc_config.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?php
/*
* ATTENTION: These settings are not to be changed by the user.
* These are simply constants and other items used by the plugin.
* Use the config in the admin screen instead.
*/
if (!defined('WPINC')) {
die;
}
global $UNC_GALLERY;
$UNC_GALLERY['upload_folder'] = "unc_gallery";
$UNC_GALLERY['upload_path'] = WP_CONTENT_DIR . "/" . $UNC_GALLERY['upload_folder'];
$UNC_GALLERY['photos'] = "photos"; // subfolder of upload_path where the photos go in
$UNC_GALLERY['thumbnails'] = "thumbs"; // subfolder of upload_path where the thumbs go in
$UNC_GALLERY['settings_prefix'] = 'unc_gallery_'; // internal prefix for the config storage.
$UNC_GALLERY['operators'] = array(
'l' => 'is larger',
's' => 'is smaller',
'e' => 'is equal',
'ne' => 'is not equal',
'c' => 'contains',
'nc' => 'does not contain'
);
// options for displays
$UNC_GALLERY['keywords'] = array(
'type' => array(
// main type // valid options
'day' => array('calendar', 'datelist'), //, 'slideshow'), // shows a single date's gallery, optional date picker
'image' => array('link','link_post'), // only one image, requires file addon unless random or latest
'thumb' => array('link','link_post'), // only the icon of one image, requires file addon unless random or latest
'filter' => array('dropdown', 'list', 'link_list', 'map', 'tagged_posts'),
'chrono' => array(),
),
'date' => array('random', 'latest'), // whichdate to chose
'file' => array('random', 'latest'), // in case of image or icon type, you can chose one filename
'featured' => array('random', 'latest'),
'limt_rows' => 'intval',
'limit_images' => 'intval',
);
// file & mime-types
$UNC_GALLERY['valid_filetypes'] = array( // allows only these for uploads
"image/jpeg" => 'jpeg',
"image/heic" => 'heic',
"image/webp" => 'webp',
);
// This is used to automatically / dynamically create the settings menu
$UNC_GALLERY['user_settings'] = array(
'photo_rss_hashtags' => array(
'help' => 'The RSS feed for all photos will include hashtags. Enter them here.',
'default' => '#photo',
'type' => 'text',
'title' => 'Photo RSS Hashtags',
),
'thumbnail_height' => array(
'help' => 'The desired thumbnail height in pixels. Applies only for new uploads. Use the "Rebuild Thumbnails" function in the "Maintenance" tab to re-generate all tumbnails after changing this.',
'default' => '120',
'type' => 'text',
'title' => 'Thumbnail Height',
),
'thumbnail_quality' => array(
'help' => 'The desired thumbnail quality. Has to be a number between 1 (worst, smallest file) to 100 (best, largest file).',
'default' => '60',
'type' => 'text',
'title' => 'Thumbnail Quality',
),
'thumbnail_format' => array(
'help' => 'Crop the thumbnails to a specific format for easier layouts.',
'default' => 'max_height',
'type' => 'dropdown',
'options' => array('max_height' => 'Do not crop', 'square' => 'Square (like facebook/instagram)'),
'title' => 'Thumbnail Format',
),
'image_filetype_convert' => array(
'help' => 'Do you want to convert all images to a more efficient filetype?',
'default' => 'none',
'type' => 'dropdown',
'options' => array('none'=> 'Keep as-is', 'webp' => 'WebP'),
'title' => 'Image File Type',
),
'picture_long_edge' => array(
'help' => 'Shrink the full-size images so that the long edge will be this long (in pixels, 0 for disable). Warning: Resizing will remove all photo meta-data except for the date.',
'default' => '0',
'type' => 'text',
'title' => 'Picture size (Long Edge)',
),
'picture_quality' => array(
'help' => 'The desired picture quality. Has to be a number between 1 (worst, smallest file) to 100 (best, largest file). This applies only if the images are resized with the above setting.',
'default' => '75',
'type' => 'text',
'title' => 'Picture Quality',
),
'no_image_alert' => array(
'help' => 'What to display if there is no image for a given date?',
'default' => 'not_found',
'type' => 'dropdown',
'options' => array('not_found' => 'A fiendly "No images available"', 'error' => 'A red Error mesage', 'nothing' => 'Nothing'),
'title' => 'No image found alert',
),
'limit_results' => array(
'help' => 'When displaying images by location or keyword, you should have a maximum limit or results to display. Set to 0 to disable the limit',
'default' => '50',
'type' => 'text',
'title' => 'Limit filter results',
),
'featured_size' => array(
'help' => 'When featuring an image, how many rows should it cover in height? Chose "dynamic" if you want a orientation-specific size instead.',
'default' => '4',
'type' => 'dropdown',
'options' => array('2' => '2 Rows', '3' => '3 Rows', '4' => '4 Rows', '5' => '5 Rows', 'dynamic' => 'dynamic'),
'title' => 'Featured Image Size',
),
'featured_size_for_portrait' => array(
'help' => 'When featuring an image, how many image rows should it cover in height in case it is higher than wide? You need to set "Featured Size" to "dynamic" to enable this.',
'default' => '4',
'type' => 'dropdown',
'options' => array('2' => '2 Rows', '3' => '3 Rows', '4' => '4 Rows', '5' => '5 Rows'),
'title' => 'Featured Image Size (Portrait Format)',
),
'featured_size_for_landscape' => array(
'help' => 'When featuring an image, how many image rows should it cover in height in case it is wider than high? You need to set "Featured Size" to "dynamic" to enable this.',
'default' => '3',
'type' => 'dropdown',
'options' => array('2' => '2 Rows', '3' => '3 Rows', '4' => '4 Rows', '5' => '5 Rows'),
'title' => 'Featured Image Size (Landscape Format)',
),
'featured_size_for_mixed_sizes' => array(
'help' => 'When featuring several images of different orientations, how many image rows should they cover? If you do not want to show them all the same size, choose "dynamic".',
'default' => '3',
'type' => 'dropdown',
'options' => array('2' => '2 Rows', '3' => '3 Rows', '4' => '4 Rows', '5' => '5 Rows', 'dynamic' => 'dynamic'),
'title' => 'Featured Image Size (Mixed Formats)',
),
'image_view_method' => array(
'help' => 'Do you want to use photoswipe (mobile enabled) or lightbox, or just an image link to view images?',
'default' => 'photoswipe',
'type' => 'dropdown',
'options' => array('photoswipe' => 'Photoswipe', 'lightbox' => 'Lightbox', 'galleria' => 'Galleria.io', 'none' => 'Direct image link'),
'title' => 'Image view method',
),
'show_other_data' => array(
'help' => 'Which basic data do you want to show in image descriptions?',
'default' => array('permalink'),
'type' => 'multiple',
'options' => array('permalink' => 'Image Permalink', 'file_name' => 'Filename', 'dimensions' => 'Dimensions'), // this function just returns an array
'title' => 'Description Other Data choices',
),
'show_exif_data' => array(
'help' => 'Which EXIF data do you want to show in image descriptions?',
'default' => array('exposure_time', 'f', 'iso'),
'type' => 'multiple',
'options' => unc_image_options_array('exif'), // this function just returns an array
'title' => 'Description EXIF Data choices',
),
'show_xmp_data' => array(
'help' => 'Which XMP data do you want to show in image descriptions?',
'default' => array('keywords'),
'type' => 'multiple',
'options' => unc_image_options_array('xmp'), // this function just returns an array
'title' => 'Description XMP Data choices',
),
'show_iptc_data' => array(
'help' => 'Which IPTC data do you want to show in image descriptions?',
'default' => array('byline'),
'type' => 'multiple',
'options' => unc_image_options_array('iptc'), // this function just returns an array
'title' => 'Description IPTC Data choices',
),
'post_keywords' => array(
'help' => 'Do you want to automatically add missing keywords from photos to posts? This will not remove any tags from posts, only create & add new ones.',
'default' => 'none',
'type' => 'dropdown',
'options' => array(
'none' => 'Do not auto-tag',
'xmp' => 'XMP Keywords',
'xmp_force' => 'XMP Keywords, remove other tags',
'iptc' => 'IPTC Keywords',
'iptc_force' => 'IPTC Keywords, remove other tags'
),
'title' => 'Auto-Tag posts with Keywords',
),
'tag_default_description' => array(
'help' => 'When adding a new keyword (see above), do you want to have a default text description applied?',
'default' => '',
'type' => 'longtext',
'title' => 'Default Keyword description',
),
'post_categories' => array(
'help' => 'Do you want to automatically add XMP-data location-based hierarchical categories to posts? This will not remove manually added categories, only create and add new ones',
'default' => 'none',
'type' => 'dropdown',
'options' => array(
'none' => 'Do not auto-categorize',
'xmp_country_state_city_location' => 'XMP: Country - State - City - Location',
'xmp_city_location' => 'XMP: City - Location',
'iptc_country_state_city' => 'IPtc: Country - State - City',
),
'title' => 'Auto-Categorize posts by Location',
),
'category_default_description' => array(
'help' => 'When adding a new location category (see above), do you want to have a default text description applied?',
'default' => '',
'type' => 'longtext',
'title' => 'Default Category description',
),
'event_categories' => array(
'help' => 'Do you want to automatically add Event-categories based on the iptc-Extension EVENT field? '
. 'This will not remove manually added categories, only create and add new ones. '
. 'Please chose the format you named events if you enable this.',
'default' => 'none',
'type' => 'dropdown',
'options' => array(
'none' => 'Do not auto-categorize events',
'name_year' => 'Format: [Eventname Year] / e.g. Coachella 2010',
),
'title' => 'Auto-Categorize posts by Event',
),
'google_api_key' => array(
'help' => 'Your google API key to display maps.',
'default' => '',
'type' => 'text',
'title' => 'Google API key',
),
'google_maps_type' => array(
'help' => 'What type of map do you want to display?',
'default' => 'ROADMAP',
'type' => 'dropdown',
'options' => array(
'HYBRID' => 'Hybrid: Photographic map + roads and city names',
'ROADMAP' => 'Roadmap: Normal, default 2D map',
'SATELLITE' => 'Satellite: Photographic map',
'TERRAIN' => 'Terrain: Map with mountains, rivers, etc.',
),
'title' => 'Google Map type',
),
'google_maps_markerstyle' => array(
'help' => 'Do you want to click through map layers (country,province, city etc) or show all at once (clustered, splitting out on zoom)?',
'default' => 'cluster',
'type' => 'dropdown',
'options' => array(
'cluster' => 'Show all markers, cluster nearby ones',
'layer' => 'Click through layers',
),
'title' => 'Google Map Marker Style',
),
'google_maps_resultstyle' => array(
'help' => 'Do you want to show photos or posts when clicking on a map point? Posts works only if you have "Auto-Categorize posts by Location" enabled.',
'default' => 'posts',
'type' => 'dropdown',
'options' => array(
'photos' => 'Show photos',
'posts' => 'Show posts',
),
'title' => 'Google Map Result type',
),
'gps_round_data' => array(
'help' => 'Do you want to round the GPS accuracy? This is recommended to group locations together.',
'default' => '5',
'type' => 'dropdown',
'options' => array(
'false' => 'Don\'t round',
'0' => 'Zero digits after the comma (111km)',
'1' => '1 digits after the comma (11km)',
'2' => '2 digits after the comma (1km)',
'3' => '3 digits after the comma (110m)',
'4' => '4 digits after the comma (11m)',
'5' => '5 digits after the comma (1m)',
'6' => '6 digits after the comma (11cm)',
),
'title' => 'Google Map Result type',
),
'rss_feed_mode' => array(
'help' => 'For the photos RSS feed, do you want to sort by date taken or by date updated??',
'default' => 'updated',
'type' => 'dropdown',
'options' => array('updated' => 'Show latest updates', 'taken' => 'Show by file date'),
'title' => 'RSS Feed sort order',
),
'rss_feed_time' => array(
'help' => 'How far back shall the RSS feed last?',
'default' => '-1 week',
'type' => 'text',
'title' => 'RSS Feed time distance',
),
'settings_location' => array(
'help' => 'Do you want the admin screen of this plugin to be shown as a menu entry in the sidebar or a sub-menu of the settings menu?',
'default' => 'sidebar',
'type' => 'dropdown',
'options' => array('sidebar' => 'Show in Sidebar', 'submenu' => 'Show in the Settings'),
'title' => 'Admin menu location',
),
'admin_date_selector' => array(
'help' => 'Chose if you want to have a calendar or a dropdown list for the Manage Images Admin page.',
'default' => 'calendar',
'type' => 'dropdown',
'options' => array('calendar' => 'Calendar', 'datelist' => 'Date List'),
'title' => 'Admin date selector format',
),
'uninstall_deletes_images' => array(
'help' => 'Do you want your images removed from the server when you uninstall the plugin?',
'default' => 'yes',
'type' => 'dropdown',
'options' => array('yes' => 'Delete all images!', 'no' => 'Keep all images!'),
'title' => 'Uninstall behavior',
),
);