You are here

function swftools_get_player_path in SWF Tools 6

Same name and namespace in other branches
  1. 5 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.

10 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_admin_embed_form in ./swftools.admin.inc

... See full list

File

./swftools.module, line 610

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;
}