최신 갤러리스킨 소스좀 봐주세요 (__) 정보
최신 갤러리스킨 소스좀 봐주세요 (__)
본문
예전에 유아원님 소스를 가지고 있어서 사용하려구 하는데요.
게시물 이미지를 클릭하면 새창이 아닌 해당 페이지로 가게 하고싶어요.
제목을 눌러두 해당페이지루 가구요. ^^;
소스 좀 봐주시면 감사하겠습니다. (__)
<?
//********************************
// 최신 글
// author : Copyright (c) Morssola. All Rights Reserved.
// http://www.morssola.co.kr
//********************************
// 최신 글
// author : Copyright (c) Morssola. All Rights Reserved.
// http://www.morssola.co.kr
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 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
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';
$thumb_path = $data_path.'/thumb';
@mkdir($thumb_path, 0707);
@chmod($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';
// 이미지뷰어
<!--
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>
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:0px solid #E4E4E4;" width="720" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table style="border:0px solid #E4E4E4;" width="720" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table width="720" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";
<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>";
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;
$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);
$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);
}
}
$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>";
$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))
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 src='{$thumb}' width='{$board[bo_3]}' height='{$board[bo_4]}' border=0></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>
<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 src='{$thumb}' width='{$board[bo_3]}' height='{$board[bo_4]}' border=0></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>
댓글 전체

아래의 소스로 바꿔보세요...^^
<?
//********************************
// 최신 글
// 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:0px solid #E4E4E4;" width="720" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table width="720" 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='{$href}' target='_self' onfocus='this.blur()'><img src='{$thumb}' width='{$board[bo_3]}' height='{$board[bo_4]}' border=0></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>
<?
//********************************
// 최신 글
// 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:0px solid #E4E4E4;" width="720" cellpadding="0" cellspacing="0" align="center">
<tr><td align="center">
<table width="720" 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='{$href}' target='_self' onfocus='this.blur()'><img src='{$thumb}' width='{$board[bo_3]}' height='{$board[bo_4]}' border=0></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>

echo <<<HEREDOC 부분에서 에러가 나서 안되더라구요^^
그냥 최신게시물 뺄까해요 ^^;;
감사합니다. (__)
그냥 최신게시물 뺄까해요 ^^;;
감사합니다. (__)