function video_thumb_path in Video 6.4
Same name and namespace in other branches
- 6.5 video.module \video_thumb_path()
5 calls to video_thumb_path()
- video_amazon_s3::delete in plugins/
video_s3/ video_s3.lib.inc - video_ffmpeg::generate_thumbnails in transcoders/
video_ffmpeg.inc - video_upload_manual_thumb in ./
video_widget.inc - Handle saving of manual thumbs
- video_zencoder::generate_thumbnails in plugins/
video_zencoder/ transcoders/ video_zencoder.inc - _video_zencoder_postback_jobs in plugins/
video_zencoder/ video_zencoder.module - This will handle Zencoder postback once video conversion is completed
4 string references to 'video_thumb_path'
- video_default_widget_settings_validate in ./
video_widget.inc - Element specific validation for video default value.
- video_ffmpeg::admin_settings in transcoders/
video_ffmpeg.inc - Interface Implementations
- video_file_delete in ./
video.module - Implementation of hook_file_delete().
- video_zencoder_api::create in plugins/
video_zencoder/ video_zencoder.lib.inc - create transcoding job on Zencoder.com
File
- ./
video.module, line 460 - video.module
Code
function video_thumb_path($video = NULL, $checkexistence = TRUE) {
$dir = $basedir = file_directory_path() . '/' . variable_get('video_thumb_path', 'video_thumbs');
if (is_array($video)) {
$dir .= '/' . $video['fid'];
}
elseif (is_object($video)) {
$dir .= '/' . $video->fid;
}
elseif ($video > 0) {
$dir .= '/' . intval($video);
}
elseif ($video != NULL) {
return NULL;
}
if ($checkexistence) {
field_file_check_directory(file_directory_path(), FILE_CREATE_DIRECTORY);
field_file_check_directory($basedir, FILE_CREATE_DIRECTORY);
if ($dir != $basedir) {
field_file_check_directory($dir, FILE_CREATE_DIRECTORY);
}
}
return $dir;
}