메인최신글 이미지
메인최신글 이미지로 했을때 궁금한것이 있어 질문드립니다.
그림을 보시면 아시겠지만 원본 이미지가 있고 그것을 파일첨부로 올렸을 때 메인최신글에서 이미지가 찌그러져서 나옵니다.
아래그림처럼 메인최신글에서 그림이 잘려서 안찌그러지게 나오게하는 방법은 없을까요?
아시는분 답변 부탁드립니다.
스킨의 latest.php의 소스는 이렇습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="130" border="0" cellspacing="0" cellpadding="0" valign="bottom">
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td width="120" align="center">
<table width='130' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='130' height='70' align='center'>
<div style='width:130px;height:90px;border:1px solid #CCCCCC;padding:2px' align='center'>
<?
echo "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='128' height='88' border='0'></a><br>
<?}
else if(preg_match("/\.(swf|wma|asf)$/i", $image))
{ echo"<embed src='$g4[path]/data/file/$bo_table/$image' width='128' height='88' border='0'>";}
else{
echo"<img src='$latest_skin_path/img/noimage.gif' width='128' height='88' border='0'></a><br>";
}?>
</div></td></tr></table>
</td>
</tr>
<tr><td align="center" height="25"><?
$style = "";
if ($list[$i][icon_new])
$style = "style='font-family:굴림; font-size:9pt;' ";
$subject = "<span $style>".cut_str($list[$i][subject],45)."</span>"; //제목 글자수
<!-- <tr><td height=10></td></tr> -->
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td width="120" align="center">
<table width='130' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='130' height='70' align='center'>
<div style='width:130px;height:90px;border:1px solid #CCCCCC;padding:2px' align='center'>
<?
echo "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
if (preg_match("/\.(gif|jpg|png)$/i", $image)) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$image?>' width='128' height='88' border='0'></a><br>
<?}
else if(preg_match("/\.(swf|wma|asf)$/i", $image))
{ echo"<embed src='$g4[path]/data/file/$bo_table/$image' width='128' height='88' border='0'>";}
else{
echo"<img src='$latest_skin_path/img/noimage.gif' width='128' height='88' border='0'></a><br>";
}?>
</div></td></tr></table>
</td>
</tr>
<tr><td align="center" height="25"><?
$style = "";
if ($list[$i][icon_new])
$style = "style='font-family:굴림; font-size:9pt;' ";
$subject = "<span $style>".cut_str($list[$i][subject],45)."</span>"; //제목 글자수
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
if ($list[$i]['is_notice'])
echo "{$subject}";
else
echo "{$subject}";
echo "{$subject}";
else
echo "{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>";
echo " <span style='font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>";
echo "</a>";
?></td></tr>
<? } ?>
</table>
첨부파일
|
오류!
이 게시판은 회원만 글쓰기가 가능합니다. 로그인해 주세요.
오류!
이 게시판은 회원만 글쓰기가 가능합니다. 로그인해 주세요.
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 3개
이를 위와 같이 깔끔하게 줄일려면 gd라이브러리를 서버에 설치하신후 이를 이용하여 제공되는 함수를 사용하시면 되겠습니다. 간단한 예제들은 검색해보시면 아실수 있을겁니다.
어디에서 받아서 설치나아요?
그리고 유아원님의 어떤 스킨을 사용하여야하나요?
최신글은 이미지체인징되는거 밖에 없던데요...
그걸 사용하니 이미지 자체가 안나오더라구요 ㅠㅠ
나만 그런가??
모르는게 너무많죠^^;;