From b531871f125265596ee9a7c550fdd3f4bfd0d19e Mon Sep 17 00:00:00 2001 From: gweltas Date: Wed, 31 Mar 2004 17:26:31 +0000 Subject: [PATCH] - Category upload admin control panel git-svn-id: http://piwigo.org/svn/trunk@403 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin.php | 3 + admin/admin_phpinfo.php | 2 +- admin/admin_upload.php | 93 ++++++++++ admin/cat_list.php | 10 +- admin/cat_modify.php | 201 ++++++++-------------- category.php | 2 +- language/en_UK.iso-8859-1/admin.lang.php | 163 +++++++++--------- language/en_UK.iso-8859-1/common.lang.php | 11 +- template/default/admin.tpl | 2 +- template/default/admin/admin_upload.tpl | 22 +++ template/default/admin/cat_modify.tpl | 72 ++++++++ template/default/admin/cat_modify.vtp | 89 ---------- template/default/category.tpl | 2 +- template/default/default.css | 32 +--- 14 files changed, 367 insertions(+), 337 deletions(-) create mode 100644 admin/admin_upload.php create mode 100644 template/default/admin/admin_upload.tpl create mode 100644 template/default/admin/cat_modify.tpl delete mode 100644 template/default/admin/cat_modify.vtp diff --git a/admin.php b/admin.php index 0076d1fb3..83714c0d6 100644 --- a/admin.php +++ b/admin.php @@ -111,6 +111,8 @@ switch ( $_GET['page'] ) $title = $lang['title_categories']; $page_valide = true; break; case 'cat_modify': $title = $lang['title_edit_cat']; $page_valide = true; break; + case 'admin_upload': + $title = $lang['upload']; $page_valide = true; break; case 'infos_images': $title = $lang['title_info_images']; $page_valide = true; break; case 'waiting': @@ -202,6 +204,7 @@ $template->assign_vars(array( 'U_USERS'=>add_session_id($link_start.'user_search' ), 'U_GROUPS'=>add_session_id($link_start.'group_list' ), 'U_CATEGORIES'=>add_session_id($link_start.'cat_list' ), + 'U_UPLOAD'=>add_session_id($link_start.'admin_upload' ), 'U_WAITING'=>add_session_id($link_start.'waiting' ), 'U_COMMENTS'=>add_session_id($link_start.'comments' ), 'U_CAT_UPDATE'=>add_session_id($link_start.'update&update=cats' ), diff --git a/admin/admin_phpinfo.php b/admin/admin_phpinfo.php index db0b52bb6..ebae7ab52 100644 --- a/admin/admin_phpinfo.php +++ b/admin/admin_phpinfo.php @@ -67,7 +67,7 @@ switch ($layout) $output = preg_replace('#(\w),(\w)#', '\1, \2', $output); $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output); $output = preg_replace('#(.*?)(.*?)#s', '
\2\1
', $output); - $output = preg_replace('##', '', $output); + $output = preg_replace('##', '', $output); $output = preg_replace('##', '', $output); $output = preg_replace('#class="e"#', 'class="row1" nowrap="nowrap"', $output); $output = preg_replace('#class="v"#', 'class="row2"', $output); diff --git a/admin/admin_upload.php b/admin/admin_upload.php new file mode 100644 index 000000000..28f210989 --- /dev/null +++ b/admin/admin_upload.php @@ -0,0 +1,93 @@ + | +// | 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' ); +$uploadable = ''; +$categories = ''; + +if (isset($_POST['submit']) || isset($_POST['delete'])) +{ + $query = 'UPDATE '.CATEGORIES_TABLE; + $query.= ' SET uploadable = '; + if (isset($_POST['submit'])) + $query.="'true'"; + else + $query.="'false'"; + $query.= ' WHERE id IN ('; + $nb=count($cat_data); + foreach($cat_data as $i=>$id) + { + $query.= $id; + if ($i+1<$nb) $query.=','; + } + $query.=');'; + mysql_query ($query); +} + +// Cache management +$query = 'SELECT id, name, uploadable FROM '.CATEGORIES_TABLE; +$query.= ' WHERE dir IS NOT NULL'; +$query.= ' ORDER BY name ASC'; +$query.= ';'; +$result = mysql_query( $query ); +while ( $row = mysql_fetch_assoc( $result ) ) +{ + if ($row['uploadable'] == 'false') + { + $categories.=''; + } + else + { + $uploadable.=''; + } +} + +//----------------------------------------------------- template initialization +$template->set_filenames( array('upload'=>'admin/admin_upload.tpl') ); + +$template->assign_vars(array( + 'PRIVATE_CATEGORIES'=>$categories, + 'UPLOADABLE_CATEGORIES'=>$uploadable, + + 'L_UPLOAD_TITLE'=>$lang['cat_upload'], + 'L_SUBMIT'=>$lang['submit'], + 'L_DELETE'=>$lang['delete'], + 'L_RESET'=>$lang['reset'], + 'L_UPLOAD_INFO'=>$lang['cat_upload_info'], + 'L_AUTHORIZED'=>$lang['authorized'], + 'L_FORBIDDEN'=>$lang['forbidden'] + )); + +//----------------------------------------------------------- sending html code +$template->assign_var_from_handle('ADMIN_CONTENT', 'upload'); + +?> \ No newline at end of file diff --git a/admin/cat_list.php b/admin/cat_list.php index 1f021bf0c..08446cf74 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -220,7 +220,7 @@ if ( sizeof( $errors ) != 0 ) while (list ($id,$category) = each($categories)) { - if ($category['status'] == 'private') + if ($category['visible'] == 'false') { $category_image = ''.$lang['cat_private'].''; @@ -255,10 +255,10 @@ while (list ($id,$category) = each($categories)) 'U_CATEGORY'=>add_session_id( $simple_url.'parent_id='.$category['id']), 'U_MOVE_UP'=>add_session_id( $url.'up='.$category['id'] ), 'U_MOVE_DOWN'=>add_session_id( $url.'down='.$category['id'] ), - 'U_CAT_EDIT'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id='.$row['id'] ), + 'U_CAT_EDIT'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id='.$category['id'] ), 'U_CAT_DELETE'=>add_session_id( $url.'delete='.$category['id'] ), - 'U_INFO_IMG'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=infos_images&cat_id='.$row['id'] ), - 'U_CAT_UPDATE'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=update&update='.$row['id'] ) + 'U_INFO_IMG'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=infos_images&cat_id='.$category['id'] ), + 'U_CAT_UPDATE'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=update&update='.$category['id'] ) )); if ( !empty($category['dir'])) @@ -269,7 +269,7 @@ while (list ($id,$category) = each($categories)) { $template->assign_block_vars('category.virtual' ,array()); } - $url = add_session_id( './admin.php?page=cat_modify&cat='.$row['id'] ); + $url = add_session_id( PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat='.$row['id'] ); if ( $category['nb_images'] > 0 ) { $template->assign_block_vars('category.image_info' ,array()); diff --git a/admin/cat_modify.php b/admin/cat_modify.php index ba1cd7d9d..ea33f20f4 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -25,47 +25,46 @@ // | USA. | // +-----------------------------------------------------------------------+ -include_once( './admin/include/isadmin.inc.php' ); -//----------------------------------------------------- template initialization -$sub = $vtp->Open( './template/'.$user['template'].'/admin/cat_modify.vtp' ); -$tpl = array( 'remote_site','editcat_confirm','editcat_back','editcat_title1', - 'editcat_name','editcat_comment','editcat_status', - 'editcat_visible','editcat_visible_info', 'submit', - 'editcat_uploadable','cat_virtual','cat_parent' ); -templatize_array( $tpl, 'lang', $sub ); -//---------------------------------------------------------------- verification -if ( !is_numeric( $_GET['cat'] ) ) +if( !defined("PHPWG_ROOT_PATH") ) { - $_GET['cat'] = '-1'; + die ("Hacking attempt!"); } +include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); + +//---------------------------------------------------------------- verification +if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) ) +{ + $_GET['cat_id'] = '-1'; +} + +$template->set_filenames( array('categories'=>'admin/cat_modify.tpl') ); + //--------------------------------------------------------- form criteria check if ( isset( $_POST['submit'] ) ) { // if new status is different from previous one, deletion of all related // links for access rights $query = 'SELECT status'; - $query.= ' FROM '.PREFIX_TABLE.'categories'; - $query.= ' WHERE id = '.$_GET['cat']; + $query.= ' FROM '.CATEGORIES_TABLE; + $query.= ' WHERE id = '.$_GET['cat_id']; $query.= ';'; $row = mysql_fetch_array( mysql_query( $query ) ); - $query = 'UPDATE '.PREFIX_TABLE.'categories'; - + $query = 'UPDATE '.CATEGORIES_TABLE; $query.= ' SET name = '; - if ( $_POST['name'] == '' ) + if ( empty($_POST['name'])) $query.= 'NULL'; else $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'"; $query.= ', comment = '; - if ( $_POST['comment'] == '' ) + if ( empty($_POST['comment'])) $query.= 'NULL'; else $query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'"; $query.= ", status = '".$_POST['status']."'"; $query.= ", visible = '".$_POST['visible']."'"; - if ( isset( $_POST['uploadable'] ) ) $query.= ", uploadable = '".$_POST['uploadable']."'"; @@ -77,7 +76,7 @@ if ( isset( $_POST['submit'] ) ) else $query.= $_POST['associate']; } - $query.= ' WHERE id = '.$_GET['cat']; + $query.= ' WHERE id = '.$_GET['cat_id']; $query.= ';'; mysql_query( $query ); @@ -85,13 +84,13 @@ if ( isset( $_POST['submit'] ) ) { // deletion of all access for groups concerning this category $query = 'DELETE'; - $query.= ' FROM '.PREFIX_TABLE.'group_access'; - $query.= ' WHERE cat_id = '.$_GET['cat']; + $query.= ' FROM '.GROUP_ACCESS_TABLE; + $query.= ' WHERE cat_id = '.$_GET['cat_id']; mysql_query( $query ); // deletion of all access for users concerning this category $query = 'DELETE'; - $query.= ' FROM '.PREFIX_TABLE.'user_access'; - $query.= ' WHERE cat_id = '.$_GET['cat']; + $query.= ' FROM '.USER_ACCESS_TABLE; + $query.= ' WHERE cat_id = '.$_GET['cat_id']; mysql_query( $query ); // resynchronize all users synchronize_all_users(); @@ -106,116 +105,67 @@ if ( isset( $_POST['submit'] ) ) { check_favorites( $row['id'] ); } - - $vtp->addSession( $sub, 'confirmation' ); - $url = add_session_id( './admin.php?page=cat_list' ); - $vtp->setVar( $sub, 'confirmation.back_url', $url ); - $vtp->closeSession( $sub, 'confirmation' ); + $template->assign_block_vars('confirmation' ,array()); } -//------------------------------------------------------------------------ form -$form_action = './admin.php?page=cat_modify&cat='.$_GET['cat']; -$vtp->setVar( $sub, 'form_action', add_session_id( $form_action ) ); -$query = 'SELECT a.id,name,dir,status,comment,uploadable'; -$query.= ',id_uppercat,site_id,galleries_url,visible'; -$query.= ' FROM '.PREFIX_TABLE.'categories as a, '.PREFIX_TABLE.'sites as b'; -$query.= ' WHERE a.id = '.$_GET['cat']; +$query = 'SELECT a.*, b.*'; +$query.= ' FROM '.CATEGORIES_TABLE.' as a, '.SITES_TABLE.' as b'; +$query.= ' WHERE a.id = '.$_GET['cat_id']; $query.= ' AND a.site_id = b.id'; $query.= ';'; -$row = mysql_fetch_array( mysql_query( $query ) ); +$category = mysql_fetch_array( mysql_query( $query ) ); -if ( !isset( $row['dir'] ) ) $row['dir'] = ''; -if ( !isset( $row['id_uppercat'] ) ) $row['id_uppercat'] = ''; +// Navigation path +$current_category = get_cat_info($_GET['cat_id']); +$url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&parent_id='; +$navigation = '
'; +$navigation.= $lang['gallery_index'].'->'; +$navigation.= get_cat_display_name($current_category['name'], '->', $url); -$result = get_cat_info( $row['id'] ); -// cat name -$cat_name = get_cat_display_name( $result['name'], ' - ' ); -$vtp->setVar( $sub, 'cat:name', $cat_name ); -// cat dir -if ( $row['dir'] != '' ) +$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_modify&cat_id='.$_GET['cat_id']; +$access = ($category['status']=='public')?'ACCESS_FREE':'ACCESS_RESTRICTED'; +$lock = ($category['visible']=='true')?'UNLOCKED':'LOCKED'; + +//----------------------------------------------------- template initialization + +$template->assign_vars(array( + 'CATEGORIES_NAV'=>$navigation, + 'CAT_NAME'=>$category['name'], + 'CAT_COMMENT'=>$category['comment'], + 'CATEGORY_DIR'=>$category['dir'], + 'SITE_URL'=>$category['galleries_url'], + + $access=>'checked="checked"', + $lock=>'checked="checked"', + + 'L_EDIT_CONFIRM'=>$lang['editcat_confirm'], + 'L_EDIT_NAME'=>$lang['description'], + 'L_STORAGE'=>$lang['storage'], + 'L_EDIT_COMMENT'=>$lang['comment'], + 'L_EDIT_STATUS'=>$lang['conf_general_access'], + 'L_EDIT_STATUS_INFO'=>$lang['cat_access_info'], + 'L_ACCESS_FREE'=>$lang['conf_general_access_1'], + 'L_ACCESS_RESTRICTED'=>$lang['conf_general_access_2'], + 'L_EDIT_LOCK'=>$lang['cat_lock'], + 'L_EDIT_LOCK_INFO'=>$lang['cat_lock_info'], + 'L_YES'=>$lang['yes'], + 'L_NO'=>$lang['no'], + 'L_SUBMIT'=>$lang['submit'], + + 'F_ACTION'=>add_session_id($form_action) + )); + +if ( !empty($category['dir'])) { - $vtp->addSession( $sub, 'storage' ); - $vtp->setVar( $sub, 'storage.dir', $row['dir'] ); - $vtp->closeSession( $sub, 'storage' ); + $template->assign_block_vars('storage' ,array()); } -else + +if ( $category['site_id'] != 1 ) { - $vtp->addSession( $sub, 'virtual' ); - $vtp->closeSession( $sub, 'virtual' ); -} -// remote site ? -if ( $row['site_id'] != 1 ) -{ - $vtp->addSession( $sub, 'server' ); - $vtp->setVar( $sub, 'server.url', $row['galleries_url'] ); - $vtp->closeSession( $sub, 'server' ); -} -$vtp->setVar( $sub, 'name', $row['name'] ); -if ( !isset( $row['comment'] ) ) $row['comment'] = ''; -$vtp->setVar( $sub, 'comment', $row['comment'] ); -// status : public, private... -$options = get_enums( PREFIX_TABLE.'categories', 'status' ); -foreach ( $options as $option ) { - $vtp->addSession( $sub, 'status_option' ); - $vtp->setVar( $sub, 'status_option.option', $lang[$option] ); - $vtp->setVar( $sub, 'status_option.value', $option ); - if ( $option == $row['status'] ) - { - $vtp->setVar( $sub, 'status_option.checked', ' checked="checked"' ); - } - $vtp->closeSession( $sub, 'status_option' ); -} -// visible : true or false -$vtp->addSession( $sub, 'visible_option' ); -$vtp->setVar( $sub, 'visible_option.value', 'true' ); -$vtp->setVar( $sub, 'visible_option.option', $lang['yes'] ); -$checked = ''; -if ( $row['visible'] == 'true' ) -{ - $checked = ' checked="checked"'; -} -$vtp->setVar( $sub, 'visible_option.checked', $checked ); -$vtp->closeSession( $sub, 'visible_option' ); -$vtp->addSession( $sub, 'visible_option' ); -$vtp->setVar( $sub, 'visible_option.value', 'false' ); -$vtp->setVar( $sub, 'visible_option.option', $lang['no'] ); -$checked = ''; -if ( $row['visible'] == 'false' ) -{ - $checked = ' checked="checked"'; -} -$vtp->setVar( $sub, 'visible_option.checked', $checked ); -$vtp->closeSession( $sub, 'visible_option' ); -// uploadable : true or false -// a category can be uploadable if : -// 1. upload is authorized -// 2. category is not virtual -// 3. category is on the main site -if ( $conf['upload_available'] and $row['dir'] != '' and $row['site_id'] == 1 ) -{ - $vtp->addSession( $sub, 'uploadable' ); - $vtp->addSession( $sub, 'uploadable_option' ); - $vtp->setVar( $sub, 'uploadable_option.value', 'true' ); - $vtp->setVar( $sub, 'uploadable_option.option', $lang['yes'] ); - $checked = ''; - if ( $row['uploadable'] == 'true' ) - { - $checked = ' checked="checked"'; - } - $vtp->setVar( $sub, 'uploadable_option.checked', $checked ); - $vtp->closeSession( $sub, 'uploadable_option' ); - $vtp->addSession( $sub, 'uploadable_option' ); - $vtp->setVar( $sub, 'uploadable_option.value', 'false' ); - $vtp->setVar( $sub, 'uploadable_option.option', $lang['no'] ); - $checked = ''; - if ( $row['uploadable'] == 'false' ) - { - $checked = ' checked="checked"'; - } - $vtp->setVar( $sub, 'uploadable_option.checked', $checked ); - $vtp->closeSession( $sub, 'uploadable_option' ); - $vtp->closeSession( $sub, 'uploadable' ); + $template->assign_block_vars('storage' ,array()); } + +/* // can the parent category be changed ? (is the category virtual ?) if ( $row['dir'] == '' ) { @@ -223,7 +173,7 @@ if ( $row['dir'] == '' ) // We only show a List Of Values if the number of categories is less than // $conf['max_LOV_categories'] $query = 'SELECT COUNT(id) AS nb_total_categories'; - $query.= ' FROM '.PREFIX_TABLE.'categories'; + $query.= ' FROM '.CATEGORIES_TABLE; $query.= ';'; $countrow = mysql_fetch_array( mysql_query( $query ) ); if ( $countrow['nb_total_categories'] < $conf['max_LOV_categories'] ) @@ -248,6 +198,7 @@ if ( $row['dir'] == '' ) } $vtp->closeSession( $sub, 'parent' ); } +*/ //----------------------------------------------------------- sending html code -$vtp->Parse( $handle , 'sub', $sub ); +$template->assign_var_from_handle('ADMIN_CONTENT', 'categories'); ?> diff --git a/category.php b/category.php index ed50a5762..02384fbc8 100644 --- a/category.php +++ b/category.php @@ -488,7 +488,7 @@ if ( isset ( $page['cat'] ) ) // category comment if ( isset( $page['comment'] ) and $page['comment'] != '' ) { - $template->assign_block_vars('cat_infos.navigation',array('COMMENTS' => $page['cat_comment'])); + $template->assign_block_vars('cat_infos.comment',array('COMMENTS' => $page['comment'])); } } //------------------------------------------------------------ log informations diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index 534161f24..02dc4d9a0 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -39,6 +39,8 @@ $lang['permissions'] = 'Permissions'; $lang['update'] = 'Synchronize'; $lang['storage'] = 'Directory'; $lang['edit'] = 'Edit'; +$lang['authorized'] = 'Authorized'; +$lang['forbidden'] = 'Forbidden'; // Specific words $lang['phpinfos'] = 'PHP Information'; @@ -54,6 +56,14 @@ $lang['cat_virtual'] = 'Virtual category'; $lang['cat_public'] = 'Public category'; $lang['cat_private'] = 'Private category'; $lang['cat_image_info'] = 'Images info'; +$lang['editcat_status'] = 'Status'; +$lang['editcat_confirm'] = 'Category informations updated successfully.'; +$lang['editcat_perm'] = 'To set permissions for this category, click'; +$lang['cat_upload'] = 'Select uploadable categories'; +$lang['cat_upload_info'] = 'Only non virtual categories are shown.'; +$lang['cat_lock'] = 'Lock'; +$lang['cat_lock_info'] = 'This category will temporary been disabled for maintenance.'; +$lang['cat_access_info'] = 'Permission management.'; // Titles $lang['admin_panel'] = 'Administration Panel'; @@ -71,9 +81,6 @@ $lang['title_thumbnails_2'] = 'for'; $lang['title_default'] = 'PhpWebGallery administration'; $lang['title_waiting'] = 'Pictures waiting for validation'; -$lang['menu_add_user'] = 'add'; -$lang['menu_list_user'] = 'list'; - //Error messages $lang['conf_err_prefixe'] = 'thumbnail\'s prefix mustn\'t contain any accentued character'; $lang['conf_err_mail'] = 'e-mail address refused, it must be like name@server.com'; @@ -82,6 +89,72 @@ $lang['conf_err_sid_time'] = 'the session time must be an integer value between $lang['conf_err_max_user_listbox'] = 'the max user listbox number must be an integer value between 0 and 255'; $lang['cat_error_name'] = 'The name of a category mustn\'t be empty'; +//Configuration +$lang['conf_confirmation'] = 'Information data registered in database'; +$lang['conf_general_title'] = 'Main configuration'; +$lang['conf_general_webmaster'] = 'Webmaster login'; +$lang['conf_general_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration'; +$lang['conf_general_mail'] = 'Webmaster mail adress'; +$lang['conf_general_mail_info'] = 'Visitors will be able to contact by this mail'; +$lang['conf_general_prefix'] = 'Thumbnail prefix'; +$lang['conf_general_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.'; +$lang['conf_general_access'] = 'Access type'; +$lang['conf_general_access_1'] = 'Free'; +$lang['conf_general_access_2'] = 'Restricted'; +$lang['conf_general_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website
- restricted : the webmaster create accounts. Only registered users can enter the site'; +$lang['conf_comments'] = 'Users comments'; +$lang['conf_comments_title'] = 'Configuration of users comments'; +$lang['conf_comments_show_comments'] = $lang['conf_comments']; +$lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?'; +$lang['conf_comments_comments_number'] = 'Number of comments per page'; +$lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.'; +$lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.'; +$lang['conf_remote_site_delete_info'] = 'Deleting a remote server will delete all the image and the categories in relation with this server.'; +$lang['conf_upload_title'] = 'Configuration of the users upload'; +$lang['conf_upload_available'] = 'authorized the upload of pictures'; +$lang['conf_upload_maxfilesize'] = 'maximum filesize'; +$lang['conf_upload_maxfilesize_info'] = 'Maximum filesize for the uploaded pictures. Must be a number between 10 and 1000 KB.'; +$lang['conf_err_upload_maxfilesize'] = 'Maximum filesize for the uploaded pictures must be a number between 10 and 1000 KB.'; +$lang['conf_upload_maxwidth'] = 'maximum width'; +$lang['conf_upload_maxwidth_info'] = 'Maximum width authorized for the uploaded images. Must be a number superior to 10 pixels'; +$lang['conf_err_upload_maxwidth'] = 'maximum width authorized for the uploaded images must be a number superior to 10 pixels.'; +$lang['conf_upload_maxheight'] = 'maximum height'; +$lang['conf_upload_maxheight_info'] = 'Maximum height authorized for the uploaded images. Must be a number superior to 10 pixels'; +$lang['conf_err_upload_maxwidth'] = 'maximum height authorized for the uploaded images must be a number superior to 10 pixels.'; +$lang['conf_upload_maxwidth_thumbnail'] = 'thumbnails maximum width'; +$lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximum width authorized for the uploaded thumbnails. Must be a number superior to 10 pixels'; +$lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximum width authorized for the uploaded thumbnails must be a number superior to 10 pixels.'; +$lang['conf_upload_maxheight_thumbnail'] = 'thumbnails maximum height'; +$lang['conf_upload_maxheight_thumbnail_info'] = 'Maximum height authorized for the uploaded thumbnails. Must be a number superior to 10 pixels'; +$lang['conf_err_upload_maxheight_thumbnail'] = 'Maximum height authorized for the uploaded thumbnails must be a number superior to 10 pixels.'; +$lang['conf_default_title'] = 'Default display properties for unregistered visitors and new accounts'; +$lang['conf_default_language_info'] = 'Default language'; +$lang['conf_default_theme_info'] = 'Default theme'; +$lang['conf_session_title'] = 'Sessions configuration'; +$lang['conf_session_size'] = 'identifier size'; +$lang['conf_session_size_info'] = '- the longer your identifier is, the more secure your site is
- enter a number between 4 and 50'; +$lang['conf_session_time'] = 'validity period'; +$lang['conf_session_time_info'] = '- the shorter the validity period is, the more secure your site is
- enter a number between 5 and 60, in minutes'; +$lang['conf_session_key'] = 'keyword'; +$lang['conf_session_key_info'] = '- the session keyword improve the encoding of the session identifier
- enter any sentence shorter than 255 caracters'; +$lang['conf_general_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel'; +$lang['conf_general_mail_notification'] = 'Mail notification'; +$lang['conf_general_mail_notification_info'] = 'Automated mail notification for adminsitrators (and only for them) when a user add a comment or upload a picture.'; +$lang['conf_comments_validation'] = 'validation'; +$lang['conf_comments_validation_info'] = 'An administrator validate users posted comments before the becom visible on the site'; +$lang['conf_comments_forall'] = 'for all ?'; +$lang['conf_comments_forall_info'] = 'Even guest not registered can post comments'; +$lang['conf_default_nb_image_per_row_info'] = 'number of pictures for each row by default'; +$lang['conf_default_nb_row_per_page_info'] = 'number of rows by page by default'; +$lang['conf_default_short_period_info'] = 'By days. Period within a picture is shown with a red mark. The short period must be superior to 1 day.'; +$lang['conf_default_long_period_info'] = 'By days. Period within a picture is shown with a green mark. The long period must be superior to the short period.'; +$lang['conf_default_expand_info'] = 'expand all categories by default in the menu ?'; +$lang['conf_default_show_nb_comments_info'] = 'show the number of comments for each picture on the thumbnails page'; +$lang['conf_default_maxwidth_info'] = 'Maximum width for display pictures : picture will have a new width only for display, picture files won\'t be changed. Let empty if you don\'t wish to have a limit.'; +$lang['conf_default_maxheight_info'] = 'Just as the maximum width, but for the height'; +$lang['conf_session_cookie'] = 'Authorize cookies'; +$lang['conf_session_cookie_info'] = 'users won\'t have to log on each visit any more. Less secure.'; + //FAQ $lang['help_images_title'] = 'Adding pictures'; $lang['help_images_intro'] = 'How to place pictures in your directories'; @@ -136,55 +209,8 @@ if (isset($conf)) -$lang['conf_confirmation'] = 'Information data registered in database'; -$lang['conf_general_title'] = 'Main configuration'; -$lang['conf_general_webmaster'] = 'Webmaster login'; -$lang['conf_general_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration'; -$lang['conf_general_mail'] = 'Webmaster mail adress'; -$lang['conf_general_mail_info'] = 'Visitors will be able to contact by this mail'; -$lang['conf_general_prefix'] = 'Thumbnail prefix'; -$lang['conf_general_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.'; -$lang['conf_general_access'] = 'Access type'; -$lang['conf_general_access_1'] = 'Free'; -$lang['conf_general_access_2'] = 'Restricted'; -$lang['conf_general_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website
- restricted : the webmaster create accounts. Only registered users can enter the site'; -$lang['conf_comments'] = 'Users comments'; -$lang['conf_comments_title'] = 'Configuration of users comments'; -$lang['conf_comments_show_comments'] = $lang['conf_comments']; -$lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?'; -$lang['conf_comments_comments_number'] = 'Number of comments per page'; -$lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.'; -$lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.'; -$lang['conf_remote_site_delete_info'] = 'Deleting a remote server will delete all the image and the categories in relation with this server.'; -$lang['conf_upload_title'] = 'Configuration of the users upload'; -$lang['conf_upload_available'] = 'authorized the upload of pictures'; -$lang['conf_upload_maxfilesize'] = 'maximum filesize'; -$lang['conf_upload_maxfilesize_info'] = 'Maximum filesize for the uploaded pictures. Must be a number between 10 and 1000 KB.'; -$lang['conf_err_upload_maxfilesize'] = 'Maximum filesize for the uploaded pictures must be a number between 10 and 1000 KB.'; -$lang['conf_upload_maxwidth'] = 'maximum width'; -$lang['conf_upload_maxwidth_info'] = 'Maximum width authorized for the uploaded images. Must be a number superior to 10 pixels'; -$lang['conf_err_upload_maxwidth'] = 'maximum width authorized for the uploaded images must be a number superior to 10 pixels.'; -$lang['conf_upload_maxheight'] = 'maximum height'; -$lang['conf_upload_maxheight_info'] = 'Maximum height authorized for the uploaded images. Must be a number superior to 10 pixels'; -$lang['conf_err_upload_maxwidth'] = 'maximum height authorized for the uploaded images must be a number superior to 10 pixels.'; -$lang['conf_upload_maxwidth_thumbnail'] = 'thumbnails maximum width'; -$lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximum width authorized for the uploaded thumbnails. Must be a number superior to 10 pixels'; -$lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximum width authorized for the uploaded thumbnails must be a number superior to 10 pixels.'; -$lang['conf_upload_maxheight_thumbnail'] = 'thumbnails maximum height'; -$lang['conf_upload_maxheight_thumbnail_info'] = 'Maximum height authorized for the uploaded thumbnails. Must be a number superior to 10 pixels'; -$lang['conf_err_upload_maxheight_thumbnail'] = 'Maximum height authorized for the uploaded thumbnails must be a number superior to 10 pixels.'; -$lang['conf_default_title'] = 'Default display properties for unregistered visitors and new accounts'; -$lang['conf_default_language_info'] = 'Default language'; -$lang['conf_default_theme_info'] = 'Default theme'; -$lang['conf_session_title'] = 'Sessions configuration'; -$lang['conf_session_size'] = 'identifier size'; -$lang['conf_session_size_info'] = '- the longer your identifier is, the more secure your site is
- enter a number between 4 and 50'; -$lang['conf_session_time'] = 'validity period'; -$lang['conf_session_time_info'] = '- the shorter the validity period is, the more secure your site is
- enter a number between 5 and 60, in minutes'; -$lang['conf_session_key'] = 'keyword'; -$lang['conf_session_key_info'] = '- the session keyword improve the encoding of the session identifier
- enter any sentence shorter than 255 caracters'; -$lang['conf_session_delete'] = 'delete out-of-date sessions'; -$lang['conf_session_delete_info'] = 'it is recommanded to empty the database table of session, because out-of-date sessions remains in the database (but it doesn\'t make any security trouble)'; +$lang['menu_add_user'] = 'add'; +$lang['menu_list_user'] = 'list'; $lang['user_err_modify'] = 'This user can\'t be modified or deleted'; $lang['user_err_unknown'] = 'This user doesn\'t exist in the database'; $lang['adduser_info_message'] = 'Informations registered in the database for user '; @@ -198,8 +224,7 @@ $lang['adduser_status_guest'] = 'guest'; $lang['permuser_info_message'] = 'Permissions registered'; $lang['permuser_title'] = 'Restrictions for user'; $lang['permuser_warning'] = 'Warning : a "forbidden access" to the root of a category prevent from accessing the whole category'; -$lang['permuser_authorized'] = 'authorized'; -$lang['permuser_forbidden'] = 'forbidden'; + $lang['permuser_parent_forbidden'] = 'parent category forbidden'; $lang['listuser_confirm'] = 'Do you really want to delete this user'; $lang['listuser_info_deletion'] = 'was removed from database'; @@ -215,11 +240,8 @@ $lang['listuser_button_invert'] = 'invert'; $lang['listuser_button_create_address'] = 'create mail address'; -$lang['editcat_confirm'] = 'Information registered in the database'; -$lang['editcat_title1'] = 'Options for the'; -$lang['editcat_name'] = 'Name'; -$lang['editcat_comment'] = 'Comment'; -$lang['editcat_status'] = 'Status'; + + $lang['infoimage_general'] = 'General options for the category'; $lang['infoimage_useforall'] = 'use for all pictures ?'; $lang['infoimage_creation_date'] = 'creation date'; @@ -276,23 +298,6 @@ $lang['title_user_perm'] = 'Modify permission for user'; $lang['title_cat_perm'] = 'Modify permissions for category'; $lang['title_group_perm'] = 'Modify permissions for group'; $lang['title_picmod'] = 'Modify informations about a picture'; -$lang['conf_general_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel'; -$lang['conf_general_mail_notification'] = 'Mail notification'; -$lang['conf_general_mail_notification_info'] = 'Automated mail notification for adminsitrators (and only for them) when a user add a comment or upload a picture.'; -$lang['conf_comments_validation'] = 'validation'; -$lang['conf_comments_validation_info'] = 'An administrator validate users posted comments before the becom visible on the site'; -$lang['conf_comments_forall'] = 'for all ?'; -$lang['conf_comments_forall_info'] = 'Even guest not registered can post comments'; -$lang['conf_default_nb_image_per_row_info'] = 'number of pictures for each row by default'; -$lang['conf_default_nb_row_per_page_info'] = 'number of rows by page by default'; -$lang['conf_default_short_period_info'] = 'By days. Period within a picture is shown with a red mark. The short period must be superior to 1 day.'; -$lang['conf_default_long_period_info'] = 'By days. Period within a picture is shown with a green mark. The long period must be superior to the short period.'; -$lang['conf_default_expand_info'] = 'expand all categories by default in the menu ?'; -$lang['conf_default_show_nb_comments_info'] = 'show the number of comments for each picture on the thumbnails page'; -$lang['conf_default_maxwidth_info'] = 'Maximum width for display pictures : picture will have a new width only for display, picture files won\'t be changed. Let empty if you don\'t wish to have a limit.'; -$lang['conf_default_maxheight_info'] = 'Just as the maximum width, but for the height'; -$lang['conf_session_cookie'] = 'authorize cookies'; -$lang['conf_session_cookie_info'] = 'users won\'t have to log on each visit any more. Less secure.'; $lang['adduser_associate'] = 'Associate to group'; $lang['group_add'] = 'Add a group'; $lang['group_add_error1'] = 'The name of a group must not contain " or \''; @@ -300,11 +305,6 @@ $lang['group_add_error2'] = 'This name is already used by another group'; $lang['group_confirm'] = 'Are you sure you want to remove this group ?'; $lang['group_list_title'] = 'List of existing groups'; $lang['group_err_unknown'] = 'This group doesn\'t exist in the database'; -$lang['cat_first'] = 'Move first'; -$lang['cat_last'] = 'Move last'; -$lang['editcat_visible_info'] = '(invisible but for administrators)'; -$lang['editcat_visible'] = 'Visible'; -$lang['editcat_uploadable'] = 'Upload available'; $lang['infoimage_keyword_separation'] = '(separate with coma ",")'; $lang['infoimage_addtoall'] = 'add to all'; $lang['infoimage_removefromall'] = 'remove from all'; @@ -320,7 +320,6 @@ $lang['comments_non_validated_title'] = 'Comments waiting for validation'; $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)'; $lang['permuser_only_private'] = 'Only private categories are shown'; $lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated'; -$lang['conf_upload_available_info'] = 'Authorizing the upload of pictures by users on the categories of the website (not on a remote server). This is general parameter, it is needed to authorize upload category by category, by default, no category is "uploadable".'; $lang['cat_unknown_id'] = 'This category is unknown in the database'; $lang['install_warning'] = 'The file "install.php" is still present. Please remove it from your server. It is not secure to keep it.'; diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php index 3c6b38042..95ea17b51 100644 --- a/language/en_UK.iso-8859-1/common.lang.php +++ b/language/en_UK.iso-8859-1/common.lang.php @@ -40,7 +40,6 @@ $lang['categories'] = 'Categories'; $lang['thumbnail'] = 'Thumbnail'; $lang['thumbnails'] = 'Thumbnails'; $lang['search'] = 'Search'; -$lang['submit'] = 'Submit'; $lang['comment'] = 'Comment'; $lang['comments'] = 'Comments'; $lang['picture'] = 'Picture'; @@ -48,6 +47,12 @@ $lang['pictures'] = 'Pictures'; $lang['no'] = 'No'; $lang['yes'] = 'Yes'; $lang['date'] = 'Date'; +$lang['description'] = 'Description'; + +// Form words +$lang['submit'] = 'Submit'; +$lang['delete'] = 'Delete'; +$lang['reset'] = 'Reset'; // Identification $lang['login'] = 'Login'; @@ -55,7 +60,6 @@ $lang['logout'] = 'Logout'; $lang['password'] = 'Password'; $lang['customize'] = 'Customize'; $lang['new'] = 'New'; -$lang['delete'] = 'Delete'; $lang['identification'] = 'Identification'; //Calendar @@ -111,7 +115,6 @@ $lang['total'] = 'images'; $lang['upload_picture'] = 'Upload a picture'; $lang['registration_date'] = 'registered on'; $lang['creation_date'] = 'created on'; -$lang['comment'] = 'comment'; $lang['author'] = 'author'; $lang['size'] = 'size'; $lang['filesize'] = 'filesize'; @@ -185,8 +188,6 @@ $lang['upload_advise_filetype'] = 'the picture must be to the fileformat jpg, gi $lang['upload_err_username'] = 'the username must be given'; $lang['upload_username'] = 'Username'; $lang['upload_successful'] = 'Picture uploaded with success, an administrator will validate it as soon as possible'; -// new or modified in release 1.3 -$lang['charset'] = 'iso-8859-1'; $lang['guest'] = 'guest'; $lang['mail_address'] = 'mail address'; diff --git a/template/default/admin.tpl b/template/default/admin.tpl index 696f43072..f8493b420 100644 --- a/template/default/admin.tpl +++ b/template/default/admin.tpl @@ -60,7 +60,7 @@
{PAGE_TITLE}
- {ADMIN_CONTENT} +
{ADMIN_CONTENT}
diff --git a/template/default/admin/admin_upload.tpl b/template/default/admin/admin_upload.tpl new file mode 100644 index 000000000..045324455 --- /dev/null +++ b/template/default/admin/admin_upload.tpl @@ -0,0 +1,22 @@ +
{L_UPLOAD_TITLE}
+
+
+
+ {L_AUTHORIZED}
+
+ +
+
+ {L_FORBIDDEN}
+ +
+   + +
+
+
+
{L_UPLOAD_INFO}
\ No newline at end of file diff --git a/template/default/admin/cat_modify.tpl b/template/default/admin/cat_modify.tpl new file mode 100644 index 000000000..4aa8ee032 --- /dev/null +++ b/template/default/admin/cat_modify.tpl @@ -0,0 +1,72 @@ + +
+ {L_EDIT_CONFIRM} {L_HERE}
+ +
{CATEGORIES_NAV}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_REMOTE_SITE}{SITE_URL}
{L_EDIT_NAME} + +
{L_STORAGE}{CATEGORY_DIR}
{L_EDIT_COMMENT} + +
{L_EDIT_STATUS} :
{L_EDIT_STATUS_INFO}
+ {L_ACCESS_FREE}   + {L_ACCESS_RESTRICTED} +
{L_EDIT_LOCK} :
{L_EDIT_LOCK_INFO}
+ {L_YES}   + {L_NO} +
{#cat_parent} + + + + + + +
 
+ +
+
\ No newline at end of file diff --git a/template/default/admin/cat_modify.vtp b/template/default/admin/cat_modify.vtp deleted file mode 100644 index 5436ff220..000000000 --- a/template/default/admin/cat_modify.vtp +++ /dev/null @@ -1,89 +0,0 @@ - -
- {#editcat_confirm} [ {#editcat_back} ]
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{#editcat_title1} "{#cat:name}" [ - - dir : {#dir} - - - {#cat_virtual} - - ] -
{#remote_site}{#url}
{#editcat_name} - -
{#editcat_comment} - -
{#editcat_status} - - {#option} - -
{#editcat_visible} - - {#option} - - {#editcat_visible_info} -
{#editcat_uploadable} - - {#option} - -
{#cat_parent} - - - - - - -
 
- -
-
\ No newline at end of file diff --git a/template/default/category.tpl b/template/default/category.tpl index 449ac30e4..a48097a5e 100644 --- a/template/default/category.tpl +++ b/template/default/category.tpl @@ -99,7 +99,7 @@ -
{cat_infos.comment.COMMENTS}
+
{cat_infos.comment.COMMENTS}
{L_NB_IMG} "{TITLE}" : {cat_infos.NB_IMG_CAT} diff --git a/template/default/default.css b/template/default/default.css index 704add92a..fdf1d576f 100644 --- a/template/default/default.css +++ b/template/default/default.css @@ -221,7 +221,7 @@ form{ margin-top:10px; } -input,select { +input,select,textarea { text-indent:2px; background-color:#505050; border: 1px solid #797979; @@ -262,13 +262,11 @@ color : #FFF48E; /* Other styles */ .info { - color:#E0E0E0; - background-color:#444444; - margin-bottom:5px; + color:#FFF48E; + margin:5px 0px 5px 0px white-space:nowrap; - margin-left:5px; - margin-right:5px; - text-align:right; + text-align:center; + font-size:16px; } .menuInfoCat { font-family:sans-serif; @@ -309,23 +307,3 @@ div.information { margin:10px; padding:5px; } - -.tableComment,.cellAuthor,.cellInfo { - border-color:#E0E0E0; - border-style:solid; -} -.tableComment { - width:100%; - border-width:2px; - text-align:left; - padding: 10px; -} -.cellAuthor { - border-width:0px; - border-right-width:1px; - width:20%; -} -.cellInfo { - border-width:0px; - border-bottom-width:1px; -}