Theming flash node

Last modified: January 29, 2008 - 22:17

Flash node uses two theme functions to produce output.

theme_flashnode($flashnode, $teaser = FALSE, $options = array()) is used to process a flash node object and prepare for it rendering to HTML. Within flash node this function does nothing more than check the requested size does not exceed the configured limits, and scales down the content as required. You could adapt this function to, for example, scale the teaser content to a fraction of the native size.

theme_flashnode_markup($flashnode, $options = array()) is the function that takes a formatted flash node object and returns mark up, either by using SWF Tools if it is available, or by falling back to direct embedding. You could over-ride this theme function if you wanted to use customised flash rendering code.

The functions are split in this way to try and make it simple to over-ride just the portion you want to modify. Assuming you generally wouldn't want to mess with the actual production of markup and only manipulate the sizing of flash content you can therefore over-ride theme_flashnode() and simply conclude your custom themer with a call to theme_flashnode_markup() when you're ready.

Note that the introduction of themeable functions to flash node is new so I am open to suggestions for improvement!

This description applies to flash node version 6 and the current development branch for flash node 5. It is not currently implemented in this manner in the official version 5 release.

 
 

Drupal is a registered trademark of Dries Buytaert.