You are here

function swftools_get_player_path in SWF Tools 5

Same name and namespace in other branches
  1. 6 swftools.module \swftools_get_player_path()
  2. 6.2 swftools.module \swftools_get_player_path()

Returns a flash player path relative to webroot. The default value is in the modules/swftools/shared directory. It may suit some sites to store flash players in an alternative location, but the assumption is the location will be on the same server. If the path starts with '/', then we can assume is relative to the webroot. Otherwise we assume it's in the files directory.

8 calls to swftools_get_player_path()
lutman_swftools_embed in lutman/lutman.module
Implementation of swftools_embed hook Returns the markup for the page, plus set necessary javascript.
swf in ./swftools.module
Return output, which might be embed markup, or pre-flash markup that includes the appropriate jQuery added to the <head>
swfobject2_swftools_embed in swfobject2/swfobject2.module
Implementation of swftools_embed hook Returns the markup for the page, plus set necessary javascript.
swfobject_swftools_embed in swfobject/swfobject.module
Implementation of swftools_embed hook Returns the markup for the page, plus set necessary javascript.
swftools_get_info in ./swftools.module
Attempt to return information for the specified file Supply the path to the file to be processed, and it return FALSE if no data was obtained. The return variable, if successful, is an array that may include width, height, extension, file_size, mime_type.

... See full list

File

./swftools.module, line 625

Code

function swftools_get_player_path($dir = FALSE) {
  if (!$dir) {
    $dir = variable_get('swftools_player_path', SWFTOOLS_PLAYER_PATH);
    if (!$dir) {
      $dir = drupal_get_path('module', 'swftools') . '/shared';
    }
  }
  elseif (substr($dir, 0, 1) == '/') {
    $dir = ltrim($dir, '/');
  }
  else {
    $dir = file_create_path($dir);
  }
  return $dir;
}