Skip to content

Commit

Permalink
merge r3196 from branch 2.0 to trunk
Browse files Browse the repository at this point in the history
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 instead.


git-svn-id: http://piwigo.org/svn/trunk@3197 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Mar 13, 2009
1 parent f94ff8b commit 87a7b60
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 32 deletions.
17 changes: 5 additions & 12 deletions admin/include/functions.php
Expand Up @@ -1741,21 +1741,14 @@ function associate_categories_to_categories($sources, $destinations)
*/
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;
}

Expand Down
1 change: 1 addition & 0 deletions admin/intro.php
Expand Up @@ -182,6 +182,7 @@

$template->assign(
array(
'PHPWG_URL' => PHPWG_URL,
'PWG_VERSION' => PHPWG_VERSION,
'OS' => PHP_OS,
'PHP_VERSION' => phpversion(),
Expand Down
2 changes: 1 addition & 1 deletion admin/template/goto/footer.tpl
Expand Up @@ -15,7 +15,7 @@
*}

{'powered_by'|@translate}
<a href="http://piwigo.org" class="Piwigo">
<a href="{$PHPWG_URL}" class="Piwigo">
<span class="Piwigo">Piwigo</span></a>
{$VERSION}
{if isset($CONTACT_MAIL)}
Expand Down
2 changes: 1 addition & 1 deletion admin/template/goto/intro.tpl
Expand Up @@ -4,7 +4,7 @@
<dt>{'Piwigo version'|@translate}</dt>
<dd>
<ul>
<li><a href="http://piwigo.org" onclick="window.open(this.href, '');
<li><a href="{$PHPWG_URL}" onclick="window.open(this.href, '');
return false;">Piwigo</a> {$PWG_VERSION}</li>
<li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
</ul>
Expand Down
9 changes: 9 additions & 0 deletions include/common.inc.php
Expand Up @@ -125,6 +125,15 @@ function sanitize_mysql_kv(&$v, $k)

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');
Expand Down
3 changes: 0 additions & 3 deletions include/constants.php
Expand Up @@ -23,9 +23,6 @@

// Default settings
define('PHPWG_VERSION', 'Colibri');
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');

Expand Down
10 changes: 9 additions & 1 deletion install.php
Expand Up @@ -211,6 +211,14 @@ function execute_sqlfile($filepath, $replaced, $replacing)
}
}

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') );
Expand Down Expand Up @@ -393,7 +401,7 @@ function execute_sqlfile($filepath, $replaced, $replacing)
'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
Expand Down
2 changes: 1 addition & 1 deletion language/fr_FR/about.html
Expand Up @@ -5,4 +5,4 @@
données MySQL.</li>

<li>Si vous avez des suggestions ou des commentaires, visitez le <a
href="http://piwigo.org">site officiel</a>.</li>
href="http://fr.piwigo.org">site officiel</a> et <a href="http://fr.piwigo.org/forum">son forum</a>.</li>
9 changes: 2 additions & 7 deletions language/fr_FR/help.html
Expand Up @@ -241,12 +241,7 @@ <h3>Informations diverses</h3>
Configuration, Affichage par défaut</span>. En effet, chaque nouvel
utilisateur héritera de ces propriétés d'affichage.</li>

<li>Pour tout question, n'hésitez pas à visiter le forum ou à y poser une
question si votre recherche est infructueuse. Le
<a href="http://forum.phpwebgallery.net">forum</a> est disponible sur le site
de Piwigo. Consulter également la
<a href="http://phpwebgallery.net/doc">documentation officielle de
Piwigo</a> pour obtenir plus de détails.</li>
<li>Pour tout question, la communauté francophone Piwigo est à l'écoute sur le <a href="http://fr.piwigo.org/forum">forum</a>.</li>

</ul>
</div>
</div>
5 changes: 2 additions & 3 deletions language/pl_PL/help.html
Expand Up @@ -286,11 +286,10 @@ <h3>Miniatury</h3>
<li>ak tylko utworzysz galerię, zmień domyślne wyświetlanie w <span class="pwgScreen">Administracja &raquo; Konfigracja &raquo;
Domyślne</span>. Jeżeli tak zrobisz każdy nowy użytkownik będzie miał taki sam domyślny wygląd stron galerii.</li>

<li>Jeżeli masz pytania, społeczność Piwigo zaprasza Cię na forum <a
href="http://forum.phpwebgallery.net"></a>.</li>
<li>Jeżeli masz pytania, społeczność Piwigo zaprasza Cię na <a href="http://piwigo.org/forum">forum</a>.</li>

</ul>
</div> <!-- misc_content -->
</div> <!-- instructionMisc -->

</div>
</div>
2 changes: 1 addition & 1 deletion template/yoga/footer.tpl
Expand Up @@ -11,7 +11,7 @@
*}

{'powered_by'|@translate}
<a href="http://piwigo.org" class="Piwigo">
<a href="{$PHPWG_URL}" class="Piwigo">
<span class="Piwigo">Piwigo</span></a>
{$VERSION}
{if isset($CONTACT_MAIL)}
Expand Down
4 changes: 2 additions & 2 deletions tools/create_listing_file.php
Expand Up @@ -31,7 +31,7 @@

// 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-';
Expand Down Expand Up @@ -1688,7 +1688,7 @@ function pwg_exit()
</fieldset>
<fieldset class="footer">
<div class="pwg_block">
Powered by <a href="http://piwigo.org" class="pwg"><span class="p">Pi</span><span class="w">wi</span><span class="g">go</span></a>
Powered by <a href="http://piwigo.org" class="pwg">Piwigo</a>
</div>
<?php echo $g_footer; ?>
</fieldset>
Expand Down

0 comments on commit 87a7b60

Please sign in to comment.