테스트 사이트 - 개발 중인 베타 버전입니다

첨부파일질문좀 드리겠습니다 채택완료

초보입니다1 7년 전 조회 2,213

안녕하세요 질문좀드리겠습니다

갤러리 리스트부분인데요

첨부파일 2번 이미지가 나오게 하고싶은데 어떻게 해야할까요 ㅠㅠ?

 

</p>

<p>   <?php

                if ($list[$i]['is_notice']) { // 공지사항 ?>

                    <strong style="width:<?php echo $board['bo_mobile_gallery_width'] ?>px;height:<?php echo $board['bo_mobile_gallery_height'] ?>px">공지</strong>

                <?php

                } else {

                    $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);</p>

<p>                    if($thumb['src']) {

                        $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'"  >';

                    } else {

                        $img_content = '<span class="no-img">no image</span>';

                    }</p>

<p>                    echo $img_content;

                }

                ?></p>

<p>

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

답변 2개

채택된 답변
+20 포인트
7년 전

이렇게 넣어주시면 나올거에요.

</p>

<p><?php</p>

<p>$sql_bf = " select bf_file, bf_content from {$g5['board_file_table']}

   where bo_table = '{$board[bo_table]}' and wr_id = '{$list[$i][wr_id]}' and bf_type between '1' and '3' order by bf_no limit 1, 1 ";

$row_bf = sql_fetch($sql_bf);</p>

<p>if($row_bf['bf_file']) {

 $filename = $row_bf['bf_file'];

 $filepath = G5_DATA_PATH.'/file/'.$board['bo_table'];

 $alt = get_text($row_bf['bf_content']);

 $tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);

 $src = G5_DATA_URL.'/file/'.$board['bo_table'].'/'.$tname;

 echo '<img src="'.$src.'" alt="'.$alt.'"  >';

}</p>

<p>?></p>

<p>

로그인 후 평가할 수 있습니다

답변에 대한 댓글 3개

초보입니다1
7년 전
알려주신대로 해보니

Warning: Missing argument 6 for thumbnail(), called in /www_root/mobile/skin/board/gallery/list.skin.php on line 132 and defined in /www_root/lib/thumbnail.lib.php on line 192

이런오류가나오네요
초보입니다1
7년 전
알려주신대로 해보니

Warning: Missing argument 6 for thumbnail(), called in /www_root/mobile/skin/board/gallery/list.skin.php on line 132 and defined in /www_root/lib/thumbnail.lib.php on line 192

이런오류가나오네요
배모씨
7년 전
$tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height']);

위 코드를 밑에 처럼 false를 추가해주세요.
$tname = thumbnail($filename, $filepath, $filepath, $board['bo_mobile_gallery_width'], $board['bo_mobile_gallery_height'], false);

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

7년 전

2번 이미지가 있다고 전제하면

lib / thumbnail.lib.php 파일 13라인쯤 

between '1' and '3' order by bf_no limit 0, 1 ";  이런 부분을 찾아

limit 1, 1 즉, 0을 1로 바꾸시면 되는데 ... 이렇게 되면 이 함수를 사용하는 모든 스킨들에서

그렇게 될테니 따로 함수를 하나 더 만들어 그걸 적용하시던지, 아니면 extend폴더에 넣어 그걸 사용하셔야 겠네요. 

로그인 후 평가할 수 있습니다

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

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

로그인