--- modules/voting/voting.module.old Wed Apr 11 20:30:56 2007 +++ modules/voting/voting.module Wed Apr 11 20:30:31 2007 @@ -355,20 +355,33 @@ function theme_voting_control_flash($con // create the Flash filename, including the required variables and optional querystring $filename = base_path() . drupal_get_path('module', 'voting') . "/voting.swf?content_type=$content_type&content_id=$content_id&base_url=" . base_path() . $optional_vars; - + + // Include swfobject.js from http://blog.deconcept.com/swfobject/, thanks Geoff! + $output .= ''. "\n"; + // create the HTML to put the Flash object on the page // // NOTE: The object is nested in a table for CSS styling. It does // not seem to work correctly in Firefox when a DIV is used instead. $output .= "
\n"; - $output .= '' . "\n"; - $output .= '' . "\n"; - $output .= '' . "\n"; - $output .= '' . "\n"; - $output .= "\n"; + + // div that will contain flash object via javascript + // each div has a unique id based off the node id + // because in IE the javascript wouldn't replace flashcontent div + // beyond the first one for pages with more than one voting + $output .= '
' . "\n"; + $output .= ' This text is replaced by the Flash movie.' . "\n"; + $output .= '
' . "\n"; + + // inline javascript for creating SWFObject and writing to + // flashcontent div + $output .= '' . "\n"; + $output .= "
\n"; return $output;