page_type == "item") {
if (locales::is_rtl()) {
$rtl_support = "rtl: true,\n";
} else {
$rtl_support = "rtl: false,\n";
}
$carouselwidth = module::get_var("navcarousel", "carouselwidth", "600");
if ($carouselwidth == 0) {
$carouselwidth = "100%";
$containerwidth = "";
} else {
$carouselwidth = $carouselwidth ."px";
$containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n
width: ". $carouselwidth .";\n
}\n";
}
$thumbsize = module::get_var("navcarousel", "thumbsize", "50");
$showelements = module::get_var("navcarousel", "showelements", "7");
$childcount = $theme->item->parent()->viewable()->children_count();
$itemoffset = intval(floor($showelements / 2));
if ($childcount <= $showelements) {
$itemoffset = 1;
} else {
$itempos = $theme->item->parent()->get_position($theme->item);
$itemoffset = $itempos - $itemoffset;
if ($itemoffset < 1) {
$itemoffset = 1;
}
if (($itemoffset + $showelements) > $childcount) {
$itemoffset = $childcount - $showelements + 1;
}
}
if (module::get_var("navcarousel", "noajax", false)) {
$ajaxhandler = "";
} else {
$ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n";
}
if (module::get_var("navcarousel", "showondomready", false)) {
$onwinload = "";
} else {
$onwinload = "});\n
$(window).load(function () {\n";
}
return
$theme->script("jquery.jcarousel.min.js")
. $theme->css("skin.css")
. "\n
\n
\n
";
}
}
static function photo_bottom($theme) {
if (!module::get_var("navcarousel", "abovephoto", false)) {
if ($theme->page_type == "item") {
return new View("navcarousel.html");
}
}
}
static function photo_top($theme) {
if (module::get_var("navcarousel", "abovephoto", false)) {
if ($theme->page_type == "item") {
return new View("navcarousel.html");
}
}
}
}