채택완료

Unite Gallery 질문입니다.

2017-02-15 (수) 11:22:31 11,018

사용은 잘 하는 중인데, 가끔... 아주 가~~끔.. 이미지만 없고 내용만 있을때가 있습니다.

이럴때에는 no_img 를 붙여 주면 될것 같은데, Skins/Basic 을 사용중인데, 해결 할 수 있는 방법이 없을까요?

Copy
<?phpif (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가add_javascript('<script src="'.$widget_url.'/themes/default/ug-theme-default.js" type="text/javascript"></script>',0);add_stylesheet('<link href="'.$widget_url.'/themes/default/ug-theme-default.css" rel="stylesheet" type="text/css" />',0);?><div id="<?php echo $wid;?>" style="display:none;"> <?php // 리스트 for ($i=0; $i < $ug_cnt; $i++) {  $thumb = apms_thumbnail($ug_list[$i][0], 200, 0); //썸네일 ?>   <img alt="<?php echo $ug_list[$i][1];?>" src="<?php echo $thumb['src'];?>" data-image="<?php echo $ug_list[$i][0];?>" data-description="<?php echo $ug_list[$i][2];?>"> <?php } ?></div><div class="h15"></div><script type="text/javascript"> $(document).ready(function(){  $("#<?php echo $wid;?>").unitegallery({    gallery_width: 1170,     gallery_height: 650,   gallery_min_width: 300,   gallery_min_height: 200,   theme_enable_text_panel: false  }); });</script>

위내용은 skins/Basic.php 입니다.

no_img 는 Default/images 에 넣으면 될 듯 한데....

고수님들 도와 주세요@@ 

답변 1개

채택된 답변
+20 포인트
2017-02-15 (수) 12:24:23

if문 사용하면 되지 않을까요...

if($ug_cnt==0) { //이미지가 없을때

no_img  보여주기

} else { //이미지가 있으면

for문 내용(7줄~12줄)... 

}

답변을 작성하려면 로그인이 필요합니다.