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

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
리스트에서 원하는 순번파일이미지 불러오기.

QA

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

본문


         <?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

  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 등으로 만들어서 사용하시면 될듯하네요..

 

답변을 작성하시기 전에 로그인 해주세요.
전체 124,206 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT