aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-08-30 08:24:42 +0000
committerplegall <plg@piwigo.org>2011-08-30 08:24:42 +0000
commitf8226de8e6940234d53a8799a7f6e30364ce6ce7 (patch)
tree875221468b46cfd20b77ac08f86c2fcb98ee5b4e
parentf048a51feb11ce077b7cbb1250fc0ce71b8f26df (diff)
feature 2420 added: automatically use the gallery title in the page banner.
Just write %gallery_title% in the page banner (this is written by default). The default gallery title and tagline are now localized. git-svn-id: http://piwigo.org/svn/trunk@12008 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/page_header.php11
-rw-r--r--install.php2
-rw-r--r--install/config.sql4
-rw-r--r--language/en_UK/install.lang.php2
-rw-r--r--language/fr_FR/install.lang.php2
5 files changed, 16 insertions, 5 deletions
diff --git a/include/page_header.php b/include/page_header.php
index 381162dbd..506e93920 100644
--- a/include/page_header.php
+++ b/include/page_header.php
@@ -35,9 +35,14 @@ $template->assign(
$page['gallery_title'] : $conf['gallery_title'],
'PAGE_BANNER' =>
- trigger_event('render_page_banner',
- isset($page['page_banner']) ?
- $page['page_banner'] : $conf['page_banner']),
+ trigger_event(
+ 'render_page_banner',
+ str_replace(
+ '%gallery_title%',
+ $conf['gallery_title'],
+ isset($page['page_banner']) ? $page['page_banner'] : $conf['page_banner']
+ )
+ ),
'BODY_ID' =>
isset($page['body_id']) ?
diff --git a/install.php b/install.php
index 29b2c86b5..695f2371a 100644
--- a/install.php
+++ b/install.php
@@ -340,6 +340,8 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment)
pwg_query($query);
conf_update_param('piwigo_db_version', get_branch_from_version(PHPWG_VERSION));
+ conf_update_param('gallery_title', l10n('Just another Piwigo gallery'));
+ conf_update_param('page_banner', '<h1>%gallery_title%</h1>'."\n\n<p>".l10n('Welcome to my photo gallery').'</p>');
// fill languages table
foreach ($languages->fs_languages as $language_code => $fs_language)
diff --git a/install/config.sql b/install/config.sql
index bafeff86e..4ee4424fc 100644
--- a/install/config.sql
+++ b/install/config.sql
@@ -9,10 +9,10 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('user_can_edit_comment',
INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment_edition','false','Send an email to the administrators when a comment is modified');
INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment_deletion','false','Send an email to the administrators when a comment is deleted');
INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_locked','false','Lock your gallery temporary for non admin users');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_title','Piwigo demonstration site','Title at top of each page and for RSS feed');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_title','','Title at top of each page and for RSS feed');
INSERT INTO piwigo_config (param,value,comment) VALUES ('rate','true','Rating pictures feature is enabled');
INSERT INTO piwigo_config (param,value,comment) VALUES ('rate_anonymous','true','Rating pictures feature is also enabled for visitors');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('page_banner','<h1>Piwigo demonstration site</h1><p>My photos web site</p>','html displayed on the top each page of your gallery');
+INSERT INTO piwigo_config (param,value,comment) VALUES ('page_banner','','html displayed on the top each page of your gallery');
INSERT INTO piwigo_config (param,value,comment) VALUES ('history_admin','false','keep a history of administrator visits on your website');
INSERT INTO piwigo_config (param,value,comment) VALUES ('history_guest','true','keep a history of guest visits on your website');
INSERT INTO piwigo_config (param,value,comment) VALUES ('allow_user_registration','true','allow visitors to register?');
diff --git a/language/en_UK/install.lang.php b/language/en_UK/install.lang.php
index eef5a98f7..d4922d4da 100644
--- a/language/en_UK/install.lang.php
+++ b/language/en_UK/install.lang.php
@@ -72,4 +72,6 @@ $lang['Download the config file'] = 'Download the config file';
$lang['You can download the config file and upload it to local/config directory of your installation.'] = 'You can download the config file and upload it to local/config directory of your installation.';
$lang['SQLite and PostgreSQL are currently in experimental state.'] = 'SQLite and PostgreSQL are currently in experimental state.';
$lang['Learn more'] = 'Learn more';
+$lang['Just another Piwigo gallery'] = 'Just another Piwigo gallery';
+$lang['Welcome to my photo gallery'] = 'Welcome to my photo gallery';
?>
diff --git a/language/fr_FR/install.lang.php b/language/fr_FR/install.lang.php
index 8a6f2177f..f03752344 100644
--- a/language/fr_FR/install.lang.php
+++ b/language/fr_FR/install.lang.php
@@ -73,4 +73,6 @@ $lang['Download the config file'] = 'Télécharger le fichier de configuration';
$lang['You can download the config file and upload it to local/config directory of your installation.'] = 'Vous pouvez télécharger le fichier de configuration et le transférer dans le répertoire local/config de votre installation Piwigo.';
$lang['SQLite and PostgreSQL are currently in experimental state.'] = 'Les types SQLite et PostgreSQL sont actuellement en phase expérimentale.';
$lang['Learn more'] = 'En savoir plus';
+$lang['Just another Piwigo gallery'] = 'Une galerie Piwigo de plus';
+$lang['Welcome to my photo gallery'] = 'Bienvenue sur ma galerie photo';
?>