would be nice to be able to upload and display swf flash files as well as standard images...

thanks,
ryan grace.

Comments

AjK’s picture

Version: 4.7.x-1.x-dev » 6.x-1.x-dev
Status: Active » Fixed

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.

AjK’s picture

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.

Anonymous’s picture

Status: Fixed » Closed (fixed)
pritisinh1’s picture

how to upload flash files in comments other than admin users i have added flashnode module still it is not working