| 1 |
<?php |
<?php |
| 2 |
// $Id: jcarousellite_views.module,v 1.1.2.1 2009/03/03 18:23:58 owahab Exp $ |
// $Id: jcarousellite_views.module,v 1.1.2.2 2009/03/04 13:58:31 owahab Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_views_style_plugins(). |
* Implementation of hook_views_style_plugins(). |
| 19 |
$functions[] = "jcarousellite_${callback}_vid${vid}_c${c}"; |
$functions[] = "jcarousellite_${callback}_vid${vid}_c${c}"; |
| 20 |
$functions[] = "jcarousellite_${callback}_vid${vid}"; |
$functions[] = "jcarousellite_${callback}_vid${vid}"; |
| 21 |
$functions[] = "jcarousellite_${callback}"; |
$functions[] = "jcarousellite_${callback}"; |
| 22 |
|
$functions[] = "jcarousellite_${callback}_default"; |
| 23 |
foreach ($functions as $func) { |
foreach ($functions as $func) { |
| 24 |
if (function_exists($func)) { |
if (function_exists($func)) { |
| 25 |
return $func($vid, $c); |
return $func($vid, $c); |
| 27 |
} |
} |
| 28 |
} |
} |
| 29 |
|
|
| 30 |
function jcarousellite_add_prev($vid, $c) { |
function jcarousellite_add_prev_default($vid, $c) { |
| 31 |
return l( |
return l( |
| 32 |
theme('image', drupal_get_path('module', 'jcarousellite_views') .'/images/prev-horizontal.png', |
theme('image', drupal_get_path('module', 'jcarousellite_views') .'/images/prev-horizontal.png', |
| 33 |
'<<', |
'<<', |
| 40 |
TRUE); |
TRUE); |
| 41 |
} |
} |
| 42 |
|
|
| 43 |
function jcarousellite_add_next($vid, $c) { |
function jcarousellite_add_next_default($vid, $c) { |
| 44 |
return l( |
return l( |
| 45 |
theme('image', drupal_get_path('module', 'jcarousellite_views') .'/images/next-horizontal.png', |
theme('image', drupal_get_path('module', 'jcarousellite_views') .'/images/next-horizontal.png', |
| 46 |
'<<', |
'<<', |
| 53 |
TRUE); |
TRUE); |
| 54 |
} |
} |
| 55 |
|
|
| 56 |
function jcarousellite_add_view_js($vid, $c) { |
function jcarousellite_add_view_js_default($vid, $c) { |
| 57 |
return " |
return " |
| 58 |
$('.jcarousellite-$vid-$c .item-list').jCarouselLite({ |
$('.jcarousellite-$vid-$c .item-list').jCarouselLite({ |
| 59 |
btnNext: '.jcarousellite-next-$vid-$c', |
btnNext: '.jcarousellite-next-$vid-$c', |