I found it interesting that the "parent" webform supports imagecache via CCK, but the building of a "child" webform does not. (There's no Display Fields option as there is within Content Types to assign a field of type "file" to an imagecache preset.)

Is this by design? I'd love to be able to create a webform that allows a user to upload an image, and have that image go into an imagecache preset. Or is there a workaround?

Comments

smudboy’s picture

Component: Miscellaneous » User interface
quicksketch’s picture

Status: Active » Closed (fixed)

You can run files through ImageCache by overriding theme_webform_display_file(), though because Webform is not intended to be a front-end facing interface, I don't think this is a particularly necessary integration to include in the project.

I'm closing this issue directly considering its age. Please reopen if you have further questions on this topic.

seb7’s picture

Version: » 6.x-3.2
Status: Closed (fixed) » Active

EDIT : original message was wrong.

I want to have a thumbnail in the result table.
What i did is :

1 - use the theme override way to change function mytheme_webform_table_file($component, $value) : reaplace line
$submission_output = webform_component_invoke($component['type'], 'table', $component, $data);
with
$submission_output = my_webform_component_invoke($component['type'], 'table', $component, $data);
2 - copy original my_webform_component_invoke function and change

  $args = func_get_args();
  $type = array_shift($args);
  // added part
    if($type == 'file' && $callback == 'table') // normalement ya que 'table' de tout façon
	$type = 'my_file';
  // end added part

so that my own function _webform_table_my_file($component, $value) is used to render the file link as a thumbnail.

That's ok because i don't change a line in the module core files but there may be a simpler way ? Or you should add a themable output for that (maybe...).

Any comment about that ?

quicksketch’s picture

Status: Active » Closed (fixed)

Right now you can't change the output of the table display, that's true. See this feature request: #933342: _webform_table_component hooks should run through theme functions.. I'm moving this back to closed, further discussion should continue in the other issue.