바다 썸네일 갤러리 최신글-가로 세로 정렬 가능 *&$&^%@$%@# > 그누4 스킨

그누4 스킨

스킨의 저작권은 해당 스킨 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
스킨 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y
그누보드와 관련이 있지만 스킨과 빌더가 아니면 플러그인 게시판에 올려주세요.

바다 썸네일 갤러리 최신글-가로 세로 정렬 가능 *&$&^%@$%@# 정보

최신글 바다 썸네일 갤러리 최신글-가로 세로 정렬 가능 *&$&^%@$%@#

첨부파일

latest.skin.php (4.4K) 641회 다운로드 2005-12-08 14:45:28

본문

이미지 가로*세로 고정 -> 필요하시면 주석 해제하면 됩니다.

질문은 되도록 안받습니다.
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%>&nbsp;</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

댓글 전체

전체 5,850 |RSS
그누4 스킨 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT