You are here

function theme_galleria_files in Galleria 6

Create a Galleria from the attached (upload module) files.

2 theme calls to theme_galleria_files()
galleria_html in ./galleria.module
Menu callback to create just the HTML data that gets embedded in a lightbox. Only supports attached files Gallerias, not imagefield ones.
galleria_nodeapi in ./galleria.module
Implementation of hook_nodeapi().

File

./galleria.module, line 249
Turns a node into a Galleria image gallery.

Code

function theme_galleria_files($node) {
  $allowed_extensions = explode(',', GALLERIA_ALLOWED_EXT);
  $images = array();
  foreach ($node->files as $file) {

    // filter out files that are not images
    $ext = strtolower(substr($file->filename, -4));
    if (substr($ext, 0, 1) == '.') {
      $ext = substr($ext, 1, 3);
    }
    if (!in_array($ext, $allowed_extensions, TRUE)) {
      continue;
    }
    $images[] = $file;
  }
  return theme('galleria', $images);
}