function swftools_get_media_path in SWF Tools 6.2
Same name and namespace in other branches
- 5 swftools.module \swftools_get_media_path()
- 6 swftools.module \swftools_get_media_path()
Returns the media path relative to webroot. There is a setting called 'swftools_media_url'. If this is set, we assume the media is on a different server.
Return value
A string containing the path to the local files, or empty if the files are remote.
11 calls to swftools_get_media_path()
- flowplayer3_swftools_embed in flowplayer3/
flowplayer3.module - flowplayer3_swftools_flashvars in flowplayer3/
flowplayer3.module - Implementation of swftools_flashvars hook(). Note that $methods and $vars are passed by reference, so the player module can manipulate them directly if necessary.
- flowplayer_flowplayer_mediaplayer_swftools_playlist in flowplayer/
flowplayer.module - flowplayer_swftools_flashvars in flowplayer/
flowplayer.module - Implementation of swftools_flashvars hook. Return an array of flashvars.
- imagerotator_swftools_flashvars in imagerotator/
imagerotator.module - Implementation of swftools_flashvars hook. Return an array of flashvars.
File
- ./
swftools.module, line 763
Code
function swftools_get_media_path() {
// Retrieve the media url setting
$media_url = trim(variable_get('swftools_media_url', ''));
// If no media url is set then return the path to local files
if (!$media_url || $media_url == '') {
return file_create_path('') . '/';
}
// If a media url is set then assume this is a remote path and so we don't know anything
// about the path between the base url and the file. Return an empty string.
return '';
}