썸네일 질문-썸네일 비율유지 하려면...
첨부사진처럼 썸네일에 전체 이미지가 다 나올수있게 수정 하려고 하는데 어디 부분을 고쳐줘야 되나요.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=101755&sca=%EA%B0%A4%EB%9F%AC%EB%A6%AC&spt=-4357&page=3
(고치려는 게시판)
이 게시판에 세로가 긴 이미지가 올라가면 썸네일엔 아래는 잘리고 나오지 않아서요
썸네일을 비율유지 시키려고 하는데
혹시 아시는 분 조언 좀 부탁드려요.
--------------------------------------skin.php 이미지 출력부분----
<tr>
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
$Thumbs = makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20));
// 이미지 링크 주소 뽑기
$text = $Thumbs;
$temp = @explode("<img src=\"", $text);
$temp = @explode("\" width=\"", $temp[1]);
echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all; padding:10px;'>";
echo "<table align=center>";
echo "<tr><td height=5></td></tr>";
//echo "<tr><td align=center><div style='float:left; border:1px solid #ccc; background:#fff; padding:4px; font-size:0; line-height:0;'><a href='{$list[$i][href]}'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20))."</a></div></td></tr>";
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=101755&sca=%EA%B0%A4%EB%9F%AC%EB%A6%AC&spt=-4357&page=3
(고치려는 게시판)
이 게시판에 세로가 긴 이미지가 올라가면 썸네일엔 아래는 잘리고 나오지 않아서요
썸네일을 비율유지 시키려고 하는데
혹시 아시는 분 조언 좀 부탁드려요.
--------------------------------------skin.php 이미지 출력부분----
<tr>
<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";
$style = "";
$subject = "<span $style>{$list[$i][subject]}</span>";
$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i][comment_cnt]}</span></a>";
$list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);
$list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);
$list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
$Thumbs = makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20));
// 이미지 링크 주소 뽑기
$text = $Thumbs;
$temp = @explode("<img src=\"", $text);
$temp = @explode("\" width=\"", $temp[1]);
echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all; padding:10px;'>";
echo "<table align=center>";
echo "<tr><td height=5></td></tr>";
//echo "<tr><td align=center><div style='float:left; border:1px solid #ccc; background:#fff; padding:4px; font-size:0; line-height:0;'><a href='{$list[$i][href]}'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_1], $board[bo_2], cut_str($list[$i][subject],20))."</a></div></td></tr>";
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 2개
사이즈의 width 값만 적용을 시키는 것입니다.
그러면 height 값은 이미지 비율에 따라서 적절하게 나와요
$Thumbs = makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $width=150, cut_str($list[$i][subject],20));
이렇게 해봤는데 잘 안돼네요..; 가로세로 사각으로 나와요. 어디의 넓이를 적용시키면
말씀하신대로 나올까요