최신글 불러오기 썸네일을 한칸 비우고 불러오게 하는 방법이 있을까요? 정보
최신글 불러오기 썸네일을 한칸 비우고 불러오게 하는 방법이 있을까요?관련링크
http://petnpet.testpage.co.kr/
232회 연결
본문
댓글 전체
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=127657
위 링크에 있는 최신글 스킨을 수정했습니다.
latest.skin.php 파일 맨 마지막 부분 입니다.
원하시는 내용이 맞는지 모르겠네요.
<? for ($i=0,$j=0; $i<count($list); $i++) { ?> // 수정부분 $j=0 추가
<? //리스트 페이지 이미지 출력
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //첨부파일 언샾마스크추가
} else { //에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/ /"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content1 = cut_str(get_text($wr_content), 100, '…');
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
//echo "<a href='{$list[$i]['href']}' class='item' title='{$list[$i]['subject']}'>";
//echo "<img src='$thumb' border='0'>";
//echo "</a>";
?>
// 추가부분
<?
if($j==0){ echo "<li>최신 글 영역 한칸비우기</li>"; }
$j++;
?>
// 추가부분
<li><a href="<?=$list[$i]['href']?>"><span></span><img src="<?=$thumb?>" /></a></li>
<?
}
} ?>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>
</ul>
위 링크에 있는 최신글 스킨을 수정했습니다.
latest.skin.php 파일 맨 마지막 부분 입니다.
원하시는 내용이 맞는지 모르겠네요.
<? for ($i=0,$j=0; $i<count($list); $i++) { ?> // 수정부분 $j=0 추가
<? //리스트 페이지 이미지 출력
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $file) && file_exists($file)) {
$thumb = thumbnail($file, $img_width, $img_height, 0, 1, 90, 0, "", $filter, $noimg); //첨부파일 언샾마스크추가
} else { //에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) { // data/cheditor------
$file = $g4[path].'/' . $tmp[0]; // 파일명
$thumb=thumbnail($file, $img_width, $img_height, 0, $is_crop, 90, 0, "", $filter, $noimg); //언샾마스크추가
}
}
$wr_content = preg_replace("/<(.*?)\>/"," ",$list[$i][wr_content]);
$wr_content = preg_replace("/ /"," ",$wr_content);
$wr_content = str_replace("//##", " ", $wr_content);
$wr_content1 = cut_str(get_text($wr_content), 100, '…');
if (preg_match("/\.(jpg|gif|png|bmp)$/i", $thumb) && file_exists($thumb)) {
//echo "<a href='{$list[$i]['href']}' class='item' title='{$list[$i]['subject']}'>";
//echo "<img src='$thumb' border='0'>";
//echo "</a>";
?>
// 추가부분
<?
if($j==0){ echo "<li>최신 글 영역 한칸비우기</li>"; }
$j++;
?>
// 추가부분
<li><a href="<?=$list[$i]['href']?>"><span></span><img src="<?=$thumb?>" /></a></li>
<?
}
} ?>
<? if (count($list) == 0) { echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td colspan=3 align=center height=100>자료가 없습니다.</td></tr></table>"; } ?>
</ul>