aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php2
-rw-r--r--admin/cat_modify.php6
-rw-r--r--admin/cat_options.php9
-rw-r--r--admin/cat_perm.php1
-rw-r--r--admin/help.php29
-rw-r--r--admin/include/functions.php100
-rw-r--r--admin/include/functions_metadata.php24
-rw-r--r--admin/thumbnail.php8
-rw-r--r--admin/user_list.php2
9 files changed, 24 insertions, 157 deletions
diff --git a/admin.php b/admin.php
index cb92cb5d5..552be51e8 100644
--- a/admin.php
+++ b/admin.php
@@ -56,7 +56,7 @@ $link_start = PHPWG_ROOT_PATH.'admin.php?page=';
$conf_link = $link_start.'configuration&section=';
$opt_link = $link_start.'cat_options&section=';
//----------------------------------------------------- template initialization
-$title = l10n('PhpWebGallery administration'); // for include/page_header.php
+$title = l10n('PhpWebGallery Administration'); // for include/page_header.php
$page['gallery_title'] = l10n('PhpWebGallery Administration');
$page['body_id'] = 'theAdminPage';
include(PHPWG_ROOT_PATH.'include/page_header.php');
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 791dff589..18aff772f 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -157,17 +157,12 @@ $template->assign_vars(array(
'L_STORAGE'=>$lang['storage'],
'L_REMOTE_SITE'=>$lang['remote_site'],
'L_EDIT_COMMENT'=>$lang['description'],
- 'L_EDIT_CAT_OPTIONS'=>$lang['cat_options'],
'L_EDIT_STATUS'=>$lang['conf_access'],
- 'L_EDIT_STATUS_INFO'=>$lang['cat_access_info'],
'L_STATUS_PUBLIC'=>$lang['public'],
'L_STATUS_PRIVATE'=>$lang['private'],
'L_EDIT_LOCK'=>$lang['lock'],
- 'L_EDIT_LOCK_INFO'=>$lang['editcat_lock_info'],
'L_EDIT_UPLOADABLE'=>$lang['editcat_uploadable'],
- 'L_EDIT_UPLOADABLE_INFO'=>$lang['editcat_uploadable_info'],
'L_EDIT_COMMENTABLE'=>$lang['comments'],
- 'L_EDIT_COMMENTABLE_INFO'=>$lang['editcat_commentable_info'],
'L_YES'=>$lang['yes'],
'L_NO'=>$lang['no'],
'L_SUBMIT'=>$lang['submit'],
@@ -177,6 +172,7 @@ $template->assign_vars(array(
add_session_id(PHPWG_ROOT_PATH.'category.php?cat='.$category['id']),
'U_CHILDREN'=>
add_session_id($cat_list_url.'&parent_id='.$category['id']),
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_modify',
'F_ACTION'=>add_session_id($form_action)
));
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 24e0687cd..f8ca7527b 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -150,6 +150,8 @@ $template->assign_vars(
array(
'L_SUBMIT'=>$lang['submit'],
'L_RESET'=>$lang['reset'],
+
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options',
'F_ACTION'=>add_session_id($base_url.$page['section'])
)
@@ -193,7 +195,6 @@ SELECT id,name,uppercats,global_rank
'L_SECTION' => $lang['cat_upload_title'],
'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
- 'L_CAT_OPTIONS_INFO' => $lang['cat_upload_info'],
)
);
break;
@@ -215,7 +216,6 @@ SELECT id,name,uppercats,global_rank
'L_SECTION' => $lang['cat_comments_title'],
'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
- 'L_CAT_OPTIONS_INFO' => $lang['cat_comments_info'],
)
);
break;
@@ -237,7 +237,6 @@ SELECT id,name,uppercats,global_rank
'L_SECTION' => $lang['cat_lock_title'],
'L_CAT_OPTIONS_TRUE' => $lang['unlocked'],
'L_CAT_OPTIONS_FALSE' => $lang['locked'],
- 'L_CAT_OPTIONS_INFO' => $lang['cat_lock_info'],
)
);
break;
@@ -259,7 +258,6 @@ SELECT id,name,uppercats,global_rank
'L_SECTION' => $lang['cat_status_title'],
'L_CAT_OPTIONS_TRUE' => $lang['cat_public'],
'L_CAT_OPTIONS_FALSE' => $lang['cat_private'],
- 'L_CAT_OPTIONS_INFO' => $lang['cat_status_info'],
)
);
break;
@@ -281,8 +279,7 @@ SELECT id,name,uppercats,global_rank
array(
'L_SECTION' => l10n('Representative'),
'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
- 'L_CAT_OPTIONS_FALSE' => l10n('randomly represented'),
- 'L_CAT_OPTIONS_INFO' => l10n('')
+ 'L_CAT_OPTIONS_FALSE' => l10n('randomly represented')
)
);
break;
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index 2c6420ae1..092d6792b 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -206,6 +206,7 @@ $template->assign_vars(
$page['cat'],
'admin.php?page=cat_modify&cat_id='
),
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_perm',
'F_ACTION' =>
add_session_id(
PHPWG_ROOT_PATH.'admin.php?page=cat_perm&cat='.$page['cat']
diff --git a/admin/help.php b/admin/help.php
index 5817db6a7..7447c3fc9 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -24,23 +24,22 @@
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
+
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
-//----------------------------------------------------- template initialization
-$template->set_filenames( array('help'=>'admin/help.tpl') );
-//----------------------------------------------------- help categories display
-$categories = array('images','thumbnails','database','access','groups',
- 'remote','upload','virtual','infos');
-foreach ($categories as $category)
+// 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.html'))
{
- $template->assign_block_vars(
- 'cat',
- array('NAME'=>$lang['help_'.$category.'_title']));
-
- foreach ($lang['help_'.$category] as $item)
- {
- $template->assign_block_vars('cat.item', array('CONTENT'=>$item));
- }
+ $html_file = $user_langdir.'/help.html';
}
-$template->assign_var_from_handle('ADMIN_CONTENT', 'help');
+else
+{
+ $html_file = $conf_langdir.'/help.html';
+}
+
+$template->set_filenames(array('help_content' => $html_file));
+$template->assign_var_from_handle('ADMIN_CONTENT', 'help_content');
?>
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 78ec15a09..12a032b39 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -27,44 +27,6 @@
include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php');
-$tab_ext_create_TN = array ( 'jpg', 'png', 'JPG', 'PNG' );
-
-// is_image returns true if the given $filename (including the path) is a
-// picture according to its format and its extension.
-// As GD library can only generate pictures from jpeg and png files, if you
-// ask if the filename is an image for thumbnail creation (second parameter
-// set to true), the only authorized formats are jpeg and png.
-function is_image( $filename, $create_thumbnail = false )
-{
- global $conf, $tab_ext_create_TN;
-
- if (is_file($filename)
- and in_array(get_extension($filename), $conf['picture_ext']))
- {
- $size = getimagesize( $filename );
- // $size[2] == 1 means GIF
- // $size[2] == 2 means JPG
- // $size[2] == 3 means PNG
- if ( !$create_thumbnail )
- {
- if ( in_array( get_extension( $filename ), $conf['picture_ext'] )
- and ( $size[2] == 1 or $size[2] == 2 or $size[2] == 3 ) )
- {
- return true;
- }
- }
- else
- {
- if ( in_array( get_extension( $filename ), $tab_ext_create_TN )
- and ( $size[2] == 2 or $size[2] == 3 ) )
- {
- return true;
- }
- }
- }
- return false;
-}
-
/**
* returns an array with all picture files according to $conf['file_ext']
*
@@ -142,22 +104,6 @@ function get_representative_files($dir)
return $pictures;
}
-function TN_exists( $dir, $file )
-{
- global $conf;
-
- $filename = get_filename_wo_extension( $file );
- foreach ( $conf['picture_ext'] as $ext ) {
- $test = $dir.'/thumbnail/'.$conf['prefix_thumbnail'].$filename.'.'.$ext;
- if ( is_file ( $test ) )
- {
- return $ext;
- }
- }
- return false;
-}
-
-
// The function delete_site deletes a site and call the function
// delete_categories for each primary category of the site
function delete_site( $id )
@@ -552,21 +498,6 @@ SELECT id
}
}
-function check_date_format( $date )
-{
- // date arrives at this format : DD/MM/YYYY
- @list($day,$month,$year) = explode( '/', $date );
- return @checkdate( $month, $day, $year );
-}
-
-function date_convert( $date )
-{
- // date arrives at this format : DD/MM/YYYY
- // It must be transformed in YYYY-MM-DD
- list($day,$month,$year) = explode( '/', $date );
- return $year.'-'.$month.'-'.$day;
-}
-
function date_convert_back( $date )
{
// date arrives at this format : YYYY-MM-DD
@@ -602,37 +533,6 @@ function get_keywords($keywords_string)
}
/**
- * returns an array containing sub-directories which can be a category
- *
- * directories nammed "thumbnail", "pwg_high" or "pwg_representative" are
- * omitted
- *
- * @param string $basedir
- * @return array
- */
-function get_category_directories( $basedir )
-{
- $sub_dirs = array();
-
- if ( $opendir = opendir( $basedir ) )
- {
- while ( $file = readdir( $opendir ) )
- {
- if ($file != '.'
- and $file != '..'
- and $file != 'thumbnail'
- and $file != 'pwg_high'
- and $file != 'pwg_representative'
- and is_dir($basedir.'/'.$file))
- {
- array_push( $sub_dirs, $file );
- }
- }
- }
- return $sub_dirs;
-}
-
-/**
* returns an array containing sub-directories which can be a category,
* recursive by default
*
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 4836f85a3..79e38a829 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -221,28 +221,4 @@ SELECT id, path
return $files;
}
-
-// used_metadata string is displayed to inform admin which metadata will be
-// used from files for synchronization
-function get_used_metadata_list()
-{
- global $conf;
-
- $used_metadata = array('filesize', 'width', 'height');
-
- if ($conf['use_exif'])
- {
- array_push($used_metadata, 'date_creation');
- }
-
- if ($conf['use_iptc'])
- {
- foreach (array_keys($conf['use_iptc_mapping']) as $key)
- {
- array_push($used_metadata, $key);
- }
- }
-
- return array_unique($used_metadata);
-}
?> \ No newline at end of file
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 64a6797e3..5193388d7 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -169,13 +169,7 @@ $template->assign_vars(array(
'L_THUMBNAIL'=>$lang['thumbnail'],
'L_PARAMS'=>$lang['tn_params_title'],
'L_GD'=>$lang['tn_params_GD'],
- 'L_GD_INFO'=>$lang['tn_params_GD_info'],
- 'L_WIDTH_INFO'=>$lang['tn_params_width_info'],
- 'L_HEIGHT_INFO'=>$lang['tn_params_height_info'],
'L_CREATE'=>$lang['tn_params_create'],
- 'L_CREATE_INFO'=>$lang['tn_params_create_info'],
- 'L_FORMAT'=>$lang['tn_params_format'],
- 'L_FORMAT_INFO'=>$lang['tn_params_format_info'],
'L_SUBMIT'=>$lang['submit'],
'L_REMAINING'=>$lang['tn_alone_title'],
'L_TN_STATS'=>$lang['tn_stats'],
@@ -185,6 +179,8 @@ $template->assign_vars(array(
'L_TN_MIN'=>$lang['tn_stats_min'],
'L_TN_AVERAGE'=>$lang['tn_stats_mean'],
'L_ALL'=>$lang['tn_all'],
+
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=thumbnail',
'T_STYLE'=>$user['template']
));
diff --git a/admin/user_list.php b/admin/user_list.php
index 0671dabc3..91bcfc954 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -293,6 +293,8 @@ $template->assign_vars(
'L_RESET' => $lang['reset'],
'L_DELETE' => $lang['user_delete'],
'L_DELETE_HINT' => $lang['user_delete_hint'],
+
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=user_list',
'F_ADD_ACTION' => $base_url,
'F_USERNAME' => @$_GET['username'],