전체 검색할때 이미지가 있을경우 이미지 출력하기

zzz.jpg
bbs/search.php <<== 요 파일
208번째 줄에

$list[$idx][$i][content] = $content;
$list[$idx][$i][wr_id] = $row[wr_id]; //이미지용 이거 추가



skin\search\basic\search.skin.php <<==요파일에 104번째 줄에 추가해주세요

//이미지 출력 시작
$img=$list[$idx][$i][wr_id];
$roo = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$search_table[$idx]' and wr_id = '$img' and bf_no = '0' ");

if (preg_match("/\.($config[cf_image_extension])$/i", $roo[bf_file]))
$imgser = "<img src='$g4[path]/data/file/$search_table[$idx]/$roo[bf_file]' width=100 height=100 border=0>";
// 여기 까지 추가
echo "<a href='{$list[$idx][$i][href]}{$comment_href}'><u>";
echo $imgser; // 요거두 추가
//이미지 출력 끝


디자인해서 배포바람 ^^
=========================================================
=========================================================

테이블안에 경우.....
=========================================================
=========================================================


skin\search\basic\search.skin.php <<==요파일에 99번째 줄에 추가해주세요


if ($list[$idx][$i][wr_is_comment])
{
echo "<font color=999999>[코멘트]</font> ";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}

//이미지 출력 시작
$img=$list[$idx][$i][wr_id];
$roo = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$search_table[$idx]' and wr_id = '$img' and bf_no = '0' ");
if (preg_match("/\.($config[cf_image_extension])$/i", $roo[bf_file]))
$imgser = "<td width=60 valign='top'><img src='$g4[path]/data/file/$search_table[$idx]/$roo[bf_file]' width=50 height=50 border=0></td>";
//이미지 출력 끝
echo "<table border=0 cellspacing=0 cellpadding=0><tr><td width=30></td>";
echo $imgser; // 요거두 추가
echo "<td>";
echo "<li>";
echo "<a href='{$list[$idx][$i][href]}{$comment_href}'><u>";
echo $list[$idx][$i][subject];
echo "</u></a> [<a href='{$list[$idx][$i][href]}{$comment_href}' target=_blank>새창</a>]<br>";
echo $list[$idx][$i][content];
echo "<br><font color=#999999>{$list[$idx][$i][wr_datetime]}</font>   ";
echo $list[$idx][$i][name];
echo "</ul></ul>";
echo "</td></tr></table>";
}
}
?>

첨부파일

zzz.jpg (108 KB)
0회 2006-03-08 01:23
|

댓글 13개

하하하~
빠르기도 하십니다^^

그사이 만드셨네요...
감사합니다.

아쉬운점은 이미지 밑으로 글이 나오는것 보다 옆으로 붙어서 나오게하면 더 멋질것 같습니다.
제 힘으로는 안되겠더군요...하하
저두 그 생각해는데 다른 사람이 모 해달라구 해서 ^^ 그래서 디자인해서 배포바람이라는 문구를 남겨쬬 ^^
아주 멋집니다.
우와~ 아주 좋은 팁이네여 감사합니다~
정말 좋은팁 입니다.
유용한 팁 감사합니다
감사합니다
검색 결과값 뿌리기 이미지 포함
검색 결과값에서 이미지가 여러개 있을경우 3열씩 가로정렬하여 뿌려지는 방법도좀..ㅋㅋ
좋은정보 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
20년 전 조회 2,671
20년 전 조회 4,319
20년 전 조회 5,270
20년 전 조회 1.1만
20년 전 조회 5,960
20년 전 조회 4,199
20년 전 조회 5,335
20년 전 조회 4,813
20년 전 조회 2,554
20년 전 조회 4,654
20년 전 조회 3,896
20년 전 조회 4,146
20년 전 조회 8,078
20년 전 조회 3,226
20년 전 조회 5,729
20년 전 조회 6,757
20년 전 조회 3,335
20년 전 조회 4,170
20년 전 조회 4,421
20년 전 조회 5,414