function _wijering_flashvars in SWF Tools 5
Same name and namespace in other branches
- 6 wijering/wijering.module \_wijering_flashvars()
- 6.2 wijering/wijering.module \_wijering_flashvars()
This function is called from wijering_swftools_flashvars() which is called from swf() It will return the default flashvar configuration, just prior to any overrides passed into swf(). We start with the settings defined on admin/swf/wijering which are returned by _wijering_settings(). Then we prepare these values for output to html (eg. '1' become 'true') and we unset undefined flashvars to prevent their output.
1 call to _wijering_flashvars()
- wijering_swftools_flashvars in wijering/
wijering.module - Implementation of swftools_flashvars hook. Return an array of flashvars.
File
- wijering/
wijering.module, line 216
Code
function _wijering_flashvars($this_player) {
// Cache this.
static $flashvars = array();
if (!count($flashvars)) {
// Media Player
foreach (array(
WIJERING_MEDIAPLAYER,
WIJERING_IMAGEROTATOR,
) as $player) {
// Get saved settings for this method.
$defaults = _wijering_settings($player);
foreach ($defaults as $category => $vars) {
foreach ($vars as $key => $setting) {
if (!$setting || $setting == 'default') {
unset($defaults[$category][$key]);
}
else {
switch ($category) {
case 'color':
$defaults['color'][$key] = str_replace('#', '0x', $defaults['color'][$key]);
break;
case 'boolean':
$defaults['boolean'][$key] = _swftools_tf($defaults['boolean'][$key]);
break;
}
}
}
}
// Not the same as width/height. This determines the extended width OR height
// past the main view area where the actual playlist file names can be found.
// Setting both together is not supported.
if ($defaults['integer']['displaywidth']) {
unset($defaults['integer']['displayheight']);
}
else {
unset($defaults['integer']['displaywidth']);
}
$flashvars[$player] = $defaults;
}
}
return $flashvars[$this_player];
}