From 98b07a4a7fa1baff52800f70066f311768904430 Mon Sep 17 00:00:00 2001 From: rvelices Date: Mon, 8 Oct 2007 23:46:09 +0000 Subject: - some code refactoring before upgrade to utf (only cosmetic at this point...) git-svn-id: http://piwigo.org/svn/trunk@2126 68402e56-0260-453c-a942-63ccdbb3a9ee --- about.php | 5 +- admin/help.php | 8 +- include/common.inc.php | 6 +- include/functions.inc.php | 45 +++- include/functions_mail.inc.php | 20 +- include/page_header.php | 4 +- include/ws_functions.inc.php | 5 +- include/ws_protocols/rest_encoder.php | 2 +- nbm.php | 5 +- plugins/add_index/main.admin.inc.php | 4 +- plugins/add_index/main.normal.inc.php | 2 +- .../admin_advices/en_UK.iso-8859-1/lang.adv.php | 168 ++++++------- .../admin_advices/fr_FR.iso-8859-1/lang.adv.php | 268 ++++++++++----------- plugins/c13y_upgrade/initialize.inc.php | 8 +- popuphelp.php | 4 +- 15 files changed, 291 insertions(+), 263 deletions(-) diff --git a/about.php b/about.php index 5ac379ce5..7b55c3354 100644 --- a/about.php +++ b/about.php @@ -57,7 +57,6 @@ include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames( array( 'about'=>'about.tpl', - 'about_content' => get_language_filepath('about.html') ) ); if ( isset($lang['Theme: '.$user['theme']]) ) @@ -75,8 +74,8 @@ $template->assign_vars( ) ); -$template->assign_var_from_handle('ABOUT_MESSAGE', 'about_content'); - +$template->assign_var('ABOUT_MESSAGE', load_language('about.html','','',true) ); + $template->parse('about'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> diff --git a/admin/help.php b/admin/help.php index 2d573fd08..bc588ee22 100644 --- a/admin/help.php +++ b/admin/help.php @@ -32,11 +32,5 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); // +-----------------------------------------------------------------------+ check_status(ACCESS_ADMINISTRATOR); -$template->set_filenames( - array( - 'help_content' => get_language_filepath('help.html') - ) - ); - -$template->assign_var_from_handle('ADMIN_CONTENT', 'help_content'); +$template->assign_var('ADMIN_CONTENT', load_language('help.html','','',true) ); ?> diff --git a/include/common.inc.php b/include/common.inc.php index ee043642c..18053e3ae 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -155,13 +155,13 @@ include(PHPWG_ROOT_PATH.'include/user.inc.php'); // language files -include_once(get_language_filepath('common.lang.php')); +load_language('common.lang'); if (defined('IN_ADMIN') and IN_ADMIN) { - include_once(get_language_filepath('admin.lang.php')); + load_language('admin.lang'); } trigger_action('loading_lang'); -@include_once(get_language_filepath('local.lang.php')); +load_language('local.lang'); // only now we can set the localized username of the guest user (and not in // include/user.inc.php) diff --git a/include/functions.inc.php b/include/functions.inc.php index 50bb81757..4e6b97b02 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -729,9 +729,9 @@ function redirect_html( $url , $msg = '', $refresh_time = 0) if (!isset($lang_info)) { $user = build_user( $conf['guest_id'], true); - include_once(get_language_filepath('common.lang.php')); + load_language('common.lang'); trigger_action('loading_lang'); - @include_once(get_language_filepath('local.lang.php')); + load_language('local.lang'); list($tmpl, $thm) = explode('/', get_default_template()); $template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm); } @@ -1424,4 +1424,43 @@ function get_filter_page_value($value_name) } } -?> +/** + * returns the character set of data sent to browsers / received from forms + */ +function get_pwg_charset() +{ + //TEMP CODE + global $lang_info;return $lang_info['charset']; +} + +/** + * includes a language file or returns the content of a language file + * availability of the file + * + * in descending order of preference: + * param language, user language, default language + * PhpWebGallery default language. + * + * @param string filename + * @param string dirname + * @param string language + * @param bool return_content - if true the file content is returned otherwise + * the file is evaluated as php + * @return boolean success status or a string if return_content is true + */ +function load_language($filename, $dirname = '', $language = '', + $return_content=false) +{ + //TEMP CODE + if (!$return_content) $filename.='.php'; + $f = get_language_filepath($filename, $dirname, $language); + if ($f === false) + return false; + if ($return_content) + return @file_get_contents($f); + global $lang, $lang_info; + @include($f); + return true; +} + +?> \ No newline at end of file diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php index a20a32797..a0e3110ae 100644 --- a/include/functions_mail.inc.php +++ b/include/functions_mail.inc.php @@ -48,7 +48,7 @@ function encode_mime_header($str) $str = str_replace(" ", "_", $str); global $lang_info; - return '=?'.$lang_info['charset'].'?Q?'.$str.'?='; + return '=?'.get_pwg_charset().'?Q?'.$str.'?='; } /* @@ -226,12 +226,12 @@ function switch_lang_to($language) $lang = array(); // language files - include(get_language_filepath('common.lang.php', '', $language)); + load_language('common.lang', '', $language); // No test admin because script is checked admin (user selected no) // Translations are in admin file too - include(get_language_filepath('admin.lang.php', '', $language)); + load_language('admin.lang', '', $language); trigger_action('loading_lang'); - @include(get_language_filepath('local.lang.php', '', $language)); + load_language('local.lang', '', $language); $switch_lang[$language]['lang_info'] = $lang_info; $switch_lang[$language]['lang'] = $lang; @@ -588,7 +588,7 @@ function pwg_mail($to, $args = array()) $content = ''; - if (!isset($conf_mail[$args['email_format']][$lang_info['charset']][$args['template']][$args['theme']])) + if (!isset($conf_mail[$args['email_format']][get_pwg_charset()][$args['template']][$args['theme']])) { if (!isset($mail_template)) { @@ -603,7 +603,7 @@ function pwg_mail($to, $args = array()) //Header 'BOUNDARY_KEY' => $conf_mail['boundary_key'], 'CONTENT_TYPE' => $args['email_format'], - 'CONTENT_ENCODING' => $lang_info['charset'], + 'CONTENT_ENCODING' => get_pwg_charset(), 'LANG' => $lang_info['code'], 'DIR' => $lang_info['direction'], @@ -650,20 +650,20 @@ function pwg_mail($to, $args = array()) // what are displayed on the header of each mail ? $conf_mail[$args['email_format']] - [$lang_info['charset']] + [get_pwg_charset()] [$args['template']][$args['theme']]['header'] = $mail_template->parse('mail_header', true); // what are displayed on the footer of each mail ? $conf_mail[$args['email_format']] - [$lang_info['charset']] + [get_pwg_charset()] [$args['template']][$args['theme']]['footer'] = $mail_template->parse('mail_footer', true); } // Header $content.= $conf_mail[$args['email_format']] - [$lang_info['charset']] + [get_pwg_charset()] [$args['template']][$args['theme']]['header']; // Content @@ -683,7 +683,7 @@ function pwg_mail($to, $args = array()) // Footer $content.= $conf_mail[$args['email_format']] - [$lang_info['charset']] + [get_pwg_charset()] [$args['template']][$args['theme']]['footer']; // Close boundary diff --git a/include/page_header.php b/include/page_header.php index 0dea51a33..0ce9281e2 100644 --- a/include/page_header.php +++ b/include/page_header.php @@ -46,7 +46,7 @@ $template->assign_vars( isset($page['body_id']) ? $page['body_id'] : '', - 'CONTENT_ENCODING' => $lang_info['charset'], + 'CONTENT_ENCODING' => get_pwg_charset(), 'PAGE_TITLE' => strip_tags($title), 'LANG'=>$lang_info['code'], 'DIR'=>$lang_info['direction'], @@ -99,7 +99,7 @@ if ( isset( $refresh ) and intval($refresh) >= 0 trigger_action('loc_end_page_header'); -header('Content-Type: text/html; charset='.$lang_info['charset']); +header('Content-Type: text/html; charset='.get_pwg_charset()); $template->parse('header'); trigger_action('loc_after_page_header'); diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index c0b3585db..808f45644 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -910,10 +910,7 @@ function ws_session_getStatus($params, &$service) { $res[$k] = $user[$k]; } - foreach ( array('charset') as $k ) - { - $res[$k] = $lang_info[$k]; - } + $res['charset'] = get_pwg_charset(); return $res; } diff --git a/include/ws_protocols/rest_encoder.php b/include/ws_protocols/rest_encoder.php index 9352e5644..e02af55bb 100644 --- a/include/ws_protocols/rest_encoder.php +++ b/include/ws_protocols/rest_encoder.php @@ -168,7 +168,7 @@ class PwgRestEncoder extends PwgResponseEncoder $this->_writer = new PwgXmlWriter(); $this->encode($response); $ret = $this->_writer->getOutput(); - $ret = ' + $ret = ' '.$ret.' '; diff --git a/nbm.php b/nbm.php index 1a30aae76..c96bbc252 100644 --- a/nbm.php +++ b/nbm.php @@ -34,10 +34,11 @@ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php'); // Translations are in admin file too -include(get_language_filepath('admin.lang.php')); +load_language('admin.lang'); // Need to update a second time trigger_action('loading_lang'); -@include(get_language_filepath('local.lang.php')); +load_language('local.lang'); + // +-----------------------------------------------------------------------+ diff --git a/plugins/add_index/main.admin.inc.php b/plugins/add_index/main.admin.inc.php index 2b56b08a5..0e1876b29 100644 --- a/plugins/add_index/main.admin.inc.php +++ b/plugins/add_index/main.admin.inc.php @@ -50,9 +50,7 @@ class AdminAddIndex extends AddIndex function loading_lang() { - global $lang; - - include(get_language_filepath('plugin.lang.php', $this->path)); + load_language('plugin.lang', $this->path); } function get_admin_advanced_features_links($advanced_features) diff --git a/plugins/add_index/main.normal.inc.php b/plugins/add_index/main.normal.inc.php index 9f3a0cc0c..8ebe10d9e 100644 --- a/plugins/add_index/main.normal.inc.php +++ b/plugins/add_index/main.normal.inc.php @@ -36,7 +36,7 @@ class NormalAddIndex extends AddIndex if (in_array($page, array('advanced_feature', 'site_manager'))) { $help_content = - @file_get_contents(get_language_filepath('help/'.$page.'.html', $this->path)); + load_language('help/'.$page.'.html', $this->path, '', true); } else { diff --git a/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php b/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php index c5e0c0850..0f6b697b4 100644 --- a/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php +++ b/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php @@ -19,7 +19,7 @@ foreach ($conf as $key => $value) { $bool = ($value == 'false') ? false : $value; $bool = ($value == 'true') ? true : $bool; - $conf[$key] = $bool; + $conf[$key] = $bool; } } @@ -45,84 +45,84 @@ foreach ($cases as $id_adv) $adv[] = 'Your new category will be well prepared.'; $cond = ($conf['newcat_default_status'] !== 'public'); $confk = 'newcat_default_status'; - break; - + 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; - + 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; - + break; + Case 4 : $adv[] = 'Show IPTC Data from your picture:'; - $adv[] = ' 1 - Copy one of your jpg pictures (a public one)' . - ' in ./tools/
' . - ' 2 - Rename it as sample.jpg.
' . + $adv[] = ' 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' . + ' 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' . + $adv[] = 'Advanced users would take care of $lang values and impacts' . ' on templates.'; $cond = true; $confk = 'show_iptc_mapping'; - break; - + break; + Case 5 : $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.'; - $adv[] = 'This value is maybe too high for low connections, ' . + $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; - + break; + Case 6 : $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.'; - $adv[] = 'One? It could be too low for random pictures, ' . + $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; - + 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; - + 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'], + $cond = ( !in_array($conf['calendar_datefield'], array('date_creation','date_available')) ); $confk = 'calendar_datefield'; - break; - + 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 ' . + $adv[] = "'date_creation'" . ' is NOT filled by ' . 'any activated use metadata mapping fields.'; - $adv[] = 'So activate metadata usage or change to ' . + $adv[] = 'So activate metadata usage or change to ' . '$conf[\'calendar_datefield\'] = \'date_available\''; $adv[] = 'Activate metadata usage as you want:
' . - '1 - $conf[\'use_iptc\'] = true; or $conf[\'use_exif\'] = true; ' . + '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\' ' . @@ -131,68 +131,68 @@ foreach ($cases as $id_adv) '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' . '=> \'DateTimeOriginal\', ...
' . '3 - Finally, a new task is up to you: Metadata synchronization.' ; - $cond2 = ( $conf['use_exif'] and + $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; - + 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; - + 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; - + 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;
' . 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7;'; - $cond = (($conf['paginate_pages_around'] < 2) + $cond = (($conf['paginate_pages_around'] < 2) or ($conf['paginate_pages_around'] > 12)); $confk = 'paginate_pages_around'; - break; + 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, ' . + $adv[] = 'Usual range is between 96 and 150, ' . 'about $conf[\'tn_width\'] = 128;'; - $cond = (($conf['tn_width'] < 66) + $cond = (($conf['tn_width'] < 66) or ($conf['tn_width'] > 180)); $confk = 'tn_width'; - break; + 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, ' . + $adv[] = 'Usual range is between 96 and 150, ' . 'about $conf[\'tn_height\'] = 128;'; - $cond = (($conf['tn_height'] < 66) + $cond = (($conf['tn_height'] < 66) or ($conf['tn_height'] > 180)); $confk = 'tn_height'; - break; + break; Case 15 : $adv[] = 'Thumbnail height and width have to be equal.'; - $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] . + $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] . ';
' . 'or $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';'; $cond = ( $conf['tn_height'] !== $conf['tn_width'] ); $confk = 'tn_height'; - break; + break; Case 16 : $adv[] = 'Current value: true.'; @@ -200,7 +200,7 @@ foreach ($cases as $id_adv) '$conf[\'show_version\'] = false;'; $cond = $conf['show_version']; $confk = 'show_version'; - break; + break; Case 17 : $adv[] = 'Current value: true.'; @@ -208,7 +208,7 @@ foreach ($cases as $id_adv) '$conf[\'show_thumbnail_caption\'] = false;'; $cond = $conf['show_thumbnail_caption']; $confk = 'show_thumbnail_caption'; - break; + break; Case 18 : $adv[] = 'Current value: true.'; @@ -216,7 +216,7 @@ foreach ($cases as $id_adv) '$conf[\'show_picture_name_on_title\'] = false;'; $cond = $conf['show_picture_name_on_title']; $confk = 'show_picture_name_on_title'; - break; + break; Case 19 : $adv[] = 'Current value: true.'; @@ -224,7 +224,7 @@ foreach ($cases as $id_adv) 'a look to $conf[\'subcatify\'] = false;'; $cond = $conf['subcatify']; $confk = 'subcatify'; - break; + break; Case 20 : $adv[] = 'Current value: true.'; @@ -232,13 +232,13 @@ foreach ($cases as $id_adv) 'but analyze if you can avoid for performance reasons.' ; $cond = $conf['allow_random_representative']; $confk = 'allow_random_representative'; - break; + 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 ' . + $adv[] = '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.'; @@ -250,26 +250,26 @@ foreach ($cases as $id_adv) './include/config_local.inc.php.'; $cond = ( $conf['prefix_thumbnail'] !== 'TN-' ); $confk = 'prefix_thumbnail'; - break; + 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 ' . + '$conf[\'users_page\'] to a higher value ' . 'if you have more than 20 members.'; $cond = ( $conf['users_page'] < 21 ); $confk = 'users_page'; - break; + break; Case 23 : $adv[] = 'Current value: true.'; $adv[] = 'Should be false, only few webmasters have to set ' . '$conf[\'mail_options\'] = true;
' . - 'A specific advice you can get from an advanced ' . + '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; + break; Case 24 : $adv[] = 'Current value: true.'; @@ -277,18 +277,18 @@ foreach ($cases as $id_adv) '$conf[\'check_upgrade_feed\'] = true; for test purpose.' ; $cond = $conf['check_upgrade_feed']; $confk = 'check_upgrade_feed'; - break; + break; Case 25 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) + $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; + break; Case 26 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) + $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.' . @@ -296,8 +296,8 @@ foreach ($cases as $id_adv) '$conf[\'rate_items\'].'; $cond = ( count($conf['rate_items']) > 6 ); $confk = 'rate_items'; - break; - + break; + Case 27 : $adv[] = 'Current value: true.'; $adv[] = 'Could be true, think about $conf[\'show_iptc\'] = false;' @@ -308,12 +308,12 @@ foreach ($cases as $id_adv) 'on our wiki).'; $cond = $conf['show_iptc']; $confk = 'show_iptc'; - break; - + break; + Case 28 : $adv[] = 'Current value: true.'; $adv[] = 'Documentalists and professionnal photographers would ' . - 'set it true, but beginners should leave it ' . + 'set it true, but beginners should leave it ' . 'as $conf[\'use_iptc\'] = false;'; $adv[] = 'Take care of mentionned fields in metadata synchronization.' . '
Mentionned fields would be rewrited with IPTC values ' . @@ -323,14 +323,14 @@ foreach ($cases as $id_adv) 'on our wiki).'; $cond = $conf['use_iptc']; $confk = 'use_iptc'; - break; - + break; + Case 29 : $adv[] = 'How to deal with IPTC:'; $adv[] = '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 ' . + '
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 ' . @@ -341,14 +341,14 @@ foreach ($cases as $id_adv) 'use_iptc_mapping must be totally different.'; $cond = true; $confk = 'use_iptc'; - break; - + break; + Case 30 : $adv[] = 'How to deal with IPTC:'; $adv[] = '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 ' . + '
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 ' . @@ -360,14 +360,14 @@ foreach ($cases as $id_adv) 'use_iptc_mapping must be totally different.'; $cond = true; $confk = 'use_iptc_mapping'; - break; - + 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 ' . + $adv[] = 'Think about EXIF information could be different depending ' . 'on camera models.
' . 'If you change your camera these fields could be ' . 'partly different.'; @@ -378,14 +378,14 @@ foreach ($cases as $id_adv) 'on our wiki).'; $cond = true; $confk = 'show_exif'; - break; - + break; + Case 32 : $adv[] = 'How to deal with EXIF:'; $adv[] = '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 EXIF fields ' . + '
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 ' . @@ -394,8 +394,8 @@ foreach ($cases as $id_adv) 'use_exif_mapping must be totally different.'; $cond = true; $confk = 'show_exif_fields'; - break; - + break; + Case 33 : $adv[] = 'Current value: ' . ( ( $conf['use_exif'] ) ? 'true':'false' ) . '.'; @@ -409,14 +409,14 @@ foreach ($cases as $id_adv) 'on our wiki).'; $cond = true; $confk = 'use_exif'; - break; - + break; + Case 34 : $adv[] = 'How to deal with EXIF:'; $adv[] = '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 EXIF fields ' . + '
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 ' . @@ -428,8 +428,8 @@ foreach ($cases as $id_adv) 'use_exif_mapping must be totally different.'; $cond = true; $confk = 'use_exif_mapping'; - break; + break; } } - + ?> diff --git a/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php b/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php index 2e8204cbc..c1a3c4d08 100644 --- a/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php +++ b/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php @@ -19,7 +19,7 @@ foreach ($conf as $key => $value) { $bool = ($value == 'false') ? false : $value; $bool = ($value == 'true') ? true : $bool; - $conf[$key] = $bool; + $conf[$key] = $bool; } } @@ -41,13 +41,13 @@ foreach ($cases as $id_adv) $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 ' + $adv[] = 'Si vous choisissez de rester privé, vous passerez directement ' . 'à l\'attribution des autorisations.
' . 'Vos nouvelles catégories seront préparées plus facilement.'; $cond = ($conf['newcat_default_status'] !== 'public'); $confk = 'newcat_default_status'; - break; - + break; + Case 2 : $adv[] = 'Valeur actuelle : ' . (string) $conf['slideshow_period'] . '.'; $adv[] = 'Ce délai pourrait être trop petit pour les connexions ' @@ -55,71 +55,71 @@ foreach ($cases as $id_adv) $adv[] = 'Pensez à une valeur supérieure comme 4.'; $cond = ( $conf['slideshow_period'] < 4 ); $confk = 'slideshow_period'; - break; - + 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; - + break; + Case 4 : $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/
' + $adv[] = ' 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 ' + . ' 3 - Lancez ./tools/metadata.php
' + . ' 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 ' + $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; - + break; + Case 5 : $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.'; $adv[] = 'Cette valeur pourrait être trop grande pour des connexions ' - . 'bas débit.
Pensez à une valeur située entre 25-50 ' + . 'bas débit.
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; - + break; + Case 6 : $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.'; - $adv[] = 'Une seule? Au moins pour les images aléatoires, pensez ' + $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; - + break; + Case 7 : $adv[] = 'Valeur actuelle : ' . (string) $conf['anti-flood_time'] . '.'; - $adv[] = 'Pour un traitement fluide, votre valeur est sans doute trop ' + $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; - + break; + Case 8 : $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.'; - $adv[] = 'Les valeurs admises sont ' - . "'date_creation' ou 'date_available'" . ', toute autre valeur' + $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'], + $cond = ( !in_array($conf['calendar_datefield'], array('date_creation','date_available')) ); $confk = 'calendar_datefield'; - break; - + 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 ' + $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 ou' . ' changez pour ' @@ -127,124 +127,124 @@ foreach ($cases as $id_adv) $adv[] = '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: ' + . '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.' ; - $cond2 = ( $conf['use_exif'] and + $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; - + break; + Case 10 : $adv[] = 'Valeur actuelle : false.'; - $adv[] = 'C\'est une erreur, un statut "private" est plus simple, ' + $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; - + break; + Case 11 : $adv[] = 'Valeur actuelle : ' . (string) $conf['level_separator'] . '.'; $adv[] = 'Vous pouvez toujours essayer un autre séparateur commme :' . '
$conf[\'level_separator\'] = \'+ \';'; $cond = ( $conf['level_separator'] == ' / ' ); $confk = 'level_separator'; - break; - + break; + Case 12 : $adv[] = 'Valeur actuelle : ' . (string) $conf['paginate_pages_around'] . '.'; - $adv[] = 'Les valeurs habituelles se situent entre 2 et 5.' + $adv[] = '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;
' + . '$conf[\'paginate_pages_around\'] = 2;
' . 'Afin de proposer plus d\'accès directs, on choisira :
' . '$conf[\'paginate_pages_around\'] = 7;'; - $cond = (($conf['paginate_pages_around'] < 2) + $cond = (($conf['paginate_pages_around'] < 2) or ($conf['paginate_pages_around'] > 12)); $confk = 'paginate_pages_around'; - break; + 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, ' + $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, ' . 'comme $conf[\'tn_width\'] = 128;'; - $cond = (($conf['tn_width'] < 66) + $cond = (($conf['tn_width'] < 66) or ($conf['tn_width'] > 180)); $confk = 'tn_width'; - break; + 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, ' + $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, ' . 'comme $conf[\'tn_height\'] = 128;'; - $cond = (($conf['tn_height'] < 66) + $cond = (($conf['tn_height'] < 66) or ($conf['tn_height'] > 180)); $confk = 'tn_height'; - break; + 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'] - . ';
' + $adv[] = 'Essayez $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] + . ';
' . 'ou $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';'; $cond = ( $conf['tn_height'] !== $conf['tn_width'] ); $confk = 'tn_height'; - break; + break; Case 16 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour des raisons de sécurité de votre galerie, préférez ' + $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; + break; Case 17 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour une galerie moins chargée, faites le test de ' + $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; + break; Case 18 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Pour une galerie moins chargée, faites le test de ' + $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; + break; Case 19 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Aucune de vos catégories ne possède de descriptions alors ' + $adv[] = 'Aucune de vos catégories ne possède de descriptions alors ' . 'essayez $conf[\'subcatify\'] = false;'; $cond = $conf['subcatify']; $confk = 'subcatify'; - break; + break; Case 20 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Laissez $conf[\'allow_random_representative\'] = true;
' + $adv[] = 'Laissez $conf[\'allow_random_representative\'] = true;
' . 'mais étudiez comment vous pouvez l\'éviter pour des raisons ' . 'de performance.' ; $cond = $conf['allow_random_representative']; $confk = 'allow_random_representative'; - break; + break; Case 21 : $adv[] = 'Valeur actuelle : ' . (string) $conf['prefix_thumbnail'] . '.'; @@ -252,133 +252,133 @@ foreach ($cases as $id_adv) . '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é.
' + $adv[] = '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.'; - $adv[] = 'Essayez de garder le même préfixe de miniatures pour les sites ' + $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_' . 'local.inc.php.
' . 'Voir la page sur la configuration dans le Wiki pour plus ' - . 'd\'informations à propos de ' + . 'd\'informations à propos de ' . './include/config_local.inc.php.'; $cond = ( $conf['prefix_thumbnail'] !== 'TN-' ); $confk = 'prefix_thumbnail'; - break; + 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\'] ' + $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; + break; Case 23 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Devrait être à false, seulement quelques webmasters devront ' - . 'indiquer $conf[\'mail_options\'] = true;
' - . 'Un utilisateur avancé de notre forum les aura conseillé ' + $adv[] = '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.' ; $cond = $conf['mail_options']; $confk = 'mail_options'; - break; + break; Case 24 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Devrait être à false, seuls les membres de l\'équipe PWG ' + $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; + break; Case 25 : - $adv[] = '$conf[\'rate_items\'] dispose de ' . count($conf['rate_items']) + $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; + break; Case 26 : - $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items']) + $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.' - . '
Réduire les valeurs excessives et modifiez votre ' + . ' certaines valeurs.' + . '
Réduire les valeurs excessives et modifiez votre ' . '$conf[\'rate_items\'].'; $cond = ( count($conf['rate_items']) > 6 ); $confk = 'rate_items'; - break; - + break; + Case 27 : $adv[] = 'Valeur actuelle : true.'; - $adv[] = 'Peut être effectivement à true, éventuellement choisissez ' + $adv[] = '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.'; - $adv[] = 'Ne confondez pas show_iptc et ' + $adv[] = 'Ne confondez pas show_iptc et ' . 'use_iptc (consultez la pages de métadonnées ' . 'sur notre wiki).'; $cond = $conf['show_iptc']; $confk = 'show_iptc'; - break; - + break; + Case 28 : $adv[] = 'Valeur actuelle : true.'; $adv[] = 'Les documentalistes et photographes professionnels choisiront ' - . 'cette valeur true, mais les débutants devraient laisser ' + . '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.
Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs IPTC quand bien même ces ' + . 'écrasés par des valeurs de champs IPTC quand bien même ces ' . 'champs ne seraient pas vides.'; - $adv[] = 'Ne confondez pas show_iptc et ' + $adv[] = 'Ne confondez pas show_iptc et ' . 'use_iptc (consultez la pages de métadonnées ' . 'sur notre wiki).'; $cond = $conf['use_iptc']; $confk = 'use_iptc'; - break; - + break; + Case 29 : $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/
' + $adv[] = ' 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 ' + . ' 3 - Lancez ./tools/metadata.php
' + . ' 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.
' - . 'Les champs IPTC doivent être décrits par ' + . 'avant de transférer leurs images.
' + . 'Les champs IPTC doivent être décrits par ' . '$conf[\'use_iptc_mapping\']'; $adv[] = 'Dans tous les cas, show_iptc_mapping et ' . 'use_iptc_mapping seront ' . 'totalement différents.'; $cond = true; $confk = 'use_iptc'; - break; - + break; + Case 30 : $adv[] = 'Comment gérer les IPTC:'; - $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/
' + $adv[] = ' 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 ' + . ' 3 - Lancez ./tools/metadata.php
' + . ' 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.
' - . 'Les champs IPTC doivent être décrits par ' + . 'avant de transférer leurs images.
' + . '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.
Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs IPTC quand bien même ces ' + . 'écrasés par des valeurs de champs IPTC quand bien même ces ' . 'champs ne seraient pas vides.'; $adv[] = 'Dans tous les cas, show_iptc_mapping et ' . 'use_iptc_mapping seront ' @@ -386,34 +386,34 @@ foreach ($cases as $id_adv) $cond = true; $confk = 'use_iptc_mapping'; break; - + Case 31 : - $adv[] = 'Valeur actuelle : ' + $adv[] = 'Valeur actuelle : ' . ( ( $conf['show_exif'] ) ? 'true':'false' ) . '.'; - $adv[] = 'Devrait être à true, certaines informations propres à votre ' + $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.
' - . 'Si vous changez votre appareil ces champs pourraient en ' + $adv[] = '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.'; - $adv[] = 'Beaucoup de photographes professionnels choissent false, ' + $adv[] = 'Beaucoup de photographes professionnels choissent false, ' . 'ceci afin de protéger leur savoir-faire.' ; - $adv[] = 'Ne confondez pas show_exif et ' + $adv[] = 'Ne confondez pas show_exif et ' . 'use_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/
' + $adv[] = ' 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 ' + . ' 3 - Lancez ./tools/metadata.php
' + . ' 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 ' + $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, show_exif_fields et ' . 'use_exif_mapping seront ' @@ -421,40 +421,40 @@ foreach ($cases as $id_adv) $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 ' + . '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.
Les champs indiqués pourront être ' - . 'écrasés par des valeurs de champs EXIF quand bien même ces ' + . 'écrasés par des valeurs de champs EXIF quand bien même ces ' . 'champs ne seraient pas vides.'; - $adv[] = 'Ne confondez pas show_exif et ' + $adv[] = 'Ne confondez pas show_exif et ' . 'use_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/
' + $adv[] = ' 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 ' + . ' 3 - Lancez ./tools/metadata.php
' + . ' 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 ' + $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.
Ces champs pourront être ' - . 'écrasés par des valeurs de champs EXIF quand bien même ces ' + . 'écrasés par des valeurs de champs EXIF quand bien même ces ' . 'champs ne seraient pas vides.'; $adv[] = 'Dans tous les cas, show_exif_fields et ' . 'use_exif_mapping seront ' @@ -464,5 +464,5 @@ foreach ($cases as $id_adv) break; } } - + ?> diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php index aa8428b31..df53d01db 100644 --- a/plugins/c13y_upgrade/initialize.inc.php +++ b/plugins/c13y_upgrade/initialize.inc.php @@ -33,10 +33,10 @@ add_event_handler('get_check_integrity', 'c13y_upgrade'); function c13y_upgrade($c13y_array) { - global $lang, $conf; + global $conf; + + load_language('plugin.lang', dirname(__FILE__).'/'); - include(get_language_filepath('plugin.lang.php', dirname(__FILE__).'/')); - $result = array(); /* Check user with same e-mail */ @@ -61,7 +61,7 @@ limit 0,1 /* Check if this plugin must deactivate */ if (count($result) === 0) { - $deactivate_msg_link = + $deactivate_msg_link = '