묻고답하기
위젯 섬네일 링크
2016.06.09 00:42
<a href="{$item->getLink()}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width,$widget_info->thumbnail_height,$widget_info->thumbnail_type)}" border="0" /></a>
섬네일쪽에 링크소스를 추가했는데 추가 하면 아예 위젯이 먹통이 되네요.
소스는 제대로 된게 맞나요? 스킨쪽 list.html 인가 또 다른곳에다가 추가해줘야하는게 있나요?
<!--%import("normal.css")-->
{@
$unique = rand(0,100);
$slideEffect = $widget_info->effect_target;
$slideInterval = $widget_info->slide_delay;
$slide_autoScroll = $widget_info->slide_autoscroll;
$slide_naviBtn = $widget_info->slide_navi;
}
<div id="effectSlider_{$unique}" class="effectSlider_Container" style="width:{$widget_info->thumbnail_width }px; height:{$widget_info->thumbnail_height}px;padding:0px;margin:0px; position:relative;">
<div class="slider-viewport" style="width:{$widget_info->thumbnail_width }px; height:{$widget_info->thumbnail_height}px;overflow: hidden;margin:0 auto;">
<div id="contentBox" style="position:absolute;top:0px;left:0px;width:{$widget_info->thumbnail_width }px; height:{$widget_info->thumbnail_height}px;">
{@ $count =0;}
<!--@for($i=0;$i<$widget_info->img_list_count;$i++)-->
{@ $oDocument = $widget_info->document_list[$i]}
<!--@if($oDocument->document_srl)-->
{@ $_existsThumbnail = $oDocument->thumbnailExists($widget_info->thumbnail_width,$widget_info->thumbnail_height,$widget_info->thumbnail_type) }
<!--@if($_existsThumbnail)-->
<figure class="slide" style="width:{$widget_info->thumbnail_width }px; height:{$widget_info->thumbnail_height}px;margin: 0px;padding: 0px;">
<a href="{$item->getLink()}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width,$widget_info->thumbnail_height,$widget_info->thumbnail_type)}" border="0" /></a>
</figure>
{@ $count++;}
<!--@end-->
<!--@end-->
<!--@end-->
</div>
</div>
<!--@if($widget_info->slide_navi == 'Y')-->
<div id="controls">
<!--@for($i=0;$i<$count;$i++)-->
<a class="goSlide" href="#" data-slideindex="{$i}"></a>
<!--@end-->
</div>
<!--@end-->
<ul class="direction-nav">
<li><a class="prev">prev</a></li>
<li><a class="next">Next</a></li>
</ul>
</div>
<script type="text/javascript" src="../../js/jquery.effetcSlider.js"></script>
<script>
$(function () {
var slideEffect = "{$slideEffect}";
var slidedelay = Number("{$slideInterval}");
var slide_autoScroll = "{$slide_autoScroll}";
var slide_NaviBtn = "{$slide_naviBtn}";
if(slide_autoScroll == "Y") slideAutoScroll = true;
else slideAutoScroll = false;
if( slideEffect == "scrollVert3d" || slideEffect == "scrollHorz3d" || slideEffect == "tile3d"){
if(BrowserDetect.browser == "Explorer"){
var slideEffect = "scrollHorz";
}
}
$("#effectSlider_{$unique}").parent().parent().css("overflow","visible");
if(slide_NaviBtn == "Y") $("#effectSlider_{$unique} #controls .goSlide").eq(0).addClass("current");
var $contentSlider = $('#effectSlider_{$unique} #contentBox');
var $indicators = $('#effectSlider_{$unique} #controls .goSlide');
var $effects = slideEffect;
var slideInterval = slidedelay;
var switchIndicator = function ($c, $n, currIndex, nextIndex) {
if(slide_NaviBtn == "Y") $indicators.removeClass('current').eq(nextIndex).addClass('current');
};
$contentSlider.boxSlider({
speed: 1200
, autoScroll: slideAutoScroll
, timeout: slideInterval
, pauseOnHover: true
, next: '#effectSlider_{$unique} .direction-nav .next'
, prev: '#effectSlider_{$unique} .direction-nav .prev'
, effect: $effects
, onbefore: switchIndicator
, blindCount : 20
, tileRows : 4
, rowOffset : 80
});
$('#effectSlider_{$unique} #controls').on('click', '.goSlide', function (e) {
$contentSlider.boxSlider('showSlide', $(this).data('slideindex'));
$("#effectSlider_{$unique} #controls .goSlide").removeClass("current");
$(this).addClass("current");
e.preventDefault();
});
});
var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
},
searchString: function (data) {
for (var i=0;i<data.length;i++) {
var dataString = data[i].string;
var dataProp = data[i].prop;
this.versionSearchString = data[i].versionSearch || data[i].identity;
if (dataString) {
if (dataString.indexOf(data[i].subString) != -1)
return data[i].identity;
}
else if (dataProp)
return data[i].identity;
}
},
dataBrowser: [
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
},
{
string: navigator.userAgent,
subString: "Trident/7.0",
identity: "Explorer",
versionSearch: "MSIE"
}
]
};
BrowserDetect.init();
</script>
전체링크입니다 이건