source: trunk/plugins/admin_advices/en_UK/lang.adv.php @ 2297

Last change on this file since 2297 was 2297, checked in by plg, 16 years ago

Modification: new header on PHP files, PhpWebGallery renamed Piwigo.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 19.5 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based picture gallery                                  |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
8// +-----------------------------------------------------------------------+
9// | This program is free software; you can redistribute it and/or modify  |
10// | it under the terms of the GNU General Public License as published by  |
11// | the Free Software Foundation                                          |
12// |                                                                       |
13// | This program is distributed in the hope that it will be useful, but   |
14// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
15// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
16// | General Public License for more details.                              |
17// |                                                                       |
18// | You should have received a copy of the GNU General Public License     |
19// | along with this program; if not, write to the Free Software           |
20// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21// | USA.                                                                  |
22// +-----------------------------------------------------------------------+
23// +-----------------------------------------------------------------------+
24// | PhpWebGallery - a PHP based picture gallery                           |
25// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
26// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
27// +-----------------------------------------------------------------------+
28
29global $lang;
30$lang['An_advice_about'] = 'A new advice about';
31$lang['Metadata'] = 'Metadata';
32
33foreach ($conf as $key => $value)
34{
35  if ( is_string($value) )
36  {
37    $bool = ($value == 'false') ? false : $value;
38    $bool = ($value == 'true') ? true : $bool;
39    $conf[$key] = $bool;
40  }
41}
42
43//
44//               Don't forget to update range for new advices
45//
46$cases = range(1,34);
47srand ((double) microtime() * 10000000);
48shuffle($cases);
49
50$cond = false;
51foreach ($cases as $id_adv)
52{
53  if ($cond) break;
54  $adv = array();
55  switch ($id_adv) {
56    Case 1 :
57      $adv[] = 'Current value: public. ';
58      $adv[] = 'Try $conf[\'newcat_default_status\'] = \'private\';';
59      $adv[] = 'You will have more time to describe and check your pictures.';
60      $adv[] = 'Time to decide between private and public status.';
61      $adv[] = 'If you choose private, time to distribute authorization.';
62      $adv[] = 'Your new category will be well prepared.';
63      $cond = ($conf['newcat_default_status'] !== 'public');
64      $confk = 'newcat_default_status';
65      break;
66
67    Case 2 :
68      $adv[] = 'Current value: ' . (string) $conf['slideshow_period'] . '.';
69      $adv[] = 'This value could be too small for low band connections.';
70      $adv[] = 'Think about higher value like 4.';
71      $cond = ( $conf['slideshow_period'] < 4 );
72      $confk = 'slideshow_period';
73      break;
74
75    Case 3 :
76      $adv[] = 'Current value: ' . implode(', ', $conf['file_ext']) . '. ';
77      $adv[] = 'Should never contains extensions which can be executed';
78      $adv[] = 'on the server side like *.php, *.PHP, *.asp, ...';
79      $cond = ( in_array('php',$conf['file_ext']) );
80      $confk = 'file_ext';
81      break;
82
83    Case 4 :
84      $adv[] = 'Show IPTC Data from your picture:';
85      $adv[] = ' 1 - Copy one of your jpg pictures (a public one)' .
86                   ' in ./tools/<br />' .
87               ' 2 - Rename it as sample.jpg.<br />' .
88               ' 3 - Run ./tools/metadata.php<br />' .
89               ' 4 - Analyse results to determine which IPTC fields could be' .
90                   ' useful for your visitors.';
91      $adv[] = 'Beginners would prefer to keep $conf[\'show_iptc\'] = false;';
92      $adv[] = 'Advanced users would take care of $lang values and impacts' .
93        ' on templates.';
94      $cond = true;
95      $confk = 'show_iptc_mapping';
96      break;
97
98     Case 5 :
99      $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
100      $adv[] = 'This value is maybe too high for low connections, ' .
101               'think about 25-50 depending on your thumbnail sizes.';
102      $cond = ( $conf['top_number'] > 50 );
103      $confk = 'top_number';
104      break;
105
106     Case 6 :
107      $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
108      $adv[] = 'One? It could be too low for random pictures, ' .
109               'think about 5-10 depending on your thumbnail sizes.';
110      $cond = ( $conf['top_number'] < 2 ) ? true : false;
111      $confk = 'top_number';
112      break;
113
114     Case 7 :
115      $adv[] = 'Current value: ' . (string) $conf['anti-flood_time'] . '.';
116      $adv[] = 'For normal flow processing, your value is probably too high. ' .
117               'Reasonable value is 60 (default).' ;
118      $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false;
119      $confk = 'anti-flood_time';
120      break;
121
122     Case 8 :
123      $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
124      $adv[] = 'Authorized values are ' .
125               "'date_creation' or 'date_available'" .
126               ', otherwise you can get unpredictable results.' ;
127      $cond = ( !in_array($conf['calendar_datefield'],
128        array('date_creation','date_available')) );
129      $confk = 'calendar_datefield';
130      break;
131
132     Case 9 :
133      // If (iptc or exif) are used and date_creation is updated
134      // Then it's Ok, you can use date_creation by default for calendar
135      // else ... Advice
136      $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
137      $adv[] = "'date_creation'" . ' is NOT filled by ' .
138      'any activated use metadata mapping fields.';
139      $adv[] = 'So activate metadata usage <strong>or</strong> change to ' .
140      '$conf[\'calendar_datefield\'] = \'date_available\'';
141      $adv[] = 'Activate metadata usage as you want: <br />' .
142      '1 - $conf[\'use_iptc\'] = true; or $conf[\'use_exif\'] = true; ' .
143      'each way will be correct.<br />' .
144      '2 - And respectively map:<br />' .
145      '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' ' .
146      '=> \'2#055\', ...<br />' .
147      'or/and:<br />' .
148      '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' .
149      '=> \'DateTimeOriginal\', ...<br />' .
150      '3 - Finally, a new task is up to you: Metadata synchronization.'  ;
151      $cond2 = ( $conf['use_exif'] and
152                isset($conf['use_exif_mapping']['date_creation']) );
153      $cond3 = ( $conf['use_iptc'] and
154                isset($conf['use_iptc_mapping']['date_creation']) );
155      $cond = ( $conf['calendar_datefield'] == 'date_creation' );
156      $cond = ( ($cond2 or $cond3) and $cond ) ? false : true;
157      $confk = 'calendar_datefield';
158      break;
159
160     Case 10 :
161      $adv[] = 'Current value: false.';
162      $adv[] = 'Not useful, private status is better, so code ' .
163               '$conf[\'newcat_default_visible\'] = true;'  ;
164      $cond = !$conf['newcat_default_visible'];
165      $confk = 'newcat_default_visible';
166      break;
167
168     Case 11 :
169      $adv[] = 'Current value: ' . (string) $conf['level_separator'] . '.';
170      $adv[] = 'Try something else like $conf[\'level_separator\'] = \'+ \';';
171      $cond = ( $conf['level_separator'] == ' / ' );
172      $confk = 'level_separator';
173      break;
174
175     Case 12 :
176      $adv[] = 'Current value: ' . (string) $conf['paginate_pages_around'] . '.';
177      $adv[] = 'Usual range is between 2 and 5. To be light, choose ' .
178      '$conf[\'paginate_pages_around\'] = 2; <br />' .
179      'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7;';
180      $cond = (($conf['paginate_pages_around'] < 2)
181            or ($conf['paginate_pages_around'] > 12));
182      $confk = 'paginate_pages_around';
183      break;
184
185     Case 13 :
186      $adv[] = 'Current value: ' . (string) $conf['tn_width'] . '.';
187      $adv[] = 'Should be a close value to your thumbnail width.' .
188      $adv[] = 'Usual range is between 96 and 150, ' .
189               'about $conf[\'tn_width\'] = 128;';
190      $cond = (($conf['tn_width'] < 66)
191            or ($conf['tn_width'] > 180));
192      $confk = 'tn_width';
193      break;
194
195     Case 14 :
196      $adv[] = 'Current value: ' . (string) $conf['tn_height'] . '.';
197      $adv[] = 'Should be a close value to your thumbnail height.' .
198      $adv[] = 'Usual range is between 96 and 150, ' .
199               'about $conf[\'tn_height\'] = 128;';
200      $cond = (($conf['tn_height'] < 66)
201            or ($conf['tn_height'] > 180));
202      $confk = 'tn_height';
203      break;
204
205     Case 15 :
206      $adv[] = 'Thumbnail height and width have to be equal.';
207      $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] .
208               ';<br />' .
209               'or $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';';
210      $cond = ( $conf['tn_height'] !== $conf['tn_width'] );
211      $confk = 'tn_height';
212      break;
213
214     Case 16 :
215      $adv[] = 'Current value: true.';
216      $adv[] = 'For security reason, please set ' .
217               '$conf[\'show_version\'] = false;';
218      $cond = $conf['show_version'];
219      $confk = 'show_version';
220      break;
221
222     Case 17 :
223      $adv[] = 'Current value: true.';
224      $adv[] = 'For a lighter gallery just have a look to ' .
225               '$conf[\'show_thumbnail_caption\'] = false;';
226      $cond = $conf['show_thumbnail_caption'];
227      $confk = 'show_thumbnail_caption';
228      break;
229
230     Case 18 :
231      $adv[] = 'Current value: true.';
232      $adv[] = 'For a lighter gallery just have a look to ' .
233               '$conf[\'show_picture_name_on_title\'] = false;';
234      $cond = $conf['show_picture_name_on_title'];
235      $confk = 'show_picture_name_on_title';
236      break;
237
238     Case 19 :
239      $adv[] = 'Current value: true.';
240      $adv[] = 'If you do NOT have any category descriptions just have ' .
241               'a look to $conf[\'subcatify\'] = false;';
242      $cond = $conf['subcatify'];
243      $confk = 'subcatify';
244      break;
245
246     Case 20 :
247      $adv[] = 'Current value: true.';
248      $adv[] = 'Leave $conf[\'allow_random_representative\'] = true; <br />' .
249               'but analyze if you can avoid for performance reasons.' ;
250      $cond = $conf['allow_random_representative'];
251      $confk = 'allow_random_representative';
252      break;
253
254     Case 21 :
255      $adv[] = 'Current value: ' . (string) $conf['prefix_thumbnail'] . '.';
256      $adv[] = 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.';
257      $adv[] = 'Do NOT change it except if your thumbnails are NOT visible.';
258      $adv[] = 'Distant site may use a different prefix but ' .
259               'create_listing_file.php must be modified.<br />' .
260               'You will get a warning message during synchronization in ' .
261               'that case.';
262      $adv[] = 'Try to keep the same prefix thru all your sites either ' .
263               'local or distants.';
264      $adv[] = 'Keep this parameter in your ./include/config_'.
265               '<strong>local.inc.php</strong>. <br />'.
266               'See our wiki configuration page for more information about ' .
267               './include/config_<strong>local.inc.php</strong>.';
268      $cond = ( $conf['prefix_thumbnail'] !== 'TN-' );
269      $confk = 'prefix_thumbnail';
270      break;
271
272     Case 22 :
273      $adv[] = 'Current value: ' . (string) $conf['users_page'] . '.';
274      $adv[] = 'Unless you have a low band connection, you can draw up ' .
275               '$conf[\'users_page\'] to a higher value ' .
276               'if you have more than 20 members.';
277      $cond = ( $conf['users_page'] < 21 );
278      $confk = 'users_page';
279      break;
280
281     Case 23 :
282      $adv[] = 'Current value: true.';
283      $adv[] = 'Should be false, only few webmasters have to set ' .
284               '$conf[\'mail_options\'] = true; <br />' .
285               'A specific advice you can get from an advanced ' .
286               'user on our forum in some mailing issues.' ;
287      $cond = $conf['mail_options'];
288      $confk = 'mail_options';
289      break;
290
291     Case 24 :
292      $adv[] = 'Current value: true.';
293      $adv[] = 'Should be false, only PWG dev Team have to set ' .
294               '$conf[\'check_upgrade_feed\'] = true; for test purpose.' ;
295      $cond = $conf['check_upgrade_feed'];
296      $confk = 'check_upgrade_feed';
297      break;
298
299     Case 25 :
300      $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
301             . 'items.';
302      $adv[] = 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.';
303      $cond = ( count($conf['rate_items']) < 4 );
304      $confk = 'rate_items';
305      break;
306
307     Case 26 :
308      $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
309             . 'items.';
310      $adv[] = 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.';
311      $adv[] = 'Check your best rated pictures prior to remove some values.' .
312               '<br />Reduce excessive rating and change your ' .
313               '$conf[\'rate_items\'].';
314      $cond = ( count($conf['rate_items']) > 6 );
315      $confk = 'rate_items';
316      break;
317
318     Case 27 :
319      $adv[] = 'Current value: true.';
320      $adv[] = 'Could be true, think about $conf[\'show_iptc\'] = false;'
321             . '<br />Some Professional photographers choose false ' .
322               'their reasons are not really professional.' ;
323      $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
324               '<strong>use</strong>_iptc (have a look on metadata page ' .
325               'on our wiki).';
326      $cond = $conf['show_iptc'];
327      $confk = 'show_iptc';
328      break;
329
330     Case 28 :
331      $adv[] = 'Current value: true.';
332      $adv[] = 'Documentalists and professionnal photographers would ' .
333               'set it true, but beginners should leave it ' .
334               'as $conf[\'use_iptc\'] = false;';
335      $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
336               '<br />Mentionned fields would be rewrited with IPTC values ' .
337               ' even those ones are NOT empty.';
338      $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
339               '<strong>use</strong>_iptc (have a look on metadata page ' .
340               'on our wiki).';
341      $cond = $conf['use_iptc'];
342      $confk = 'use_iptc';
343      break;
344
345     Case 29 :
346      $adv[] = 'How to deal with IPTC:';
347      $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
348               '<br />2 - Rename it as sample.jpg.' .
349               '<br />3 - Run ./tools/metadata.php' .
350               '<br />4 - Analyse results to determine which IPTC fields ' .
351               'could be used to override database fields.';
352      $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
353      $adv[] = 'Advanced users make documentation efforts prior ' .
354               'to upload their pictures.<br />' .
355               'IPTC fields have to be described in ' .
356               '$conf[\'use_iptc_mapping\']';
357      $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
358               '<strong>use</strong>_iptc_mapping must be totally different.';
359      $cond = true;
360      $confk = 'use_iptc';
361      break;
362
363     Case 30 :
364      $adv[] = 'How to deal with IPTC:';
365      $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
366               '<br />2 - Rename it as sample.jpg.' .
367               '<br />3 - Run ./tools/metadata.php' .
368               '<br />4 - Analyse results to determine which IPTC fields ' .
369               'could be used to override database fields.';
370      $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
371      $adv[] = 'Advanced users make documentation efforts prior ' .
372               'to upload their pictures.';
373      $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
374               '<br />Mentionned fields would be rewrited with IPTC values ' .
375               ' even those ones are NOT empty.';
376      $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
377               '<strong>use</strong>_iptc_mapping must be totally different.';
378      $cond = true;
379      $confk = 'use_iptc_mapping';
380      break;
381
382     Case 31 :
383      $adv[] = 'Current value: ' . ( ( $conf['show_exif'] ) ? 'true':'false' )
384             . '.';
385      $adv[] = 'Should be true, some information from your camera ' .
386               'can be displayed.';
387      $adv[] = 'Think about EXIF information could be different depending ' .
388               'on camera models.<br />' .
389               'If you change your camera these fields could be ' .
390               'partly different.';
391      $adv[] = 'Many professional photographers choose false, ' .
392               'their reasons are to protect their knowledge.' ;
393      $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
394               '<strong>use</strong>_exif (have a look on metadata page ' .
395               'on our wiki).';
396      $cond = true;
397      $confk = 'show_exif';
398      break;
399
400     Case 32 :
401      $adv[] = 'How to deal with EXIF:';
402      $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
403               '<br />2 - Rename it as sample.jpg.' .
404               '<br />3 - Run ./tools/metadata.php' .
405               '<br />4 - Analyse results to determine which EXIF fields ' .
406               'could be used to override database fields.';
407      $adv[] = 'Beginners would prefer to let default values.';
408      $adv[] = 'Advanced users would take care of $lang values and ' .
409               'impacts on templates.';
410      $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
411               '<strong>use</strong>_exif_mapping must be totally different.';
412      $cond = true;
413      $confk = 'show_exif_fields';
414      break;
415
416     Case 33 :
417      $adv[] = 'Current value: ' . ( ( $conf['use_exif'] ) ? 'true':'false' )
418             . '.';
419      $adv[] = 'Documentalists and professionnal photographers would ' .
420               'set it true, but beginners should leave the default value.';
421      $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
422               '<br />Mentionned fields would be rewrited with EXIF values ' .
423               ' even those ones are NOT empty.';
424      $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
425               '<strong>use</strong>_exif (have a look on metadata page ' .
426               'on our wiki).';
427      $cond = true;
428      $confk = 'use_exif';
429      break;
430
431     Case 34 :
432      $adv[] = 'How to deal with EXIF:';
433      $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
434               '<br />2 - Rename it as sample.jpg.' .
435               '<br />3 - Run ./tools/metadata.php' .
436               '<br />4 - Analyse results to determine which EXIF fields ' .
437               'could be used to override database fields.';
438      $adv[] = 'Beginners would prefer to let default values.';
439      $adv[] = 'Advanced users would carefully chose overrided fields ' .
440               'prior to synchronize.';
441      $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
442               '<br />Mentionned fields would be rewrited with EXIF values ' .
443               ' even those ones are NOT empty.';
444      $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
445               '<strong>use</strong>_exif_mapping must be totally different.';
446      $cond = true;
447      $confk = 'use_exif_mapping';
448      break;
449  }
450}
451
452?>
Note: See TracBrowser for help on using the repository browser.