'swfobject_replace', 'module' => 'swfobject', 'shared_file' => 'swfobject.js', 'title' => t('SWFOject - '), ); return $methods; } /** * Implementation of swftools_embed hook * Returns the markup for the page, plus set necessary javascript. */ function swfobject_swftools_embed($action, &$methods, &$vars, $preview = '') { // This is code from lutman.module for comparison /* static $lutman_has_run; // Output javascript to the header if (!$lutman_has_run) { // Add jquery.flash.js drupal_add_js(drupal_get_path('module', 'swftools') .'/shared/'. $methods->embed['shared_file']); drupal_add_js(_lutman_header_js(), 'inline', 'header'); } $param_json = drupal_to_js($vars->params); $html = '
'; return $html; */ } /** * The jQuery code that will try to replace all elements after the page loads. * This parses the JSON out of the 'data' attribute of all swftools-embed divs. * */ function _swfobject_header_js() { // This is code from lutman.module for comparison /* $js = " $(document).ready(function(){ $('.swftools-embed').flash(null, {version:7}, function(htmlOptions) { params = Drupal.parseJson($(this).attr('data')); for (p in params) { htmlOptions[p] = params[p]; } this.innerHTML = '