'wijering_media', 'module' => 'wijering', 'shared_file' => 'mediaplayer.swf', 'title' => t('Flash Media Player - Jeroen Wijering'), ); // Wijering support various actions with the same player and info. $methods[SWFTOOLS_FLV_DISPLAY]['wijering_media'] = $media_player; $methods[SWFTOOLS_MP3_DISPLAY]['wijering_media'] = $media_player; return $methods; } /** * Implementation of hook_menu(). */ function wijering_menu($may_cache) { $items = array(); if ($may_cache) { $items[] = array('path' => 'admin/swf/wijering', 'title' => t('Wijering Flash'), 'weight' => 1, ); } return $items; } function swftools_admin_wijering_form() { drupal_set_title('Jeroen Wijering - Flash Players'); $form = array(); $form['wijering_media'] = array( '#type' => 'fieldset', '#title' => t('Flash Media Player'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#description' => 'This media player ships with SWF Tools. A free (un-watermarked) version and commercial license information can be found at http://www.jeroenwijering.com/?item=Flash_Media_Player', ); $form['wijering_media']['wijering_media_autoplay'] = array( '#type' => 'checkbox', '#title' => t('Autoplay by default'), '#default_value' => variable_get('wijering_media_autoplay', FALSE), ); $form['wijering_rotator'] = array( '#type' => 'fieldset', '#title' => t('Flash Image Rotator'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#description' => 'This image rotator ships with SWF Tools. A free (un-watermarked) version and commercial license information can be found at http://www.jeroenwijering.com/?item=Flash_Image_Rotator', ); return system_settings_form($form); } /** * Implementation of swftools_flashvars hook * Allows the Flash player provider to add variables to the Flashvars array. * Other arrays can also be modified. */ function wijering_swftools_flashvars($action, &$methods, &$vars) { $vars->flashvars = array_merge(_wijering_flashvars(), $vars->flashvars); if ($methods->player = 'wijering_media') { if ($vars->othervars['file_url']) { $vars->flashvars['file'] = $vars->othervars['file_url']; } } return $flashvars; } /** * These are the default flashvars. * */ function _wijering_flashvars() { $swf_options = _swf_options(); $defaults = array( 'autostart' => $swf_options['bool'][variable_get('wijering_media_autoplay', '0')], 'file' => '', // may have a "problem with file" file later ); return $defaults; }