울라프

Season2 // 검색결과에서 이미지 보이기

C:\xampp\htdocs\eeeeeeeeeeeee\skin\search\basic/search.skin.php

 

#21 Season2 // bbs/search.php 검색 결과를 100개 표시

[code]

if (!$srows) $srows = 110; // 한페이지에 출력하는 검색 행수

[/code]

 

 

# 131 Season2 // 검색결과에서 이미지 보이기

[code]

<?php
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
  if ($list[$idx][$i]['wr_is_comment']) {
    $comment_def = '<span class="cmt_def"><i class="fa fa-commenting-o" aria-hidden="true"></span> ';
    $comment_href = '#c_'.$list[$idx][$i]['wr_id'];
  } else {
    $comment_def = '';
    $comment_href = '';
  }

  // 검색결과에서 썸네일 이미지 생성
  $thumb_info = get_list_thumbnail($search_table[$idx], $list[$idx][$i]['wr_id'],105,79);
  $sch_thumb = $thumb_info['src'];
?>

 

//이미지 주소 넣을 곳에 아래 코드 삽입

<?=$sch_thumb?>

[/code]

 

# 170 Season2 // bbs/search.php 코멘트는 검색 안되게

[code]

$sql = " select * from {$tmp_write_table}
where wr_is_comment = 0 and {$sql_search}
order by wr_id desc
limit {$from_record}, {$rows} ";

[/code]

위 코드에서 wr_is_comment = 0 and 삽입

|

댓글 4개

위 코드데로 업데이트 했지만 변함이 없어서;;; 출력부분에
<?php echo $sch_thumb ?> 시키게 되면 이미지가 http://test.test.com/data/file/gallery/thumb-aab70f5ff94a70e099d2eeff6fc19234_bKr67aZE_c031c0fe92bcfa28f715ffb96588e7920ca76bc1_105x79.jpg test22222222222222222222이런식으로 상대경로 나오는데 이미지로 나오게 하려면 어떻게 해야하죠?
@피라미드
그누보드 원본 갤러리 view.php, list.php 파일에 보면 해당 변수를 이용한 echo 문이 있으니 참고해 보세요.
네 감사합니다 해결되었네요 ^^
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
2년 전 조회 1,079
2년 전 조회 1,707
2년 전 조회 2,762
2년 전 조회 1,966
2년 전 조회 1,321
2년 전 조회 2,506
2년 전 조회 2,397
2년 전 조회 1,874
2년 전 조회 2,739
2년 전 조회 1,785
2년 전 조회 2,280
2년 전 조회 3,939
2년 전 조회 1,481
2년 전 조회 1,878
2년 전 조회 1,565
2년 전 조회 2,059
2년 전 조회 3,091
2년 전 조회 2,279
2년 전 조회 2,452
2년 전 조회 1,977
2년 전 조회 2,296
2년 전 조회 2,860
2년 전 조회 1,940
2년 전 조회 2,325
2년 전 조회 1,722
2년 전 조회 2,333
2년 전 조회 3,825
2년 전 조회 1,793
2년 전 조회 2,005
2년 전 조회 1,922