최신글 썸네일 경로.. 급해서요 부탁드립니다.
공개된 갤러리 최신글 스킨입니다.
lightbox 적용되어있는데요...
워낙에 초보다 보니 기본적인 부분을 모르겠네요.
기존 갤러리게시판이 있구요.
메인에서는 다른 latest를 사용하여 썸네일부분도 잘 출력되고 있습니다.
문제는 서브페이지에 lightbox적용한 최신글을 출력하려다 보니....
기존 갤러리게시판의 썸네일 저장 경로(?) 또는 출력경로(?)가 달라서인지
엑박이네요.....
메인에서 잘 출력되는 썸네일의 경로를 보면
http://도메인/data/file/gallery/thumb/73/0 이구요
서브페이지에서 lightbox적용된 엑박의 썸네일 경로를 보면
http://도메인/data/file/gallery/lb_thumb73/0 과 같습니다.
경로변경문제인것 같은데 도무지 아무리 바꿔보고 해봐도 안되네요...
아래 문제의 latest의 원본입니다.
latest.skin.php 내용을 보면 아래와 같습니다.
----------------------------------원본----------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit;
$lb_width = 100;
$image_quality = 100;
//$data_path = $g4[path]."/data/file/".$bo_table;
$data_path = $g4['path'].'/data/file/'.$bo_table;
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/prototype.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/lightbox.js"></script>
<link rel="stylesheet" href="<?=$latest_skin_path?>/lb/css/lightbox.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-top:10;">
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<? for ($i=0; $i<count($list); $i++) {
$thumb_path = $data_path.'/lb_thumb'.$list[$i][wr_id];
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$img = "";
$v = "0";
$thumb = $thumb_path.'/'.$v;
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (!file_exists($thumb))
{
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 = $lb_width / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor(100, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, 100, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$v, $image_quality);
chmod($thumb_path.'/'.$v, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$img_href = "<a href='{$file}' rel=lightbox >";
?>
<td width="<?=$td_width?>" align=center valign=top>
<table width=100% cellspacing=0 cellpadding=0>
<tr>
<td align=center>
<?=$img_href?><?=$img?></a>
</td>
</tr>
<tr>
<td class=th8>
<nobr>
<? if ($is_category) { ?><a href="<?=$list[$i][ca_name_href]?>"><font color=#333333><span class=small><?=$list[$i][ca_name]?></span></font></a> <? } ?>
<? if ($wr_id == $list[$i][wr_id]) echo "<strong>"; ?>
<?
echo "<a href='{$list[$i][href]}'>";
echo "<font class='th8'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <font style=font-family:Tahoma;font-size:6pt;font-weight:bold;letter-spacing:-1px;><b>{$list[$i][comment_cnt]}</b></font>";
?>
<? if ($wr_id == $list[$i][wr_id]) echo "</strong>"; ?></nobr>
</td>
</tr>
</table>
</td>
<? if($i % $mod == 0 && $i != 0) { ?></tr><tr><? } ?>
<? } ?>
<?
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
</table>
</td>
</tr>
</table>
-----------------------------------------------원본끝------------------------------
너무 길어서 보기 힘드실거란걸 알지만 제가 워낙에 모르다 보니
전체를 올렸네요.
고수님들 도와주세요~
참 그리고 한가지 더 조언 부탁드립니다.
현재 상황에서 lightbox 적용된 latest페이지를 보면
처음 페이지에 접속할때
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in /home/hosting_users/ujja/www/skin/latest/la_sub/latest.skin.php on line 56
Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in /home/hosting_users/ujja/www/skin/latest/la_sub/latest.skin.php on line 56
이런경고가 뜨는데요 두번째 접속할때 부터는 안뜹니다.
이건 또 왜 그러는지... 참 어렵네요.
고수님들의 조언 부탁드립니다.
lightbox 적용되어있는데요...
워낙에 초보다 보니 기본적인 부분을 모르겠네요.
기존 갤러리게시판이 있구요.
메인에서는 다른 latest를 사용하여 썸네일부분도 잘 출력되고 있습니다.
문제는 서브페이지에 lightbox적용한 최신글을 출력하려다 보니....
기존 갤러리게시판의 썸네일 저장 경로(?) 또는 출력경로(?)가 달라서인지
엑박이네요.....
메인에서 잘 출력되는 썸네일의 경로를 보면
http://도메인/data/file/gallery/thumb/73/0 이구요
서브페이지에서 lightbox적용된 엑박의 썸네일 경로를 보면
http://도메인/data/file/gallery/lb_thumb73/0 과 같습니다.
경로변경문제인것 같은데 도무지 아무리 바꿔보고 해봐도 안되네요...
아래 문제의 latest의 원본입니다.
latest.skin.php 내용을 보면 아래와 같습니다.
----------------------------------원본----------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit;
$lb_width = 100;
$image_quality = 100;
//$data_path = $g4[path]."/data/file/".$bo_table;
$data_path = $g4['path'].'/data/file/'.$bo_table;
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/prototype.js"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="<?=$latest_skin_path?>/lb/js/lightbox.js"></script>
<link rel="stylesheet" href="<?=$latest_skin_path?>/lb/css/lightbox.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-top:10;">
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<? for ($i=0; $i<count($list); $i++) {
$thumb_path = $data_path.'/lb_thumb'.$list[$i][wr_id];
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
$img = "";
$v = "0";
$thumb = $thumb_path.'/'.$v;
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (!file_exists($thumb))
{
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 = $lb_width / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor(100, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, 100, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$v, $image_quality);
chmod($thumb_path.'/'.$v, 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' border=0>";
$img_href = "<a href='{$file}' rel=lightbox >";
?>
<td width="<?=$td_width?>" align=center valign=top>
<table width=100% cellspacing=0 cellpadding=0>
<tr>
<td align=center>
<?=$img_href?><?=$img?></a>
</td>
</tr>
<tr>
<td class=th8>
<nobr>
<? if ($is_category) { ?><a href="<?=$list[$i][ca_name_href]?>"><font color=#333333><span class=small><?=$list[$i][ca_name]?></span></font></a> <? } ?>
<? if ($wr_id == $list[$i][wr_id]) echo "<strong>"; ?>
<?
echo "<a href='{$list[$i][href]}'>";
echo "<font class='th8'>{$list[$i][subject]}</font>";
echo "</a>";
if ($list[$i][comment_cnt])
echo " <font style=font-family:Tahoma;font-size:6pt;font-weight:bold;letter-spacing:-1px;><b>{$list[$i][comment_cnt]}</b></font>";
?>
<? if ($wr_id == $list[$i][wr_id]) echo "</strong>"; ?></nobr>
</td>
</tr>
</table>
</td>
<? if($i % $mod == 0 && $i != 0) { ?></tr><tr><? } ?>
<? } ?>
<?
// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'> </td>";
?>
</tr>
</table>
</td>
</tr>
</table>
-----------------------------------------------원본끝------------------------------
너무 길어서 보기 힘드실거란걸 알지만 제가 워낙에 모르다 보니
전체를 올렸네요.
고수님들 도와주세요~
참 그리고 한가지 더 조언 부탁드립니다.
현재 상황에서 lightbox 적용된 latest페이지를 보면
처음 페이지에 접속할때
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in /home/hosting_users/ujja/www/skin/latest/la_sub/latest.skin.php on line 56
Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in /home/hosting_users/ujja/www/skin/latest/la_sub/latest.skin.php on line 56
이런경고가 뜨는데요 두번째 접속할때 부터는 안뜹니다.
이건 또 왜 그러는지... 참 어렵네요.
고수님들의 조언 부탁드립니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인