'Views Slideshow: ImageFlow', 'description' => 'Configure Views Slideshow: ImageFlow options.', 'page callback' => 'drupal_get_form', 'page arguments' => array('views_slideshow_imageflow_settings'), 'file' => 'includes/views_slideshow_imageflow.admin.inc', 'access callback' => 'user_access', 'access arguments' => array('administer views'), ); return $items; } /** * Implements hook_theme(). */ function views_slideshow_imageflow_theme($existing, $type, $theme, $path) { return array( 'views_slideshow_imageflow' => array( 'arguments' => array('view' => NULL, 'options' => array(), 'rows' => array(), 'title' => ''), 'template' => 'views-slideshow-imageflow', 'file' => 'views_slideshow_imageflow.theme.inc', 'path' => $path .'/themes', ), ); } /** * Return the path to the ImageFlow plugin. * * If variable_get('views_slideshow_imageflow_plugin') has not yet been set, * then this will attempt to autodiscover the path if the imageflow.js file * exists within sites/all/libraries/* or sites/example.com/libraries/*. It will * also set the path to variable_get('views_slideshow_imageflow_plugin'). * * The library is available from http://finnrudolph.de/ImageFlow. * * @param boolean $reset * (Optional) If TRUE, then reset the variable and attempt a new autodiscovery. * @return string * The path to the imageflow.js file. */ function views_slideshow_imageflow_path($reset = FALSE) { static $path; if (!isset($path) || $reset) { if (!($path = views_slideshow_imageflow_variable_get('plugin_path')) || $reset) { $files = drupal_system_listing('^imageflow\.js$', 'libraries', 'basename', 0); if (!$files) { $files = drupal_system_listing('^imageflow\.js$', 'plugins', 'basename', 0); } if (isset($files['imageflow.js'])) { $path = dirname($files['imageflow.js']->filename); views_slideshow_imageflow_variable_set('plugin_path', $path); } } } return $path; }