Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Add the swf "file type" to those allowed to be search for. They then appear in the drop down for you to select.
Once you can select an swf file to display in a block, you then need to override the theme function. Currently, the theme function simply wraps the file in an <img src> element. You need to override that so that swf files are wrapped in their appropiate display type (whilst maintaining the img src element if it's not an swf tag).
This is the default theme function the module uses to display the image in a block:-
/**
* themeable function for display of the block
*/
function theme_path_image_block_0($params) {
return '<img src="' . $params['full_uri'] . '" border="1" />';
}
and it's that that you need to override in your theme to enable the display of swf type files.
silly me for noticing that, this is what the theme function in the module looks lie=ke that you need to override
/**
* themeable function for display of the block
*/
function theme_path_image_block_0($params) {
return '<img src="' . $params['full_uri'] . '" border="1" />';
}
It's very basic as it's expecting only an image type file.
Comments
Comment #1
AjK commentedAdd the swf "file type" to those allowed to be search for. They then appear in the drop down for you to select.
Once you can select an swf file to display in a block, you then need to override the theme function. Currently, the theme function simply wraps the file in an <img src> element. You need to override that so that swf files are wrapped in their appropiate display type (whilst maintaining the img src element if it's not an swf tag).
This is the default theme function the module uses to display the image in a block:-
and it's that that you need to override in your theme to enable the display of swf type files.
Comment #2
AjK commentedsilly me for noticing that, this is what the theme function in the module looks lie=ke that you need to override
It's very basic as it's expecting only an image type file.
Comment #3
(not verified) commentedComment #4
pritisinh1 commentedhow to upload flash files in comments other than admin users i have added flashnode module still it is not working