View source
<?php
function views_slideshow_liquid_slider_libraries_info() {
$jsfile = 'js/jquery.liquid-slider.js';
$library_path = libraries_get_path('liquidslider');
$jsfile = !file_exists($library_path . '/' . $jsfile) ? 'src/' . $jsfile : $jsfile;
$libraries['liquidslider'] = array(
'name' => 'jQuery Liquid Slider',
'vendor url' => 'http://liquidslider.kevinbatdorf.com/',
'download url' => 'https://github.com/KevinBatdorf/liquidslider/archive/2.0.12.zip',
'version arguments' => array(
'pattern' => '@([0-9]\\.[0-9]{1,2}\\.[0-9]{1,2})@',
'file' => $jsfile,
),
'files' => array(
'js' => array(
'js/jquery.easing.1.3.js',
'js/jquery.touchSwipe.min.js',
$jsfile,
),
),
'variants' => array(
'minified' => array(
'files' => array(
'js' => array(
'js/jquery.easing.1.3.js',
'js/jquery.touchSwipe.min.js',
'js/jquery.liquid-slider.min.js',
),
),
),
),
);
return $libraries;
}
function views_slideshow_liquid_slider_theme($existing, $type, $theme, $path) {
return array(
'views_slideshow_liquid_slider_main_frame' => array(
'variables' => array(
'view' => NULL,
'settings' => array(),
'rows' => array(),
'title' => '',
),
'template' => 'theme/views-slideshow-liquidslider-main-frame',
'file' => 'theme/views_slideshow_liquid_slider.theme.inc',
),
);
}
function views_slideshow_liquid_slider_jqmulti_files() {
$library_path = libraries_get_path('liquidslider');
$module_path = drupal_get_path('module', 'views_slideshow_liquid_slider');
return array(
$library_path . '/js/jquery.liquid-slider.min.js',
$module_path . '/js/liquidslider.js',
$library_path . '/js/jquery.easing.1.3.js',
$library_path . '/js/jquery.touchSwipe.min.js',
);
}
function views_slideshow_liquid_slider_jqmulti_libraries() {
return array(
'liquidslider',
);
}
function _views_slideshow_liquid_slider_library_path() {
if (function_exists('libraries_load')) {
if (($library = libraries_load('liquidslider', 'minified')) && $library['installed']) {
return TRUE;
}
else {
return FALSE;
}
}
$library_path = libraries_get_path('liquidslider');
if (!empty($library_path)) {
if (file_exists($liquidslider_path = $library_path . '/js/jquery.liquid-slider.min.js')) {
return $liquidslider_path;
}
elseif (file_exists($liquidslider_path = $library_path . '/src/js/jquery.liquid-slider.js')) {
return $liquidslider_path;
}
elseif (file_exists($liquidslider_path = $library_path . '/js/jquery.liquid-slider.js')) {
return $liquidslider_path;
}
}
return FALSE;
}
function _views_slideshow_liquid_slider_get_install_error_message() {
$library_path = 'sites/all/libraries/';
$library_url = 'https://github.com/KevinBatdorf/liquidslider/archive/2.0.12.zip';
$library_link = l($library_url, $library_url, array(
'attributes' => array(
'target' => '_blank',
),
));
$t = get_t();
$output = $t('The jQuery Liquid Slider plugin needs to be installed.');
$output .= ' ';
$output .= $t('Download the jQuery plugin from !link and unzip it into @library_path', array(
'!link' => $library_link,
'@library_path' => $library_path,
));
$output .= '<br>';
$output .= '<b>CAUTION:</b> You must rename the folder name "liquidslider-(version)" to "liquidslider"';
return $output;
}