답변 1개 / 댓글 3개
채택된 답변
+20 포인트
2024-02-26 (월) 18:30:44
다음과 같이 해보시는건 어떨까 합니다.
Copy
if ($list[$i]['is_notice']) { // 공지사항
?>
<strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>
<?php
} else {
if ($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
$img_mosaic = '<img id="bo_w_mosaic" src="'.$board_skin_url.'/img/mosaic.jpg" />';
$img_text = '<div id="bo_w_txt">로그인 후 확인하실 수 있습니다.</div>';
echo $img_content; // "Before" 이미지 출력
// "After" 이미지 출력
echo '<img src="'.$thumb2['src'].'" alt="'.$thumb2['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'">';
} else {
$img_content = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
echo $img_content;
}
}
이렇게 하면 로그인과 상관없이 After의 이미지가 출력하게 됩니다.
답변에 대한 댓글 3개
noScarlet
2024-02-26 (월) 18:34:44
답변을 작성하려면 로그인이 필요합니다.
적용 해봤는데... before 이미지가 모자이크 없이 같이 나오네요 ㅠㅠㅠㅠ