'simpleviewer', 'module' => 'simpleviewer', 'shared_file' => 'viewer.swf', 'title' => t('Simple Viewer - Airtight Interactive'), ); // Wijering support various actions with the same player and info. $methods[SWFTOOLS_IMAGE_DISPLAY_LIST]['simpleviewer'] = $media_player; $methods[SWFTOOLS_IMAGE_DISPLAY]['simpleviewer'] = $media_player; return $methods; } /** * Implementation of hook_menu(). */ function simpleviewer_menu($may_cache) { $items = array(); if ($may_cache) { $items[] = array('path' => 'admin/swf/simpleviewer', 'title' => t('SimpleViewer'), 'weight' => 1, ); } return $items; } function swftools_admin_simpleviewer_form() { drupal_set_title('Simple Viewer - Airtight Interactive'); $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 swfobject_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 _swfoject_flashvars() { // From wijering.module for comparison /* $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; */ }