When importing flash, title is usually imported as some_name.swf, i added this code so ".swf" is cut from title so it looks nicer.

  // Populate basic data in to the node
  $title_temp=check_plain(basename($file_to_import));
  $pos=strpos($title_temp,'.swf');
  
  $node->title = substr($title_temp,0,$pos);
  $node->uid = $user->uid;
  $node->type = 'flashnode';

Comments

Marko B’s picture

full code, with uppercase and spaces instead of dashes.

  // Populate basic data in to the node
  $title_temp=check_plain(basename($file_to_import));
  $pos=strpos($title_temp,'.swf');
  
  $search  = array('-', '_');
  $replace = array(' ', ' ');
  $title_temp= ucfirst(str_replace($search, $replace, $title_temp));
  
  $node->title = substr($title_temp,0,$pos);
  $node->uid = $user->uid;
  $node->type = 'flashnode';