Make galleries from attachments to a node made using the Upload module.

Currently there is no UI for getting this onto a page ... for testing purposes I am using a page with PHP input type and this snippet:

$node = node_load(arg(1));
$element = array(
  '#node' => $node,
  '#formatter' => 'galleryapi_upload_upimage_homepage_slideshow',
);
foreach ($node->files as $fid => $file) {
  $element[$fid] = array('#item'=>array('provider'=>1,'value'=>1));
}
echo theme('galupload_formatter_galleryapi_upload_upimage_homepage_slideshow', $element);

I think that I will create a block for this instead and then it can be added to different zones on the page and only appear if there is content for it, or depending on the block restrictions.

TODO:
* Create a block for the slideshow.
* Check file extensions and/or mime types of attachments to make sure that they are images.
* Video support?

Related projects

Project Information

Downloads