function _simpleviewer_vars in SWF Tools 5
Same name and namespace in other branches
- 6 simpleviewer/simpleviewer.module \_simpleviewer_vars()
- 6.2 simpleviewer/simpleviewer.module \_simpleviewer_vars()
These are the default options and flashvars.
2 calls to _simpleviewer_vars()
- simpleviewer_swftools_flashvars in simpleviewer/
simpleviewer.module - Implementation of swftools_flashvars hook Allows the Flash player provider to add variables to the Flashvars array. Other arrays can also be modified.
- swftools_simpleviewer_playlist in simpleviewer/
simpleviewer.module
File
- simpleviewer/
simpleviewer.module, line 79
Code
function _simpleviewer_vars($flat = FALSE) {
include_once drupal_get_path('module', 'simpleviewer') . '/simpleviewer.admin.inc';
// Grab the admin form and use all of the default values as settings for the flash embedding.
$sv_vars = _swftools_admin_simpleviewer_form($flat);
// If $flat is false, then we want a normal form version of the settings page
if (!$flat) {
return $sv_vars;
}
foreach (element_children($sv_vars) as $name) {
$name_parts = explode('_', $name);
if ($name_parts[1] == 'xml') {
// The last part of the Drupal variable name matches the SimpleViewer XML option name
$return['xml'][$name_parts[2]] = $sv_vars[$name]['#default_value'];
}
elseif ($name_parts[1] == 'swf') {
$return['swf'][$name_parts[2]] = $sv_vars[$name]['#default_value'];
}
else {
$return['other'][$name_parts[2]] = $sv_vars[$name]['#default_value'];
}
}
return $return;
}