function theme_fupload_create_filename in Image FUpload 6
Same name and namespace in other branches
- 6.3 image_fupload.module \theme_fupload_create_filename()
 - 6.2 image_fupload.module \theme_fupload_create_filename()
 
1 theme call to theme_fupload_create_filename()
- fupload_node_create in image_fupload_image/
image_fupload_image.module  
File
- ./
image_fupload.module, line 90  
Code
function theme_fupload_create_filename($image) {
  // Get filename out of filepath
  $filename = trim(basename($image->filepath), ' ');
  $length1 = strlen(strrchr($filename, '.'));
  $length2 = strlen($filename);
  $image_name = ucfirst(substr($filename, 0, $length2 - $length1));
  // Remove some given (userdefined) elements
  $replacements = explode(';', variable_get('fupload_title_replacements', '_;{;}'));
  $image_name = str_replace($replacements, ' ', $image_name);
  return $image_name;
}