바다 썸네일 갤러리 최신글-가로 세로 정렬 가능 *&$&^%@$%@# 정보
최신글 바다 썸네일 갤러리 최신글-가로 세로 정렬 가능 *&$&^%@$%@#첨부파일
본문
이미지 가로*세로 고정 -> 필요하시면 주석 해제하면 됩니다.
질문은 되도록 안받습니다.
GD 라이브러리 2.0.1 이상 설치되어 있어야 정상 작동합니다.
코멘트 안써도 되고
포인트 차감 없으니 마음대로 받으세요...
---------------------------------------
아래는 갤러리에서 이미 생성된 썸네일을 불러서 쓰는 경우입니다.
(썸네일 재 생성 안함)
가로세로 정렬/팝업이미지
참고하세요.
latest.skin.php -------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 이미지 가로 및 세로 정렬 기능 - 그누 썸네일 갤러리 공용 최신글
// 썸네일이 없을경우 원본이미지 불러옴.
$cols = 4; // 이미지 가로갯수 - 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align='center'>
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding=1 cellspacing=1 border=0 bgcolor='#E1E1E1'><tr>";
echo "<td bgcolor='#FFFFFF'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='100' height='67' border='0'></a></td></tr></table>";
echo "<table cellpadding=0 cellspacing=0 border=0><tr><td height=3></td></tr>";
echo "<tr><td><a href='{$list[$i][href]}' onfocus='this.blur()'>{$subject} {$list[$i][icon_new]}</a></td></tr></table> ";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table></td>
</tr>
</table>
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
질문은 되도록 안받습니다.
GD 라이브러리 2.0.1 이상 설치되어 있어야 정상 작동합니다.
코멘트 안써도 되고
포인트 차감 없으니 마음대로 받으세요...
---------------------------------------
아래는 갤러리에서 이미 생성된 썸네일을 불러서 쓰는 경우입니다.
(썸네일 재 생성 안함)
가로세로 정렬/팝업이미지
참고하세요.
latest.skin.php -------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 이미지 가로 및 세로 정렬 기능 - 그누 썸네일 갤러리 공용 최신글
// 썸네일이 없을경우 원본이미지 불러옴.
$cols = 4; // 이미지 가로갯수 - 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 10; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align='center'>
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = $list[$i][file][0][file]; //원본 리사이즈_아래 자바와 연동_추가
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "font-family:돋움; font-size:9pt; color:#636363;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt; color:#006F00;' ";
$subject = "<span $style>".cut_str($list[$i][subject],15)."</span>"; //제목 글자수 자르기
// $subject = "<span $style>". $list[$i][subject]. "</span>";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding=1 cellspacing=1 border=0 bgcolor='#E1E1E1'><tr>";
echo "<td bgcolor='#FFFFFF'><a href=\"javascript:;\" OnClick=\"popupImage('$g4[path]/data/file/$bo_table/$image')\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='100' height='67' border='0'></a></td></tr></table>";
echo "<table cellpadding=0 cellspacing=0 border=0><tr><td height=3></td></tr>";
echo "<tr><td><a href='{$list[$i][href]}' onfocus='this.blur()'>{$subject} {$list[$i][icon_new]}</a></td></tr></table> ";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table></td>
</tr>
</table>
<script language="javascript">
function popupImage(imageURL){
imageHandle=open("","popupForImage","toolbar=no,location=no,status=no,manubar=no,scrollbars=no,resizable=no,width=100,height=100,top=0,left=0");
imageHandle.document.write("<title> </title>");
imageHandle.document.write("<style>");
imageHandle.document.write("*{margin:0;padding:0;border:0;}");
imageHandle.document.write("</style>");
imageHandle.document.write("<img src=\""+imageURL+"\" onload=\"window.resizeTo(this.width+6,this.height+55);\" onclick=\"self.close();\" style=\"cursor:hand;\" title=\"클릭하면 닫힙니다.\">");
}
</script>
추천
3
3
댓글 전체

감사합니다.
감사합니다...
정말감사합니다...잘쓰겠습니다.

우웃 잘쓸께요

좋은 스킨 감사합니다..
감사합니다.
와우!!
차감되네요...ㅎㅎㅎ
감사합니다
한마디로 굿이네요^^
한마디로 굿이네요^^
정말감사합니다...잘쓰겠습니다. 정말감사합니다...잘쓰겠습니다.

오오... 이거네요 이거... 열심히 찾고있었습니다.
필요한스킨인데~~~감솨요~ 필요한스킨인데~~~감솨요~
잘쓰겠습니다,,,
잘쓰겠습니다,,, 잘쓰겠습니다,,,
감사 합니다...너무 깔끔하고 좋네요...감사합니다.

GD갤러리중 최강~~~
감사합니다... 깔끔하네용...
감사합니다.

감사합니다.
잘쓸게요 ^^
이쁘네요_2 ㅋㅌ

감사합니다 .

감사합니다.
깔끔합니다.
감솨..잘쓸께요..
