Active
Project:
Flash Node
Version:
6.x-3.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2011 at 14:00 UTC
Updated:
18 Apr 2011 at 15:02 UTC
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
Comment #1
marko b commentedfull code, with uppercase and spaces instead of dashes.