diff options
Diffstat (limited to '')
15 files changed, 1114 insertions, 1049 deletions
diff --git a/plugins/admin_advices/admin_advices.php b/plugins/admin_advices/admin_advices.php new file mode 100644 index 000000000..ee2a3e797 --- /dev/null +++ b/plugins/admin_advices/admin_advices.php @@ -0,0 +1,194 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' ); + +// Add a XHTML tag in HEAD section +function set_admin_advice_add_css() +{ + global $template, $page; + if ( isset($page['body_id']) and $page['body_id']=='theAdminPage' + and $page['page'] == 'intro' + ) + {// This Plugin works only on the Admin page + $template->append( + 'head_elements', + '<link rel="stylesheet" type="text/css" ' + . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">' + ); + add_event_handler('loc_begin_page_tail', 'set_admin_advice' ); + } +} + +// Build an advice on the Admin Intro page +function set_admin_advice() +{ + global $page, $user, $template, $conf, $prefixeTable, $lang; + $my_path = dirname(__FILE__).'/'; + +// Include language advices + foreach ($conf as $key => $value) + { + if ( is_string($value) ) + { + $bool = ($value == 'false') ? false : $value; + $bool = ($value == 'true') ? true : $bool; + $conf[$key] = $bool; + } + } + $adv = array(); + ini_set('error_reporting', E_ALL); + ini_set('display_errors', true); + + include_once( $my_path."adv_set.php" ); + + $cases = range(0,count($lang['Adv_case'])-1); + srand ((double) microtime() * 10000000); + shuffle($cases); + + + $cond = false; + foreach ($cases as $id) + { + if (!isset($adv['c'][$id])) $adv['c'][$id] = true; + if (!isset($adv['n'][$id])) $adv['c'][$id] = false; + if (!isset($lang['Adv_case'][$id])) $adv['c'][$id] = false; + $cond = $adv['c'][$id]; + if ($cond) break; + } + $confk = $adv['n'][$id]; + if (substr($confk,0,2) == '**') $confk = substr($confk,2); + else $confk = '$conf[' . "'$confk']"; + $advice_text = (isset($adv['v'][$id])) ? $adv['v'][$id] : ''; + $more = $lang['Adv_case'][$id]; + + $template->set_filenames(array( + 'admin_advice' => $my_path.'admin_advices.tpl') + ); + +// Mysql status + $result = pwg_query('SHOW TABLE STATUS ;'); + $pwgspacef = $spacef = $pwgsize = $size = 0; + $len = strlen($prefixeTable); + $check = array(); + while ($row = mysql_fetch_array($result)) + { + $size += ($row['Data_length'] + $row['Index_length']); + $spacef += $row['Data_free']; + if ( substr( $row['Name'], 0, $len ) == $prefixeTable ) { + $pwgsize += ($row['Data_length'] + $row['Index_length']); + $pwgspacef += $row['Data_free']; + $check[] = (string) $row['Check_time']; + } + } + $size .= ' bytes'; + $pwgsize .= ' bytes'; + $spacef .= ' bytes'; + $pwgspacef .= ' bytes'; + if ($size > 1024) $size = round($size / 1024, 1) . ' Kb'; + if ($size > 1024) $size = round($size / 1024, 1) . ' Mb'; + if ($pwgsize > 1024) $pwgsize = round($pwgsize / 1024, 1) . ' Kb'; + if ($pwgsize > 1024) $pwgsize = round($pwgsize / 1024, 1) . ' Mb'; + if ($spacef > 1024) $spacef = round($spacef / 1024, 1) . ' Kb'; + if ($spacef > 1024) $spacef = round($spacef / 1024, 1) . ' Mb'; + if ($pwgspacef > 1024) $pwgspacef = round($pwgspacef / 1024, 1) . ' Kb'; + if ($pwgspacef > 1024) $pwgspacef = round($pwgspacef / 1024, 1) . ' Mb'; + $check = array_flip(array_flip($check)); + rsort($check); + $end = end($check); + $prev = prev($check); + $first = $check[0]; + $checkon = ''; + if (empty($end)) $end = $prev; + if ($end == $first) $checkon .= 'Last table check on: %s'; + else $checkon .= 'Most recent table check on: %s - oldest: %s'; + $checkon = sprintf($checkon, $first, $end); + $template->assign( + array( + 'prefixTable' => $prefixeTable, + 'pwgsize' => $pwgsize, + 'size' => $size, + 'checked_tables' => $checkon, + 'pwgspacef' => $pwgspacef, + 'spacef' => $spacef, + 'U_maintenance' => get_root_url() + . 'admin.php?page=maintenance&action=database', + ) + ); + +// If there is an advice + if ( $cond ) + { + +// Random Thumbnail + $query = ' +SELECT * +FROM '.IMAGES_TABLE.' +ORDER BY RAND(NOW()) +LIMIT 0, 1 +;'; + $result = pwg_query($query); + $row = mysql_fetch_assoc($result); + if ( is_array($row) ) + { + $url_modify = get_root_url().'admin.php?page=picture_modify' + .'&image_id='.$row['id']; + $query = ' +SELECT * FROM '.IMAGE_TAG_TABLE.' +WHERE image_id = ' . $row['id'] .' +;'; + $tag_count = mysql_num_rows(mysql_query($query)); + $template->assign('thumbnail', + array( + 'IMAGE' => get_thumbnail_url($row), + 'IMAGE_ALT' => $row['file'], + 'IMAGE_TITLE' => $row['name'], + 'METADATA' => (empty($row['date_metadata_update'])) ? + 'un' : '', + 'NAME' => (empty($row['name'])) ? + 'un' : '', + 'COMMENT' => (empty($row['comment'])) ? + 'un' : '', + 'AUTHOR' => (empty($row['author'])) ? + 'un' : '', + 'CREATE_DATE' => (empty($row['date_creation'])) ? + 'un' : '', + 'TAGS' => ($tag_count == 0) ? + 'un' : '', + 'NUM_TAGS' => $tag_count, + 'U_MODIFY' => $url_modify, + ) + ); + } + //$advice_text = array_shift($adv); + $template->assign( + array( + 'ADVICE_ABOUT' => $confk, + 'ADVICE_TEXT' => $advice_text, + ) + ); + $template->assign('More', $more ); + $template->pparse('admin_advice'); + } +} +?> diff --git a/plugins/admin_advices/admin_advices.tpl b/plugins/admin_advices/admin_advices.tpl index 85c385286..56ca9a85e 100644 --- a/plugins/admin_advices/admin_advices.tpl +++ b/plugins/admin_advices/admin_advices.tpl @@ -1,39 +1,63 @@ -{if isset($ADVICE_ABOUT)} <div class="content"> + <h3>{'An_advice_about'|@translate} {$ADVICE_ABOUT}</h3> - <h4>{$ADVICE_TEXT}</h4> - <table summary="Admin advices summary"> - <tr><td style="text-align: left; width: 50%;"> + <h4>{$ADVICE_TEXT}</h4> + <table summary="Admin advices summary"> + {if isset($More)} + <tr> + <td style="text-align: left; width: 50%;"> {foreach from=$More item=advice} {$advice}<BR /> {/foreach} <br /> - </td><td style="text-align: right; width: 20%;"> + </td> + <td style="text-align: right; width: 20%;"> {if isset($thumbnail.IMAGE)} - <a href="{$thumbnail.U_MODIFY}" title="{'link_info_image'|@translate}"> - <img class="thumbnail" src="{$thumbnail.IMAGE}" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"></a> - </td><td style="text-align: left;"> - <img src="{$themeconf.icon_dir}/{$thumbnail.NAME}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Name'|@translate}<br /> - <img src="{$themeconf.icon_dir}/{$thumbnail.COMMENT}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Description'|@translate}<br /> - <img src="{$themeconf.icon_dir}/{$thumbnail.AUTHOR}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Author'|@translate}<br /> - <img src="{$themeconf.icon_dir}/{$thumbnail.CREATE_DATE}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Creation date'|@translate}<br /> - <img src="{$themeconf.icon_dir}/{$thumbnail.METADATA}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Metadata'|@translate}<br /> - <img src="{$themeconf.icon_dir}/{$thumbnail.TAGS}check.png" - alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Tags'|@translate} ({$thumbnail.NUM_TAGS}) + <a href="{$thumbnail.U_MODIFY}" title="{'link_info_image'|@translate}"> + <img class="thumbnail" src="{$thumbnail.IMAGE}" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"></a> + </td><td style="text-align: left;"> + <img src="{$themeconf.icon_dir}/{$thumbnail.NAME}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Name'|@translate}<br /> + <img src="{$themeconf.icon_dir}/{$thumbnail.COMMENT}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Description'|@translate}<br /> + <img src="{$themeconf.icon_dir}/{$thumbnail.AUTHOR}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Author'|@translate}<br /> + <img src="{$themeconf.icon_dir}/{$thumbnail.CREATE_DATE}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Creation date'|@translate}<br /> + <img src="{$themeconf.icon_dir}/{$thumbnail.METADATA}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Metadata'|@translate}<br /> + <img src="{$themeconf.icon_dir}/{$thumbnail.TAGS}check.png" + alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Tags'|@translate} ({$thumbnail.NUM_TAGS}) {/if} - </td> - </tr> - - <tr> - <td colspan=2>{$smarty.now|date_format:"%A, %B %e, %Y - %r"} --- Templates generated by <a href="http://www.smarty.net/" onclick="window.open(this.href, ''); return false;">Smarty</a> {$smarty.version}</td> + </td> </tr> + {/if} </table> - + <div class="summary"> + <h4>External summary</h4> + <ul>Database Analysis<br /> + {if ($pwgsize != $size)} + - Space used by {$prefixTable} tables: {$pwgsize}<br /> + {/if} + - Space used by all tables: {$size}<br /> + - {$checked_tables}<br /> + - Unused allocated space by {$prefixTable} tables: {$pwgspacef}<br /> + {if ($spacef > 0 and $pwgspacef != $spacef)} + - Unused allocated space: {$spacef}<br /> + {/if} + {if ($spacef > 0)} + Useful links: + <a class="internal" href="{$U_maintenance}">{'repair and optimize database'|@translate}</a> - + {else} + MySQL documentation: + {/if} + <a class="external" href="http://dev.mysql.com/doc/" onclick="window.open(this.href, ''); return false;">MySQL</a> + <br /><br /> + Templates generated on {$smarty.now|date_format:"%A, %B %e, %Y - %r"} by + <a class="external" href="http://www.smarty.net/" onclick="window.open(this.href, ''); return false;">Smarty</a> + {$smarty.version} + </ul> + </div> </div> -{/if}
\ No newline at end of file + diff --git a/plugins/admin_advices/adv_set.php b/plugins/admin_advices/adv_set.php new file mode 100644 index 000000000..d0fb98c2f --- /dev/null +++ b/plugins/admin_advices/adv_set.php @@ -0,0 +1,175 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + + +// +// A new advices needs: +// $lang['Adv_case'][xx] = 'Text' ==> in all plugin.lang +// $adv['c'][xx] = Condition (default true) +// $adv['v'][xx] = Value (if there is one (facultative)) +// $adv['n'][xx] = Name of $conf (A new advice about blah-blah) +// +// prefix '**' . => Not a $conf['xxxxx'] + +load_language('plugin.lang', dirname(__FILE__).'/'); + +// No needed translation here below + +// Use l10n if your need a localization and update all plugin.lang + +$adv['n'][0] = '**' . $lang['contribute']; + +$adv['n'][1] = 'newcat_default_status'; +$adv['c'][1] = ($conf['newcat_default_status'] !== 'public'); +$adv['v'][1] = sprintf($lang['current'], 'public'); + +$adv['n'][2] = 'slideshow_period'; +$adv['c'][2] = ( $conf['slideshow_period'] < 4 ); +$adv['v'][2] = sprintf($lang['current'], $conf['slideshow_period']); + +$adv['n'][3] = 'file_ext'; +$adv['c'][3] = ( in_array('php',$conf['file_ext']) ); +$adv['v'][3] = sprintf($lang['current'], implode(', ', $conf['file_ext'])); + +$adv['n'][4] = 'show_iptc_mapping'; + +$adv['n'][5] = 'top_number'; +$adv['c'][5] = ( $conf['top_number'] > 50 ); +$adv['v'][5] = sprintf($lang['current'], $conf['top_number']); + +$adv['n'][6] = 'top_number'; +$adv['c'][6] = ( $conf['top_number'] < 2 ) ? true : false; +$adv['v'][6] = sprintf($lang['current'], $conf['top_number']); + +$adv['n'][7] = 'anti-flood_time'; +$adv['c'][7] = ( $conf['anti-flood_time'] > 100 ) ? true : false; +$adv['v'][7] = sprintf($lang['current'], $conf['anti-flood_time']); + +$adv['n'][8] = 'calendar_datefield'; +$adv['c'][8] = ( !in_array($conf['calendar_datefield'], + array('date_creation','date_available')) ); +$adv['v'][8] = sprintf($lang['current'], $conf['calendar_datefield']); + +/* Unavailable creation date and default calendar is creation date */ +$adv['n'][9] = 'calendar_datefield'; +$adv['c'][9] = ( (( $conf['use_exif'] and + isset($conf['use_exif_mapping']['date_creation']) ) + or ( $conf['use_iptc'] and + isset($conf['use_iptc_mapping']['date_creation']) )) + and ( $conf['calendar_datefield'] == 'date_creation' ) ) + ? false : true; +$adv['v'][9] = sprintf($lang['current'], $conf['calendar_datefield']); + +$adv['n'][10] = 'newcat_default_visible'; +$adv['c'][10] = !$conf['newcat_default_visible']; +$adv['v'][10] = sprintf($lang['current'], 'false'); + +$adv['n'][11] = 'level_separator'; +$adv['c'][11] = ( $conf['level_separator'] == ' / ' ); +$adv['v'][11] = sprintf($lang['current'], $conf['level_separator']); + +$adv['n'][12] = 'paginate_pages_around'; +$adv['c'][12] = (($conf['paginate_pages_around'] < 2) + or ($conf['paginate_pages_around'] > 12)); +$adv['v'][12] = sprintf($lang['current'], $conf['paginate_pages_around']); + +$adv['n'][13] = 'tn_width'; +$adv['c'][13] = (($conf['tn_width'] < 66) + or ($conf['tn_width'] > 180)); +$adv['v'][13] = sprintf($lang['current'], $conf['tn_width']); + +$adv['n'][14] = 'tn_height'; +$adv['c'][14] = (($conf['tn_height'] < 66) + or ($conf['tn_height'] > 180)); +$adv['v'][14] = sprintf($lang['current'], $conf['tn_height']); + +$adv['n'][15] = 'tn_height'; + +$adv['c'][15] = ( $conf['tn_height'] !== $conf['tn_width'] ); +$adv['v'][15] = l10n('TN-height&width'); + +$adv['n'][16] = 'show_version'; +$adv['c'][16] = $conf['show_version']; +$adv['v'][16] = sprintf($lang['current'], 'true'); + +$adv['n'][17] = 'show_thumbnail_caption'; +$adv['c'][17] = $conf['show_thumbnail_caption']; +$adv['v'][17] = sprintf($lang['current'], 'true'); + +$adv['n'][18] = 'show_picture_name_on_title'; +$adv['c'][18] = $conf['show_picture_name_on_title']; +$adv['v'][18] = sprintf($lang['current'], 'true'); + +$adv['n'][19] = 'subcatify'; +$adv['c'][19] = $conf['subcatify']; +$adv['v'][19] = sprintf($lang['current'], 'true'); + +$adv['n'][20] = 'allow_random_representative'; +$adv['c'][20] = $conf['allow_random_representative']; +$adv['v'][20] = sprintf($lang['current'], 'true'); + +$adv['n'][21] = 'prefix_thumbnail'; +$adv['c'][21] = ( $conf['prefix_thumbnail'] !== 'TN-' ); +$adv['v'][21] = sprintf($lang['current'], $conf['prefix_thumbnail']); + +$adv['n'][22] = 'users_page'; +$adv['c'][22] = ( $conf['users_page'] < 21 ); +$adv['v'][22] = sprintf($lang['current'], $conf['users_page']); + +$adv['n'][23] = 'mail_options'; +$adv['c'][23] = $conf['mail_options']; +$adv['v'][23] = sprintf($lang['current'], 'true'); + +$adv['n'][24] = 'check_upgrade_feed'; +$adv['c'][24] = $conf['check_upgrade_feed']; +$adv['v'][24] = sprintf($lang['current'], 'true'); + +$adv['n'][25] = 'rate_items'; +$adv['c'][25] = ( count($conf['rate_items']) < 4 ); +$adv['v'][25] = sprintf($lang['current'], $conf['rate_items']); + +$adv['n'][26] = 'rate_items'; +$adv['c'][26] = ( count($conf['rate_items']) > 6 ); +$adv['v'][26] = sprintf($lang['current'], $conf['rate_items']); + +$adv['n'][27] = $conf['show_iptc']; +$adv['c'][27] = $conf['show_iptc']; +$adv['v'][27] = sprintf($lang['current'], 'true'); + +$adv['n'][28] = 'use_iptc'; +$adv['c'][28] = $conf['use_iptc']; +$adv['v'][28] = sprintf($lang['current'], 'true'); + +$adv['n'][29] = 'use_iptc'; + +$adv['n'][30] = 'use_iptc_mapping'; + +$adv['n'][31] = 'show_exif'; +$adv['v'][31] = sprintf($lang['current'], (($conf['show_exif'])? 'true':'false' )); + +$adv['n'][32] = 'use_exif'; +$adv['v'][32] = sprintf($lang['current'], (($conf['use_exif'])? 'true':'false' )); + +$adv['n'][33] = '**' . $lang['navigation']; + +?>
\ No newline at end of file diff --git a/plugins/admin_advices/en_UK/lang.adv.php b/plugins/admin_advices/en_UK/lang.adv.php deleted file mode 100644 index 26dc4d56b..000000000 --- a/plugins/admin_advices/en_UK/lang.adv.php +++ /dev/null @@ -1,447 +0,0 @@ -<?php -// +-----------------------------------------------------------------------+ -// | Piwigo - a PHP based picture gallery | -// +-----------------------------------------------------------------------+ -// | Copyright(C) 2008 Piwigo Team http://piwigo.org | -// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | -// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | -// +-----------------------------------------------------------------------+ -// | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | -// | | -// | This program is distributed in the hope that it will be useful, but | -// | WITHOUT ANY WARRANTY; without even the implied warranty of | -// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -// | General Public License for more details. | -// | | -// | You should have received a copy of the GNU General Public License | -// | along with this program; if not, write to the Free Software | -// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | -// | USA. | -// +-----------------------------------------------------------------------+ - -global $lang; -$lang['An_advice_about'] = 'A new advice about'; -$lang['Metadata'] = 'Metadata'; - -foreach ($conf as $key => $value) -{ - if ( is_string($value) ) - { - $bool = ($value == 'false') ? false : $value; - $bool = ($value == 'true') ? true : $bool; - $conf[$key] = $bool; - } -} - -// -// Don't forget to update range for new advices -// -$cases = range(1,34); -srand ((double) microtime() * 10000000); -shuffle($cases); - -$cond = false; -foreach ($cases as $id_adv) -{ - if ($cond) break; - $adv = array(); - switch ($id_adv) { - Case 1 : - $adv[] = 'Current value: public. '; - $adv[] = 'Try $conf[\'newcat_default_status\'] = \'private\';'; - $adv[] = 'You will have more time to describe and check your pictures.'; - $adv[] = 'Time to decide between private and public status.'; - $adv[] = 'If you choose private, time to distribute authorization.'; - $adv[] = 'Your new category will be well prepared.'; - $cond = ($conf['newcat_default_status'] !== 'public'); - $confk = 'newcat_default_status'; - break; - - Case 2 : - $adv[] = 'Current value: ' . (string) $conf['slideshow_period'] . '.'; - $adv[] = 'This value could be too small for low band connections.'; - $adv[] = 'Think about higher value like 4.'; - $cond = ( $conf['slideshow_period'] < 4 ); - $confk = 'slideshow_period'; - break; - - Case 3 : - $adv[] = 'Current value: ' . implode(', ', $conf['file_ext']) . '. '; - $adv[] = 'Should never contains extensions which can be executed'; - $adv[] = 'on the server side like *.php, *.PHP, *.asp, ...'; - $cond = ( in_array('php',$conf['file_ext']) ); - $confk = 'file_ext'; - break; - - Case 4 : - $adv[] = 'Show IPTC Data from your picture:'; - $adv[] = ' 1 - Copy one of your jpg pictures (a public one)' . - ' in ./tools/<br />' . - ' 2 - Rename it as sample.jpg.<br />' . - ' 3 - Run ./tools/metadata.php<br />' . - ' 4 - Analyse results to determine which IPTC fields could be' . - ' useful for your visitors.'; - $adv[] = 'Beginners would prefer to keep $conf[\'show_iptc\'] = false;'; - $adv[] = 'Advanced users would take care of $lang values and impacts' . - ' on templates.'; - $cond = true; - $confk = 'show_iptc_mapping'; - break; - - Case 5 : - $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.'; - $adv[] = 'This value is maybe too high for low connections, ' . - 'think about 25-50 depending on your thumbnail sizes.'; - $cond = ( $conf['top_number'] > 50 ); - $confk = 'top_number'; - break; - - Case 6 : - $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.'; - $adv[] = 'One? It could be too low for random pictures, ' . - 'think about 5-10 depending on your thumbnail sizes.'; - $cond = ( $conf['top_number'] < 2 ) ? true : false; - $confk = 'top_number'; - break; - - Case 7 : - $adv[] = 'Current value: ' . (string) $conf['anti-flood_time'] . '.'; - $adv[] = 'For normal flow processing, your value is probably too high. ' . - 'Reasonable value is 60 (default).' ; - $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false; - $confk = 'anti-flood_time'; - break; - - Case 8 : - $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.'; - $adv[] = 'Authorized values are ' . - "'date_creation' or 'date_available'" . - ', otherwise you can get unpredictable results.' ; - $cond = ( !in_array($conf['calendar_datefield'], - array('date_creation','date_available')) ); - $confk = 'calendar_datefield'; - break; - - Case 9 : - // If (iptc or exif) are used and date_creation is updated - // Then it's Ok, you can use date_creation by default for calendar - // else ... Advice - $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.'; - $adv[] = "'date_creation'" . ' is NOT filled by ' . - 'any activated use metadata mapping fields.'; - $adv[] = 'So activate metadata usage <strong>or</strong> change to ' . - '$conf[\'calendar_datefield\'] = \'date_available\''; - $adv[] = 'Activate metadata usage as you want: <br />' . - '1 - $conf[\'use_iptc\'] = true; or $conf[\'use_exif\'] = true; ' . - 'each way will be correct.<br />' . - '2 - And respectively map:<br />' . - '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' ' . - '=> \'2#055\', ...<br />' . - 'or/and:<br />' . - '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' . - '=> \'DateTimeOriginal\', ...<br />' . - '3 - Finally, a new task is up to you: Metadata synchronization.' ; - $cond2 = ( $conf['use_exif'] and - isset($conf['use_exif_mapping']['date_creation']) ); - $cond3 = ( $conf['use_iptc'] and - isset($conf['use_iptc_mapping']['date_creation']) ); - $cond = ( $conf['calendar_datefield'] == 'date_creation' ); - $cond = ( ($cond2 or $cond3) and $cond ) ? false : true; - $confk = 'calendar_datefield'; - break; - - Case 10 : - $adv[] = 'Current value: false.'; - $adv[] = 'Not useful, private status is better, so code ' . - '$conf[\'newcat_default_visible\'] = true;' ; - $cond = !$conf['newcat_default_visible']; - $confk = 'newcat_default_visible'; - break; - - Case 11 : - $adv[] = 'Current value: ' . (string) $conf['level_separator'] . '.'; - $adv[] = 'Try something else like $conf[\'level_separator\'] = \'+ \';'; - $cond = ( $conf['level_separator'] == ' / ' ); - $confk = 'level_separator'; - break; - - Case 12 : - $adv[] = 'Current value: ' . (string) $conf['paginate_pages_around'] . '.'; - $adv[] = 'Usual range is between 2 and 5. To be light, choose ' . - '$conf[\'paginate_pages_around\'] = 2; <br />' . - 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7;'; - $cond = (($conf['paginate_pages_around'] < 2) - or ($conf['paginate_pages_around'] > 12)); - $confk = 'paginate_pages_around'; - break; - - Case 13 : - $adv[] = 'Current value: ' . (string) $conf['tn_width'] . '.'; - $adv[] = 'Should be a close value to your thumbnail width.' . - $adv[] = 'Usual range is between 96 and 150, ' . - 'about $conf[\'tn_width\'] = 128;'; - $cond = (($conf['tn_width'] < 66) - or ($conf['tn_width'] > 180)); - $confk = 'tn_width'; - break; - - Case 14 : - $adv[] = 'Current value: ' . (string) $conf['tn_height'] . '.'; - $adv[] = 'Should be a close value to your thumbnail height.' . - $adv[] = 'Usual range is between 96 and 150, ' . - 'about $conf[\'tn_height\'] = 128;'; - $cond = (($conf['tn_height'] < 66) - or ($conf['tn_height'] > 180)); - $confk = 'tn_height'; - break; - - Case 15 : - $adv[] = 'Thumbnail height and width have to be equal.'; - $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] . - ';<br />' . - 'or $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';'; - $cond = ( $conf['tn_height'] !== $conf['tn_width'] ); - $confk = 'tn_height'; - break; - - Case 16 : - $adv[] = 'Current value: true.'; - $adv[] = 'For security reason, please set ' . - '$conf[\'show_version\'] = false;'; - $cond = $conf['show_version']; - $confk = 'show_version'; - break; - - Case 17 : - $adv[] = 'Current value: true.'; - $adv[] = 'For a lighter gallery just have a look to ' . - '$conf[\'show_thumbnail_caption\'] = false;'; - $cond = $conf['show_thumbnail_caption']; - $confk = 'show_thumbnail_caption'; - break; - - Case 18 : - $adv[] = 'Current value: true.'; - $adv[] = 'For a lighter gallery just have a look to ' . - '$conf[\'show_picture_name_on_title\'] = false;'; - $cond = $conf['show_picture_name_on_title']; - $confk = 'show_picture_name_on_title'; - break; - - Case 19 : - $adv[] = 'Current value: true.'; - $adv[] = 'If you do NOT have any category descriptions just have ' . - 'a look to $conf[\'subcatify\'] = false;'; - $cond = $conf['subcatify']; - $confk = 'subcatify'; - break; - - Case 20 : - $adv[] = 'Current value: true.'; - $adv[] = 'Leave $conf[\'allow_random_representative\'] = true; <br />' . - 'but analyze if you can avoid for performance reasons.' ; - $cond = $conf['allow_random_representative']; - $confk = 'allow_random_representative'; - break; - - Case 21 : - $adv[] = 'Current value: ' . (string) $conf['prefix_thumbnail'] . '.'; - $adv[] = 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.'; - $adv[] = 'Do NOT change it except if your thumbnails are NOT visible.'; - $adv[] = 'Distant site may use a different prefix but ' . - 'create_listing_file.php must be modified.<br />' . - 'You will get a warning message during synchronization in ' . - 'that case.'; - $adv[] = 'Try to keep the same prefix thru all your sites either ' . - 'local or distants.'; - $adv[] = 'Keep this parameter in your ./include/config_'. - '<strong>local.inc.php</strong>. <br />'. - 'See our wiki configuration page for more information about ' . - './include/config_<strong>local.inc.php</strong>.'; - $cond = ( $conf['prefix_thumbnail'] !== 'TN-' ); - $confk = 'prefix_thumbnail'; - break; - - Case 22 : - $adv[] = 'Current value: ' . (string) $conf['users_page'] . '.'; - $adv[] = 'Unless you have a low band connection, you can draw up ' . - '$conf[\'users_page\'] to a higher value ' . - 'if you have more than 20 members.'; - $cond = ( $conf['users_page'] < 21 ); - $confk = 'users_page'; - break; - - Case 23 : - $adv[] = 'Current value: true.'; - $adv[] = 'Should be false, only few webmasters have to set ' . - '$conf[\'mail_options\'] = true; <br />' . - 'A specific advice you can get from an advanced ' . - 'user on our forum in some mailing issues.' ; - $cond = $conf['mail_options']; - $confk = 'mail_options'; - break; - - Case 24 : - $adv[] = 'Current value: true.'; - $adv[] = 'Should be false, only PWG dev Team have to set ' . - '$conf[\'check_upgrade_feed\'] = true; for test purpose.' ; - $cond = $conf['check_upgrade_feed']; - $confk = 'check_upgrade_feed'; - break; - - Case 25 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) - . 'items.'; - $adv[] = 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.'; - $cond = ( count($conf['rate_items']) < 4 ); - $confk = 'rate_items'; - break; - - Case 26 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) - . 'items.'; - $adv[] = 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.'; - $adv[] = 'Check your best rated pictures prior to remove some values.' . - '<br />Reduce excessive rating and change your ' . - '$conf[\'rate_items\'].'; - $cond = ( count($conf['rate_items']) > 6 ); - $confk = 'rate_items'; - break; - - Case 27 : - $adv[] = 'Current value: true.'; - $adv[] = 'Could be true, think about $conf[\'show_iptc\'] = false;' - . '<br />Some Professional photographers choose false ' . - 'their reasons are not really professional.' ; - $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' . - '<strong>use</strong>_iptc (have a look on metadata page ' . - 'on our wiki).'; - $cond = $conf['show_iptc']; - $confk = 'show_iptc'; - break; - - Case 28 : - $adv[] = 'Current value: true.'; - $adv[] = 'Documentalists and professionnal photographers would ' . - 'set it true, but beginners should leave it ' . - 'as $conf[\'use_iptc\'] = false;'; - $adv[] = 'Take care of mentionned fields in metadata synchronization.' . - '<br />Mentionned fields would be rewrited with IPTC values ' . - ' even those ones are NOT empty.'; - $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' . - '<strong>use</strong>_iptc (have a look on metadata page ' . - 'on our wiki).'; - $cond = $conf['use_iptc']; - $confk = 'use_iptc'; - break; - - Case 29 : - $adv[] = 'How to deal with IPTC:'; - $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' . - '<br />2 - Rename it as sample.jpg.' . - '<br />3 - Run ./tools/metadata.php' . - '<br />4 - Analyse results to determine which IPTC fields ' . - 'could be used to override database fields.'; - $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;'; - $adv[] = 'Advanced users make documentation efforts prior ' . - 'to upload their pictures.<br />' . - 'IPTC fields have to be described in ' . - '$conf[\'use_iptc_mapping\']'; - $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' . - '<strong>use</strong>_iptc_mapping must be totally different.'; - $cond = true; - $confk = 'use_iptc'; - break; - - Case 30 : - $adv[] = 'How to deal with IPTC:'; - $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' . - '<br />2 - Rename it as sample.jpg.' . - '<br />3 - Run ./tools/metadata.php' . - '<br />4 - Analyse results to determine which IPTC fields ' . - 'could be used to override database fields.'; - $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;'; - $adv[] = 'Advanced users make documentation efforts prior ' . - 'to upload their pictures.'; - $adv[] = 'Take care of mentionned fields in metadata synchronization.' . - '<br />Mentionned fields would be rewrited with IPTC values ' . - ' even those ones are NOT empty.'; - $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' . - '<strong>use</strong>_iptc_mapping must be totally different.'; - $cond = true; - $confk = 'use_iptc_mapping'; - break; - - Case 31 : - $adv[] = 'Current value: ' . ( ( $conf['show_exif'] ) ? 'true':'false' ) - . '.'; - $adv[] = 'Should be true, some information from your camera ' . - 'can be displayed.'; - $adv[] = 'Think about EXIF information could be different depending ' . - 'on camera models.<br />' . - 'If you change your camera these fields could be ' . - 'partly different.'; - $adv[] = 'Many professional photographers choose false, ' . - 'their reasons are to protect their knowledge.' ; - $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' . - '<strong>use</strong>_exif (have a look on metadata page ' . - 'on our wiki).'; - $cond = true; - $confk = 'show_exif'; - break; - - Case 32 : - $adv[] = 'How to deal with EXIF:'; - $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' . - '<br />2 - Rename it as sample.jpg.' . - '<br />3 - Run ./tools/metadata.php' . - '<br />4 - Analyse results to determine which EXIF fields ' . - 'could be used to override database fields.'; - $adv[] = 'Beginners would prefer to let default values.'; - $adv[] = 'Advanced users would take care of $lang values and ' . - 'impacts on templates.'; - $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' . - '<strong>use</strong>_exif_mapping must be totally different.'; - $cond = true; - $confk = 'show_exif_fields'; - break; - - Case 33 : - $adv[] = 'Current value: ' . ( ( $conf['use_exif'] ) ? 'true':'false' ) - . '.'; - $adv[] = 'Documentalists and professionnal photographers would ' . - 'set it true, but beginners should leave the default value.'; - $adv[] = 'Take care of mentionned fields in metadata synchronization.' . - '<br />Mentionned fields would be rewrited with EXIF values ' . - ' even those ones are NOT empty.'; - $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' . - '<strong>use</strong>_exif (have a look on metadata page ' . - 'on our wiki).'; - $cond = true; - $confk = 'use_exif'; - break; - - Case 34 : - $adv[] = 'How to deal with EXIF:'; - $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' . - '<br />2 - Rename it as sample.jpg.' . - '<br />3 - Run ./tools/metadata.php' . - '<br />4 - Analyse results to determine which EXIF fields ' . - 'could be used to override database fields.'; - $adv[] = 'Beginners would prefer to let default values.'; - $adv[] = 'Advanced users would carefully chose overrided fields ' . - 'prior to synchronize.'; - $adv[] = 'Take care of mentionned fields in metadata synchronization.' . - '<br />Mentionned fields would be rewrited with EXIF values ' . - ' even those ones are NOT empty.'; - $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' . - '<strong>use</strong>_exif_mapping must be totally different.'; - $cond = true; - $confk = 'use_exif_mapping'; - break; - } -} - -?> diff --git a/plugins/admin_advices/fr_FR/lang.adv.php b/plugins/admin_advices/fr_FR/lang.adv.php deleted file mode 100644 index 11fd5cf53..000000000 --- a/plugins/admin_advices/fr_FR/lang.adv.php +++ /dev/null @@ -1,480 +0,0 @@ -<?php -// +-----------------------------------------------------------------------+ -// | Piwigo - a PHP based picture gallery | -// +-----------------------------------------------------------------------+ -// | Copyright(C) 2008 Piwigo Team http://piwigo.org | -// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | -// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | -// +-----------------------------------------------------------------------+ -// | This program is free software; you can redistribute it and/or modify | -// | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation | -// | | -// | This program is distributed in the hope that it will be useful, but | -// | WITHOUT ANY WARRANTY; without even the implied warranty of | -// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | -// | General Public License for more details. | -// | | -// | You should have received a copy of the GNU General Public License | -// | along with this program; if not, write to the Free Software | -// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | -// | USA. | -// +-----------------------------------------------------------------------+ - -global $lang; -$lang['An_advice_about'] = 'Un nouveau conseil à propos de '; -$lang['Metadata'] = 'Méta-données'; - -foreach ($conf as $key => $value) -{ - if ( is_string($value) ) - { - $bool = ($value == 'false') ? false : $value; - $bool = ($value == 'true') ? true : $bool; - $conf[$key] = $bool; - } -} - -// -// Don't forget to update range for new advices -// -$cases = range(1,34); -srand ((double) microtime() * 10000000); -shuffle($cases); - -$cond = false; -foreach ($cases as $id_adv) -{ - if ($cond) break; - $adv = array(); - switch ($id_adv) { - Case 1 : - $adv[] = 'Valeur actuelle : public. '; - $adv[] = 'Essayez $conf[\'newcat_default_status\'] = \'private\';'; - $adv[] = 'Vous aurez plus de temps pour décrire et contrôler vos images. ' - . 'Du temps pour vous décider entre un statut privé ou public.'; - $adv[] = 'Si vous choisissez de rester privé, vous passerez directement ' - . 'à l\'attribution des autorisations. <br />' - . 'Vos nouvelles catégories seront préparées plus facilement.'; - $cond = ($conf['newcat_default_status'] !== 'public'); - $confk = 'newcat_default_status'; - break; - - Case 2 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['slideshow_period'] . '.'; - $adv[] = 'Ce délai pourrait être trop petit pour les connexions ' - . 'en bas débit.'; - $adv[] = 'Pensez à une valeur supérieure comme 4.'; - $cond = ( $conf['slideshow_period'] < 4 ); - $confk = 'slideshow_period'; - break; - - Case 3 : - $adv[] = 'Valeur actuelle : ' . implode(', ', $conf['file_ext']) . '. '; - $adv[] = 'Ne devrait jamais contenir des extensions pouvant être '; - $adv[] = 'exécutées sur le serveur comme *.php, *.PHP, *.asp, ...'; - $cond = ( in_array('php',$conf['file_ext']) ); - $confk = 'file_ext'; - break; - - Case 4 : - $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />' - . ' 2 - Renommez celle-ci en sample.jpg.<br />' - . ' 3 - Lancez ./tools/metadata.php<br />' - . ' 4 - Analysez les résultats pour déterminer quels champs ' - . 'IPTC pourraient intéresser vos visiteurs.'; - $adv[] = 'Les débutants laisseront $conf[\'show_iptc\'] = false;'; - $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau ' - . '$lang; voire même à l\'impact possible sur les templates.'; - $cond = true; - $confk = 'show_iptc_mapping'; - break; - - Case 5 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.'; - $adv[] = 'Cette valeur pourrait être trop grande pour des connexions ' - . 'bas débit.<br /> Pensez à une valeur située entre 25-50 ' - . 'en fonction de la taille de vos minitures.'; - $cond = ( $conf['top_number'] > 50 ); - $confk = 'top_number'; - break; - - Case 6 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.'; - $adv[] = 'Une seule? Au moins pour les images aléatoires, pensez ' - . 'autour de 5-10 selon la tailles de vos miniatures.'; - $cond = ( $conf['top_number'] < 2 ) ? true : false; - $confk = 'top_number'; - break; - - Case 7 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['anti-flood_time'] . '.'; - $adv[] = 'Pour un traitement fluide, votre valeur est sans doute trop ' - . 'grande. Une valeur raisonnable serait 60 (valeur par défaut).' ; - $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false; - $confk = 'anti-flood_time'; - break; - - Case 8 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.'; - $adv[] = 'Les valeurs admises sont ' - . "'date_creation' ou 'date_available'" . ', toute autre valeur' - . 'peut aboutir à des résultats imprévisibles.' ; - $cond = ( !in_array($conf['calendar_datefield'], - array('date_creation','date_available')) ); - $confk = 'calendar_datefield'; - break; - - Case 9 : - // If (iptc or exif) are used and date_creation is updated - // Then it's Ok, you can use date_creation by default for calendar - // else ... Advise - $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.'; - $adv[] = "La 'date_creation'" . ' n\'est pas renseignée. Aucun champ ' - . 'des méta-données (use_) n\'actualise la base.'; - $adv[] = 'Soit vous activez l\'usage des méta-données <strong>ou' - . '</strong> changez pour ' - . '$conf[\'calendar_datefield\'] = \'date_available\''; - $adv[] = 'Activez l\'usage des méta-données simplement par: <br />' - . '1 - $conf[\'use_iptc\'] = true; ou $conf[\'use_exif\'] = true; ' - . 'au choix, les 2 sont valables.<br />' - . '2 - Respectivement à chacune faire la modif:<br />' - . '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' ' - . '=> \'2#055\', ...<br />' - . 'et/ou:<br />' - . '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' - . '=> \'DateTimeOriginal\', ...<br />' - . '3 - Enfin une nouvelle tache vous est destinée: ' - . 'la synchronisation des méta-données.' ; - $cond2 = ( $conf['use_exif'] and - isset($conf['use_exif_mapping']['date_creation']) ); - $cond3 = ( $conf['use_iptc'] and - isset($conf['use_iptc_mapping']['date_creation']) ); - $cond = ( $conf['calendar_datefield'] == 'date_creation' ); - $cond = ( ($cond2 or $cond3) and $cond ) ? false : true; - $confk = 'calendar_datefield'; - break; - - Case 10 : - $adv[] = 'Valeur actuelle : false.'; - $adv[] = 'C\'est une erreur, un statut "private" est plus simple, ' - . 'alors choisissez $conf[\'newcat_default_visible\'] = true;' ; - $cond = !$conf['newcat_default_visible']; - $confk = 'newcat_default_visible'; - break; - - Case 11 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['level_separator'] . '.'; - $adv[] = 'Vous pouvez toujours essayer un autre séparateur comme :' - . '<br />$conf[\'level_separator\'] = \'+ \';'; - $cond = ( $conf['level_separator'] == ' / ' ); - $confk = 'level_separator'; - break; - - Case 12 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['paginate_pages_around'] - . '.'; - $adv[] = 'Les valeurs habituelles se situent entre 2 et 5.' - . 'Pour un site avec une interface légère, on choisira : <br />' - . '$conf[\'paginate_pages_around\'] = 2; <br />' - . 'Afin de proposer plus d\'accès directs, on choisira : <br />' - . '$conf[\'paginate_pages_around\'] = 7;'; - $cond = (($conf['paginate_pages_around'] < 2) - or ($conf['paginate_pages_around'] > 12)); - $confk = 'paginate_pages_around'; - break; - - Case 13 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_width'] . '.'; - $adv[] = 'Doit être une valeur proche de la largeur de vos miniatures.'; - $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, ' - . 'comme $conf[\'tn_width\'] = 128;'; - $cond = (($conf['tn_width'] < 66) - or ($conf['tn_width'] > 180)); - $confk = 'tn_width'; - break; - - Case 14 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_height'] . '.'; - $adv[] = 'Doit être une valeur proche de la hauteur de vos miniatures.'; - $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, ' - . 'comme $conf[\'tn_height\'] = 128;'; - $cond = (($conf['tn_height'] < 66) - or ($conf['tn_height'] > 180)); - $confk = 'tn_height'; - break; - - Case 15 : - $adv[] = 'Il n\'y a aucune raison pour que la largeur maximale soit ' - . 'différente de la hauteur maximale. Pourquoi les ajouts en ' - . 'portrait afficheraient des miniatures dans une résolution ' - . 'différente de celle des miniatures en paysage?'; - $adv[] = 'Essayez $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] - . ';<br />' - . 'ou $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';'; - $cond = ( $conf['tn_height'] !== $conf['tn_width'] ); - $confk = 'tn_height'; - break; - - Case 16 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour des raisons de sécurité de votre galerie, préférez ' - . '$conf[\'show_version\'] = false;'; - $cond = $conf['show_version']; - $confk = 'show_version'; - break; - - Case 17 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour une galerie moins chargée, faites le test de ' - . '$conf[\'show_thumbnail_caption\'] = false;'; - $cond = $conf['show_thumbnail_caption']; - $confk = 'show_thumbnail_caption'; - break; - - Case 18 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour une galerie moins chargée, faites le test de ' - . '$conf[\'show_picture_name_on_title\'] = false;'; - $cond = $conf['show_picture_name_on_title']; - $confk = 'show_picture_name_on_title'; - break; - - Case 19 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Aucune de vos catégories ne possède de descriptions alors ' - . 'essayez $conf[\'subcatify\'] = false;'; - $cond = $conf['subcatify']; - $confk = 'subcatify'; - break; - - Case 20 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Laissez $conf[\'allow_random_representative\'] = true; <br />' - . 'mais étudiez comment vous pouvez l\'éviter pour des raisons ' - . 'de performance.' ; - $cond = $conf['allow_random_representative']; - $confk = 'allow_random_representative'; - break; - - Case 21 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['prefix_thumbnail'] . '.'; - $adv[] = 'Attention, votre $conf[\'prefix_thumbnail\'] n\'est pas ' - . 'standard.'; - $adv[] = 'Ne pas changer votre préfixe sauf si vos miniatures ont un ' - . 'problème d\'affichage.'; - $adv[] = 'Un site distant peut avoir un préfixe différent, le ' - . 'create_listing_file.php devra être modifié.<br />' - . 'Vous devriez avoir un message d\'avertissement pendant la ' - . 'synchronisation dans ce cas.'; - $adv[] = 'Essayez de garder le même préfixe de miniatures pour les sites ' - . 'locaux ou distants.'; - $adv[] = 'Conservez ce paramètre dans votre ./include/config_' - . '<strong>local.inc.php</strong>. <br />' - . 'Voir la page sur la configuration dans le Wiki pour plus ' - . 'd\'informations à propos de ' - . './include/config_<strong>local.inc.php</strong>.'; - $cond = ( $conf['prefix_thumbnail'] !== 'TN-' ); - $confk = 'prefix_thumbnail'; - break; - - Case 22 : - $adv[] = 'Valeur actuelle : ' . (string) $conf['users_page'] . '.'; - $adv[] = 'A moins d\'avoir une connexion bas débit, vous pouvez ' - . 'augmenter largement $conf[\'users_page\'] ' - . 'surtout si vous avez plus de 20 membres.'; - $cond = ( $conf['users_page'] < 21 ); - $confk = 'users_page'; - break; - - Case 23 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Devrait être à false, seulement quelques webmasters devront ' - . 'indiquer $conf[\'mail_options\'] = true; <br />' - . 'Un utilisateur avancé de notre forum les aura conseillé ' - . 'dans un seul cas de problème d\'email.' ; - $cond = $conf['mail_options']; - $confk = 'mail_options'; - break; - - Case 24 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Devrait être à false, seuls les membres de l\'équipe PWG ' - . 'codent $conf[\'check_upgrade_feed\'] = true; pour leurs tests.'; - $cond = $conf['check_upgrade_feed']; - $confk = 'check_upgrade_feed'; - break; - - Case 25 : - $adv[] = '$conf[\'rate_items\'] dispose de ' . count($conf['rate_items']) - . 'éléments.'; - $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments ' - . 'mais pas moins.'; - $cond = ( count($conf['rate_items']) < 4 ); - $confk = 'rate_items'; - break; - - Case 26 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) - . 'items.'; - $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments ' - . 'mais pas plus.'; - $adv[] = 'Contrôlez vos images les mieux notées avant de retirer ' - . ' certaines valeurs.' - . '<br />Réduire les valeurs excessives et modifiez votre ' - . '$conf[\'rate_items\'].'; - $cond = ( count($conf['rate_items']) > 6 ); - $confk = 'rate_items'; - break; - - Case 27 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Peut être effectivement à true, éventuellement choisissez ' - . '$conf[\'show_iptc\'] = false;' - . '<br />Comme quelques photographes professionnels choisissez ' - . 'false bien que leurs raisons ne soient guère professionnelles.'; - $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et ' - . '<strong>use</strong>_iptc (consultez la pages de métadonnées ' - . 'sur notre wiki).'; - $cond = $conf['show_iptc']; - $confk = 'show_iptc'; - break; - - Case 28 : - $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Les documentalistes et photographes professionnels choisiront ' - . 'cette valeur true, mais les débutants devraient laisser ' - . '$conf[\'use_iptc\'] = false;'; - $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation ' - . 'des métadonnées.<br />Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs IPTC quand bien même ces ' - . 'champs ne seraient pas vides.'; - $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et ' - . '<strong>use</strong>_iptc (consultez la pages de métadonnées ' - . 'sur notre wiki).'; - $cond = $conf['use_iptc']; - $confk = 'use_iptc'; - break; - - Case 29 : - $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />' - . ' 2 - Renommez celle-ci en sample.jpg.<br />' - . ' 3 - Lancez ./tools/metadata.php<br />' - . ' 4 - Analysez les résultats pour déterminer quels champs ' - . 'IPTC pourraient intéresser vos visiteurs.'; - $adv[] = 'Les débutants laisseront $conf[\'use_iptc\'] = false;'; - $adv[] = 'Les utilisateurs avancés feront des efforts de documentation ' - . 'avant de transférer leurs images.<br />' - . 'Les champs IPTC doivent être décrits par ' - . '$conf[\'use_iptc_mapping\']'; - $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et ' - . '<strong>use</strong>_iptc_mapping seront ' - . 'totalement différents.'; - $cond = true; - $confk = 'use_iptc'; - break; - - Case 30 : - $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />' - . ' 2 - Renommez celle-ci en sample.jpg.<br />' - . ' 3 - Lancez ./tools/metadata.php<br />' - . ' 4 - Analysez les résultats pour déterminer quels champs ' - . 'IPTC pourraient intéresser vos visiteurs.'; - $adv[] = 'Les débutants laisseront $conf[\'use_iptc\'] = false;'; - $adv[] = 'Les utilisateurs avancés feront des efforts de documentation ' - . 'avant de transférer leurs images.<br />' - . 'Les champs IPTC doivent être décrits par ' - . '$conf[\'use_iptc_mapping\']'; - $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation ' - . 'des métadonnées.<br />Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs IPTC quand bien même ces ' - . 'champs ne seraient pas vides.'; - $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et ' - . '<strong>use</strong>_iptc_mapping seront ' - . 'totalement différents.'; - $cond = true; - $confk = 'use_iptc_mapping'; - break; - - Case 31 : - $adv[] = 'Valeur actuelle : ' - . ( ( $conf['show_exif'] ) ? 'true':'false' ) . '.'; - $adv[] = 'Devrait être à true, certaines informations propres à votre ' - . 'appareil pourront être affichées.'; - $adv[] = 'Pensez au fait que les informations EXIF peuvent être ' - . 'différentes suivant les modèles d\'appareil.<br />' - . 'Si vous changez votre appareil ces champs pourraient en ' - . 'partie differents.'; - $adv[] = 'Beaucoup de photographes professionnels choissent false, ' - . 'ceci afin de protéger leur savoir-faire.' ; - $adv[] = 'Ne confondez pas <strong>show</strong>_exif et ' - . '<strong>use</strong>_exif (consultez la pages de métadonnées ' - . 'sur notre wiki).'; - $cond = true; - $confk = 'show_exif'; - break; - - Case 32 : - $adv[] = 'Comment gérer les EXIF:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />' - . ' 2 - Renommez celle-ci en sample.jpg.<br />' - . ' 3 - Lancez ./tools/metadata.php<br />' - . ' 4 - Analysez les résultats pour déterminer quels champs ' - . 'EXIF pourraient intéresser vos visiteurs.'; - $adv[] = 'Les débutants laisseront la valeur par défaut.'; - $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau ' - . '$lang; voire même à l\'impact possible sur les templates.'; - $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et ' - . '<strong>use</strong>_exif_mapping seront ' - . 'totalement différents.'; - $cond = true; - $confk = 'show_exif_fields'; - break; - - Case 33 : - $adv[] = 'Valeur actuelle : ' . ( ( $conf['use_exif'] ) ? 'true':'false' ) - . '.'; - $adv[] = 'Les documentalistes et photographes professionnels choisiront ' - . 'cette valeur true, mais les débutants devraient laisser ' - . 'la valeur par défaut.'; - $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation ' - . 'des métadonnées.<br />Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs EXIF quand bien même ces ' - . 'champs ne seraient pas vides.'; - $adv[] = 'Ne confondez pas <strong>show</strong>_exif et ' - . '<strong>use</strong>_exif (consultez la pages de métadonnées ' - . 'sur notre wiki).'; - $cond = true; - $confk = 'use_exif'; - break; - - Case 34 : - $adv[] = 'Comment gérer les EXIF:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />' - . ' 2 - Renommez celle-ci en sample.jpg.<br />' - . ' 3 - Lancez ./tools/metadata.php<br />' - . ' 4 - Analysez les résultats pour déterminer quels champs ' - . 'EXIF pourraient intéresser vos visiteurs.'; - $adv[] = 'Les débutants laisseront la valeur par défaut.'; - $adv[] = 'Les utilisateurs avancés penseront aux valeurs du tableau ' - . '$lang; voire même à l\'impact possible sur les templates.'; - $adv[] = 'Les débutants laisseront $conf[\'use_exif\'] = false;'; - $adv[] = 'Les utilisateurs avancés feront très attention aux champs ' - . 'sélectionnés et modifiés par la synchronisation.'; - $adv[] = 'Faire attention aux champs mentionnés dans la synchronisation ' - . 'des métadonnées.<br />Ces champs pourront être ' - . 'écrasés par des valeurs de champs EXIF quand bien même ces ' - . 'champs ne seraient pas vides.'; - $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et ' - . '<strong>use</strong>_exif_mapping seront ' - . 'totalement différents.'; - $cond = true; - $confk = 'use_exif_mapping'; - break; - } -} - -?> diff --git a/plugins/admin_advices/en_UK/index.php b/plugins/admin_advices/language/en_UK/index.php index c15b15795..c15b15795 100644 --- a/plugins/admin_advices/en_UK/index.php +++ b/plugins/admin_advices/language/en_UK/index.php diff --git a/plugins/admin_advices/language/en_UK/plugin.lang.php b/plugins/admin_advices/language/en_UK/plugin.lang.php new file mode 100644 index 000000000..cdae1d6c4 --- /dev/null +++ b/plugins/admin_advices/language/en_UK/plugin.lang.php @@ -0,0 +1,157 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software, you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY, without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program, if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// --------- Starting below: New or revised $lang ---- from Butterfly (1.8) +$lang['An_advice_about'] = 'A new advice about'; +$lang['contribute'] = 'how you can contribute'; +$lang['navigation'] = 'navigation'; +$lang['Metadata'] = 'Metadata'; +$lang['current'] = 'Current value: %s.'; +$lang['TN-height&width'] = 'Thumbnail height and width have to be equal.'; +$lang['Adv_case'][0] = array( /* **contribute */ + 'If you want to contribute with your own "tip", please publish it', + 'on Piwigo Forums (or mail it to the one of the developers),', + 'and we would be happy to add it within next release.', ); +$lang['Adv_case'][1] = array( /* newcat_default_status */ + 'Try $conf[\'newcat_default_status\'] = \'private\',', + 'You will have more time to describe and check your pictures.', + 'Time to decide between private and public status.', + 'If you choose private, time to distribute authorization.', + 'Your new category will be well prepared.', ); +$lang['Adv_case'][2] = array( /* slideshow_period */ + 'This value could be too small for low band connections.', + 'Think about higher value like 4.', ); +$lang['Adv_case'][3] = array( /* file_ext */ + 'Should never contains extensions which can be executed', + 'on the server side like *.php, *.PHP, *.asp, ...', ); +$lang['Adv_case'][4] = array( /* show_iptc_mapping */ + 'Show IPTC Data from your picture:', + ' 1 - Copy one of your jpg pictures (a public one) in ./tools/', + ' 2 - Rename it as sample.jpg.', + ' 3 - Run ./tools/metadata.php', + ' 4 - Analyse results to determine which IPTC fields could be useful for your visitors.', + 'Beginners would prefer to keep $conf[\'show_iptc\'] = false,', + 'Advanced users would take care of $lang values and impacts on templates.', ); +$lang['Adv_case'][5] = array( /* top_number */ + 'This value is maybe too high for low connections, think about 25-50 depending on your thumbnail sizes.', ); +$lang['Adv_case'][6] = array( /* top_number */ + 'One? It could be too low for random pictures, think about 5-10 depending on your thumbnail sizes.', ); +$lang['Adv_case'][7] = array( /* anti-flood_time */ + 'For normal flow processing, your value is probably too high. Reasonable value is 60 (default).' , ); +$lang['Adv_case'][8] = array( /* calendar_datefield */ + 'Authorized values are ' . "'date_creation' or 'date_available'" . ', otherwise you can get unpredictable results.' , ); +$lang['Adv_case'][9] = array( /* calendar_datefield */ + "'date_creation'" . ' is NOT filled by any activated use metadata mapping fields.', + 'So activate metadata usage <strong>or</strong> change to $conf[\'calendar_datefield\'] = \'date_available\'', + 'Activate metadata usage as you want: ', + '1 - $conf[\'use_iptc\'] = true, or $conf[\'use_exif\'] = true, each way will be correct.', + '2 - And respectively map:', + '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' => \'2#055\', ...', + 'or/and:', + '$conf[\'use_exif_mapping\'] = array(\'date_creation\' => \'DateTimeOriginal\', ...', + '3 - Finally, a new task is up to you: Metadata synchronization.', ); +$lang['Adv_case'][10] = array( /* newcat_default_visible */ + 'Not useful, private status is better, so code $conf[\'newcat_default_visible\'] = true,', ); +$lang['Adv_case'][11] = array( /* level_separator */ + 'Try something else like $conf[\'level_separator\'] = \'+ \',', ); +$lang['Adv_case'][12] = array( /* paginate_pages_around */ + 'Usual range is between 2 and 5. To be light, choose $conf[\'paginate_pages_around\'] = 2, ', + 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7,', ); +$lang['Adv_case'][13] = array( /* tn_width */ + 'Should be a close value to your thumbnail width. Usual range is between 96 and 150, about $conf[\'tn_width\'] = 128,', ); +$lang['Adv_case'][14] = array( /* tn_height */ + 'Should be a close value to your thumbnail height. Usual range is between 96 and 150, about $conf[\'tn_height\'] = 128,', ); +$lang['Adv_case'][15] = array( /* tn_height */ + 'Thumbnail height and width have to be equal.', + 'Choose $conf[\'tn_height\'] = $conf[\'tn_width\'],', + 'or $conf[\'tn_width\'] = $conf[\'tn_height\'],', ); +$lang['Adv_case'][16] = array( /* show_version */ + 'For security reason, please set $conf[\'show_version\'] = false,', ); +$lang['Adv_case'][17] = array( /* show_thumbnail_caption */ + 'For a lighter gallery just have a look to $conf[\'show_thumbnail_caption\'] = false,', ); +$lang['Adv_case'][18] = array( /* show_picture_name_on_title */ + 'For a lighter gallery just have a look to $conf[\'show_picture_name_on_title\'] = false,', ); +$lang['Adv_case'][19] = array( /* subcatify */ + 'If you do NOT have any category descriptions just have a look to $conf[\'subcatify\'] = false,', ); +$lang['Adv_case'][20] = array( /* allow_random_representative */ + 'Leave $conf[\'allow_random_representative\'] = true, ', + 'but analyze if you can avoid for performance reasons.' , ); +$lang['Adv_case'][21] = array( /* prefix_thumbnail */ + 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.', + 'Do NOT change it except if your thumbnails are NOT visible.', + 'Distant site may use a different prefix but create_listing_file.php must be modified.', + 'You will get a warning message during synchronization in that case.', + 'Try to keep the same prefix thru all your sites either local or distants.', + 'Keep this parameter in your ./include/config_ <strong>local.inc.php</strong>', + 'See our wiki configuration page for more information about ./include/config_<strong>local.inc.php</strong>.', ); +$lang['Adv_case'][22] = array( /* users_page */ + 'Unless you have a low band connection, you can draw up $conf[\'users_page\'] to a higher value if you have more than 20 members.', ); +$lang['Adv_case'][23] = array( /* mail_options */ + 'Should be false, only few webmasters have to set $conf[\'mail_options\'] = true, ', + 'A specific advice you can get from an advanced user on our forum in some mailing issues.', ); +$lang['Adv_case'][24] = array( /* check_upgrade_feed */ + 'Should be false, only PWG dev Team have to set $conf[\'check_upgrade_feed\'] = true, for test purpose.' , ); +$lang['Adv_case'][25] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.', ); +$lang['Adv_case'][26] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.', + 'Check your best rated pictures prior to remove some values.', + 'Reduce excessive rating and change your $conf[\'rate_items\'].', ); +$lang['Adv_case'][27] = array( /* show_iptc */ + 'Could be true, think about $conf[\'show_iptc\'] = false,', + 'Some Professional photographers choose false their reasons are not really professional.' , + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][28] = array( /* use_iptc */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave it as $conf[\'use_iptc\'] = false,', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][29] = array( /* use_iptc */ + 'How to deal with IPTC:', + '1 - Copy one of your jpg pictures (a public one) in ./tools/', + '2 - Rename it as sample.jpg.', + '3 - Run ./tools/metadata.php', + '4 - Analyse results to determine which IPTC fields could be used to override database fields.', + 'Beginners would prefer to keep $conf[\'use_iptc\'] = false,', + 'Advanced users make documentation efforts prior to upload their pictures.', + 'IPTC fields have to be described in $conf[\'use_iptc_mapping\']', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][30] = array( /* use_iptc_mapping */ + 'How to deal with IPTC:', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][31] = array( /* show_exif */ + 'Should be true, some information from your camera can be displayed.', + 'Think about EXIF information could be different depending on camera models.', + 'If you change your camera these fields could be partly different.', + 'Many professional photographers choose false, their reasons are to protect their knowledge.' , + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][32] = array( /* use_exif */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave the default value.', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with EXIF values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][33] = array( /* **navigation */ + 'You can use keyboard arrows to navigate between pictures.', ); +?>
\ No newline at end of file diff --git a/plugins/admin_advices/fr_FR/index.php b/plugins/admin_advices/language/es_ES/index.php index c15b15795..c15b15795 100644 --- a/plugins/admin_advices/fr_FR/index.php +++ b/plugins/admin_advices/language/es_ES/index.php diff --git a/plugins/admin_advices/language/es_ES/plugin.lang.php b/plugins/admin_advices/language/es_ES/plugin.lang.php new file mode 100644 index 000000000..cdae1d6c4 --- /dev/null +++ b/plugins/admin_advices/language/es_ES/plugin.lang.php @@ -0,0 +1,157 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software, you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY, without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program, if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// --------- Starting below: New or revised $lang ---- from Butterfly (1.8) +$lang['An_advice_about'] = 'A new advice about'; +$lang['contribute'] = 'how you can contribute'; +$lang['navigation'] = 'navigation'; +$lang['Metadata'] = 'Metadata'; +$lang['current'] = 'Current value: %s.'; +$lang['TN-height&width'] = 'Thumbnail height and width have to be equal.'; +$lang['Adv_case'][0] = array( /* **contribute */ + 'If you want to contribute with your own "tip", please publish it', + 'on Piwigo Forums (or mail it to the one of the developers),', + 'and we would be happy to add it within next release.', ); +$lang['Adv_case'][1] = array( /* newcat_default_status */ + 'Try $conf[\'newcat_default_status\'] = \'private\',', + 'You will have more time to describe and check your pictures.', + 'Time to decide between private and public status.', + 'If you choose private, time to distribute authorization.', + 'Your new category will be well prepared.', ); +$lang['Adv_case'][2] = array( /* slideshow_period */ + 'This value could be too small for low band connections.', + 'Think about higher value like 4.', ); +$lang['Adv_case'][3] = array( /* file_ext */ + 'Should never contains extensions which can be executed', + 'on the server side like *.php, *.PHP, *.asp, ...', ); +$lang['Adv_case'][4] = array( /* show_iptc_mapping */ + 'Show IPTC Data from your picture:', + ' 1 - Copy one of your jpg pictures (a public one) in ./tools/', + ' 2 - Rename it as sample.jpg.', + ' 3 - Run ./tools/metadata.php', + ' 4 - Analyse results to determine which IPTC fields could be useful for your visitors.', + 'Beginners would prefer to keep $conf[\'show_iptc\'] = false,', + 'Advanced users would take care of $lang values and impacts on templates.', ); +$lang['Adv_case'][5] = array( /* top_number */ + 'This value is maybe too high for low connections, think about 25-50 depending on your thumbnail sizes.', ); +$lang['Adv_case'][6] = array( /* top_number */ + 'One? It could be too low for random pictures, think about 5-10 depending on your thumbnail sizes.', ); +$lang['Adv_case'][7] = array( /* anti-flood_time */ + 'For normal flow processing, your value is probably too high. Reasonable value is 60 (default).' , ); +$lang['Adv_case'][8] = array( /* calendar_datefield */ + 'Authorized values are ' . "'date_creation' or 'date_available'" . ', otherwise you can get unpredictable results.' , ); +$lang['Adv_case'][9] = array( /* calendar_datefield */ + "'date_creation'" . ' is NOT filled by any activated use metadata mapping fields.', + 'So activate metadata usage <strong>or</strong> change to $conf[\'calendar_datefield\'] = \'date_available\'', + 'Activate metadata usage as you want: ', + '1 - $conf[\'use_iptc\'] = true, or $conf[\'use_exif\'] = true, each way will be correct.', + '2 - And respectively map:', + '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' => \'2#055\', ...', + 'or/and:', + '$conf[\'use_exif_mapping\'] = array(\'date_creation\' => \'DateTimeOriginal\', ...', + '3 - Finally, a new task is up to you: Metadata synchronization.', ); +$lang['Adv_case'][10] = array( /* newcat_default_visible */ + 'Not useful, private status is better, so code $conf[\'newcat_default_visible\'] = true,', ); +$lang['Adv_case'][11] = array( /* level_separator */ + 'Try something else like $conf[\'level_separator\'] = \'+ \',', ); +$lang['Adv_case'][12] = array( /* paginate_pages_around */ + 'Usual range is between 2 and 5. To be light, choose $conf[\'paginate_pages_around\'] = 2, ', + 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7,', ); +$lang['Adv_case'][13] = array( /* tn_width */ + 'Should be a close value to your thumbnail width. Usual range is between 96 and 150, about $conf[\'tn_width\'] = 128,', ); +$lang['Adv_case'][14] = array( /* tn_height */ + 'Should be a close value to your thumbnail height. Usual range is between 96 and 150, about $conf[\'tn_height\'] = 128,', ); +$lang['Adv_case'][15] = array( /* tn_height */ + 'Thumbnail height and width have to be equal.', + 'Choose $conf[\'tn_height\'] = $conf[\'tn_width\'],', + 'or $conf[\'tn_width\'] = $conf[\'tn_height\'],', ); +$lang['Adv_case'][16] = array( /* show_version */ + 'For security reason, please set $conf[\'show_version\'] = false,', ); +$lang['Adv_case'][17] = array( /* show_thumbnail_caption */ + 'For a lighter gallery just have a look to $conf[\'show_thumbnail_caption\'] = false,', ); +$lang['Adv_case'][18] = array( /* show_picture_name_on_title */ + 'For a lighter gallery just have a look to $conf[\'show_picture_name_on_title\'] = false,', ); +$lang['Adv_case'][19] = array( /* subcatify */ + 'If you do NOT have any category descriptions just have a look to $conf[\'subcatify\'] = false,', ); +$lang['Adv_case'][20] = array( /* allow_random_representative */ + 'Leave $conf[\'allow_random_representative\'] = true, ', + 'but analyze if you can avoid for performance reasons.' , ); +$lang['Adv_case'][21] = array( /* prefix_thumbnail */ + 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.', + 'Do NOT change it except if your thumbnails are NOT visible.', + 'Distant site may use a different prefix but create_listing_file.php must be modified.', + 'You will get a warning message during synchronization in that case.', + 'Try to keep the same prefix thru all your sites either local or distants.', + 'Keep this parameter in your ./include/config_ <strong>local.inc.php</strong>', + 'See our wiki configuration page for more information about ./include/config_<strong>local.inc.php</strong>.', ); +$lang['Adv_case'][22] = array( /* users_page */ + 'Unless you have a low band connection, you can draw up $conf[\'users_page\'] to a higher value if you have more than 20 members.', ); +$lang['Adv_case'][23] = array( /* mail_options */ + 'Should be false, only few webmasters have to set $conf[\'mail_options\'] = true, ', + 'A specific advice you can get from an advanced user on our forum in some mailing issues.', ); +$lang['Adv_case'][24] = array( /* check_upgrade_feed */ + 'Should be false, only PWG dev Team have to set $conf[\'check_upgrade_feed\'] = true, for test purpose.' , ); +$lang['Adv_case'][25] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.', ); +$lang['Adv_case'][26] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.', + 'Check your best rated pictures prior to remove some values.', + 'Reduce excessive rating and change your $conf[\'rate_items\'].', ); +$lang['Adv_case'][27] = array( /* show_iptc */ + 'Could be true, think about $conf[\'show_iptc\'] = false,', + 'Some Professional photographers choose false their reasons are not really professional.' , + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][28] = array( /* use_iptc */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave it as $conf[\'use_iptc\'] = false,', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][29] = array( /* use_iptc */ + 'How to deal with IPTC:', + '1 - Copy one of your jpg pictures (a public one) in ./tools/', + '2 - Rename it as sample.jpg.', + '3 - Run ./tools/metadata.php', + '4 - Analyse results to determine which IPTC fields could be used to override database fields.', + 'Beginners would prefer to keep $conf[\'use_iptc\'] = false,', + 'Advanced users make documentation efforts prior to upload their pictures.', + 'IPTC fields have to be described in $conf[\'use_iptc_mapping\']', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][30] = array( /* use_iptc_mapping */ + 'How to deal with IPTC:', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][31] = array( /* show_exif */ + 'Should be true, some information from your camera can be displayed.', + 'Think about EXIF information could be different depending on camera models.', + 'If you change your camera these fields could be partly different.', + 'Many professional photographers choose false, their reasons are to protect their knowledge.' , + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][32] = array( /* use_exif */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave the default value.', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with EXIF values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][33] = array( /* **navigation */ + 'You can use keyboard arrows to navigate between pictures.', ); +?>
\ No newline at end of file diff --git a/template/yoga/admin/index.php b/plugins/admin_advices/language/fr_FR/index.php index c15b15795..c15b15795 100644 --- a/template/yoga/admin/index.php +++ b/plugins/admin_advices/language/fr_FR/index.php diff --git a/plugins/admin_advices/language/fr_FR/plugin.lang.php b/plugins/admin_advices/language/fr_FR/plugin.lang.php new file mode 100644 index 000000000..20ea2aef2 --- /dev/null +++ b/plugins/admin_advices/language/fr_FR/plugin.lang.php @@ -0,0 +1,159 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software, you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY, without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program, if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// --------- Starting below: New or revised $lang ---- from Butterfly (1.8) +$lang['An_advice_about'] = 'Un nouveau conseil à propos de '; +$lang['contribute'] = 'comment contribuer'; +$lang['navigation'] = 'navigation'; +$lang['Metadata'] = 'Méta-données'; +$lang['current'] = 'Valeur actuelle : %s.'; +$lang['TN-height&width'] = 'Hauteur et largeur de miniature devrait être égales.'; +$lang['Adv_case'][0] = array( /* **contribute */ + 'Si vous souhaitez contribuer avec votre propre «astuce», merci de la publier', + 'sur les Forums de Piwigo (ou par message privé à l\'un des développeurs),', + 'et nous serons heureux de l\'ajouter dès la publication suivante.', ); +$lang['Adv_case'][1] = array( /* newcat_default_status */ + 'Essayez $conf[\'newcat_default_status\'] = \'private\';', + 'Vous aurez plus de temps pour décrire et contrôler vos images. ', + 'Du temps pour vous décider entre un statut privé ou public.', + 'Si vous choisissez de rester privé, vous passerez directement à l\'attribution des autorisations. ', + 'Vos nouvelles catégories seront préparées plus facilement.', ); +$lang['Adv_case'][2] = array( /* slideshow_period */ + 'Ce délai pourrait être trop court pour les connexions en bas débit. ', + 'Pensez à une valeur supérieure comme 4.', ); +$lang['Adv_case'][3] = array( /* file_ext */ + 'Ne devrait jamais contenir des extensions pouvant être exécutées', + 'sur le serveur comme *.php, *.PHP, *.asp, ...', ); +$lang['Adv_case'][4] = array( /* show_iptc_mapping */ + 'Comment gérer les IPTC:', + ' 1 - Copiez une image jpg (publique) dans ./tools/', + ' 2 - Renommez celle-ci en sample.jpg.', + ' 3 - Lancez ./tools/metadata.php', + ' 4 - Analysez les résultats pour déterminer quels champs ', + 'Les débutants laisseront $conf[\'show_iptc\'] = false;', + 'Les utilisateurs avancés penseront aux valeurs du tableau $lang; voire même à l\'impact possible sur les templates.', ); +$lang['Adv_case'][5] = array( /* top_number */ + 'Cette valeur pourrait être trop grande pour des connexions bas débit.', + 'Pensez à une valeur située entre 25-50 en fonction de la taille de vos minitures.', ); +$lang['Adv_case'][6] = array( /* top_number */ + 'Une seule? Au moins pour les images aléatoires, pensez autour de 5-10 selon la tailles de vos miniatures.', ); +$lang['Adv_case'][7] = array( /* anti-flood_time */ + 'Pour un traitement fluide, votre valeur est sans doute trop grande. Une valeur raisonnable serait 60 (valeur par défaut).', ); +$lang['Adv_case'][8] = array( /* calendar_datefield */ + 'Les valeurs admises sont ' . "'date_creation' ou 'date_available'" . ', toute autre valeur peut aboutir à des résultats imprévisibles.', ); + $lang['Adv_case'][9] = array( /* calendar_datefield */ + "La 'date_creation'" . ' n\'est pas renseignée. Aucun champ des méta-données (use_) n\'actualise la base.', + 'Soit vous activez l\'usage des méta-données <strong>ou</strong> changez pour $conf[\'calendar_datefield\'] = \'date_available\'', + 'Activez l\'usage des méta-données simplement par: ', + '1 - $conf[\'use_iptc\'] = true; ou $conf[\'use_exif\'] = true; au choix, les 2 sont valables.', + '2 - Respectivement à chacune faire la modif:', + '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' => \'2#055\', ...', + 'et/ou:', + '$conf[\'use_exif_mapping\'] = array(\'date_creation\' => \'DateTimeOriginal\', ...', + '3 - Enfin une nouvelle tache vous est destinée: la synchronisation des méta-données.', ); +$lang['Adv_case'][10] = array( /* newcat_default_visible */ + 'C\'est une erreur, un statut "private" est plus simple, alors choisissez $conf[\'newcat_default_visible\'] = true;', ); +$lang['Adv_case'][11] = array( /* level_separator */ + 'Vous pouvez toujours essayer un autre séparateur comme : $conf[\'level_separator\'] = \'+ \';', ); +$lang['Adv_case'][12] = array( /* paginate_pages_around */ + 'Les valeurs habituelles se situent entre 2 et 5. Pour un site avec une interface légère, on choisira : ', + '$conf[\'paginate_pages_around\'] = 2;', + 'Afin de proposer plus d\'accès directs, on choisira : $conf[\'paginate_pages_around\'] = 7;', ); +$lang['Adv_case'][13] = array( /* tn_width */ + 'Doit être une valeur proche de la largeur de vos miniatures. Les valeurs habituelles se situent entre 96 et 150, comme $conf[\'tn_width\'] = 128;', ); +$lang['Adv_case'][14] = array( /* tn_height */ + 'Doit être une valeur proche de la hauteur de vos miniatures. Les valeurs habituelles se situent entre 96 et 150, comme $conf[\'tn_height\'] = 128;', ); +$lang['Adv_case'][15] = array( /* tn_height */ + 'Largeur et hauteur de miniature devraient être égales.', + 'Essayez $conf[\'tn_height\'] = $conf[\'tn_width\'],', + 'ou $conf[\'tn_width\'] = $conf[\'tn_height\'],', ); +$lang['Adv_case'][16] = array( /* show_version */ + 'Pour des raisons de sécurité de votre galerie, préférez $conf[\'show_version\'] = false;', ); +$lang['Adv_case'][17] = array( /* show_thumbnail_caption */ + 'Pour une galerie moins chargée, faites le test de $conf[\'show_thumbnail_caption\'] = false,', ); +$lang['Adv_case'][18] = array( /* show_picture_name_on_title */ + 'Pour une galerie moins chargée, faites le test de $conf[\'show_picture_name_on_title\'] = false,', ); +$lang['Adv_case'][19] = array( /* subcatify */ + 'Si aucune de vos catégories ne possède de description alors essayez $conf[\'subcatify\'] = false;', ); +$lang['Adv_case'][20] = array( /* allow_random_representative */ + 'Laissez $conf[\'allow_random_representative\'] = true, ', + 'mais étudiez comment vous pourriez l\'éviter pour des raisons de performance.' , ); +$lang['Adv_case'][21] = array( /* prefix_thumbnail */ + 'Attention, votre $conf[\'prefix_thumbnail\'] n\'est pas standard.', + 'Ne pas changer votre préfixe sauf si vos miniatures ont un problème d\'affichage.', + 'Un site distant peut avoir un préfixe différent, le create_listing_file.php devra être modifié.', + 'Vous devriez avoir un message d\'avertissement pendant la synchronisation dans ce cas.', + 'Essayez de garder le même préfixe de miniatures pour les sites locaux ou distants.', + 'Conservez ce paramètre dans votre ./include/config_<strong>local.inc.php</strong>.', + 'Voir la page sur la configuration dans le Wiki pour plus d\'informations à propos de ./include/config_<strong>local.inc.php</strong>.', ); +$lang['Adv_case'][22] = array( /* users_page */ + 'A moins d\'avoir une connexion bas débit, vous pouvez augmenter largement $conf[\'users_page\'] surtout si vous avez plus de 20 membres.', ); +$lang['Adv_case'][23] = array( /* mail_options */ + 'Devrait être à false, seulement quelques webmasters devront indiquer $conf[\'mail_options\'] = true;', + 'Un utilisateur avancé de notre forum les aura conseillé dans un seul cas de problème d\'email.', ); +$lang['Adv_case'][24] = array( /* check_upgrade_feed */ + 'Devrait être à false, seuls les membres de l\'équipe Piwigo codent $conf[\'check_upgrade_feed\'] = true; pour leurs tests.', ); +$lang['Adv_case'][25] = array( /* rate_items */ + 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments mais pas moins.', ); +$lang['Adv_case'][26] = array( /* rate_items */ + 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 éléments mais pas plus.', + 'Contrôlez vos images les mieux notées avant de retirer certaines valeurs.', + 'Réduire les valeurs excessives et modifiez votre $conf[\'rate_items\'].', ); +$lang['Adv_case'][27] = array( /* show_iptc */ + 'Peut être effectivement à true, éventuellement choisissez $conf[\'show_iptc\'] = false,', + 'Comme quelques photographes professionnels choisissez false bien que leurs raisons ne soient guère professionnelles.', + 'Ne confondez pas <strong>show</strong>_iptc et <strong>use</strong>_iptc (consultez les pages sur les métadonnées de notre wiki).', ); +$lang['Adv_case'][28] = array( /* use_iptc */ + 'Les documentalistes et photographes professionnels préfèreront la valeur true, mais les débutants devraient laisser $conf[\'use_iptc\'] = false,', + 'Faire attention aux champs mentionnés dans la synchronisation des métadonnées.', + 'Les champs indiqués pourront être écrasés par des valeurs de champs IPTC quand bien même ces champs ne seraient pas vides.', + 'Ne confondez pas <strong>show</strong>_iptc et <strong>use</strong>_iptc (consultez les pages sur les métadonnées de notre wiki).', ); +$lang['Adv_case'][29] = array( /* use_iptc */ + 'Comment gérer les IPTC:', + '1 - Copiez une image jpg (publique) dans ./tools/', + '2 - Renommez celle-ci en sample.jpg.', + '3 - Lancez ./tools/metadata.php', + '4 - Analysez les résultats pour déterminer quels champs IPTC pourraient compléter votre base de données.', + 'Les débutants laisseront $conf[\'use_iptc\'] = false,', + 'Les utilisateurs avancés feront des efforts de documentation avant de transférer leurs images.', + 'Les champs IPTC doivent être décrits par $conf[\'use_iptc_mapping\']', + 'Dans tous les cas, <strong>show</strong>_iptc_mapping et <strong>use</strong>_iptc_mapping seront totalement différents.', ); +$lang['Adv_case'][30] = array( /* use_iptc_mapping */ + 'Comment gérer les IPTC:', + 'Faites attention aux champs mentionnés dans la synchronisation des métadonnées.', + 'Les champs indiqués pourront être écrasés par des valeurs de champs IPTC quand bien même ces champs ne seraient pas vides.', + 'Dans tous les cas, <strong>show</strong>_iptc_mapping et <strong>use</strong>_iptc_mapping seront totalement différents.', ); +$lang['Adv_case'][31] = array( /* show_exif */ + 'Devrait être à true, certaines informations propres à votre appareil pourront être affichées.', + 'Pensez au fait que les informations EXIF peuvent être différentes suivant les modèles d\'appareil.', + 'Si vous changez votre appareil ces champs pourraient en partie differents.', + 'Beaucoup de photographes professionnels choissent false, ceci afin de protéger leur savoir-faire.' , + 'Ne confondez pas <strong>show</strong>_exif et <strong>use</strong>_exif (consultez les pages sur les métadonnées de notre wiki).', ); +$lang['Adv_case'][32] = array( /* use_exif */ +'Les documentalistes et photographes professionnels préfèreront la valeur true, mais les débutants laisseront la valeur par défaut.', + 'Take care of mentionned fields in metadata synchronization.', + 'Les champs indiqués pourront être écrasés par des valeurs de champs EXIF quand bien même ces champs ne seraient pas vides.', + 'Ne confondez pas <strong>show</strong>_exif et <strong>use</strong>_exif (consultez les pages sur les métadonnées de notre wiki).', ); +$lang['Adv_case'][33] = array( /* **navigation */ + 'Vous pouvez utiliser les flèches du clavier pour naviguer entre les images.', ); +?>
\ No newline at end of file diff --git a/plugins/admin_advices/language/index.php b/plugins/admin_advices/language/index.php new file mode 100644 index 000000000..c15b15795 --- /dev/null +++ b/plugins/admin_advices/language/index.php @@ -0,0 +1,30 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// Recursive call +$url = '../'; +header( 'Request-URI: '.$url ); +header( 'Content-Location: '.$url ); +header( 'Location: '.$url ); +exit(); +?> diff --git a/plugins/admin_advices/language/it_IT/index.php b/plugins/admin_advices/language/it_IT/index.php new file mode 100644 index 000000000..c15b15795 --- /dev/null +++ b/plugins/admin_advices/language/it_IT/index.php @@ -0,0 +1,30 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// Recursive call +$url = '../'; +header( 'Request-URI: '.$url ); +header( 'Content-Location: '.$url ); +header( 'Location: '.$url ); +exit(); +?> diff --git a/plugins/admin_advices/language/it_IT/plugin.lang.php b/plugins/admin_advices/language/it_IT/plugin.lang.php new file mode 100644 index 000000000..cdae1d6c4 --- /dev/null +++ b/plugins/admin_advices/language/it_IT/plugin.lang.php @@ -0,0 +1,157 @@ +<?php +// +-----------------------------------------------------------------------+ +// | Piwigo - a PHP based picture gallery | +// +-----------------------------------------------------------------------+ +// | Copyright(C) 2008 Piwigo Team http://piwigo.org | +// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | +// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | +// +-----------------------------------------------------------------------+ +// | This program is free software, you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY, without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program, if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +// --------- Starting below: New or revised $lang ---- from Butterfly (1.8) +$lang['An_advice_about'] = 'A new advice about'; +$lang['contribute'] = 'how you can contribute'; +$lang['navigation'] = 'navigation'; +$lang['Metadata'] = 'Metadata'; +$lang['current'] = 'Current value: %s.'; +$lang['TN-height&width'] = 'Thumbnail height and width have to be equal.'; +$lang['Adv_case'][0] = array( /* **contribute */ + 'If you want to contribute with your own "tip", please publish it', + 'on Piwigo Forums (or mail it to the one of the developers),', + 'and we would be happy to add it within next release.', ); +$lang['Adv_case'][1] = array( /* newcat_default_status */ + 'Try $conf[\'newcat_default_status\'] = \'private\',', + 'You will have more time to describe and check your pictures.', + 'Time to decide between private and public status.', + 'If you choose private, time to distribute authorization.', + 'Your new category will be well prepared.', ); +$lang['Adv_case'][2] = array( /* slideshow_period */ + 'This value could be too small for low band connections.', + 'Think about higher value like 4.', ); +$lang['Adv_case'][3] = array( /* file_ext */ + 'Should never contains extensions which can be executed', + 'on the server side like *.php, *.PHP, *.asp, ...', ); +$lang['Adv_case'][4] = array( /* show_iptc_mapping */ + 'Show IPTC Data from your picture:', + ' 1 - Copy one of your jpg pictures (a public one) in ./tools/', + ' 2 - Rename it as sample.jpg.', + ' 3 - Run ./tools/metadata.php', + ' 4 - Analyse results to determine which IPTC fields could be useful for your visitors.', + 'Beginners would prefer to keep $conf[\'show_iptc\'] = false,', + 'Advanced users would take care of $lang values and impacts on templates.', ); +$lang['Adv_case'][5] = array( /* top_number */ + 'This value is maybe too high for low connections, think about 25-50 depending on your thumbnail sizes.', ); +$lang['Adv_case'][6] = array( /* top_number */ + 'One? It could be too low for random pictures, think about 5-10 depending on your thumbnail sizes.', ); +$lang['Adv_case'][7] = array( /* anti-flood_time */ + 'For normal flow processing, your value is probably too high. Reasonable value is 60 (default).' , ); +$lang['Adv_case'][8] = array( /* calendar_datefield */ + 'Authorized values are ' . "'date_creation' or 'date_available'" . ', otherwise you can get unpredictable results.' , ); +$lang['Adv_case'][9] = array( /* calendar_datefield */ + "'date_creation'" . ' is NOT filled by any activated use metadata mapping fields.', + 'So activate metadata usage <strong>or</strong> change to $conf[\'calendar_datefield\'] = \'date_available\'', + 'Activate metadata usage as you want: ', + '1 - $conf[\'use_iptc\'] = true, or $conf[\'use_exif\'] = true, each way will be correct.', + '2 - And respectively map:', + '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' => \'2#055\', ...', + 'or/and:', + '$conf[\'use_exif_mapping\'] = array(\'date_creation\' => \'DateTimeOriginal\', ...', + '3 - Finally, a new task is up to you: Metadata synchronization.', ); +$lang['Adv_case'][10] = array( /* newcat_default_visible */ + 'Not useful, private status is better, so code $conf[\'newcat_default_visible\'] = true,', ); +$lang['Adv_case'][11] = array( /* level_separator */ + 'Try something else like $conf[\'level_separator\'] = \'+ \',', ); +$lang['Adv_case'][12] = array( /* paginate_pages_around */ + 'Usual range is between 2 and 5. To be light, choose $conf[\'paginate_pages_around\'] = 2, ', + 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7,', ); +$lang['Adv_case'][13] = array( /* tn_width */ + 'Should be a close value to your thumbnail width. Usual range is between 96 and 150, about $conf[\'tn_width\'] = 128,', ); +$lang['Adv_case'][14] = array( /* tn_height */ + 'Should be a close value to your thumbnail height. Usual range is between 96 and 150, about $conf[\'tn_height\'] = 128,', ); +$lang['Adv_case'][15] = array( /* tn_height */ + 'Thumbnail height and width have to be equal.', + 'Choose $conf[\'tn_height\'] = $conf[\'tn_width\'],', + 'or $conf[\'tn_width\'] = $conf[\'tn_height\'],', ); +$lang['Adv_case'][16] = array( /* show_version */ + 'For security reason, please set $conf[\'show_version\'] = false,', ); +$lang['Adv_case'][17] = array( /* show_thumbnail_caption */ + 'For a lighter gallery just have a look to $conf[\'show_thumbnail_caption\'] = false,', ); +$lang['Adv_case'][18] = array( /* show_picture_name_on_title */ + 'For a lighter gallery just have a look to $conf[\'show_picture_name_on_title\'] = false,', ); +$lang['Adv_case'][19] = array( /* subcatify */ + 'If you do NOT have any category descriptions just have a look to $conf[\'subcatify\'] = false,', ); +$lang['Adv_case'][20] = array( /* allow_random_representative */ + 'Leave $conf[\'allow_random_representative\'] = true, ', + 'but analyze if you can avoid for performance reasons.' , ); +$lang['Adv_case'][21] = array( /* prefix_thumbnail */ + 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.', + 'Do NOT change it except if your thumbnails are NOT visible.', + 'Distant site may use a different prefix but create_listing_file.php must be modified.', + 'You will get a warning message during synchronization in that case.', + 'Try to keep the same prefix thru all your sites either local or distants.', + 'Keep this parameter in your ./include/config_ <strong>local.inc.php</strong>', + 'See our wiki configuration page for more information about ./include/config_<strong>local.inc.php</strong>.', ); +$lang['Adv_case'][22] = array( /* users_page */ + 'Unless you have a low band connection, you can draw up $conf[\'users_page\'] to a higher value if you have more than 20 members.', ); +$lang['Adv_case'][23] = array( /* mail_options */ + 'Should be false, only few webmasters have to set $conf[\'mail_options\'] = true, ', + 'A specific advice you can get from an advanced user on our forum in some mailing issues.', ); +$lang['Adv_case'][24] = array( /* check_upgrade_feed */ + 'Should be false, only PWG dev Team have to set $conf[\'check_upgrade_feed\'] = true, for test purpose.' , ); +$lang['Adv_case'][25] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.', ); +$lang['Adv_case'][26] = array( /* rate_items */ + 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.', + 'Check your best rated pictures prior to remove some values.', + 'Reduce excessive rating and change your $conf[\'rate_items\'].', ); +$lang['Adv_case'][27] = array( /* show_iptc */ + 'Could be true, think about $conf[\'show_iptc\'] = false,', + 'Some Professional photographers choose false their reasons are not really professional.' , + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][28] = array( /* use_iptc */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave it as $conf[\'use_iptc\'] = false,', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_iptc and <strong>use</strong>_iptc (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][29] = array( /* use_iptc */ + 'How to deal with IPTC:', + '1 - Copy one of your jpg pictures (a public one) in ./tools/', + '2 - Rename it as sample.jpg.', + '3 - Run ./tools/metadata.php', + '4 - Analyse results to determine which IPTC fields could be used to override database fields.', + 'Beginners would prefer to keep $conf[\'use_iptc\'] = false,', + 'Advanced users make documentation efforts prior to upload their pictures.', + 'IPTC fields have to be described in $conf[\'use_iptc_mapping\']', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][30] = array( /* use_iptc_mapping */ + 'How to deal with IPTC:', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with IPTC values even those ones are NOT empty.', + 'In any case, <strong>show</strong>_iptc_mapping and <strong>use</strong>_iptc_mapping must be totally different.', ); +$lang['Adv_case'][31] = array( /* show_exif */ + 'Should be true, some information from your camera can be displayed.', + 'Think about EXIF information could be different depending on camera models.', + 'If you change your camera these fields could be partly different.', + 'Many professional photographers choose false, their reasons are to protect their knowledge.' , + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][32] = array( /* use_exif */ + 'Documentalists and professionnal photographers would set it true, but beginners should leave the default value.', + 'Take care of mentionned fields in metadata synchronization.', + 'Mentionned fields would be rewrited with EXIF values even those ones are NOT empty.', + 'Do NOT confuse between <strong>show</strong>_exif and <strong>use</strong>_exif (have a look on metadata page on our wiki).', ); +$lang['Adv_case'][33] = array( /* **navigation */ + 'You can use keyboard arrows to navigate between pictures.', ); +?>
\ No newline at end of file diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php index fe87cc723..b54f77751 100644 --- a/plugins/admin_advices/main.inc.php +++ b/plugins/admin_advices/main.inc.php @@ -29,99 +29,8 @@ Plugin URI: http://piwigo.org Author: Piwigo team Author URI: http://piwigo.org */ +if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); -add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' ); - -// Add a XHTML tag in HEAD section -function set_admin_advice_add_css() -{ - global $template, $page; - if ( isset($page['body_id']) and $page['body_id']=='theAdminPage' - and $page['page'] == 'intro' - ) - {// This Plugin works only on the Admin page - $template->append( - 'head_elements', - '<link rel="stylesheet" type="text/css" ' - . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">' - ); - add_event_handler('loc_begin_page_tail', 'set_admin_advice' ); - } -} - -// Build an advice on the Admin Intro page -function set_admin_advice() -{ - global $page, $user, $template, $conf; - -// Setup Advice Language (Maybe there is already a variable) - $advlang = ( isset($user['language']) ) ? - $user['language'] : get_default_language(); // en_UK - $my_path = dirname(__FILE__).'/'; - $adv = array(); - if ( !@file_exists($my_path."$advlang/lang.adv.php") ) - { - $advlang = 'en_UK'; - } -// Include language advices - @include_once( $my_path."$advlang/lang.adv.php" ); - -// If there is an advice - if ( $cond ) - { - $template->set_filenames(array( - 'admin_advice' => $my_path.'admin_advices.tpl') - ); - -// Random Thumbnail - $query = ' -SELECT * -FROM '.IMAGES_TABLE.' -ORDER BY RAND(NOW()) -LIMIT 0, 1 -;'; - $result = pwg_query($query); - $row = mysql_fetch_assoc($result); - if ( is_array($row) ) - { - $url_modify = get_root_url().'admin.php?page=picture_modify' - .'&image_id='.$row['id']; - $query = ' -SELECT * FROM '.IMAGE_TAG_TABLE.' -WHERE image_id = ' . $row['id'] .' -;'; - $tag_count = mysql_num_rows(mysql_query($query)); - $template->assign('thumbnail', - array( - 'IMAGE' => get_thumbnail_url($row), - 'IMAGE_ALT' => $row['file'], - 'IMAGE_TITLE' => $row['name'], - 'METADATA' => (empty($row['date_metadata_update'])) ? - 'un' : '', - 'NAME' => (empty($row['name'])) ? - 'un' : '', - 'COMMENT' => (empty($row['comment'])) ? - 'un' : '', - 'AUTHOR' => (empty($row['author'])) ? - 'un' : '', - 'CREATE_DATE' => (empty($row['date_creation'])) ? - 'un' : '', - 'TAGS' => ($tag_count == 0) ? - 'un' : '', - 'NUM_TAGS' => $tag_count, - 'U_MODIFY' => $url_modify, - ) - ); - } - $advice_text = array_shift($adv); - $template->assign( - array( - 'ADVICE_ABOUT' => '$conf[' . "'$confk'] ", - 'ADVICE_TEXT' => $advice_text, - ) - ); - $template->assign('More', $adv ); - $template->pparse('admin_advice'); - } -} +if (script_basename() == 'admin' and defined('IN_ADMIN') and IN_ADMIN) + include_once(dirname(__FILE__).'/admin_advices.php'); ?> |