Community Documentation

Theming flash node

Last updated January 29, 2008. Created by Stuart Greenfield on January 28, 2008.
Log in to edit this page.

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.

About this page

Drupal version
Drupal 6.x

Site Building Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here