aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin.php3
-rw-r--r--admin/configuration.php210
-rw-r--r--admin/include/functions.php2
-rw-r--r--admin/include/functions_metadata.php43
-rw-r--r--admin/infos_images.php351
-rw-r--r--admin/maintenance.php1
-rw-r--r--admin/remote_site.php3
-rw-r--r--admin/update.php6
-rw-r--r--admin/user_list.php208
-rw-r--r--category.php1
-rw-r--r--doc/ChangeLog18
-rw-r--r--include/config_default.inc.php262
-rw-r--r--include/functions_metadata.inc.php42
-rw-r--r--include/page_tail.php21
-rw-r--r--include/scripts.js12
-rw-r--r--include/template.php3
-rw-r--r--install/config.sql7
-rw-r--r--install/phpwebgallery_structure.sql18
-rw-r--r--language/en_UK.iso-8859-1/help/configuration.html87
-rw-r--r--language/en_UK.iso-8859-1/help/maintenance.html38
-rw-r--r--language/en_UK.iso-8859-1/help/remote_site.html51
-rw-r--r--language/en_UK.iso-8859-1/help/synchronize.html1
-rw-r--r--picture.php30
-rw-r--r--popuphelp.php64
-rw-r--r--search.php1
-rw-r--r--template/cclear/admin.tpl3
-rw-r--r--template/cclear/admin/configuration.tpl298
-rw-r--r--template/cclear/admin/element_set_global.tpl4
-rw-r--r--template/cclear/admin/maintenance.tpl7
-rw-r--r--template/cclear/admin/remote_site.tpl7
-rw-r--r--template/cclear/admin/update.tpl7
-rw-r--r--template/cclear/comments.tpl2
-rw-r--r--template/cclear/content.css1
-rw-r--r--template/cclear/default-colors.css42
-rw-r--r--template/cclear/default-layout.css24
-rw-r--r--template/cclear/footer.tpl9
-rw-r--r--template/cclear/menubar.css1
-rw-r--r--template/cclear/picture.tpl6
-rw-r--r--template/cclear/popuphelp.css34
-rw-r--r--template/cclear/popuphelp.tpl5
-rw-r--r--template/cclear/theme/exit.pngbin0 -> 1431 bytes
-rw-r--r--template/cclear/theme/help.pngbin0 -> 1993 bytes
42 files changed, 977 insertions, 956 deletions
diff --git a/admin.php b/admin.php
index b2113b22a..cb92cb5d5 100644
--- a/admin.php
+++ b/admin.php
@@ -72,9 +72,6 @@ $template->assign_vars(
'U_CONFIG_GENERAL'=>add_session_id($conf_link.'general' ),
'U_CONFIG_COMMENTS'=>add_session_id($conf_link.'comments' ),
'U_CONFIG_DISPLAY'=>add_session_id($conf_link.'default' ),
- 'U_CONFIG_UPLOAD'=>add_session_id($conf_link.'upload' ),
- 'U_CONFIG_SESSION'=>add_session_id($conf_link.'session' ),
- 'U_CONFIG_METADATA'=>add_session_id($conf_link.'metadata' ),
'U_CATEGORIES'=>add_session_id($link_start.'cat_list' ),
'U_CAT_UPLOAD'=>add_session_id($opt_link.'upload'),
'U_CAT_COMMENTS'=>add_session_id($opt_link.'comments'),
diff --git a/admin/configuration.php b/admin/configuration.php
index 8829c0822..9da9c56d3 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -60,17 +60,6 @@ if (isset($_POST['submit']))
{
case 'general' :
{
- // thumbnail prefix must only contain simple ASCII characters
- if (!preg_match('/^[\w-]*$/', $_POST['prefix_thumbnail']))
- {
- array_push($page['errors'], $lang['conf_prefix_thumbnail_error']);
- }
- // mail must be formatted as follows : name@server.com
- $pattern = '/^[\w-]+(\.[\w-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/';
- if (!preg_match($pattern, $_POST['mail_webmaster']))
- {
- array_push($page['errors'], $lang['conf_mail_webmaster_error']);
- }
break;
}
case 'comments' :
@@ -95,30 +84,6 @@ if (isset($_POST['submit']))
}
break;
}
- case 'upload' :
- {
- // the maximum upload filesize must be an integer between 10 and 1000
- if (!preg_match($int_pattern, $_POST['upload_maxfilesize'])
- or $_POST['upload_maxfilesize'] < 10
- or $_POST['upload_maxfilesize'] > 1000)
- {
- array_push($page['errors'], $lang['conf_upload_maxfilesize_error']);
- }
-
- foreach (array('upload_maxwidth',
- 'upload_maxheight',
- 'upload_maxwidth_thumbnail',
- 'upload_maxheight_thumbnail')
- as $field)
- {
- if (!preg_match($int_pattern, $_POST[$field])
- or $_POST[$field] < 10)
- {
- array_push($page['errors'], $lang['conf_'.$field.'_error']);
- }
- }
- break;
- }
}
// updating configuration if no error found
@@ -154,6 +119,8 @@ $template->assign_vars(
'L_NO'=>$lang['no'],
'L_SUBMIT'=>$lang['submit'],
'L_RESET'=>$lang['reset'],
+
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=configuration',
'F_ACTION'=>add_session_id($action)
));
@@ -170,18 +137,6 @@ switch ($page['section'])
$template->assign_block_vars(
'general',
array(
- 'L_CONF_TITLE'=>$lang['conf_general_title'],
- 'L_CONF_MAIL'=>$lang['conf_mail_webmaster'],
- 'L_CONF_MAIL_INFO'=>$lang['conf_mail_webmaster_info'],
- 'L_CONF_TN_PREFIX'=>$lang['conf_prefix'],
- 'L_CONF_TN_PREFIX_INFO'=>$lang['conf_prefix_info'],
- 'L_CONF_HISTORY'=>$lang['history'],
- 'L_CONF_HISTORY_INFO'=>$lang['conf_log_info'],
- 'L_CONF_GALLERY_LOCKED'=>$lang['conf_gallery_locked'],
- 'L_CONF_GALLERY_LOCKED_INFO'=>$lang['conf_gallery_locked_info'],
-
- 'ADMIN_MAIL'=>$conf['mail_webmaster'],
- 'THUMBNAIL_PREFIX'=>$conf['prefix_thumbnail'],
'HISTORY_YES'=>$history_yes,
'HISTORY_NO'=>$history_no,
'GALLERY_LOCKED_YES'=>$lock_yes,
@@ -199,14 +154,6 @@ switch ($page['section'])
$template->assign_block_vars(
'comments',
array(
- 'L_CONF_TITLE'=>$lang['conf_comments_title'],
- 'L_CONF_COMMENTS_ALL'=>$lang['conf_comments_forall'],
- 'L_CONF_COMMENTS_ALL_INFO'=>$lang['conf_comments_forall_info'],
- 'L_CONF_NB_COMMENTS_PAGE'=>$lang['conf_nb_comment_page'],
- 'L_CONF_NB_COMMENTS_PAGE_INFO'=>$lang['conf_nb_comment_page'],
- 'L_CONF_VALIDATE'=>$lang['conf_comments_validation'],
- 'L_CONF_VALIDATE_INFO'=>$lang['conf_comments_validation_info'],
-
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
'COMMENTS_ALL_YES'=>$all_yes,
'COMMENTS_ALL_NO'=>$all_no,
@@ -225,28 +172,8 @@ switch ($page['section'])
$template->assign_block_vars(
'default',
array(
- 'L_CONF_TITLE'=>$lang['conf_default_title'],
- 'L_CONF_LANG'=>$lang['language'],
- 'L_CONF_LANG_INFO'=>$lang['conf_default_language_info'],
- 'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],
- 'L_NB_IMAGE_LINE_INFO'=>$lang['conf_nb_image_line_info'],
- 'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],
- 'L_NB_ROW_PAGE_INFO'=>$lang['conf_nb_line_page_info'],
- 'L_CONF_STYLE'=>$lang['theme'],
- 'L_CONF_STYLE_INFO'=>$lang['conf_default_theme_info'],
- 'L_CONF_RECENT'=>$lang['recent_period'],
- 'L_CONF_RECENT_INFO'=>$lang['conf_recent_period_info'],
- 'L_CONF_EXPAND'=>$lang['auto_expand'],
- 'L_CONF_EXPAND_INFO'=>$lang['conf_default_expand_info'],
- 'L_NB_COMMENTS'=>$lang['show_nb_comments'],
- 'L_NB_COMMENTS_INFO'=>$lang['conf_show_nb_comments_info'],
- 'L_MAXWIDTH'=>$lang['maxwidth'],
- 'L_MAXHEIGHT'=>$lang['maxheight'],
-
- 'CONF_LANG_SELECT'=>language_select($conf['default_language'], 'default_language'),
'NB_IMAGE_LINE'=>$conf['nb_image_line'],
'NB_ROW_PAGE'=>$conf['nb_line_page'],
- 'CONF_STYLE_SELECT'=>style_select($conf['default_template'], 'default_template'),
'CONF_RECENT'=>$conf['recent_period'],
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
'EXPAND_YES'=>$expand_yes,
@@ -254,86 +181,65 @@ switch ($page['section'])
'SHOW_COMMENTS_YES'=>$show_yes,
'SHOW_COMMENTS_NO'=>$show_no
));
- break;
- }
- case 'upload' :
- {
- $template->assign_block_vars(
- 'upload',
- array(
- 'L_CONF_TITLE'=>$lang['conf_upload_title'],
- 'L_CONF_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
- 'L_CONF_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
- 'L_CONF_MAXWIDTH'=>$lang['conf_upload_maxwidth'],
- 'L_CONF_MAXWIDTH_INFO'=>$lang['conf_upload_maxwidth_info'],
- 'L_CONF_MAXHEIGHT'=>$lang['conf_upload_maxheight'],
- 'L_CONF_MAXHEIGHT_INFO'=>$lang['conf_upload_maxheight_info'],
- 'L_CONF_TN_MAXWIDTH'=>$lang['conf_upload_tn_maxwidth'],
- 'L_CONF_TN_MAXWIDTH_INFO'=>$lang['conf_upload_tn_maxwidth_info'],
- 'L_CONF_TN_MAXHEIGHT'=>$lang['conf_upload_tn_maxheight'],
- 'L_CONF_TN_MAXHEIGHT_INFO'=>$lang['conf_upload_tn_maxheight_info'],
-
- 'UPLOAD_MAXSIZE'=>$conf['upload_maxfilesize'],
- 'UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth'],
- 'UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight'],
- 'TN_UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth_thumbnail'],
- 'TN_UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight_thumbnail'],
- ));
- break;
- }
- case 'session' :
- {
- $authorize_remembering_yes =
- ($conf['authorize_remembering']=='true')?'checked="checked"':'';
- $authorize_remembering_no =
- ($conf['authorize_remembering']=='false')?'checked="checked"':'';
+
+ $blockname = 'default.language_option';
+
+ foreach (get_languages() as $language_code => $language_name)
+ {
+ if (isset($_POST['submit']))
+ {
+ $selected =
+ $_POST['default_language'] == $language_code
+ ? 'selected="selected"' : '';
+ }
+ else if ($conf['default_language'] == $language_code)
+ {
+ $selected = 'selected="selected"';
+ }
+ else
+ {
+ $selected = '';
+ }
- $template->assign_block_vars(
- 'session',
- array(
- 'L_CONF_TITLE'=>$lang['conf_session_title'],
- 'L_CONF_AUTHORIZE_REMEMBERING'=>$lang['conf_authorize_remembering'],
- 'L_CONF_AUTHORIZE_REMEMBERING_INFO' =>
- $lang['conf_authorize_remembering_info'],
+ $template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE'=> $language_code,
+ 'CONTENT' => $language_name,
+ 'SELECTED' => $selected
+ ));
+ }
- 'AUTHORIZE_REMEMBERING_YES'=>$authorize_remembering_yes,
- 'AUTHORIZE_REMEMBERING_NO'=>$authorize_remembering_no
- ));
- break;
- }
- case 'metadata' :
- {
- $exif_yes = ($conf['use_exif']=='true')?'checked="checked"':'';
- $exif_no = ($conf['use_exif']=='false')?'checked="checked"':'';
- $iptc_yes = ($conf['use_iptc']=='true')?'checked="checked"':'';
- $iptc_no = ($conf['use_iptc']=='false')?'checked="checked"':'';
- $show_exif_yes = ($conf['show_exif']=='true')?'checked="checked"':'';
- $show_exif_no = ($conf['show_exif']=='false')?'checked="checked"':'';
- $show_iptc_yes = ($conf['show_iptc']=='true')?'checked="checked"':'';
- $show_iptc_no = ($conf['show_iptc']=='false')?'checked="checked"':'';
+ $blockname = 'default.template_option';
+
+ foreach (get_templates() as $pwg_template)
+ {
+ if (isset($_POST['submit']))
+ {
+ $selected =
+ $_POST['default_template'] == $pwg_template
+ ? 'selected="selected"' : '';
+ }
+ else if ($conf['default_template'] == $pwg_template)
+ {
+ $selected = 'selected="selected"';
+ }
+ else
+ {
+ $selected = '';
+ }
- $template->assign_block_vars(
- 'metadata',
- array(
- 'L_CONF_TITLE'=>$lang['conf_metadata_title'],
- 'L_CONF_EXIF'=>$lang['conf_use_exif'],
- 'L_CONF_EXIF_INFO'=>$lang['conf_use_exif_info'],
- 'L_CONF_IPTC'=>$lang['conf_use_iptc'],
- 'L_CONF_IPTC_INFO'=>$lang['conf_use_iptc_info'],
- 'L_CONF_SHOW_EXIF'=>$lang['conf_show_exif'],
- 'L_CONF_SHOW_EXIF_INFO'=>$lang['conf_show_exif_info'],
- 'L_CONF_SHOW_IPTC'=>$lang['conf_show_iptc'],
- 'L_CONF_SHOW_IPTC_INFO'=>$lang['conf_show_iptc_info'],
-
- 'USE_EXIF_YES'=>$exif_yes,
- 'USE_EXIF_NO'=>$exif_no,
- 'USE_IPTC_YES'=>$iptc_yes,
- 'USE_IPTC_NO'=>$iptc_no,
- 'SHOW_EXIF_YES'=>$show_exif_yes,
- 'SHOW_EXIF_NO'=>$show_exif_no,
- 'SHOW_IPTC_YES'=>$show_iptc_yes,
- 'SHOW_IPTC_NO'=>$show_iptc_no
- ));
+ $template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE'=> $pwg_template,
+ 'CONTENT' => $pwg_template,
+ 'SELECTED' => $selected
+ )
+ );
+ }
+
+
break;
}
}
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 2b7a9a5cc..78ec15a09 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -364,7 +364,7 @@ DELETE FROM '.SESSIONS_TABLE.'
// deletion of calculated permissions linked to the user
$query = '
-DELETE FROM '.USER_FORBIDDEN_TABLE.'
+DELETE FROM '.USER_CACHE_TABLE.'
WHERE user_id = '.$user_id.'
;';
pwg_query($query);
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 23b04833c..4836f85a3 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -27,18 +27,19 @@
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
+$page['datefields'] = array('date_creation', 'date_available');
+
function get_sync_iptc_data($file)
{
- global $conf;
+ global $conf, $page;
$map = $conf['use_iptc_mapping'];
- $datefields = array('date_creation', 'date_available');
$iptc = get_iptc_data($file, $map);
foreach ($iptc as $pwg_key => $value)
{
- if (in_array($pwg_key, $datefields))
+ if (in_array($pwg_key, $page['datefields']))
{
if (preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
{
@@ -59,6 +60,26 @@ function get_sync_iptc_data($file)
return $iptc;
}
+function get_sync_exif_data($file)
+{
+ global $conf, $page;
+
+ $exif = get_exif_data($file, $conf['use_exif_mapping']);
+
+ foreach ($exif as $pwg_key => $value)
+ {
+ if (in_array($pwg_key, $page['datefields']))
+ {
+ if (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches))
+ {
+ $exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
+ }
+ }
+ }
+
+ return $exif;
+}
+
function update_metadata($files)
{
global $conf;
@@ -84,17 +105,13 @@ function update_metadata($files)
if ($conf['use_exif'])
{
- if (!function_exists('read_exif_data'))
- {
- die('Exif extension not available, admin should disable exif use');
- }
-
- if ($exif = @read_exif_data($file))
+ $exif = get_sync_exif_data($file);
+
+ if (count($exif) > 0)
{
- if (isset($exif['DateTime']))
+ foreach (array_keys($exif) as $key)
{
- preg_match('/^(\d{4}).(\d{2}).(\d{2})/',$exif['DateTime'],$matches);
- $data['date_creation'] = $matches[1].'-'.$matches[2].'-'.$matches[3];
+ $data[$key] = addslashes($exif[$key]);
}
}
}
@@ -128,7 +145,7 @@ function update_metadata($files)
$update_fields = array_merge($update_fields,
array_keys($conf['use_iptc_mapping']));
}
-
+
$fields = array('primary' => array('id'),
'update' => array_unique($update_fields));
mass_updates(IMAGES_TABLE, $fields, $datas);
diff --git a/admin/infos_images.php b/admin/infos_images.php
deleted file mode 100644
index b8db86ec9..000000000
--- a/admin/infos_images.php
+++ /dev/null
@@ -1,351 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
-// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
-// | last update : $Date$
-// | last modifier : $Author$
-// | revision : $Revision$
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if(!defined("PHPWG_ROOT_PATH"))
-{
- die ("Hacking attempt!");
-}
-include_once(PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-check_cat_id($_GET['cat_id']);
-$errors = array();
-
-if (isset($page['cat']))
-{
-// +-----------------------------------------------------------------------+
-// | update individual options |
-// +-----------------------------------------------------------------------+
- if (isset($_POST['submit']))
- {
- if (isset($_POST['associate']) and $_POST['associate'] != '')
- {
- // does the uppercat id exists in the database ?
- if (!is_numeric($_POST['associate']))
- {
- array_push($errors, $lang['cat_unknown_id']);
- }
- else
- {
- $query = 'SELECT id FROM '.CATEGORIES_TABLE;
- $query.= ' WHERE id = '.$_POST['associate'];
- $query.= ';';
- if (mysql_num_rows(pwg_query($query)) == 0)
- array_push($errors, $lang['cat_unknown_id']);
- }
- }
-
- $query = 'SELECT id,file FROM '.IMAGES_TABLE;
- $query.= ' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
- $query.= ' WHERE category_id = '.$page['cat'];
- $query.= ';';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $name = 'name-'.$row['id'];
- $author = 'author-'.$row['id'];
- $comment = 'comment-'.$row['id'];
- $date_creation = 'date_creation-'.$row['id'];
- $keywords = 'keywords-'.$row['id'];
- if (isset($_POST[$name]))
- {
- $query = 'UPDATE '.IMAGES_TABLE.' SET name = ';
- if ($_POST[$name] == '')
- $query.= 'NULL';
- else
- $query.= "'".htmlentities($_POST[$name], ENT_QUOTES)."'";
-
- $query.= ', author = ';
- if ($_POST[$author] == '')
- $query.= 'NULL';
- else
- $query.= "'".htmlentities($_POST[$author],ENT_QUOTES)."'";
-
- $query.= ', comment = ';
- if ($_POST[$comment] == '')
- $query.= 'NULL';
- else
- $query.= "'".htmlentities($_POST[$comment],ENT_QUOTES)."'";
-
- $query.= ', date_creation = ';
- if (check_date_format($_POST[$date_creation]))
- $query.= "'".date_convert($_POST[$date_creation])."'";
- else if ($_POST[$date_creation] == '')
- $query.= 'NULL';
-
- $query.= ', keywords = ';
-
- $keywords_array = get_keywords($_POST[$keywords]);
- if (count($keywords_array) == 0) $query.= 'NULL';
- else $query.= "'".implode(',', $keywords_array)."'";
-
- $query.= ' WHERE id = '.$row['id'];
- $query.= ';';
- pwg_query($query);
- }
- // add link to another category
- if (isset($_POST['check-'.$row['id']])
- and isset($_POST['associate'])
- and $_POST['associate'] != '')
- {
- $query = 'INSERT INTO '.IMAGE_CATEGORY_TABLE;
- $query.= ' (image_id,category_id) VALUES';
- $query.= ' ('.$row['id'].','.$_POST['associate'].')';
- $query.= ';';
- pwg_query($query);
- }
- }
- if (isset($_POST['associate']) and $_POST['associate'] != '')
- {
- update_category(array($_POST['associate']));
- }
-// +-----------------------------------------------------------------------+
-// | update general options |
-// +-----------------------------------------------------------------------+
- if (isset($_POST['use_common_author']))
- {
- $query = 'SELECT image_id FROM '.IMAGE_CATEGORY_TABLE;
- $query.= ' WHERE category_id = '.$page['cat'];
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $query = 'UPDATE '.IMAGES_TABLE;
- if ($_POST['author_cat'] == '')
- {
- $query.= ' SET author = NULL';
- }
- else
- {
- $query.= ' SET author = ';
- $query.= "'".htmlentities($_POST['author_cat'], ENT_QUOTES)."'";
- }
- $query.= ' WHERE id = '.$row['image_id'];
- $query.= ';';
- pwg_query($query);
- }
- }
- if (isset($_POST['use_common_date_creation']))
- {
- if (check_date_format($_POST['date_creation_cat']))
- {
- $date = date_convert($_POST['date_creation_cat']);
- $query = 'SELECT image_id FROM '.IMAGE_CATEGORY_TABLE;
- $query.= ' WHERE category_id = '.$page['cat'];
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $query = 'UPDATE '.IMAGES_TABLE;
- if ($_POST['date_creation_cat'] == '')
- {
- $query.= ' SET date_creation = NULL';
- }
- else
- {
- $query.= " SET date_creation = '".$date."'";
- }
- $query.= ' WHERE id = '.$row['image_id'];
- $query.= ';';
- pwg_query($query);
- }
- }
- else
- {
- array_push($errors, $lang['err_date']);
- }
- }
- if (isset($_POST['common_keywords']) and $_POST['keywords_cat'] != '')
- {
- $query = 'SELECT id,keywords FROM '.IMAGES_TABLE;
- $query.= ' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
- $query.= ' WHERE category_id = '.$page['cat'];
- $query.= ';';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- if (!isset($row['keywords'])) $specific_keywords = array();
- else $specific_keywords = explode(',', $row['keywords']);
-
- $common_keywords = get_keywords($_POST['keywords_cat']);
- // first possiblity : adding the given keywords to all the pictures
- if ($_POST['common_keywords'] == 'add')
- {
- $keywords = array_merge($specific_keywords, $common_keywords);
- $keywords = array_unique($keywords);
- }
- // second possiblity : removing the given keywords from all pictures
- // (without deleting the other specific keywords
- if ($_POST['common_keywords'] == 'remove')
- {
- $keywords = array_diff($specific_keywords, $common_keywords);
- }
- // cleaning the keywords array, sometimes, an empty value still remain
- $keywords = array_remove($keywords, '');
- // updating the picture with new keywords array
- $query = 'UPDATE '.IMAGES_TABLE.' SET keywords = ';
- if (count($keywords) == 0)
- {
- $query.= 'NULL';
- }
- else
- {
- $query.= '"';
- $i = 0;
- foreach ($keywords as $keyword) {
- if ($i++ > 0) $query.= ',';
- $query.= $keyword;
- }
- $query.= '"';
- }
- $query.= ' WHERE id = '.$row['id'];
- $query.= ';';
- pwg_query($query);
- }
- }
- }
-// +-----------------------------------------------------------------------+
-// | form initialization |
-// +-----------------------------------------------------------------------+
- if (!isset($_GET['start'])
- or !is_numeric($_GET['start'])
- or (is_numeric($_GET['start']) and $_GET['start'] < 0))
- {
- $page['start'] = 0;
- }
- else
- {
- $page['start'] = $_GET['start'];
- }
-
- if (isset($_GET['num']) and is_numeric($_GET['num']) and $_GET['num'] >= 0)
- {
- $max = $conf['info_nb_elements_page'];
- $page['start'] = floor($_GET['num'] / $max) * $max;
- }
- // Navigation path
- $current_category = get_cat_info($_GET['cat_id']);
- $url = PHPWG_ROOT_PATH.'admin.php?page=infos_images&amp;cat_id=';
- $category_path = get_cat_display_name($current_category['name'], $url);
-
- $form_action = PHPWG_ROOT_PATH.'admin.php';
- $form_action.= '?page=infos_images&amp;cat_id='.$_GET['cat_id'];
- if($page['start'])
- {
- $form_action.= '&amp;start='.$_GET['start'];
- }
-
- $nav_bar = create_navigation_bar($form_action,
- $current_category['nb_images'],
- $page['start'],
- $conf['info_nb_elements_page'],
- '');
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
- $template->set_filenames(array('infos_images'=>'admin/infos_images.tpl'));
- $template->assign_vars(
- array(
- 'CATEGORY'=>$category_path,
- 'NAV_BAR'=>$nav_bar,
-
- 'L_INFOS_TITLE'=>$lang['infoimage_general'],
- 'L_AUTHOR'=>$lang['author'],
- 'L_INFOS_OVERALL_USE'=>$lang['infoimage_useforall'],
- 'L_INFOS_CREATION_DATE'=>$lang['infoimage_creation_date'],
- 'L_KEYWORD'=>$lang['keywords'],
- 'L_KEYWORD_SEPARATION'=>$lang['infoimage_keyword_separation'],
- 'L_INFOS_ADDTOALL'=>$lang['infoimage_addtoall'],
- 'L_INFOS_REMOVEFROMALL'=>$lang['infoimage_removefromall'],
- 'L_INFOS_DETAIL'=>$lang['infoimage_detailed'],
- 'L_THUMBNAIL'=>$lang['thumbnail'],
- 'L_INFOS_IMG'=>$lang['infoimage_title'],
- 'L_INFOS_COMMENT'=>$lang['description'],
- 'L_INFOS_ASSOCIATE'=>$lang['infoimage_associate'],
- 'L_SUBMIT'=>$lang['submit'],
-
- 'F_ACTION'=>add_session_id($form_action)
- ));
-// +-----------------------------------------------------------------------+
-// | errors display |
-// +-----------------------------------------------------------------------+
- if (count($errors) != 0)
- {
- $template->assign_block_vars('errors',array());
- foreach ($errors as $error)
- {
- $template->assign_block_vars('errors.error',array('ERROR'=>$error));
- }
- }
-// +-----------------------------------------------------------------------+
-// | form |
-// +-----------------------------------------------------------------------+
- $array_cat_directories = array();
-
- $pic_mod_base_url = PHPWG_ROOT_PATH.'admin.php';
- $pic_mod_base_url = '?page=picture_modify&amp;image_id=';
-
- $query = '
-SELECT *
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id
- WHERE category_id = '.$page['cat'].'
- '.$conf['order_by'].'
- LIMIT '.$page['start'].','.$conf['info_nb_elements_page'].'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
-
- $template->assign_block_vars(
- 'picture',
- array(
- 'ID_IMG'=>$row['id'],
- 'URL_IMG'=>add_session_id($pic_mod_base_url.$row['id']),
- 'TN_URL_IMG'=>$thumbnail_url,
- 'FILENAME_IMG'=>$row['file'],
- 'DEFAULTNAME_IMG'=>get_filename_wo_extension($row['file']),
- 'NAME_IMG'=>@$row['name'],
- 'DATE_IMG'=>date_convert_back(@$row['date_creation']),
- 'AUTHOR_IMG'=>@$row['author'],
- 'KEYWORDS_IMG'=>@$row['keywords'],
- 'COMMENT_IMG'=>@$row['comment']
- ));
- }
-
- // Virtualy associate a picture to a category
- $query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
-;';
- display_select_cat_wrapper($query,
- array(),
- 'associate_option',
- true);
-}
-//----------------------------------------------------------- sending html code
-$template->assign_var_from_handle('ADMIN_CONTENT', 'infos_images');
-?>
diff --git a/admin/maintenance.php b/admin/maintenance.php
index 935e42f0a..ec45196db 100644
--- a/admin/maintenance.php
+++ b/admin/maintenance.php
@@ -103,6 +103,7 @@ $template->assign_vars(
'U_MAINT_HISTORY' => add_session_id($start_url.'history'),
'U_MAINT_SESSIONS' => add_session_id($start_url.'sessions'),
'U_MAINT_FEEDS' => add_session_id($start_url.'feeds'),
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance',
)
);
diff --git a/admin/remote_site.php b/admin/remote_site.php
index 774358ddf..5044bd45a 100644
--- a/admin/remote_site.php
+++ b/admin/remote_site.php
@@ -512,10 +512,13 @@ $template->assign_vars(
'L_REMOTE_SITE_LOCAL_FOUND'=>$lang['remote_site_local_found'],
'L_REMOTE_SITE_LOCAL_NEW'=>$lang['remote_site_local_new'],
'L_REMOTE_SITE_LOCAL_UPDATE'=>$lang['remote_site_local_update'],
+
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=remote_site',
'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=remote_site')
)
);
+
// +-----------------------------------------------------------------------+
// | new site creation form |
// +-----------------------------------------------------------------------+
diff --git a/admin/update.php b/admin/update.php
index b0e26a3f7..e4283a824 100644
--- a/admin/update.php
+++ b/admin/update.php
@@ -573,6 +573,12 @@ $template->assign_vars(
'L_USED_METADATA'=>$lang['update_used_metadata'],
'METADATA_LIST' => $used_metadata
));
+
+$template->assign_vars(
+ array(
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=synchronize'
+ )
+ );
// +-----------------------------------------------------------------------+
// | introduction : choices |
// +-----------------------------------------------------------------------+
diff --git a/admin/user_list.php b/admin/user_list.php
index e4a4c6d7e..0671dabc3 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -49,10 +49,10 @@ if (isset($_POST['submit_add']))
}
// +-----------------------------------------------------------------------+
-// | preferences form submission |
+// | selected users |
// +-----------------------------------------------------------------------+
-if (isset($_POST['pref_submit']))
+if (isset($_POST['delete']) or isset($_POST['pref_submit']))
{
$collection = array();
@@ -78,116 +78,154 @@ SELECT id
}
}
- if (count($collection) > 0)
+ if (count($collection) == 0)
+ {
+ array_push($page['errors'], l10n('Select at least one user'));
+ }
+}
+
+// +-----------------------------------------------------------------------+
+// | delete users |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['delete']) and count($collection) > 0)
+{
+ if (in_array($conf['webmaster_id'], $collection))
+ {
+ array_push($page['errors'], l10n('Webmaster cannot be deleted'));
+ }
+ else
{
- if (-1 != $_POST['associate'])
+ if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion'])
+ {
+ foreach ($collection as $user_id)
+ {
+ delete_user($user_id);
+ }
+ array_push(
+ $page['infos'],
+ sprintf(
+ l10n('%d users deleted'),
+ count($collection)
+ )
+ );
+ }
+ else
{
- $datas = array();
+ array_push($page['errors'], l10n('You need to confirm deletion'));
+ }
+ }
+}
- $query = '
+// +-----------------------------------------------------------------------+
+// | preferences form submission |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['pref_submit']) and count($collection) > 0)
+{
+ if (-1 != $_POST['associate'])
+ {
+ $datas = array();
+
+ $query = '
SELECT user_id
FROM '.USER_GROUP_TABLE.'
WHERE group_id = '.$_POST['associate'].'
;';
- $associated = array_from_query($query, 'user_id');
-
- $associable = array_diff($collection, $associated);
-
- if (count($associable) > 0)
+ $associated = array_from_query($query, 'user_id');
+
+ $associable = array_diff($collection, $associated);
+
+ if (count($associable) > 0)
+ {
+ foreach ($associable as $item)
{
- foreach ($associable as $item)
- {
- array_push($datas,
- array('group_id'=>$_POST['associate'],
- 'user_id'=>$item));
- }
-
- mass_inserts(USER_GROUP_TABLE,
- array('group_id', 'user_id'),
- $datas);
+ array_push($datas,
+ array('group_id'=>$_POST['associate'],
+ 'user_id'=>$item));
}
+
+ mass_inserts(USER_GROUP_TABLE,
+ array('group_id', 'user_id'),
+ $datas);
}
-
- if (-1 != $_POST['dissociate'])
- {
- $query = '
+ }
+
+ if (-1 != $_POST['dissociate'])
+ {
+ $query = '
DELETE FROM '.USER_GROUP_TABLE.'
WHERE group_id = '.$_POST['dissociate'].'
AND user_id IN ('.implode(',', $collection).')
';
- pwg_query($query);
+ pwg_query($query);
+ }
+
+ // properties to set for the collection (a user list)
+ $datas = array();
+ $dbfields = array('primary' => array('user_id'), 'update' => array());
+
+ $formfields =
+ array('nb_image_line', 'nb_line_page', 'template', 'language',
+ 'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
+ 'maxheight', 'status');
+
+ $true_false_fields = array('expand', 'show_nb_comments');
+
+ foreach ($formfields as $formfield)
+ {
+ // special for true/false fields
+ if (in_array($formfield, $true_false_fields))
+ {
+ $test = $formfield;
+ }
+ else
+ {
+ $test = $formfield.'_action';
}
-
- // properties to set for the collection (a user list)
- $datas = array();
- $dbfields = array('primary' => array('user_id'), 'update' => array());
-
- $formfields =
- array('nb_image_line', 'nb_line_page', 'template', 'language',
- 'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
- 'maxheight', 'status');
-
- $true_false_fields = array('expand', 'show_nb_comments');
- foreach ($formfields as $formfield)
+ if ($_POST[$test] != 'leave')
{
- // special for true/false fields
- if (in_array($formfield, $true_false_fields))
- {
- $test = $formfield;
- }
- else
- {
- $test = $formfield.'_action';
- }
-
- if ($_POST[$test] != 'leave')
- {
- array_push($dbfields['update'], $formfield);
- }
+ array_push($dbfields['update'], $formfield);
}
-
- // updating elements is useful only if needed...
- if (count($dbfields['update']) > 0)
+ }
+
+ // updating elements is useful only if needed...
+ if (count($dbfields['update']) > 0)
+ {
+ $datas = array();
+
+ foreach ($collection as $user_id)
{
- $datas = array();
+ $data = array();
+ $data['user_id'] = $user_id;
- foreach ($collection as $user_id)
+ // TODO : verify if submited values are semanticaly correct
+ foreach ($dbfields['update'] as $dbfield)
{
- $data = array();
- $data['user_id'] = $user_id;
-
- // TODO : verify if submited values are semanticaly correct
- foreach ($dbfields['update'] as $dbfield)
- {
- // if the action is 'unset', the key won't be in row and
- // mass_updates function will set this field to NULL
- if (in_array($dbfield, $true_false_fields)
- or 'set' == $_POST[$dbfield.'_action'])
- {
- $data[$dbfield] = $_POST[$dbfield];
- }
- }
-
- // Webmaster (user_id = 1) status must not be changed
- if (1 == $user_id and isset($data['status']))
+ // if the action is 'unset', the key won't be in row and
+ // mass_updates function will set this field to NULL
+ if (in_array($dbfield, $true_false_fields)
+ or 'set' == $_POST[$dbfield.'_action'])
{
- $data['status'] = 'admin';
+ $data[$dbfield] = $_POST[$dbfield];
}
-
- array_push($datas, $data);
}
-
+
+ // Webmaster status must not be changed
+ if ($conf['webmaster_id'] == $user_id and isset($data['status']))
+ {
+ $data['status'] = 'admin';
+ }
+
+ array_push($datas, $data);
+ }
+
// echo '<pre>';
// print_r($datas);
// echo '</pre>';
-
- mass_updates(USER_INFOS_TABLE, $dbfields, $datas);
- }
- }
- else
- {
- array_push($page['errors'], l10n('Select at least one user'));
+
+ mass_updates(USER_INFOS_TABLE, $dbfields, $datas);
}
}
diff --git a/category.php b/category.php
index 7e2a037f5..a28601e10 100644
--- a/category.php
+++ b/category.php
@@ -410,7 +410,6 @@ if ( isset ( $page['cat'] ) )
}
//------------------------------------------------------------ log informations
pwg_log( 'category', $page['title'] );
-mysql_close();
$template->parse('category');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
diff --git a/doc/ChangeLog b/doc/ChangeLog
index cdf5bc542..a89d8cc8b 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,21 @@
+2005-09-03 Pierrick LE GALL
+
+ * modification : less configuration parameters in administration
+ screen. These parameters are move to
+ include/config_default.inc.php.
+
+ * new : ability to add a single picture to caddie from picture.php
+
+ * new : contextual help, only a few pages are available.
+
+ * new : ability to delete users from admin/user_list
+
+ * modification : reorganization of configuration file
+
+ * new : configuration parameter use_exif_mapping
+
+ * improvement : MOD hidemail added to standard
+
2005-08-26 Pierrick LE GALL
* new : HTML BODY identifier to let CSS stylesheets manage
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 62e4a2782..90d2cabf9 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -43,6 +43,10 @@
* table, other parameters are in config_*.inc.php
*/
+// +-----------------------------------------------------------------------+
+// | misc |
+// +-----------------------------------------------------------------------+
+
// order_by : how to change the order of display for images in a category ?
//
// There are several fields that can order the display :
@@ -67,9 +71,6 @@ $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
// during automated slideshow
$conf['slideshow_period'] = 4;
-// last_days : options for X last days to displays for comments
-$conf['last_days'] = array(1,2,3,10,30,365);
-
// file_ext : file extensions (case sensitive) authorized
$conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip',
'avi','mp3','ogg');
@@ -85,6 +86,106 @@ $conf['top_number'] = 15;
// anti-flood_time : number of seconds between 2 comments : 0 to disable
$conf['anti-flood_time'] = 60;
+// calendar_datefield : date field of table "images" used for calendar
+// catgory
+$conf['calendar_datefield'] = 'date_creation';
+
+// rate : enable feature for rating elements
+$conf['rate'] = true;
+
+// newcat_default_commentable : at creation, must a category be commentable
+// or not ?
+$conf['newcat_default_commentable'] = 'true';
+
+// newcat_default_uploadable : at creation, must a category be uploadable or
+// not ?
+$conf['newcat_default_uploadable'] = 'false';
+
+// newcat_default_visible : at creation, must a category be visible or not ?
+// Warning : if the parent category is invisible, the category is
+// automatically create invisible. (invisible = locked)
+$conf['newcat_default_visible'] = 'true';
+
+// newcat_default_status : at creation, must a category be public or private
+// ? Warning : if the parent category is private, the category is
+// automatically create private.
+$conf['newcat_default_status'] = 'public';
+
+// level_separator : character string used for separating a category level
+// to the sub level. Suggestions : ' / ', ' &raquo; ', ' &rarr; ', ' - ',
+// ' &gt;'
+$conf['level_separator'] = ' / ';
+
+// paginate_pages_around : on paginate navigation bar, how many pages
+// display before and after the current page ?
+$conf['paginate_pages_around'] = 2;
+
+// tn_width : default width for thumbnails creation
+$conf['tn_width'] = 128;
+
+// tn_height : default height for thumbnails creation
+$conf['tn_height'] = 96;
+
+// show_version : shall the version of PhpWebGallery be displayed at the
+// bottom of each page ?
+$conf['show_version'] = true;
+
+// links : list of external links to add in the menu. An example is the best
+// than a long explanation :
+//
+// $conf['links'] = array(
+// 'http://phpwebgallery.net' => 'PWG website',
+// 'http://forum.phpwebgallery.net' => 'PWG forum',
+// 'http://phpwebgallery.net/doc' => 'PWG wiki'
+// );
+//
+// If the array is empty, the "Links" box won't be displayed on the main
+// page.
+$conf['links'] = array();
+
+// show_thumbnail_caption : on thumbnails page, show thumbnail captions ?
+$conf['show_thumbnail_caption'] = true;
+
+// show_picture_name_on_title : on picture presentation page, show picture
+// name ?
+$conf['show_picture_name_on_title'] = true;
+
+// allow_random_representative : do you wish PhpWebGallery to search among
+// categories elements a new representative at each reload ?
+//
+// If false, an element is randomly or manually chosen to represent its
+// category and remains the representative as long as an admin does not
+// change it.
+//
+// Warning : setting this parameter to true is CPU consuming. Each time you
+// change the value of this parameter from false to true, an administrator
+// must update categories informations in screen [Admin > General >
+// Maintenance].
+$conf['allow_random_representative'] = false;
+
+// allow_html_descriptions : authorize administrators to use HTML in
+// category and element description.
+$conf['allow_html_descriptions'] = true;
+
+// gallery_title : Title at top of each page and for RSS feed
+$conf['gallery_title'] = 'PhpWebGallery demonstration site';
+
+// gallery_description : Short description displayed with gallery title
+$conf['gallery_description'] = 'My photos web site';
+
+// galery_url : URL given in RSS feed
+$conf['gallery_url'] = 'http://demo.phpwebgallery.net';
+
+// prefix_thumbnail : string before filename
+$conf['prefix_thumbnail'] = 'TN-';
+
+// +-----------------------------------------------------------------------+
+// | metadata |
+// +-----------------------------------------------------------------------+
+
+// show_iptc: Show IPTC metadata on picture.php if asked by user
+$conf['show_iptc'] = false;
+
// show_iptc_mapping : is used for showing IPTC metadata on picture.php
// page. For each key of the array, you need to have the same key in the
// $lang array. For example, if my first key is 'iptc_keywords' (associated
@@ -101,6 +202,10 @@ $conf['show_iptc_mapping'] = array(
'iptc_caption' => '2#120'
);
+// use_iptc: Use IPTC data during database synchronization with files
+// metadata
+$conf['use_iptc'] = false;
+
// use_iptc_mapping : in which IPTC fields will PhpWebGallery find image
// information ? This setting is used during metadata synchronisation. It
// associates a phpwebgallery_images column name to a IPTC key
@@ -112,6 +217,10 @@ $conf['use_iptc_mapping'] = array(
'comment' => '2#120'
);
+// show_exif: Show EXIF metadata on picture.php (table or line presentation
+// avalaible)
+$conf['show_exif'] = true;
+
// show_exif_fields : in EXIF fields, you can choose to display fields in
// sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add
// 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields']
@@ -124,17 +233,29 @@ $conf['use_iptc_mapping'] = array(
// for PHP version newer than 4.1.2 :
// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
//
-$conf['show_exif_fields'] = array('Make',
- 'Model',
- 'DateTime',
- 'COMPUTED;ApertureFNumber');
+$conf['show_exif_fields'] = array(
+ 'Make',
+ 'Model',
+ 'DateTimeOriginal',
+ 'COMPUTED;ApertureFNumber'
+ );
-// calendar_datefield : date field of table "images" used for calendar
-// catgory
-$conf['calendar_datefield'] = 'date_creation';
+// use_exif: Use EXIF data during database synchronization with files
+// metadata
+$conf['use_exif'] = false;
-// rate : enable feature for rating elements
-$conf['rate'] = true;
+// use_exif_mapping: same behaviour as use_iptc_mapping
+$conf['use_exif_mapping'] = array(
+ 'date_creation' => 'DateTimeOriginal'
+ );
+
+// +-----------------------------------------------------------------------+
+// | sessions |
+// +-----------------------------------------------------------------------+
+
+// authorize_remembering : permits user to stay logged for a long time. It
+// creates a cookie on client side.
+$conf['authorize_remembering'] = true;
// remember_me_length : time of validity for "remember me" cookies, in
// seconds.
@@ -153,9 +274,9 @@ $conf['session_length'] = 3600;
//
$conf['session_id_size'] = 10;
-// info_nb_elements_page : number of elements to display per page on
-// admin/infos_images
-$conf['info_nb_elements_page'] = 5;
+// +-----------------------------------------------------------------------+
+// | debug |
+// +-----------------------------------------------------------------------+
// show_queries : for debug purpose, show queries and execution times
$conf['show_queries'] = false;
@@ -163,75 +284,18 @@ $conf['show_queries'] = false;
// show_gt : display generation time at the bottom of each page
$conf['show_gt'] = true;
-// newcat_default_commentable : at creation, must a category be commentable
-// or not ?
-$conf['newcat_default_commentable'] = 'true';
-
-// newcat_default_uploadable : at creation, must a category be uploadable or
-// not ?
-$conf['newcat_default_uploadable'] = 'false';
-
-// newcat_default_visible : at creation, must a category be visible or not ?
-// Warning : if the parent category is invisible, the category is
-// automatically create invisible. (invisible = locked)
-$conf['newcat_default_visible'] = 'true';
-
-// newcat_default_status : at creation, must a category be public or private
-// ? Warning : if the parent category is private, the category is
-// automatically create private.
-$conf['newcat_default_status'] = 'public';
-
-// level_separator : character string used for separating a category level
-// to the sub level. Suggestions : ' / ', ' &raquo; ', ' &rarr; ', ' - ',
-// ' &gt;'
-$conf['level_separator'] = ' / ';
-
-// paginate_pages_around : on paginate navigation bar, how many pages
-// display before and after the current page ?
-$conf['paginate_pages_around'] = 2;
-
-// tn_width : default width for thumbnails creation
-$conf['tn_width'] = 128;
-
-// tn_height : default height for thumbnails creation
-$conf['tn_height'] = 96;
-
-// show_version : shall the version of PhpWebGallery be displayed at the
-// bottom of each page ?
-$conf['show_version'] = true;
-
-// links : list of external links to add in the menu. An example is the best
-// than a long explanation :
-//
-// $conf['links'] = array(
-// 'http://phpwebgallery.net' => 'PWG website',
-// 'http://forum.phpwebgallery.net' => 'PWG forum',
-// 'http://phpwebgallery.net/doc' => 'PWG wiki'
-// );
-//
-// If the array is empty, the "Links" box won't be displayed on the main
-// page.
-$conf['links'] = array();
-
-// feed_period : how long between two feed refresh ? Possible values are
-// "hour", "half day", "day", "week", "month".
-$conf['feed_period'] = 'week';
-
-// show_thumbnail_caption : on thumbnails page, show thumbnail captions ?
-$conf['show_thumbnail_caption'] = true;
+// debug_l10n : display a warning message each time an unset language key is
+// accessed
+$conf['debug_l10n'] = false;
-// show_picture_name_on_title : on picture presentation page, show picture
-// name ?
-$conf['show_picture_name_on_title'] = true;
+// +-----------------------------------------------------------------------+
+// | authentication |
+// +-----------------------------------------------------------------------+
// apache_authentication : use Apache authentication as reference instead of
// users table ?
$conf['apache_authentication'] = false;
-// debug_l10n : display a warning message each time an unset language key is
-// accessed
-$conf['debug_l10n'] = false;
-
// users_table : which table is the reference for users ? Can be a different
// table than PhpWebGallery table
$conf['users_table'] = $prefixeTable.'users';
@@ -253,30 +317,30 @@ $conf['pass_convert'] = create_function('$s', 'return md5($s);');
// guest_id : id of the anonymous user
$conf['guest_id'] = 2;
-// allow_random_representative : do you wish PhpWebGallery to search among
-// categories elements a new representative at each reload ?
-//
-// If false, an element is randomly or manually chosen to represent its
-// category and remains the representative as long as an admin does not
-// change it.
-//
-// Warning : setting this parameter to true is CPU consuming. Each time you
-// change the value of this parameter from false to true, an administrator
-// must update categories informations in screen [Admin > General >
-// Maintenance].
-$conf['allow_random_representative'] = false;
+// webmaster_id : webmaster'id.
+$conf['webmaster_id'] = 1;
-// allow_html_descriptions : authorize administrators to use HTML in
-// category and element description.
-$conf['allow_html_descriptions'] = true;
+// +-----------------------------------------------------------------------+
+// | upload |
+// +-----------------------------------------------------------------------+
-// gallery_title : Title at top of each page and for RSS feed
-$conf['gallery_title'] = 'PhpWebGallery demonstration site';
+// upload_maxfilesize: maximum filesize for the uploaded pictures. In
+// kilobytes.
+$conf['upload_maxfilesize'] = 200;
-// gallery_description : Short description displayed with gallery title
-$conf['gallery_description'] = 'My photos web site';
+// upload_maxheight: maximum height authorized for the uploaded images. In
+// pixels.
+$conf['upload_maxheight'] = 800;
-// galery_url : URL given in RSS feed
-$conf['gallery_url'] = 'http://demo.phpwebgallery.net';
+// upload_maxwidth: maximum width authorized for the uploaded images. In
+// kilobytes.
+$conf['upload_maxwidth'] = 800;
+
+// upload_maxheight_thumbnail: maximum height authorized for the uploaded
+// thumbnails
+$conf['upload_maxheight_thumbnail'] = 100;
+// upload_maxwidth_thumbnail: maximum width authorized for the uploaded
+// thumbnails
+$conf['upload_maxwidth_thumbnail'] = 150;
?>
diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php
index 2708810f1..d03327f60 100644
--- a/include/functions_metadata.inc.php
+++ b/include/functions_metadata.inc.php
@@ -91,4 +91,46 @@ function clean_iptc_value($value)
return $value;
}
+
+/**
+ * returns informations from EXIF metadata, mapping is done at the beginning
+ * of the function
+ *
+ * @param string $filename
+ * @return array
+ */
+function get_exif_data($filename, $map)
+{
+ $result = array();
+
+ if (!function_exists('read_exif_data'))
+ {
+ die('Exif extension not available, admin should disable exif use');
+ }
+
+ // Read EXIF data
+ if ($exif = @read_exif_data($filename))
+ {
+ foreach ($map as $key => $field)
+ {
+ if (strpos($field, ';') === false)
+ {
+ if (isset($exif[$field]))
+ {
+ $result[$key] = $exif[$field];
+ }
+ }
+ else
+ {
+ $tokens = explode(';', $field);
+ if (isset($exif[$tokens[0]][$tokens[1]]))
+ {
+ $result[$key] = $exif[$tokens[0]][$tokens[1]];
+ }
+ }
+ }
+ }
+
+ return $result;
+}
?> \ No newline at end of file
diff --git a/include/page_tail.php b/include/page_tail.php
index 5e4a977e6..33f6900cf 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -29,13 +29,11 @@ $template->set_filenames(array('tail'=>'footer.tpl'));
$template->assign_vars(
array(
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
- 'MAIL'=>$conf['mail_webmaster'],
'L_GEN_TIME' => $lang['generation_time'],
'L_SQL_QUERIES_IN' => $lang['sql_queries_in'],
'L_SEND_MAIL' => $lang['send_mail'],
'L_TITLE_MAIL' => $lang['title_send_mail'],
- 'L_WEBMASTER'=>$lang['webmaster'],
'L_POWERED_BY'=>$lang['powered_by']
));
//------------------------------------------------------------- generation time
@@ -56,6 +54,25 @@ if ($conf['show_gt'])
'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s'));
}
+//--------------------------------------------------------------------- contact
+
+if (!$user['is_the_guest'])
+{
+ $query = '
+SELECT '.$conf['user_fields']['email'].'
+ FROM '.USERS_TABLE.'
+ WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
+;';
+ list($email) = mysql_fetch_array(pwg_query($query));
+
+ $template->assign_block_vars(
+ 'contact',
+ array(
+ 'MAIL' => $email
+ )
+ );
+}
+
//
// Generate the page
//
diff --git a/include/scripts.js b/include/scripts.js
index 43fb86644..2550233e6 100644
--- a/include/scripts.js
+++ b/include/scripts.js
@@ -29,4 +29,14 @@ for( i=0; i<len; i++)
function phpWGOpenWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
-} \ No newline at end of file
+}
+
+function popuphelp(url)
+{
+ window.open(
+ url,
+ 'dc_popup',
+ 'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
+ );
+}
+
diff --git a/include/template.php b/include/template.php
index 14f5d4349..f82937d99 100644
--- a/include/template.php
+++ b/include/template.php
@@ -269,7 +269,8 @@ class Template {
function make_filename($filename)
{
// Check if it's an absolute or relative path.
- if (substr($filename, 0, 1) != '/')
+ // if (substr($filename, 0, 1) != '/')
+ if (preg_match('/^[a-z_]/i', $filename))
{
$filename = $this->root.'/'.$filename;
}
diff --git a/install/config.sql b/install/config.sql
index ba7e8875d..fa27ce1e3 100644
--- a/install/config.sql
+++ b/install/config.sql
@@ -1,17 +1,10 @@
-- initial configuration for PhpWebGallery
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('prefix_thumbnail','TN-','thumbnails filename prefix');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('mail_webmaster','','webmaster mail');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_language','en_UK.iso-8859-1','Default gallery language');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_template','default','Default gallery style');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_maxwidth','','maximum width authorized for displaying images');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('default_maxheight','','maximum height authorized for the displaying images');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nb_comment_page','10','number of comments to display on each page');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxfilesize','150','maximum filesize for the uploaded pictures');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxwidth','800','maximum width authorized for the uploaded images');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxheight','600','maximum height authorized for the uploaded images');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxwidth_thumbnail','150','maximum width authorized for the uploaded thumbnails');
-INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('upload_maxheight_thumbnail','100','maximum height authorized for the uploaded thumbnails');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('log','false','keep an history of visits on your website');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('comments_validation','false','administrators validate users comments before becoming visible');
INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('comments_forall','false','even guest not registered can post comments');
diff --git a/install/phpwebgallery_structure.sql b/install/phpwebgallery_structure.sql
index 28368df69..5d0bac12a 100644
--- a/install/phpwebgallery_structure.sql
+++ b/install/phpwebgallery_structure.sql
@@ -77,7 +77,7 @@ CREATE TABLE `phpwebgallery_config` (
DROP TABLE IF EXISTS `phpwebgallery_favorites`;
CREATE TABLE `phpwebgallery_favorites` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`image_id` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`image_id`)
) TYPE=MyISAM;
@@ -170,7 +170,7 @@ CREATE TABLE `phpwebgallery_images` (
DROP TABLE IF EXISTS `phpwebgallery_rate`;
CREATE TABLE `phpwebgallery_rate` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`element_id` mediumint(8) unsigned NOT NULL default '0',
`rate` tinyint(2) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`element_id`)
@@ -183,7 +183,7 @@ CREATE TABLE `phpwebgallery_rate` (
DROP TABLE IF EXISTS `phpwebgallery_sessions`;
CREATE TABLE `phpwebgallery_sessions` (
`id` varchar(255) binary NOT NULL default '',
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`expiration` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
@@ -206,7 +206,7 @@ CREATE TABLE `phpwebgallery_sites` (
DROP TABLE IF EXISTS `phpwebgallery_user_access`;
CREATE TABLE `phpwebgallery_user_access` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`cat_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`cat_id`)
) TYPE=MyISAM;
@@ -217,7 +217,7 @@ CREATE TABLE `phpwebgallery_user_access` (
DROP TABLE IF EXISTS `phpwebgallery_user_cache`;
CREATE TABLE `phpwebgallery_user_cache` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`need_update` enum('true','false') NOT NULL default 'true',
`forbidden_categories` text,
PRIMARY KEY (`user_id`)
@@ -230,7 +230,7 @@ CREATE TABLE `phpwebgallery_user_cache` (
DROP TABLE IF EXISTS `phpwebgallery_user_feed`;
CREATE TABLE `phpwebgallery_user_feed` (
`id` varchar(50) binary NOT NULL default '',
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`last_check` datetime default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
@@ -241,7 +241,7 @@ CREATE TABLE `phpwebgallery_user_feed` (
DROP TABLE IF EXISTS `phpwebgallery_user_group`;
CREATE TABLE `phpwebgallery_user_group` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`group_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`group_id`,`user_id`)
) TYPE=MyISAM;
@@ -252,7 +252,7 @@ CREATE TABLE `phpwebgallery_user_group` (
DROP TABLE IF EXISTS `phpwebgallery_user_infos`;
CREATE TABLE `phpwebgallery_user_infos` (
- `user_id` smallint(5) unsigned NOT NULL default '0',
+ `user_id` smallint(5) NOT NULL default '0',
`nb_image_line` tinyint(1) unsigned NOT NULL default '5',
`nb_line_page` tinyint(3) unsigned NOT NULL default '3',
`status` enum('admin','guest') NOT NULL default 'guest',
@@ -273,7 +273,7 @@ CREATE TABLE `phpwebgallery_user_infos` (
DROP TABLE IF EXISTS `phpwebgallery_users`;
CREATE TABLE `phpwebgallery_users` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
+ `id` smallint(5) NOT NULL auto_increment,
`username` varchar(20) binary NOT NULL default '',
`password` varchar(32) default NULL,
`mail_address` varchar(255) default NULL,
diff --git a/language/en_UK.iso-8859-1/help/configuration.html b/language/en_UK.iso-8859-1/help/configuration.html
new file mode 100644
index 000000000..1ce846feb
--- /dev/null
+++ b/language/en_UK.iso-8859-1/help/configuration.html
@@ -0,0 +1,87 @@
+<h2>Configuration</h2>
+
+<p>This screen let the administrator do basic configuration. Indeed, this
+screen only shows simple configuration parameters that should be enough for
+the vast majority of administrators. If you want to see other numerous (and
+advanced) configuration parameters, read file <span
+cass="filename">include/config_default.inc.php</span>.</p>
+
+<p>This screen is divided in several sections, regrouping configuration
+parameters by theme.</p>
+
+<h3>General</h3>
+
+<ul>
+
+ <li><strong>History</strong>: visits on pages <span
+ class="pwgScreen">category.php</span> and <span
+ class="pwgScreen">picture.php</span> will be registered in
+ <code>history</code> table. Visits will be shown in <span
+ class="pwgScreen">Administration, General, History</span>.</li>
+
+ <li><strong>Lock gallery</strong>: Lock the entire gallery for
+ maintenance. Only administrator users will be able to reach the
+ gallery.</li>
+
+</ul>
+
+
+<h3>User comments</h3>
+
+<ul>
+
+ <li><strong>Comments for all</strong>: Even guest not registered can post
+ comments.</li>
+
+ <li><strong>Number of comments per page</strong>.</li>
+
+ <li><strong>Validation</strong>: an administrator validate users posted
+ comments before they become visible on the site. User comments validation
+ takes place in screen <span class="pwgScreen">Administration, Pictures,
+ Comments</span>.</li>
+
+</ul>
+
+<h3>Default display</h3>
+
+<p>Here you can change display options used by default, when guest is not
+connected. Once connected, these options are overloaded by user own options
+(modifiable in <span class="pwgScreen">profile</span>).</p>
+
+<p>It is possible to change display options for all existing users, but the
+screen to consider is <span class="pwgScreen">Administration,
+Identification, Users</span>, where you can options for a selected list of
+users.</p>
+
+<ul>
+
+ <li><strong>Language</strong>: concerns only PhpWebGallery
+ labels. Category names, picture names and all descriptions are not
+ localized.</li>
+
+ <li><strong>Number of images per row</strong></li>
+
+ <li><strong>Number of rows per page</strong></li>
+
+ <li><strong>Interface theme</strong></li>
+
+ <li><strong>Recent period</strong>: By days. Period within a picture is
+ shown as new. Must be superior to 1 day.</li>
+
+ <li><strong>Expand all categories</strong>: Expand all categories by
+ default in the menu? <em>Warning</em>: this option is resources consuming
+ and may generate a huge menu if your category tree is contains many
+ categories.</li>
+
+ <li><strong>Show number of comments</strong>: show the number of comments
+ for each picture on the thumbnails page. Resource consuming.</li>
+
+ <li><strong>Maximum width of the pictures</strong>: maximum displayed
+ width. If pictures are larger than this setting, they will be resized on
+ display. If you consider filling this option, you'd better consider
+ modifying the width of your pictures instead.</li>
+
+ <li><strong>Maximum height of the pictures</strong>: same remarks as for
+ previous setting.</li>
+
+</ul>
diff --git a/language/en_UK.iso-8859-1/help/maintenance.html b/language/en_UK.iso-8859-1/help/maintenance.html
new file mode 100644
index 000000000..85e905cc9
--- /dev/null
+++ b/language/en_UK.iso-8859-1/help/maintenance.html
@@ -0,0 +1,38 @@
+<h2>Maintenance</h2>
+
+<p>To optimize page generation time, PhpWebGallery uses cached
+information. For example, instead of counting the number of pictures
+contained in each category at each page reload, this information is stored
+in the database. In theory, this information should always be correct, but
+sometimes an error can occur and cached information becomes wrong.</p>
+
+<p>Some informations become useless with time. Deleting this useless
+information from database make you save disk space.</p>
+
+<ul>
+
+ <li><strong>update categories informations</strong>. For each category,
+ informations to update or control are the following : list of parent
+ categories, number of pictures, date of the last picture, position among
+ brother categories, position among all categories. This action also checks
+ the coherence of representative picture.</li>
+
+ <li><strong>update images informations</strong>. For each picture,
+ informations to update are : full path to file, averate
+ rate. <em>Warning</em>: do not get confuse with metadata informations
+ which can be synchronized from <span class="pwgScreen">Administration,
+ General, Synchronize</span> or by reaching the modification screen of a
+ single picture (through <span class="pwgScreen">Picture</span> for
+ example).</li>
+
+ <li><strong>purge history</strong>. Delete all lines from
+ <code>history</code> table. Screen <span class="pwgScreen">Administration,
+ General, History</span> shows no informations anymore on past
+ history. <em>Warning</em>: all data will be lost and there is no way to
+ get informations back.</li>
+
+ <li><strong>purge sessions</strong>. Delete expired user sessions.</li>
+
+ <li><strong>purge never used notification feeds</strong></li>
+
+</ul>
diff --git a/language/en_UK.iso-8859-1/help/remote_site.html b/language/en_UK.iso-8859-1/help/remote_site.html
new file mode 100644
index 000000000..38cd8f370
--- /dev/null
+++ b/language/en_UK.iso-8859-1/help/remote_site.html
@@ -0,0 +1,51 @@
+<h2>Remote site</h2>
+
+<p>PhpWebGallery offers the possibility to use several servers to store the
+images which will compose your gallery. It can be useful if your gallery is
+installed on one limited space and that you have a big quantity of images to
+be shown.</p>
+
+<ol>
+
+ <li>edit file <span class="filename">tools/create_listing_file.php</span>,
+ by modifying parameters section such as
+ <code>$conf['prefix_thumbnail']</code> or
+ <code>$conf['use_exif']</code>.</li>
+
+ <li>place file <span class="filename">tools/create_listing_file.php</span>
+ modified on your distant website, in the same directory than your category
+ directories (as the directory <span class="filename">galleries</span> of
+ this website) by ftp. For the example, let's say that you can access <span
+ class="filename">http://example.com/galleries/create_listing_file.php</span>.</li>
+
+ <li>go to <span class="pwgScreen">administration panel, General, Remote
+ sites</span>. Ask to create a new site, for example <span
+ class="filename">http://example.com/galleries</span>.</li>
+
+ <li>a new remote site is registered. You can perform 4 actions :
+
+ <ol>
+
+ <li><strong>generate listing</strong> : launches a distant request to
+ generate a distant file listing</li>
+
+ <li><strong>update</strong> : reads the distant <span
+ class="filename">listing.xml</span> file and synchronizes with
+ database informations.</li>
+
+ <li><strong>clean</strong> : removes distant <span
+ class="filename">listing.xml</span> file.</li>
+
+ <li><strong>delete</strong> : deletes the site (and all related
+ categories and elements) in the database.</li>
+
+ </ol>
+ </li>
+</ol>
+
+<p>You can do all this by hand by generating yourself the <span
+class="filename">listing.xml</span> file, moving it from your distant server
+to you local PhpWebGallery root directory and opening the remote site
+management screen : PhpWebGallery will propose you to use the found
+listing.xml file.</p>
+
diff --git a/language/en_UK.iso-8859-1/help/synchronize.html b/language/en_UK.iso-8859-1/help/synchronize.html
new file mode 100644
index 000000000..835e0c52e
--- /dev/null
+++ b/language/en_UK.iso-8859-1/help/synchronize.html
@@ -0,0 +1 @@
+<h2>Synchronize</h2>
diff --git a/picture.php b/picture.php
index b6995a3ca..c3b9df112 100644
--- a/picture.php
+++ b/picture.php
@@ -90,6 +90,20 @@ UPDATE '.CATEGORIES_TABLE.'
.get_query_string_diff(array('representative'));
redirect($url);
}
+
+//-------------------------------------------------------------- caddie filling
+
+if (isset($_GET['caddie']))
+{
+ fill_caddie(array($_GET['image_id']));
+
+ $url =
+ PHPWG_ROOT_PATH
+ .'picture.php'
+ .get_query_string_diff(array('caddie'));
+ redirect($url);
+}
+
//---------------------------------------------------------- related categories
$query = '
SELECT category_id,uppercats,commentable,global_rank
@@ -244,6 +258,7 @@ $url_admin.= '&amp;image_id='.$_GET['image_id'];
$url_slide = $picture['current']['url'];
$url_slide.= '&amp;slideshow='.$conf['slideshow_period'];
+
//----------------------------------------------------------- rate registration
if (isset($_GET['rate'])
and $conf['rate']
@@ -555,6 +570,20 @@ if ('admin' == $user['status'] and is_numeric($page['cat']))
)
);
}
+
+if ('admin' == $user['status'])
+{
+ $template->assign_block_vars(
+ 'caddie',
+ array(
+ 'URL' =>
+ add_session_id(
+ PHPWG_ROOT_PATH.'picture.php'
+ .get_query_string_diff(array('caddie')).'&amp;caddie=1')
+ )
+ );
+}
+
//------------------------------------------------------- favorite manipulation
if ( !$user['is_the_guest'] )
{
@@ -1034,7 +1063,6 @@ if ($page['show_comments'])
}
//------------------------------------------------------------ log informations
pwg_log( 'picture', $title_img, $picture['current']['file'] );
-mysql_close();
$template->parse('picture');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
diff --git a/popuphelp.php b/popuphelp.php
new file mode 100644
index 000000000..97ae7532a
--- /dev/null
+++ b/popuphelp.php
@@ -0,0 +1,64 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch : BSF (Best So Far)
+// | file : $RCSfile$
+// | last update : $Date$
+// | last modifier : $Author$
+// | revision : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// +-----------------------------------------------------------------------+
+// | initialization |
+// +-----------------------------------------------------------------------+
+
+define('PHPWG_ROOT_PATH','./');
+include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
+
+// language files
+$user_langdir = PHPWG_ROOT_PATH.'language/'.$user['language'];
+$conf_langdir = PHPWG_ROOT_PATH.'language/'.$conf['default_language'];
+
+if (file_exists($user_langdir.'/help/'.$_GET['page'].'.html'))
+{
+ $html_file = $user_langdir.'/help/'.$_GET['page'].'.html';
+}
+else
+{
+ $html_file = $conf_langdir.'/help/'.$_GET['page'].'.html';
+}
+
+$page['body_id'] = 'thePopuphelpPage';
+$page['gallery_title'] = $title = l10n('PhpWebGallery Help');
+include(PHPWG_ROOT_PATH.'include/page_header.php');
+$template->set_filenames(array('help_content' => $html_file));
+
+$template->set_filenames(array('popuphelp' => 'popuphelp.tpl'));
+
+$template->assign_var_from_handle('HELP_CONTENT', 'help_content');
+
+// +-----------------------------------------------------------------------+
+// | html code display |
+// +-----------------------------------------------------------------------+
+
+$template->parse('popuphelp');
+
+include(PHPWG_ROOT_PATH.'include/page_tail.php');
+?> \ No newline at end of file
diff --git a/search.php b/search.php
index e8645440c..877ca4e6b 100644
--- a/search.php
+++ b/search.php
@@ -214,7 +214,6 @@ if (sizeof($errors) != 0)
}
//------------------------------------------------------------ log informations
pwg_log( 'search', $title );
-mysql_close();
$template->parse('search');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>
diff --git a/template/cclear/admin.tpl b/template/cclear/admin.tpl
index 98f555332..70c0f2042 100644
--- a/template/cclear/admin.tpl
+++ b/template/cclear/admin.tpl
@@ -26,9 +26,6 @@
<li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li>
<li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li>
<li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
- <li><a href="{U_CONFIG_UPLOAD}">{lang:upload}</a></li>
- <li><a href="{U_CONFIG_SESSION}">{lang:conf_cookie}</a></li>
- <li><a href="{U_CONFIG_METADATA}">{lang:metadata}</a></li>
</ul>
</dd>
diff --git a/template/cclear/admin/configuration.tpl b/template/cclear/admin/configuration.tpl
index 591a1bbca..6129c032c 100644
--- a/template/cclear/admin/configuration.tpl
+++ b/template/cclear/admin/configuration.tpl
@@ -1,198 +1,118 @@
<!-- $Id$ -->
-<h2>{lang:title_configuration}</h2>
+<div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="template/cclear/theme/help.png" alt="(?)"></a></li>
+ </ul>
+ <h2>{lang:title_configuration}</h2>
+</div>
-<form method="post" action="{F_ACTION}">
-<table width="100%" align="center">
+<form method="post" action="{F_ACTION}" class="properties">
+
+<fieldset>
<!-- BEGIN general -->
- <tr class="admin">
- <th colspan="2">{general.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%"><strong>{general.L_CONF_MAIL}&nbsp;:</strong><br /><span class="small">{general.L_CONF_MAIL_INFO}</span></td>
- <td class="row1"><input type="text" size="25" maxlength="100" name="mail_webmaster" value="{general.ADMIN_MAIL}" /></td>
- </tr>
- <tr>
- <td><strong>{general.L_CONF_TN_PREFIX}&nbsp;:</strong><br /><span class="small">{general.L_CONF_TN_PREFIX_INFO}</span></td>
- <td class="row1"><input type="text" size="10" maxlength="10" name="prefix_thumbnail" value="{general.THUMBNAIL_PREFIX}" /></td>
- </tr>
- <tr>
- <td><strong>{general.L_CONF_HISTORY}&nbsp;:</strong><br /><span class="small">{general.L_CONF_HISTORY_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="log" value="true" {general.HISTORY_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="log" value="false" {general.HISTORY_NO} />{L_NO}</td>
- </tr>
- <tr>
- <td><strong>{general.L_CONF_GALLERY_LOCKED}&nbsp;:</strong><br /><span class="small">{general.L_CONF_GALLERY_LOCKED_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="gallery_locked" value="true" {general.GALLERY_LOCKED_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="gallery_locked" value="false" {general.GALLERY_LOCKED_NO} />{L_NO}</td>
- </tr>
+ <legend>{lang:conf_general_title}</legend>
+
+ <ul>
+ <li>
+ <label><strong>{lang:History}</strong></label>
+ <input type="radio" class="radio" name="log" value="true" {general.HISTORY_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="log" value="false" {general.HISTORY_NO} />{lang:No}
+ </li>
+
+ <li>
+ <label><strong>{lang:Lock gallery}</strong></label>
+ <input type="radio" class="radio" name="gallery_locked" value="true" {general.GALLERY_LOCKED_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="gallery_locked" value="false" {general.GALLERY_LOCKED_NO} />{lang:No}
+ </li>
+ </ul>
<!-- END general -->
+
<!-- BEGIN comments -->
- <tr class="admin">
- <th colspan="2">{comments.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%"><strong>{comments.L_CONF_COMMENTS_ALL}&nbsp;:</strong><br /><span class="small">{comments.L_CONF_COMMENTS_ALL_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="comments_forall" value="true" {comments.COMMENTS_ALL_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="comments_forall" value="false" {comments.COMMENTS_ALL_NO} />{L_NO}</td>
- </tr>
- <tr>
- <td><strong>{comments.L_CONF_NB_COMMENTS_PAGE}&nbsp;:</strong><br /><span class="small">{comments.L_CONF_NB_COMMENTS_PAGE_INFO}</span></td>
- <td class="row1"><input type="text" size="3" maxlength="4" name="nb_comment_page" value="{comments.NB_COMMENTS_PAGE}" /></td>
- </tr>
- <tr>
- <td><strong>{comments.L_CONF_VALIDATE}&nbsp;:</strong><br /><span class="small">{comments.L_CONF_VALIDATE_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="comments_validation" value="true" {comments.VALIDATE_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="comments_validation" value="false" {comments.VALIDATE_NO} />{L_NO}</td>
- </tr>
+ <legend>{lang:conf_comments_title}</legend>
+
+ <ul>
+ <li>
+ <label><strong>{lang:Comments for all}</strong></label>
+ <input type="radio" class="radio" name="comments_forall" value="true" {comments.COMMENTS_ALL_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="comments_forall" value="false" {comments.COMMENTS_ALL_NO} />{lang:No}
+ </li>
+
+ <li>
+ <label for="nb_comment_page"><strong>{lang:Number of comments per page}</strong></label>
+ <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{comments.NB_COMMENTS_PAGE}" />
+ </li>
+
+ <li>
+ <label><strong>{lang:Validation}</strong></label>
+ <input type="radio" class="radio" name="comments_validation" value="true" {comments.VALIDATE_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="comments_validation" value="false" {comments.VALIDATE_NO} />{lang:No}
+ </li>
+ </ul>
<!-- END comments -->
<!-- BEGIN default -->
- <tr class="admin">
- <th colspan="2">{default.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%"><strong>{default.L_CONF_LANG}&nbsp;:</strong><br /><span class="small">{default.L_CONF_LANG_INFO}</span></td>
- <td class="row1">{default.CONF_LANG_SELECT}</td>
- </tr>
- <tr>
- <td><strong>{default.L_NB_IMAGE_LINE}&nbsp;:</strong><br /><span class="small">{default.L_NB_IMAGE_LINE_INFO}</span></td>
- <td class="row1"><input type="text" size="3" maxlength="2" name="nb_image_line" value="{default.NB_IMAGE_LINE}" /></td>
- </tr>
- <tr>
- <td><strong>{default.L_NB_ROW_PAGE}&nbsp;:</strong><br /><span class="small">{default.L_NB_ROW_PAGE_INFO}</span></td>
- <td class="row1"><input type="text" size="3" maxlength="2" name="nb_line_page" value="{default.NB_ROW_PAGE}" /></td>
- </tr>
- <tr>
- <td><strong>{default.L_CONF_STYLE}&nbsp;:</strong><br /><span class="small">{default.L_CONF_STYLE_INFO}</span></td>
- <td class="row1">{default.CONF_STYLE_SELECT}</td>
- </tr>
- <tr>
- <td><strong>{default.L_CONF_RECENT}&nbsp;:</strong><br /><span class="small">{default.L_CONF_RECENT_INFO}</span></td>
- <td class="row1"><input type="text" size="3" maxlength="2" name="recent_period" value="{default.CONF_RECENT}" /></td>
- </tr>
- <tr>
- <td><strong>{default.L_CONF_EXPAND}&nbsp;:</strong><br /><span class="small">{default.L_CONF_EXPAND_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="auto_expand" value="true" {default.EXPAND_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="auto_expand" value="false" {default.EXPAND_NO} />{L_NO}</td>
- </tr>
- <tr>
- <td><strong>{default.L_NB_COMMENTS}&nbsp;:</strong><br /><span class="small">{default.L_NB_COMMENTS_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="show_nb_comments" value="true" {default.SHOW_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="show_nb_comments" value="false" {default.SHOW_COMMENTS_NO} />{L_NO}</td>
- </tr>
- <tr>
- <td><strong>{default.L_MAXWIDTH}&nbsp;:</strong></td>
- <td><input type="text" size="4" maxlength="4" name="default_maxwidth" value="{default.MAXWIDTH}" />
- </td>
- </tr>
- <tr>
- <td><strong>{default.L_MAXHEIGHT}&nbsp;:</strong></td>
- <td><input type="text" size="4" maxlength="4" name="default_maxheight" value="{default.MAXHEIGHT}" />
- </td>
- </tr>
+ <legend>{lang:conf_default_title}</legend>
+
+ <ul>
+ <li>
+ <label for="language"><strong>{lang:Language}</strong></label>
+ <select name="default_language" id="default_language">
+ <!-- BEGIN language_option -->
+ <option value="{default.language_option.VALUE}" {default.language_option.SELECTED}>{default.language_option.CONTENT}</option>
+ <!-- END language_option -->
+ </select>
+ </li>
+
+ <li>
+ <label for="nb_image_line"><strong>{lang:Number of images per row}</strong></label>
+ <input type="text" size="3" maxlength="2" name="nb_image_line" value="{default.NB_IMAGE_LINE}" />
+ </li>
+
+ <li>
+ <label><strong>{lang:Number of rows per page}</strong></label>
+ <input type="text" size="3" maxlength="2" name="nb_line_page" value="{default.NB_ROW_PAGE}" />
+ </li>
+
+ <li>
+ <label><strong>{lang:Interface theme}</strong></label>
+ <select name="default_template" id="default_template">
+ <!-- BEGIN template_option -->
+ <option value="{default.template_option.VALUE}" {default.template_option.SELECTED}>{default.template_option.CONTENT}</option>
+ <!-- END template_option -->
+ </select>
+ </li>
+
+ <li>
+ <label for="recent_period"><strong>{lang:Recent period}</strong></label>
+ <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{default.CONF_RECENT}" />
+ </li>
+
+ <li>
+ <label><strong>{lang:Expand all categories}</strong></label>
+ <input type="radio" class="radio" name="auto_expand" value="true" {default.EXPAND_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="auto_expand" value="false" {default.EXPAND_NO} />{lang:No}
+ </li>
+
+ <li>
+ <label><strong>{lang:Show number of comments}</strong></label>
+ <input type="radio" class="radio" name="show_nb_comments" value="true" {default.SHOW_COMMENTS_YES} />{lang:Yes}
+ <input type="radio" class="radio" name="show_nb_comments" value="false" {default.SHOW_COMMENTS_NO} />{lang:No}
+ </li>
+
+ <li>
+ <label><strong>{lang:Maximum width of the pictures}</strong></label>
+ <input type="text" size="4" maxlength="4" name="default_maxwidth" value="{default.MAXWIDTH}" />
+ </li>
+
+ <li>
+ <label><strong>{lang:Maximum height of the pictures}</strong></label>
+ <input type="text" size="4" maxlength="4" name="default_maxheight" value="{default.MAXHEIGHT}" />
+ </li>
+ </ul>
<!-- END default -->
-<!-- BEGIN upload -->
- <tr class="admin">
- <th colspan="2">{upload.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%"><strong>{upload.L_CONF_MAXSIZE}&nbsp;:</strong><br /><span class="small">{upload.L_CONF_MAXSIZE_INFO}</span></td>
- <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxfilesize" value="{upload.UPLOAD_MAXSIZE}" /></td>
- </tr>
- <tr>
- <td><strong>{upload.L_CONF_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{upload.L_CONF_MAXWIDTH_INFO}</span></td>
- <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth" value="{upload.UPLOAD_MAXWIDTH}" /></td>
- </tr>
- <tr>
- <td><strong>{upload.L_CONF_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{upload.L_CONF_MAXHEIGHT_INFO}</span></td>
- <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight" value="{upload.UPLOAD_MAXHEIGHT}" /></td>
- </tr>
- <tr>
- <td><strong>{upload.L_CONF_TN_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{upload.L_CONF_TN_MAXWIDTH_INFO}</span></td>
- <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth_thumbnail" value="{upload.TN_UPLOAD_MAXWIDTH}" /></td>
- </tr>
- <tr>
- <td><strong>{upload.L_CONF_TN_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{upload.L_CONF_TN_MAXHEIGHT_INFO}</span></td>
- <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight_thumbnail" value="{upload.TN_UPLOAD_MAXHEIGHT}" /></td>
- </tr>
-<!-- END upload -->
-<!-- BEGIN session -->
- <tr class="admin">
- <th colspan="2">{session.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%"><strong>{session.L_CONF_AUTHORIZE_REMEMBERING}&nbsp;:</strong><br /><span class="small">{session.L_CONF_AUTHORIZE_REMEMBERING_INFO}</span></td>
- <td class="row1"><input type="radio" class="radio" name="authorize_remembering" value="true" {session.AUTHORIZE_REMEMBERING_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="authorize_remembering" value="false" {session.AUTHORIZE_REMEMBERING_NO} />{L_NO}</td>
- </tr>
-<!-- END session -->
-<!-- BEGIN metadata -->
- <tr class="admin">
- <th colspan="2">{metadata.L_CONF_TITLE}</th>
- </tr>
- <tr>
- <td colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td width="70%">
- <strong>{metadata.L_CONF_EXIF}&nbsp;:</strong>
- <br /><span class="small">{metadata.L_CONF_EXIF_INFO}</span>
- </td>
- <td class="row1">
- <input type="radio" class="radio" name="use_exif" value="true" {metadata.USE_EXIF_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="use_exif" value="false" {metadata.USE_EXIF_NO} />{L_NO}
- </td>
- </tr>
- <tr>
- <td>
- <strong>{metadata.L_CONF_IPTC}&nbsp;:</strong>
- <br /><span class="small">{metadata.L_CONF_IPTC_INFO}</span>
- </td>
- <td class="row1">
- <input type="radio" class="radio" name="use_iptc" value="true" {metadata.USE_IPTC_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="use_iptc" value="false" {metadata.USE_IPTC_NO} />{L_NO}
- </td>
- </tr>
- <tr>
- <td>
- <strong>{metadata.L_CONF_SHOW_EXIF}&nbsp;:</strong>
- <br /><span class="small">{metadata.L_CONF_SHOW_EXIF_INFO}</span>
- </td>
- <td class="row1">
- <input type="radio" class="radio" name="show_exif" value="true" {metadata.SHOW_EXIF_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="show_exif" value="false" {metadata.SHOW_EXIF_NO} />{L_NO}
- </td>
- </tr>
- <tr>
- <td>
- <strong>{metadata.L_CONF_SHOW_IPTC}&nbsp;:</strong>
- <br /><span class="small">{metadata.L_CONF_SHOW_IPTC_INFO}</span>
- </td>
- <td class="row1">
- <input type="radio" class="radio" name="show_iptc" value="true" {metadata.SHOW_IPTC_YES} />{L_YES}&nbsp;&nbsp;
- <input type="radio" class="radio" name="show_iptc" value="false" {metadata.SHOW_IPTC_NO} />{L_NO}
- </td>
- </tr>
-<!-- END metadata -->
- <tr>
- <td colspan="2" align="center">
- <input type="submit" name="submit" value="{L_SUBMIT}">
- <input type="reset" name="reset" value="{L_RESET}">
- </td>
- </tr>
- </table>
+ </fieldset>
+
+ <p>
+ <input type="submit" name="submit" value="{lang:Submit}">
+ <input type="reset" name="reset" value="{lang:Reset}">
+ </p>
</form>
diff --git a/template/cclear/admin/element_set_global.tpl b/template/cclear/admin/element_set_global.tpl
index 081bb808a..7cd8d1ec5 100644
--- a/template/cclear/admin/element_set_global.tpl
+++ b/template/cclear/admin/element_set_global.tpl
@@ -17,8 +17,8 @@
<ul style="list-style-type:none;">
<!-- BEGIN in_caddie -->
- <li><input type="radio" name="caddie_action" value="empty_all" /> Empty caddie</li>
- <li><input type="radio" name="caddie_action" value="empty_selected" /> Take selected elements out of caddie</li>
+ <li><label><input type="radio" name="caddie_action" value="empty_all" /> {lang:Empty caddie}</label></li>
+ <li><label><input type="radio" name="caddie_action" value="empty_selected" /> {lang:Take selected elements out of caddie}</label></li>
<!-- END in_caddie -->
<!-- BEGIN not_in_caddie -->
diff --git a/template/cclear/admin/maintenance.tpl b/template/cclear/admin/maintenance.tpl
index e9fe86a38..6cc11816c 100644
--- a/template/cclear/admin/maintenance.tpl
+++ b/template/cclear/admin/maintenance.tpl
@@ -1,5 +1,10 @@
<!-- $Id$ -->
-<h2>{lang:Maintenance}</h2>
+<div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="template/cclear/theme/help.png" alt="(?)"></a></li>
+ </ul>
+ <h2>{lang:Maintenance}</h2>
+</div>
<ul>
<li><a href="{U_MAINT_CATEGORIES}">{lang:update categories informations}</a></li>
diff --git a/template/cclear/admin/remote_site.tpl b/template/cclear/admin/remote_site.tpl
index ac6515925..776d08a1a 100644
--- a/template/cclear/admin/remote_site.tpl
+++ b/template/cclear/admin/remote_site.tpl
@@ -1,5 +1,10 @@
<!-- $Id$ -->
-<h2>{lang:remote_sites}</h2>
+<div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="template/cclear/theme/help.png" alt="(?)"></a></li>
+ </ul>
+ <h2>{lang:remote_sites}</h2>
+</div>
<!-- BEGIN errors -->
<div class="errors">
diff --git a/template/cclear/admin/update.tpl b/template/cclear/admin/update.tpl
index 8e952c329..ee58e3da9 100644
--- a/template/cclear/admin/update.tpl
+++ b/template/cclear/admin/update.tpl
@@ -1,6 +1,11 @@
<!-- $Id$ -->
-<h2>{lang:title_update}</h2>
+<div class="titrePage">
+ <ul class="categoryActions">
+ <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="template/cclear/theme/help.png" alt="(?)"></a></li>
+ </ul>
+ <h2>{lang:title_update}</h2>
+</div>
<!-- BEGIN update -->
<h3>{L_RESULT_UPDATE}</h3>
diff --git a/template/cclear/comments.tpl b/template/cclear/comments.tpl
index c8d435f38..29af69aac 100644
--- a/template/cclear/comments.tpl
+++ b/template/cclear/comments.tpl
@@ -70,7 +70,7 @@
</fieldset>
- <input type="submit" name="submit" value="{lang:Filter and display}" />
+ <p><input type="submit" name="submit" value="{lang:Filter and display}"></p>
</form>
diff --git a/template/cclear/content.css b/template/cclear/content.css
index 88b373c41..ec060a3a0 100644
--- a/template/cclear/content.css
+++ b/template/cclear/content.css
@@ -14,6 +14,7 @@ BODY#theIdentificationPage #content,
BODY#theProfilePage #content,
BODY#theSearchPage #content,
BODY#theAboutPage #content,
+BODY#thePopuphelpPage #content,
BODY#theNotificationPage #content
{
margin: 1em;
diff --git a/template/cclear/default-colors.css b/template/cclear/default-colors.css
index f2262c85a..0e52b2eba 100644
--- a/template/cclear/default-colors.css
+++ b/template/cclear/default-colors.css
@@ -118,18 +118,40 @@ input, select, textarea {
border: 1px solid gray;
}
-.errors { /* Errors display */
- color:red;
- background-color:#ffe1e1;
- font-weight:bold;
- text-align:left;
- margin:5px;
- border:1px solid red;
-}
-.errors ul li
+#errors { /* Errors display */
+ color: red;
+ background-color: #ffe1e1;
+ font-weight: bold;
+ text-align: left;
+ margin: 5px;
+ border: 1px solid red;
+ background-image: url(admin/images/errors.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ padding: 10px 50px 10px 10px;
+}
+
+#errors ul li
{
- font-weight:normal;
+ font-weight: normal;
}
+
+/**
+ * Informations box in administration
+ */
+#infos {
+ text-align: left;
+ background-color: palegreen;
+ background-image: url(admin/images/infos.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ color: darkgreen;
+ font-weight: bold;
+ margin: 5px;
+ border:1px solid gray;
+ padding: 10px 50px 10px 10px;
+}
+
LEGEND {
font-style: italic;
}
diff --git a/template/cclear/default-layout.css b/template/cclear/default-layout.css
index 33adf19e8..7f1a856ec 100644
--- a/template/cclear/default-layout.css
+++ b/template/cclear/default-layout.css
@@ -2,6 +2,7 @@
@import "menubar.css";
@import "content.css";
@import "image.css";
+@import "popuphelp.css";
/* $Id$ */
@@ -125,21 +126,6 @@ select.categoryList {
}
/** go to an admin.css ? **/
-/**
- * Informations box in administration
- */
-#infos {
- text-align: left;
- background-color: #eee;
- background-image: url(admin/images/infos.png);
- background-repeat: no-repeat;
- background-position: top right;
- color: black;
- font-weight: bold;
- margin: 5px;
- border:1px solid gray;
- padding: 10px 50px 10px 10px;
-}
.table2 {
border: 1px solid black;
@@ -272,4 +258,10 @@ FORM#categoryPermissions LI {
BODY#theAdminPage #theHeader P {
display: none;
-} \ No newline at end of file
+}
+
+BODY#thePopuphelpPage #copyright {
+ color: green;
+ display: none;
+}
+
diff --git a/template/cclear/footer.tpl b/template/cclear/footer.tpl
index ea92324d8..d4c18aff8 100644
--- a/template/cclear/footer.tpl
+++ b/template/cclear/footer.tpl
@@ -8,10 +8,11 @@
to show the origin of the script...-->
{L_POWERED_BY} <a href="http://www.phpwebgallery.net" class="back">PhpWebGallery</a>
- {VERSION} -
-
- {L_SEND_MAIL}
- <a href="mailto:{MAIL}?subject={L_TITLE_MAIL}">{L_WEBMASTER}</a>
+ {VERSION}
+ <!-- BEGIN contact -->
+ - {L_SEND_MAIL}
+ <a href="mailto:{contact.MAIL}?subject={L_TITLE_MAIL}">{lang:Webmaster}</a>
+ <!-- END contact -->
</div> <!-- copyright -->
</div> <!-- the_page -->
diff --git a/template/cclear/menubar.css b/template/cclear/menubar.css
index 46ba6bb86..9f2b9c2a3 100644
--- a/template/cclear/menubar.css
+++ b/template/cclear/menubar.css
@@ -64,4 +64,3 @@ BODY#theAdminPage #menubar {
#menubar INPUT {
text-indent: 2px;
}
-
diff --git a/template/cclear/picture.tpl b/template/cclear/picture.tpl
index 3f2793fbe..e05b4ddd1 100644
--- a/template/cclear/picture.tpl
+++ b/template/cclear/picture.tpl
@@ -9,6 +9,7 @@
</div>
<div id="imageToolBar">
+
<div class="randomButtons">
<a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}"><img src="template/cclear/theme/slideshow.png" alt="{L_SLIDESHOW}"></a>
<a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="template/cclear/theme/metadata.png" alt="{L_PICTURE_METADATA}"></a>
@@ -24,7 +25,11 @@
<!-- BEGIN admin -->
<a href="{U_ADMIN}" title="{L_ADMIN}"><img src="template/cclear/theme/preferences.png" alt="{L_ADMIN}"></a>
<!-- END admin -->
+<!-- BEGIN caddie -->
+ <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="./template/default/theme/caddie_add.png" alt="{lang:caddie}"/></a>
+<!-- END caddie -->
</div>
+
<div class="navButtons">
<!-- BEGIN next -->
<a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}"><img src="template/cclear/theme/right.png" alt="next"></a>
@@ -34,6 +39,7 @@
<a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}"><img src="template/cclear/theme/left.png" alt="previous"></a>
<!-- END previous -->
</div>
+
</div> <!-- imageToolBar -->
<div id="theImage">
diff --git a/template/cclear/popuphelp.css b/template/cclear/popuphelp.css
new file mode 100644
index 000000000..4c73d212d
--- /dev/null
+++ b/template/cclear/popuphelp.css
@@ -0,0 +1,34 @@
+BODY#thePopuphelpPage #copyright {
+ display: none;
+}
+
+BODY#thePopuphelpPage #theHeader P {
+ display: none;
+}
+
+BODY#thePopuphelpPage #content P {
+ text-align: justify;
+ padding: 0.5em;
+}
+
+BODY#thePopuphelpPage #content OL LI,
+BODY#thePopuphelpPage #content UL LI
+{
+ margin-bottom: 0.5em;
+}
+
+BODY#thePopuphelpPage #content SPAN.pwgScreen {
+ border-bottom: 1px dotted black;
+}
+
+BODY#thePopuphelpPage #content SPAN.filename:before {
+ content: "[";
+}
+
+BODY#thePopuphelpPage #content SPAN.filename:after {
+ content: "]";
+}
+
+BODY#thePopuphelpPage P#pageBottomActions A {
+ border: none;
+}
diff --git a/template/cclear/popuphelp.tpl b/template/cclear/popuphelp.tpl
new file mode 100644
index 000000000..60e8c3ddc
--- /dev/null
+++ b/template/cclear/popuphelp.tpl
@@ -0,0 +1,5 @@
+<div id="content">
+{HELP_CONTENT}
+</div> <!-- content -->
+
+<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{lang:Close this window}"><img src="template/cclear/theme/exit.png" alt="close"></a></p>
diff --git a/template/cclear/theme/exit.png b/template/cclear/theme/exit.png
new file mode 100644
index 000000000..c9a87b5cb
--- /dev/null
+++ b/template/cclear/theme/exit.png
Binary files differ
diff --git a/template/cclear/theme/help.png b/template/cclear/theme/help.png
new file mode 100644
index 000000000..39d089e72
--- /dev/null
+++ b/template/cclear/theme/help.png
Binary files differ