';
$page['body_id'] = 'theAdminPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
diff --git a/admin/configuration.php b/admin/configuration.php
index fdcbabcc4..4d730b953 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -50,8 +50,12 @@ while ($row = mysql_fetch_array($result))
if (isset($_POST[$row['param']]))
{
$conf[$row['param']] = $_POST[$row['param']];
+ if ( 'page_banner'==$row['param'] )
+ { // should we do it for all ?
+ $conf[$row['param']] = stripslashes( $conf[$row['param']] );
+ }
}
-}
+}
//------------------------------ verification and registration of modifications
if (isset($_POST['submit']))
{
@@ -105,7 +109,7 @@ if (isset($_POST['submit']))
break;
}
}
-
+
// updating configuration if no error found
if (count($page['errors']) == 0)
{
@@ -116,16 +120,15 @@ if (isset($_POST['submit']))
if (isset($_POST[$row['param']]))
{
$value = $_POST[$row['param']];
-
- if ('gallery_title' == $row['param']
- or 'gallery_description' == $row['param'])
+
+ if ('gallery_title' == $row['param'])
{
if (!$conf['allow_html_descriptions'])
{
$value = strip_tags($value);
}
}
-
+
$query = '
UPDATE '.CONFIG_TABLE.'
SET value = \''. str_replace("\'", "''", $value).'\'
@@ -152,7 +155,7 @@ $template->assign_vars(
'L_RESET'=>$lang['reset'],
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=configuration',
-
+
'F_ACTION'=>$action
));
@@ -161,12 +164,12 @@ switch ($page['section'])
case 'general' :
{
$html_check='checked="checked"';
-
+
$history_yes = ($conf['log']=='true')?'checked="checked"':'';
$history_no = ($conf['log']=='false')?'checked="checked"':'';
$lock_yes = ($conf['gallery_locked']=='true')?'checked="checked"':'';
$lock_no = ($conf['gallery_locked']=='false')?'checked="checked"':'';
-
+
$template->assign_block_vars(
'general',
array(
@@ -178,7 +181,7 @@ switch ($page['section'])
($conf['rate_anonymous']=='true'
? 'RATE_ANONYMOUS_YES' : 'RATE_ANONYMOUS_NO')=>$html_check,
'CONF_GALLERY_TITLE' => $conf['gallery_title'],
- 'CONF_GALLERY_DESCRIPTION' => $conf['gallery_description'],
+ 'CONF_PAGE_BANNER' => $conf['page_banner'],
'CONF_GALLERY_URL' => $conf['gallery_url'],
));
break;
@@ -189,7 +192,7 @@ switch ($page['section'])
$all_no = ($conf['comments_forall']=='false')?'checked="checked"':'';
$validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
$validate_no = ($conf['comments_validation']=='false')?'checked="checked"':'';
-
+
$template->assign_block_vars(
'comments',
array(
@@ -207,7 +210,7 @@ switch ($page['section'])
$show_no = ($conf['show_nb_comments']=='false')?'checked="checked"':'';
$expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
$expand_no = ($conf['auto_expand']=='false')?'checked="checked"':'';
-
+
$template->assign_block_vars(
'default',
array(
@@ -222,9 +225,9 @@ switch ($page['section'])
'SHOW_COMMENTS_YES'=>$show_yes,
'SHOW_COMMENTS_NO'=>$show_no
));
-
+
$blockname = 'default.language_option';
-
+
foreach (get_languages() as $language_code => $language_name)
{
if (isset($_POST['submit']))
@@ -241,7 +244,7 @@ switch ($page['section'])
{
$selected = '';
}
-
+
$template->assign_block_vars(
$blockname,
array(
@@ -269,7 +272,7 @@ switch ($page['section'])
{
$selected = '';
}
-
+
$template->assign_block_vars(
$blockname,
array(
@@ -280,7 +283,7 @@ switch ($page['section'])
);
}
-
+
break;
}
}
diff --git a/include/page_header.php b/include/page_header.php
index 6891787bd..d4c3b9e3d 100644
--- a/include/page_header.php
+++ b/include/page_header.php
@@ -24,7 +24,7 @@
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
-
+
//
// Start output of page
//
@@ -38,20 +38,20 @@ $template->assign_vars(
'GALLERY_TITLE' =>
isset($page['gallery_title']) ?
$page['gallery_title'] : $conf['gallery_title'],
-
- 'GALLERY_DESCRIPTION' =>
- isset($page['gallery_description']) ?
- $page['gallery_description'] : $conf['gallery_description'],
-
+
+ 'PAGE_BANNER' =>
+ isset($page['page_banner']) ?
+ $page['page_banner'] : $conf['page_banner'],
+
'BODY_ID' =>
isset($page['body_id']) ?
$page['body_id'] : '',
-
+
'CONTENT_ENCODING' => $lang_info['charset'],
'PAGE_TITLE' => $title,
'LANG'=>$lang_info['code'],
'DIR'=>$lang_info['direction'],
-
+
'T_STYLE' => $css
));
diff --git a/install/config.sql b/install/config.sql
index 4371d9fb2..80c572903 100644
--- a/install/config.sql
+++ b/install/config.sql
@@ -15,8 +15,8 @@ INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('auto_expand','fa
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('show_nb_comments','false','Show the number of comments under the thumbnails');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_locked','false','Lock your gallery temporary for non admin users');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_title','PhpWebGallery demonstration site','Title at top of each page and for RSS feed');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_description','My photos web site','Short description displayed with gallery title');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('gallery_url','http://demo.phpwebgallery.net','URL given in RSS feed');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('rate','true','Rating pictures feature is enabled');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('rate_anonymous','true','Rating pictures feature is also enabled for visitors');
+INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('page_banner','
PhpWebGallery demonstration site
My photos web site
','html displayed on the top each page of your gallery');
diff --git a/install/db/13-database.php b/install/db/13-database.php
new file mode 100644
index 000000000..ac35cc40c
--- /dev/null
+++ b/install/db/13-database.php
@@ -0,0 +1,73 @@
+
'.$t.'
'.$d.'
';
+$page_banner=addslashes($page_banner);
+$query = '
+INSERT INTO '.PREFIX_TABLE.'config (param,value,comment) VALUES (' .
+"'page_banner','$page_banner','html displayed on the top each page of your gallery');";
+pwg_query($query);
+
+$query = '
+DELETE FROM '.PREFIX_TABLE.'config
+ WHERE param=\'gallery_description\'
+;';
+pwg_query($query);
+
+
+echo
+"\n"
+.'Table '.PREFIX_TABLE.'config updated'
+."\n"
+;
+?>
diff --git a/install/phpwebgallery_structure.sql b/install/phpwebgallery_structure.sql
index 841aed340..e8f07334a 100644
--- a/install/phpwebgallery_structure.sql
+++ b/install/phpwebgallery_structure.sql
@@ -78,7 +78,7 @@ CREATE TABLE `phpwebgallery_comments` (
DROP TABLE IF EXISTS `phpwebgallery_config`;
CREATE TABLE `phpwebgallery_config` (
`param` varchar(40) NOT NULL default '',
- `value` varchar(255) default NULL,
+ `value` text,
`comment` varchar(255) default NULL,
PRIMARY KEY (`param`)
) TYPE=MyISAM COMMENT='configuration table';
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 98fdf37a5..0fe6d6606 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -118,6 +118,7 @@ $lang['Permission granted thanks to a group'] = 'Permission granted thanks to a
$lang['Permission granted'] = 'Permission granted';
$lang['PhpWebGallery Administration'] = 'PhpWebGallery Administration';
$lang['PhpWebGallery version'] = 'PhpWebGallery version';
+$lang['Page banner'] = 'Page banner';
$lang['Picture informations updated'] = 'Picture informations updated';
$lang['Position'] = 'Position';
$lang['Preferences'] = 'Preferences';
diff --git a/language/en_UK.iso-8859-1/help/configuration.html b/language/en_UK.iso-8859-1/help/configuration.html
index 4e6a73b5d..3741207e2 100644
--- a/language/en_UK.iso-8859-1/help/configuration.html
+++ b/language/en_UK.iso-8859-1/help/configuration.html
@@ -13,11 +13,11 @@ parameters by theme.
-
Gallery title: displayed on top of each public
- page.
+
Gallery title: used in RSS feed and notifications by
+email.
-
Gallery description: displayed under gallery
- title.
+
Page banner: displayed on top of each public
+page.
Gallery URL: used for the RSS feed.
@@ -33,7 +33,7 @@ parameters by theme.
Rating: Picture rating feature is enabled.
-
Rating by guests: Even non registered users can
+
Rating by guests: Even non registered users can
rate images.
diff --git a/template/yoga/header.tpl b/template/yoga/header.tpl
index 9936a1095..ccf80d74f 100644
--- a/template/yoga/header.tpl
+++ b/template/yoga/header.tpl
@@ -27,7 +27,4 @@ the "text/nonsense" prevents gecko based browsers to load it -->