이미지 최신게시물 질문 입니다. 정보
이미지 최신게시물 질문 입니다.
본문
를 사용하려구 하는데요...
설명에 보면
<?=latest("g4_gallery", "freeboard", 2, 100, 120, 1);?>
---------------- -------------- -------- ----- ----- -----
스킨명 게시판명 갯수 가로폭 세로폭 세로줄 // 한줄에 그림2개 보이기
---------------- -------------- -------- ----- ----- -----
스킨명 게시판명 갯수 가로폭 세로폭 세로줄 // 한줄에 그림2개 보이기
이렇게 되어 있는데...
가로는 한줄 세로는 제가 정하구 싶은데루 정하고 싶은데... 어찌해야 하는지요?
위와 같이 해봤는데... 가로로만 쭉 나와요 ㅠㅠ
글구... 게시물 클릭하면 게시판쪽으로 말고... 새창 뜨게 하려면 어케해야 할까요??
댓글 전체
해당 함수를 함께 올려주셔야 합니다.
위의 소스로만으로는 답변이 어렵습니다.
원하시면 수정해 드리겠습니다.
====================
웹솔루션 제작 전문 아가웹
http://www.agaweb.co.kr
위의 소스로만으로는 답변이 어렵습니다.
원하시면 수정해 드리겠습니다.
====================
웹솔루션 제작 전문 아가웹
http://www.agaweb.co.kr

흐흐^^;;
감사합니다.
지금 하두 모르겠어서 다 뒤루 하구 유아원님 자료를 이용하구 있습니다.
그런데 최근 이미지 게시물이 100%로 뽑아져 나오는게 아니구 잘려서 나오더라구요.
이건 어떡게 해결해야 하는지 알려 주실 수 있을까요?
<?
//********************************
// 최신 글
// author : Copyright (c) Morssola. All Rights Reserved.
// http://www.morssola.co.kr
// 참고 링크
// http://www.sir.co.kr/bbs/tb.php/g4_skin_basic/128
//********************************
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_3]) alert("해당 게시판 설정 : 여분 필드 3 에 목록에서 보여질 이미지의 가로 크기를 설정하십시오.");
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 세로 크기를 설정하십시오.");
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 한 줄당 가로 이미지 수를 설정하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_5]; //이미지 가로 갯수
?>
<SCRIPT LANGUAGE='JavaScript'>
// 이미지뷰어
<!--
var win= null;
function Center_Window(img, w, h)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/3;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=yes,';
settings +='resizable=yes,';
settings +='status=no';
win=window.open("","newWindow",settings);
win.document.open();
win.document.write ("<html><head><title>원본 이미지 보기</title></head>");
win.document.write ("<script>function init(){window.resizeBy(document.all.pop_img.width-document.body.clientWidth, document.all.pop_img.height-document.body.clientHeight+10);}</script>");
win.document.write ("<body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload='init();'>");
win.document.write ("<img src='"+img+"' border=0 onclick='window.close();' style='cursor:hand' title='클릭하면 닫혀요' id='pop_img'>");
win.document.write ("</body></html>");
win.document.close();
}
//-->
</SCRIPT>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table style="border:1px solid #E4E4E4;" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
else if ($i > 0)
echo "<td width=20> </td>";
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $board[bo_3] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_4])
$dst = imagecreatetruecolor($board[bo_3], $height);
else
$dst = imagecreatetruecolor($board[bo_3], $board[bo_4]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_3], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_9]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$photo_view = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $photo_view) && file_exists($photo_view))
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align=center width='{$board[bo_3]}' height='{$board[bo_4]}' style='width:{$board[bo_3]}px;height:{$board[bo_4]}px;border:1px solid #CCCCCC; padding:3px'><div style='width:{$board[bo_3]}px; height:{$board[bo_4]}px; position: relative; overflow:hidden;' align=center><a href='javascript:void(0);' onClick=Center_Window('{$photo_view}') onfocus='this.blur()'>{$img}</a></div></td>
</tr>
</tr>
<tr><td height="5" align="center"></td></tr>
<tr>
<td width="{$board[bo_3]}" height="20" align="center" class="sub">{$list[$i][subject]}</td>
</tr>
</table></td>
HEREDOC;
}
?>
</tr>
</table></td></tr>
</table>
감사합니다.
지금 하두 모르겠어서 다 뒤루 하구 유아원님 자료를 이용하구 있습니다.
그런데 최근 이미지 게시물이 100%로 뽑아져 나오는게 아니구 잘려서 나오더라구요.
이건 어떡게 해결해야 하는지 알려 주실 수 있을까요?
<?
//********************************
// 최신 글
// author : Copyright (c) Morssola. All Rights Reserved.
// http://www.morssola.co.kr
// 참고 링크
// http://www.sir.co.kr/bbs/tb.php/g4_skin_basic/128
//********************************
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board[bo_3]) alert("해당 게시판 설정 : 여분 필드 3 에 목록에서 보여질 이미지의 가로 크기를 설정하십시오.");
if (!$board[bo_4]) alert("해당 게시판 설정 : 여분 필드 4 에 목록에서 보여질 이미지의 세로 크기를 설정하십시오.");
if (!$board[bo_9]) alert("해당 게시판 설정 : 여분 필드 9 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
if (!$board[bo_5]) alert("해당 게시판 설정 : 여분 필드 5 에 목록에서 보여질 한 줄당 가로 이미지 수를 설정하십시오.");
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$mod = $board[bo_5]; //이미지 가로 갯수
?>
<SCRIPT LANGUAGE='JavaScript'>
// 이미지뷰어
<!--
var win= null;
function Center_Window(img, w, h)
{
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/3;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars=yes,';
settings +='resizable=yes,';
settings +='status=no';
win=window.open("","newWindow",settings);
win.document.open();
win.document.write ("<html><head><title>원본 이미지 보기</title></head>");
win.document.write ("<script>function init(){window.resizeBy(document.all.pop_img.width-document.body.clientWidth, document.all.pop_img.height-document.body.clientHeight+10);}</script>");
win.document.write ("<body bgcolor=white topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload='init();'>");
win.document.write ("<img src='"+img+"' border=0 onclick='window.close();' style='cursor:hand' title='클릭하면 닫혀요' id='pop_img'>");
win.document.write ("</body></html>");
win.document.close();
}
//-->
</SCRIPT>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table style="border:1px solid #E4E4E4;" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
else if ($i > 0)
echo "<td width=20> </td>";
$img = "<img src='$latest_skin_path/img/no_image.gif' border=0 title='이미지 없음'>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $board[bo_3] / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $board[bo_4])
$dst = imagecreatetruecolor($board[bo_3], $height);
else
$dst = imagecreatetruecolor($board[bo_3], $board[bo_4]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_3], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_9]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$photo_view = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $photo_view) && file_exists($photo_view))
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
echo <<<HEREDOC
<td valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align=center width='{$board[bo_3]}' height='{$board[bo_4]}' style='width:{$board[bo_3]}px;height:{$board[bo_4]}px;border:1px solid #CCCCCC; padding:3px'><div style='width:{$board[bo_3]}px; height:{$board[bo_4]}px; position: relative; overflow:hidden;' align=center><a href='javascript:void(0);' onClick=Center_Window('{$photo_view}') onfocus='this.blur()'>{$img}</a></div></td>
</tr>
</tr>
<tr><td height="5" align="center"></td></tr>
<tr>
<td width="{$board[bo_3]}" height="20" align="center" class="sub">{$list[$i][subject]}</td>
</tr>
</table></td>
HEREDOC;
}
?>
</tr>
</table></td></tr>
</table>
잘려서 나온다는 의미가 무엇인지...
대충 살펴보니까 여분필드에서 입력하신 가로 세로에 맞게 이미지 사이즈만 줄여서 출력하는것 같은데요??
====================
웹솔루션 제작 전문 아가웹
http://www.agaweb.co.kr
대충 살펴보니까 여분필드에서 입력하신 가로 세로에 맞게 이미지 사이즈만 줄여서 출력하는것 같은데요??
====================
웹솔루션 제작 전문 아가웹
http://www.agaweb.co.kr

거기까진 잘 했다구 생각하는데여...
최근 게시물이 이상해요... http://bsy070707.cafe24.com/moving_g.html 보시면 게시물 이미지가 짤려 나와요...
도와주세요 ㅠㅠ
최근 게시물이 이상해요... http://bsy070707.cafe24.com/moving_g.html 보시면 게시물 이미지가 짤려 나와요...
도와주세요 ㅠㅠ