You are here

views_slideshow_galleria.module in Views Slideshow: Galleria 6.3

Same filename and directory in other branches
  1. 6 views_slideshow_galleria.module
  2. 7.3 views_slideshow_galleria.module

Integrating Galleria with Views Slideshow.

File

views_slideshow_galleria.module
View source
<?php

/**
 *  @file
 *  Integrating Galleria with Views Slideshow.
 */

/**
 *  Implements hook_theme().
 */
function views_slideshow_galleria_theme() {
  return array(
    'views_slideshow_galleria_main_frame' => array(
      'arguments' => array(
        'vss_id' => NULL,
        'view' => NULL,
        'settings' => NULL,
        'rows' => NULL,
      ),
      'template' => 'views-slideshow-galleria-main-frame',
      'file' => 'views_slideshow_galleria.theme.inc',
    ),
  );
}

/**
 * Gets the path to the Galleria library.
 *
 * @return
 *   The path to the Galleria library js file, or FALSE if not found.
 */
function _views_slideshow_galleria_library_path() {
  $library_path = libraries_get_path('galleria');
  if (!empty($library_path)) {

    // Attempt to use minified version of Galleria plugin.
    $files = glob($library_path . '/galleria*.min.js');
    if ($galleria_path = array_shift($files)) {
      return $galleria_path;
    }
    else {
      $files = glob($library_path . '/galleria*.js');
      if ($galleria_path = array_shift($files)) {
        return $galleria_path;
      }
    }
  }
  return FALSE;
}

Functions

Namesort descending Description
views_slideshow_galleria_theme Implements hook_theme().
_views_slideshow_galleria_library_path Gets the path to the Galleria library.