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

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

Bug fixed: as rvelices notified me by email, my header replacement script was
bugged (r2297 was repeating new and old header).

By the way, I've also removed the replacement keywords. We were using them
because it was a common usage with CVS but it is advised not to use them with
Subversion. Personnaly, it is a problem when I search differences between 2
Piwigo installations outside Subversion.

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