Changeset 862 for trunk/admin
- Timestamp:
- Sep 14, 2005, 11:57:05 PM (19 years ago)
- Location:
- trunk/admin
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r834 r862 158 158 'L_REMOTE_SITE'=>$lang['remote_site'], 159 159 'L_EDIT_COMMENT'=>$lang['description'], 160 'L_EDIT_CAT_OPTIONS'=>$lang['cat_options'],161 160 'L_EDIT_STATUS'=>$lang['conf_access'], 162 'L_EDIT_STATUS_INFO'=>$lang['cat_access_info'],163 161 'L_STATUS_PUBLIC'=>$lang['public'], 164 162 'L_STATUS_PRIVATE'=>$lang['private'], 165 163 'L_EDIT_LOCK'=>$lang['lock'], 166 'L_EDIT_LOCK_INFO'=>$lang['editcat_lock_info'],167 164 'L_EDIT_UPLOADABLE'=>$lang['editcat_uploadable'], 168 'L_EDIT_UPLOADABLE_INFO'=>$lang['editcat_uploadable_info'],169 165 'L_EDIT_COMMENTABLE'=>$lang['comments'], 170 'L_EDIT_COMMENTABLE_INFO'=>$lang['editcat_commentable_info'],171 166 'L_YES'=>$lang['yes'], 172 167 'L_NO'=>$lang['no'], … … 178 173 'U_CHILDREN'=> 179 174 add_session_id($cat_list_url.'&parent_id='.$category['id']), 175 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_modify', 180 176 181 177 'F_ACTION'=>add_session_id($form_action) -
trunk/admin/cat_options.php
r817 r862 151 151 'L_SUBMIT'=>$lang['submit'], 152 152 'L_RESET'=>$lang['reset'], 153 154 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options', 153 155 154 156 'F_ACTION'=>add_session_id($base_url.$page['section']) … … 194 196 'L_CAT_OPTIONS_TRUE' => $lang['authorized'], 195 197 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'], 196 'L_CAT_OPTIONS_INFO' => $lang['cat_upload_info'],197 198 ) 198 199 ); … … 216 217 'L_CAT_OPTIONS_TRUE' => $lang['authorized'], 217 218 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'], 218 'L_CAT_OPTIONS_INFO' => $lang['cat_comments_info'],219 219 ) 220 220 ); … … 238 238 'L_CAT_OPTIONS_TRUE' => $lang['unlocked'], 239 239 'L_CAT_OPTIONS_FALSE' => $lang['locked'], 240 'L_CAT_OPTIONS_INFO' => $lang['cat_lock_info'],241 240 ) 242 241 ); … … 260 259 'L_CAT_OPTIONS_TRUE' => $lang['cat_public'], 261 260 'L_CAT_OPTIONS_FALSE' => $lang['cat_private'], 262 'L_CAT_OPTIONS_INFO' => $lang['cat_status_info'],263 261 ) 264 262 ); … … 282 280 'L_SECTION' => l10n('Representative'), 283 281 'L_CAT_OPTIONS_TRUE' => l10n('singly represented'), 284 'L_CAT_OPTIONS_FALSE' => l10n('randomly represented'), 285 'L_CAT_OPTIONS_INFO' => l10n('') 282 'L_CAT_OPTIONS_FALSE' => l10n('randomly represented') 286 283 ) 287 284 ); -
trunk/admin/cat_perm.php
r825 r862 207 207 'admin.php?page=cat_modify&cat_id=' 208 208 ), 209 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_perm', 209 210 'F_ACTION' => 210 211 add_session_id( -
trunk/admin/help.php
r675 r862 25 25 // | USA. | 26 26 // +-----------------------------------------------------------------------+ 27 27 28 include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); 28 //----------------------------------------------------- template initialization29 $template->set_filenames( array('help'=>'admin/help.tpl') );30 29 31 //----------------------------------------------------- help categories display 32 $categories = array('images','thumbnails','database','access','groups', 33 'remote','upload','virtual','infos'); 34 foreach ($categories as $category) 30 // language files 31 $user_langdir = PHPWG_ROOT_PATH.'language/'.$user['language']; 32 $conf_langdir = PHPWG_ROOT_PATH.'language/'.$conf['default_language']; 33 34 if (file_exists($user_langdir.'/help.html')) 35 35 { 36 $template->assign_block_vars( 37 'cat', 38 array('NAME'=>$lang['help_'.$category.'_title'])); 39 40 foreach ($lang['help_'.$category] as $item) 41 { 42 $template->assign_block_vars('cat.item', array('CONTENT'=>$item)); 43 } 36 $html_file = $user_langdir.'/help.html'; 44 37 } 45 $template->assign_var_from_handle('ADMIN_CONTENT', 'help'); 38 else 39 { 40 $html_file = $conf_langdir.'/help.html'; 41 } 42 43 $template->set_filenames(array('help_content' => $html_file)); 44 $template->assign_var_from_handle('ADMIN_CONTENT', 'help_content'); 46 45 ?> -
trunk/admin/include/functions.php
r858 r862 28 28 include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php'); 29 29 30 $tab_ext_create_TN = array ( 'jpg', 'png', 'JPG', 'PNG' );31 32 // is_image returns true if the given $filename (including the path) is a33 // picture according to its format and its extension.34 // As GD library can only generate pictures from jpeg and png files, if you35 // ask if the filename is an image for thumbnail creation (second parameter36 // set to true), the only authorized formats are jpeg and png.37 function is_image( $filename, $create_thumbnail = false )38 {39 global $conf, $tab_ext_create_TN;40 41 if (is_file($filename)42 and in_array(get_extension($filename), $conf['picture_ext']))43 {44 $size = getimagesize( $filename );45 // $size[2] == 1 means GIF46 // $size[2] == 2 means JPG47 // $size[2] == 3 means PNG48 if ( !$create_thumbnail )49 {50 if ( in_array( get_extension( $filename ), $conf['picture_ext'] )51 and ( $size[2] == 1 or $size[2] == 2 or $size[2] == 3 ) )52 {53 return true;54 }55 }56 else57 {58 if ( in_array( get_extension( $filename ), $tab_ext_create_TN )59 and ( $size[2] == 2 or $size[2] == 3 ) )60 {61 return true;62 }63 }64 }65 return false;66 }67 68 30 /** 69 31 * returns an array with all picture files according to $conf['file_ext'] … … 142 104 return $pictures; 143 105 } 144 145 function TN_exists( $dir, $file )146 {147 global $conf;148 149 $filename = get_filename_wo_extension( $file );150 foreach ( $conf['picture_ext'] as $ext ) {151 $test = $dir.'/thumbnail/'.$conf['prefix_thumbnail'].$filename.'.'.$ext;152 if ( is_file ( $test ) )153 {154 return $ext;155 }156 }157 return false;158 }159 160 106 161 107 // The function delete_site deletes a site and call the function … … 553 499 } 554 500 555 function check_date_format( $date )556 {557 // date arrives at this format : DD/MM/YYYY558 @list($day,$month,$year) = explode( '/', $date );559 return @checkdate( $month, $day, $year );560 }561 562 function date_convert( $date )563 {564 // date arrives at this format : DD/MM/YYYY565 // It must be transformed in YYYY-MM-DD566 list($day,$month,$year) = explode( '/', $date );567 return $year.'-'.$month.'-'.$day;568 }569 570 501 function date_convert_back( $date ) 571 502 { … … 600 531 ) 601 532 ); 602 }603 604 /**605 * returns an array containing sub-directories which can be a category606 *607 * directories nammed "thumbnail", "pwg_high" or "pwg_representative" are608 * omitted609 *610 * @param string $basedir611 * @return array612 */613 function get_category_directories( $basedir )614 {615 $sub_dirs = array();616 617 if ( $opendir = opendir( $basedir ) )618 {619 while ( $file = readdir( $opendir ) )620 {621 if ($file != '.'622 and $file != '..'623 and $file != 'thumbnail'624 and $file != 'pwg_high'625 and $file != 'pwg_representative'626 and is_dir($basedir.'/'.$file))627 {628 array_push( $sub_dirs, $file );629 }630 }631 }632 return $sub_dirs;633 533 } 634 534 -
trunk/admin/include/functions_metadata.php
r858 r862 222 222 return $files; 223 223 } 224 225 // used_metadata string is displayed to inform admin which metadata will be226 // used from files for synchronization227 function get_used_metadata_list()228 {229 global $conf;230 231 $used_metadata = array('filesize', 'width', 'height');232 233 if ($conf['use_exif'])234 {235 array_push($used_metadata, 'date_creation');236 }237 238 if ($conf['use_iptc'])239 {240 foreach (array_keys($conf['use_iptc_mapping']) as $key)241 {242 array_push($used_metadata, $key);243 }244 }245 246 return array_unique($used_metadata);247 }248 224 ?> -
trunk/admin/thumbnail.php
r792 r862 170 170 'L_PARAMS'=>$lang['tn_params_title'], 171 171 'L_GD'=>$lang['tn_params_GD'], 172 'L_GD_INFO'=>$lang['tn_params_GD_info'],173 'L_WIDTH_INFO'=>$lang['tn_params_width_info'],174 'L_HEIGHT_INFO'=>$lang['tn_params_height_info'],175 172 'L_CREATE'=>$lang['tn_params_create'], 176 'L_CREATE_INFO'=>$lang['tn_params_create_info'],177 'L_FORMAT'=>$lang['tn_params_format'],178 'L_FORMAT_INFO'=>$lang['tn_params_format_info'],179 173 'L_SUBMIT'=>$lang['submit'], 180 174 'L_REMAINING'=>$lang['tn_alone_title'], … … 186 180 'L_TN_AVERAGE'=>$lang['tn_stats_mean'], 187 181 'L_ALL'=>$lang['tn_all'], 182 183 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=thumbnail', 188 184 189 185 'T_STYLE'=>$user['template'] -
trunk/admin/user_list.php
r858 r862 294 294 'L_DELETE' => $lang['user_delete'], 295 295 'L_DELETE_HINT' => $lang['user_delete_hint'], 296 297 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=user_list', 296 298 297 299 'F_ADD_ACTION' => $base_url,
Note: See TracChangeset
for help on using the changeset viewer.