From ab6f96964aef65c6c284501ac2027eb4435a1bfc Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 13 Mar 2009 23:37:34 +0000 Subject: [PATCH] bug 926 fixed: change links to piwigo.org so that they go to existing URLs. new: if the current language is french, the links go to fr.piwigo.org insted. git-svn-id: http://piwigo.org/svn/branches/2.0@3196 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 17 +++++------------ admin/intro.php | 1 + admin/template/goto/footer.tpl | 2 +- admin/template/goto/intro.tpl | 2 +- include/common.inc.php | 9 +++++++++ include/constants.php | 3 --- install.php | 10 +++++++++- language/fr_FR/about.html | 2 +- language/fr_FR/help.html | 2 +- language/hr_HR/about.html | 2 +- language/pl_PL/help.html | 5 ++--- language/ru_RU/about.html | 2 +- template/yoga/footer.tpl | 2 +- tools/create_listing_file.php | 4 ++-- 14 files changed, 35 insertions(+), 28 deletions(-) diff --git a/admin/include/functions.php b/admin/include/functions.php index 5fdee9684..6f41aafba 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1741,21 +1741,14 @@ SELECT image_id */ function pwg_URL() { - global $lang_info; $urls = array( - 'WIKI' => 'http://'.PHPWG_DOMAIN.'/doc/', - 'HOME' => 'http://'.PHPWG_DOMAIN.'/', - 'DEMO' => 'http://demo.'.PHPWG_DOMAIN.'/', - 'FORUM' => 'http://forum.'.PHPWG_DOMAIN.'/', - 'BUGS' => 'http://bugs.'.PHPWG_DOMAIN.'/', + 'HOME' => 'http://'.PHPWG_DOMAIN, + 'WIKI' => 'http://'.PHPWG_DOMAIN.'/doc', + 'DEMO' => 'http://'.PHPWG_DOMAIN.'/demo', + 'FORUM' => 'http://'.PHPWG_DOMAIN.'/forum', + 'BUGS' => 'http://'.PHPWG_DOMAIN.'/bugs', 'EXTENSIONS' => 'http://'.PHPWG_DOMAIN.'/ext', ); - if ( isset($lang_info['code']) and - in_array($lang_info['code'], array('fr','en')) ) - { /* current wiki languages are French or English */ - $urls['WIKI'] .= 'doku.php?id='.$lang_info['code'].':'.$lang_info['code']; - $urls['HOME'] .= '?lang='.$lang_info['code']; - } return $urls; } diff --git a/admin/intro.php b/admin/intro.php index 9d37a1b30..98ee92f26 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -182,6 +182,7 @@ list($nb_comments) = mysql_fetch_row(pwg_query($query)); $template->assign( array( + 'PHPWG_URL' => PHPWG_URL, 'PWG_VERSION' => PHPWG_VERSION, 'OS' => PHP_OS, 'PHP_VERSION' => phpversion(), diff --git a/admin/template/goto/footer.tpl b/admin/template/goto/footer.tpl index 9e0dcd85d..8c12ca190 100644 --- a/admin/template/goto/footer.tpl +++ b/admin/template/goto/footer.tpl @@ -15,7 +15,7 @@ *} {'powered_by'|@translate} - + Piwigo {$VERSION} {if isset($CONTACT_MAIL)} diff --git a/admin/template/goto/intro.tpl b/admin/template/goto/intro.tpl index 2bde582f3..3df354993 100644 --- a/admin/template/goto/intro.tpl +++ b/admin/template/goto/intro.tpl @@ -4,7 +4,7 @@
{'Piwigo version'|@translate}
diff --git a/include/common.inc.php b/include/common.inc.php index 76054153a..1ca54e1bb 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -125,6 +125,15 @@ load_plugins(); include(PHPWG_ROOT_PATH.'include/user.inc.php'); +if ('fr_FR' == $user['language']) { + define('PHPWG_DOMAIN', 'fr.piwigo.org'); +} +else { + define('PHPWG_DOMAIN', 'piwigo.org'); +} +define('PHPWG_URL', 'http://'.PHPWG_DOMAIN); +define('PEM_URL', 'http://'.PHPWG_DOMAIN.'/ext'); + // language files load_language('common.lang'); diff --git a/include/constants.php b/include/constants.php index 27e429a14..99a4816e7 100644 --- a/include/constants.php +++ b/include/constants.php @@ -23,9 +23,6 @@ // Default settings define('PHPWG_VERSION', '2.0'); -define('PHPWG_DOMAIN', 'piwigo.org'); -define('PHPWG_URL', 'http://'.PHPWG_DOMAIN); -define('PEM_URL', 'http://'.PHPWG_DOMAIN.'/ext'); define('PHPWG_DEFAULT_LANGUAGE', 'en_UK'); define('PHPWG_DEFAULT_TEMPLATE', 'yoga/Sylvia'); diff --git a/install.php b/install.php index 91d858a6b..ec222db7d 100644 --- a/install.php +++ b/install.php @@ -211,6 +211,14 @@ else } } +if ('fr_FR' == $language) { + define('PHPWG_DOMAIN', 'fr.piwigo.org'); +} +else { + define('PHPWG_DOMAIN', 'piwigo.org'); +} +define('PHPWG_URL', 'http://'.PHPWG_DOMAIN); + load_language( 'common.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') ); load_language( 'admin.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') ); load_language( 'install.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') ); @@ -393,7 +401,7 @@ $template->assign( 'F_DB_PREFIX' => $table_prefix, 'F_ADMIN'=>$admin_name, 'F_ADMIN_EMAIL'=>$admin_mail, - 'L_INSTALL_HELP'=>sprintf(l10n('install_help'), 'http://forum.'.PHPWG_DOMAIN.'/'), + 'L_INSTALL_HELP'=>sprintf(l10n('install_help'), PHPWG_URL.'/forum'), )); //------------------------------------------------------ errors & infos display diff --git a/language/fr_FR/about.html b/language/fr_FR/about.html index 15cf5e8bd..5f2036a75 100644 --- a/language/fr_FR/about.html +++ b/language/fr_FR/about.html @@ -5,4 +5,4 @@ une galerie d'images en ligne. données MySQL.
  • Si vous avez des suggestions ou des commentaires, visitez le site officiel.
  • + href="http://fr.piwigo.org">site officiel et son forum. diff --git a/language/fr_FR/help.html b/language/fr_FR/help.html index 7b4b8740e..27ad4bea4 100644 --- a/language/fr_FR/help.html +++ b/language/fr_FR/help.html @@ -320,7 +320,7 @@ cela, un administrateur doit se rendre dans Administrati défaut tel que désiré dans Administation » Configuration » Affichage par défaut. En effet, chaque nouvel utilisateur héritera de ces propriétés d'affichage. -
  • Pour tout question, la communauté Piwigo est à l'écoute sur le forum.
  • +
  • Pour tout question, la communauté francophone Piwigo est à l'écoute sur le forum.
  • diff --git a/language/hr_HR/about.html b/language/hr_HR/about.html index 7f1844297..761db5ae7 100644 --- a/language/hr_HR/about.html +++ b/language/hr_HR/about.html @@ -2,5 +2,5 @@
  • Tehnički, Piwigo je potpuno razvijen korištenjem PHP (the elePHPant) te MySQL baze podataka (the SQuirreL).
  • -
  • Ako imate prijedloga i komentara, molimo posjetite Piwigo službenu stranicu, te njoj posvećen forum.
  • +
  • Ako imate prijedloga i komentara, molimo posjetite Piwigo službenu stranicu, te njoj posvećen forum.
  • diff --git a/language/pl_PL/help.html b/language/pl_PL/help.html index 1423bfdd2..52f3dd853 100644 --- a/language/pl_PL/help.html +++ b/language/pl_PL/help.html @@ -286,11 +286,10 @@ liter cyfr, znaków "-", "_" lub ".". Nie mogą zawierać spacji oraz pozostały
  • ak tylko utworzysz galerię, zmień domyślne wyświetlanie w Administracja » Konfigracja » Domyślne. Jeżeli tak zrobisz każdy nowy użytkownik będzie miał taki sam domyślny wygląd stron galerii.
  • -
  • Jeżeli masz pytania, społeczność Piwigo zaprasza Cię na forum .
  • +
  • Jeżeli masz pytania, społeczność Piwigo zaprasza Cię na forum.
  • - \ No newline at end of file + diff --git a/language/ru_RU/about.html b/language/ru_RU/about.html index a0fd0fd67..bd5514eea 100644 --- a/language/ru_RU/about.html +++ b/language/ru_RU/about.html @@ -3,5 +3,5 @@
  • Галерея Piwigo создана с помощью PHP (elePHPant) с использованием базы данных MySQL (SQuirreL).
  • Если у Вас есть какие-либо пожелания или комментарии по скрипту, оставьте их на официальном сайте Piwigo, и его форуме.
  • + href="http://piwigo.org">Piwigo, и его форуме. diff --git a/template/yoga/footer.tpl b/template/yoga/footer.tpl index fdc0c92cf..c7a83eef3 100644 --- a/template/yoga/footer.tpl +++ b/template/yoga/footer.tpl @@ -11,7 +11,7 @@ *} {'powered_by'|@translate} - + Piwigo {$VERSION} {if isset($CONTACT_MAIL)} diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php index f93707292..13fb057ab 100644 --- a/tools/create_listing_file.php +++ b/tools/create_listing_file.php @@ -31,7 +31,7 @@ $conf['version'] = '2.0'; // URL of main gallery // Example : http://www.my.domain/my/directory -$conf['gallery'] = 'http://demo.piwigo.net/'; +$conf['gallery'] = 'http://piwigo.org/demo'; // prefix for thumbnails in "thumbnail" sub directories $conf['prefix_thumbnail'] = 'TN-'; @@ -1688,7 +1688,7 @@ if ($_SESSION['scan_step'] == 'exit')