views:

73

answers:

2

Is there a contrib module or Drupal option to allow users download all attachments in one zip file?

+2  A: 

I'm not aware of a core option for this.

As for contributed modules, take a look at the pclzip module (with sub modules). It is still in beta, but promises to do what you want. Not sure if it works with CCK based attachments yet (filefield/imagefield).

Henrik Opel
Nice find Henrik! :)
mac
+2  A: 

This answer is just an add-on to Henrik's (+1), so please accept his in case you will end use the module he suggested... I just needed code formatting, this is why I did not use the comment! :)

From what I understand by inspecting the code only I see that the pclzip_zip_content_files module (one of the submodules of the one previously suggested) does process CCK fields correctly. The option seems however to be available only through some sort of configuration from the module block.

    // manage cck fields
    $form['pclzip_zip_node_files']['pclzip_extra_cck_fields_fieldset'] = array(
      '#type' =>'fieldset',
      '#title' =>t('Extra cck fields'),
      '#collapsible' =>TRUE,
      '#collapsed' =>TRUE,
    );
    $form['pclzip_zip_node_files']['pclzip_extra_cck_fields_fieldset']['pclzip_zip_content_files_extra_cck_fields'] = array(
      '#type'               => 'checkboxes',
      '#title'                => t('CCK Field'),
      '#options'            => pclzip_get_extra_cck_fields(),
      '#default_value'   => variable_get('pclzip_zip_content_files_extra_cck_fields', array()),
      '#description'       => t('Select the CCK field to use.'),
    );

Hope this helps!

mac
Great, thanks for this.
Viliam

related questions