리스트에서 원하는 순번파일이미지 불러오기. 채택완료

Copy
<?php          ?>           <strong style="width:<?php echo $board['bo_gallery_width'] ?>px;height:<?php echo $board['bo_gallery_height'] ?>px">공지</strong>         <?php } else {          $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);          if($thumb['src']) {           $img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['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;         }          ?> ​

list.skin.php에서

지금 이런식으로 갤러리에서 썸네일 생성을 하는데요..

당연하게 첨부파일 1번이 썸네일 생성되어 나오는데..

이것을 1번 첨부파일을 무시하고 2번 첨부파일이 나오게 바꾸고 싶습니다.

여러가지 검색하고 적용보았는데.. 이상하게 다 안되네요 ㅠㅠ

답답해서 이렇게 문의 드립니다.

부탁드리겠습니다.

답변 1개

채택된 답변
+20 포인트

  get_list_thumbnail 함수의 내용중 

아래 쿼리를

$sql = " select bf_file, bf_content from {$g5['board_file_table']}
                where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit 0, 1 "; 

아래처럼

$sql = " select bf_file, bf_content from {$g5['board_file_table']}
                where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' and bf_no=1"; 

바꾸시면 될것 같네요..

다만 get_list_thumbnail  이함수가 여러곳에서 사용될테니..

하나 더 복사해서..

get_list_thumbnail_new 등으로 만들어서 사용하시면 될듯하네요..

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

답변에 대한 댓글 1개

정말 감사합니다.
덕분에 잘해결했습니다.~

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

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

로그인
🐛 버그신고