- 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


git-svn-id: http://piwigo.org/svn/trunk@858 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2005-09-03 16:36:05 +00:00
parent 857eec2218
commit 7eae759590
42 changed files with 988 additions and 967 deletions
-3
View File
@@ -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'),
+58 -152
View File
@@ -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;
}
}
+1 -1
View File
@@ -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);
+30 -13
View File
@@ -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'))
$exif = get_sync_exif_data($file);
if (count($exif) > 0)
{
die('Exif extension not available, admin should disable exif use');
}
if ($exif = @read_exif_data($file))
{
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);
-351
View File
@@ -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');
?>
+1
View File
@@ -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',
)
);
+3
View File
@@ -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 |
// +-----------------------------------------------------------------------+
+6
View File
@@ -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 |
// +-----------------------------------------------------------------------+
+127 -89
View File
@@ -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)
{
if (-1 != $_POST['associate'])
{
$datas = array();
array_push($page['errors'], l10n('Select at least one user'));
}
}
$query = '
// +-----------------------------------------------------------------------+
// | 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 (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
{
array_push($page['errors'], l10n('You need to confirm deletion'));
}
}
}
// +-----------------------------------------------------------------------+
// | 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)
{
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);
}
}
if (-1 != $_POST['dissociate'])
$associated = array_from_query($query, 'user_id');
$associable = array_diff($collection, $associated);
if (count($associable) > 0)
{
$query = '
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);
}
}
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;
}
// properties to set for the collection (a user list)
else
{
$test = $formfield.'_action';
}
if ($_POST[$test] != 'leave')
{
array_push($dbfields['update'], $formfield);
}
}
// updating elements is useful only if needed...
if (count($dbfields['update']) > 0)
{
$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)
foreach ($collection as $user_id)
{
// 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);
}
}
// updating elements is useful only if needed...
if (count($dbfields['update']) > 0)
{
$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'])
{
// 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];
}
$data[$dbfield] = $_POST[$dbfield];
}
// Webmaster (user_id = 1) status must not be changed
if (1 == $user_id and isset($data['status']))
{
$data['status'] = 'admin';
}
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);
}
}
-1
View File
@@ -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');
+18
View File
@@ -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
+171 -107
View File
@@ -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,50 +86,6 @@ $conf['top_number'] = 15;
// anti-flood_time : number of seconds between 2 comments : 0 to disable
$conf['anti-flood_time'] = 60;
// 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
// to '2#025') then you need to have $lang['iptc_keywords'] set in
// language/$user['language']/common.lang.php. If you don't have the lang
// var set, the key will be simply displayed
//
// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
'iptc_keywords' => '2#025',
'iptc_caption_writer' => '2#122',
'iptc_byline_title' => '2#085',
'iptc_caption' => '2#120'
);
// 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
$conf['use_iptc_mapping'] = array(
'keywords' => '2#025',
'date_creation' => '2#055',
'author' => '2#122',
'name' => '2#005',
'comment' => '2#120'
);
// 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']
//
// The key displayed in picture.php will be $lang['exif_field_Make'] for
// example and if it exists. For compound fields, only take into account the
// last part : for key 'COMPUTED;ApertureFNumber', you need
// $lang['exif_field_ApertureFNumber']
//
// 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');
// calendar_datefield : date field of table "images" used for calendar
// catgory
$conf['calendar_datefield'] = 'date_creation';
@@ -136,33 +93,6 @@ $conf['calendar_datefield'] = 'date_creation';
// rate : enable feature for rating elements
$conf['rate'] = true;
// remember_me_length : time of validity for "remember me" cookies, in
// seconds.
$conf['remember_me_length'] = 31536000;
// session_length : time of validity for normal session, in seconds.
$conf['session_length'] = 3600;
// session_id_size : a session identifier is compound of alphanumeric
// characters and is case sensitive. Each character is among 62
// possibilities. The number of possible sessions is
// 62^$conf['session_id_size'].
//
// 62^5 = 916,132,832
// 62^10 = 839,299,365,868,340,224
//
$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;
// show_queries : for debug purpose, show queries and execution times
$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';
@@ -213,10 +143,6 @@ $conf['show_version'] = true;
// 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;
@@ -224,35 +150,6 @@ $conf['show_thumbnail_caption'] = true;
// name ?
$conf['show_picture_name_on_title'] = true;
// 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';
// user_fields : mapping between generic field names and table specific
// field names. For example, in PWG, the mail address is names
// "mail_address" and in punbb, it's called "email".
$conf['user_fields'] = array(
'id' => 'id',
'username' => 'username',
'password' => 'password',
'email' => 'mail_address'
);
// pass_convert : function to crypt or hash the clear user password to store
// it in the database
$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 ?
//
@@ -279,4 +176,171 @@ $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
// to '2#025') then you need to have $lang['iptc_keywords'] set in
// language/$user['language']/common.lang.php. If you don't have the lang
// var set, the key will be simply displayed
//
// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
'iptc_keywords' => '2#025',
'iptc_caption_writer' => '2#122',
'iptc_byline_title' => '2#085',
'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
$conf['use_iptc_mapping'] = array(
'keywords' => '2#025',
'date_creation' => '2#055',
'author' => '2#122',
'name' => '2#005',
'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']
//
// The key displayed in picture.php will be $lang['exif_field_Make'] for
// example and if it exists. For compound fields, only take into account the
// last part : for key 'COMPUTED;ApertureFNumber', you need
// $lang['exif_field_ApertureFNumber']
//
// for PHP version newer than 4.1.2 :
// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
//
$conf['show_exif_fields'] = array(
'Make',
'Model',
'DateTimeOriginal',
'COMPUTED;ApertureFNumber'
);
// use_exif: Use EXIF data during database synchronization with files
// metadata
$conf['use_exif'] = false;
// 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.
$conf['remember_me_length'] = 31536000;
// session_length : time of validity for normal session, in seconds.
$conf['session_length'] = 3600;
// session_id_size : a session identifier is compound of alphanumeric
// characters and is case sensitive. Each character is among 62
// possibilities. The number of possible sessions is
// 62^$conf['session_id_size'].
//
// 62^5 = 916,132,832
// 62^10 = 839,299,365,868,340,224
//
$conf['session_id_size'] = 10;
// +-----------------------------------------------------------------------+
// | debug |
// +-----------------------------------------------------------------------+
// show_queries : for debug purpose, show queries and execution times
$conf['show_queries'] = false;
// show_gt : display generation time at the bottom of each page
$conf['show_gt'] = true;
// debug_l10n : display a warning message each time an unset language key is
// accessed
$conf['debug_l10n'] = false;
// +-----------------------------------------------------------------------+
// | authentication |
// +-----------------------------------------------------------------------+
// apache_authentication : use Apache authentication as reference instead of
// users table ?
$conf['apache_authentication'] = false;
// users_table : which table is the reference for users ? Can be a different
// table than PhpWebGallery table
$conf['users_table'] = $prefixeTable.'users';
// user_fields : mapping between generic field names and table specific
// field names. For example, in PWG, the mail address is names
// "mail_address" and in punbb, it's called "email".
$conf['user_fields'] = array(
'id' => 'id',
'username' => 'username',
'password' => 'password',
'email' => 'mail_address'
);
// pass_convert : function to crypt or hash the clear user password to store
// it in the database
$conf['pass_convert'] = create_function('$s', 'return md5($s);');
// guest_id : id of the anonymous user
$conf['guest_id'] = 2;
// webmaster_id : webmaster'id.
$conf['webmaster_id'] = 1;
// +-----------------------------------------------------------------------+
// | upload |
// +-----------------------------------------------------------------------+
// upload_maxfilesize: maximum filesize for the uploaded pictures. In
// kilobytes.
$conf['upload_maxfilesize'] = 200;
// upload_maxheight: maximum height authorized for the uploaded images. In
// pixels.
$conf['upload_maxheight'] = 800;
// 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;
?>
+42
View File
@@ -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;
}
?>
+19 -2
View File
@@ -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
//
+11 -1
View File
@@ -29,4 +29,14 @@ for( i=0; i<len; i++)
function phpWGOpenWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}
}
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'
);
}
+2 -1
View File
@@ -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;
}
-7
View File
@@ -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');
+9 -9
View File
@@ -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,
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1 @@
<h2>Synchronize</h2>
+29 -1
View File
@@ -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');
+64
View File
@@ -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');
?>
-1
View File
@@ -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');
?>
-3
View File
@@ -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>
+109 -189
View File
@@ -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>
+2 -2
View File
@@ -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 -->
+6 -1
View File
@@ -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>
+6 -1
View File
@@ -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">
+6 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
+1
View File
@@ -14,6 +14,7 @@ BODY#theIdentificationPage #content,
BODY#theProfilePage #content,
BODY#theSearchPage #content,
BODY#theAboutPage #content,
BODY#thePopuphelpPage #content,
BODY#theNotificationPage #content
{
margin: 1em;
+31 -9
View File
@@ -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 { /* 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
#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;
}
+8 -16
View File
@@ -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;
}
}
BODY#thePopuphelpPage #copyright {
color: green;
display: none;
}
+5 -4
View File
@@ -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 -->
-1
View File
@@ -64,4 +64,3 @@ BODY#theAdminPage #menubar {
#menubar INPUT {
text-indent: 2px;
}
+6
View File
@@ -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">
+34
View File
@@ -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;
}
+5
View File
@@ -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>
Binary file not shown.
Binary file not shown.