최근이미지게시물을 최근그룹이미지게시물로... > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최근이미지게시물을 최근그룹이미지게시물로... 정보

최근이미지게시물을 최근그룹이미지게시물로...

본문

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$cols  = 1; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h  = 1; // 이미지 상하 간격

$col_width = (int)(99 / $cols);

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<style type="text/css">
<!--
.data  { font-family:돋움; font-size:8pt; color:#999999; }
-->
</style>

<table width="95" border="0" cellspacing="0" cellpadding="0">

<!-- 최신글 제목 -->



<tr>
<td align='center' width="95">
<table width="100%" 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="100%" align="center" valign='top' height="15">

<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][file][0][file];

  if (is_file($thumb)) {
    $img = $thumb;
    }else if(!is_file($img)){
    $img="$latest_skin_path/img/noimg.gif";
    }

    $style = "font-family:돋움; font-size:8pt; color:#636363;";
    if ($list[$i][icon_new])
    $style = "style='font-family:돋움; font-size:8pt; color:#424542;' ";
$subject = "<span $style>".cut_str($list[$i][subject],30)."</span>"; //제목 글자수 자르기

$bg = "";  //새글?
    if ($list[$i][icon_new])
        $bg="la_top_2.gif";
    else
        $bg="la_top_1.gif";

    echo $list[$i][icon_reply] . " ";

echo "<table width='75' cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td valign='top' align='center'><a href='{$list[$i]['href']}' onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\"><img src='$img' width='95' height='60' border='0'></a></td></tr>";
echo " <tr><td height='21' align='center'><a href='{$list[$i]['href']}'><b><span style='font-size:10pt;'><font color='#424542'>{$subject}</font></span></b></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>

원문이구요.
늘 많은 질문 드리고 여러 고마운 분들께 도움 받고 있습니다.
세상은 참 따듯한것 같아요^^;;

이번에도 송구스럽게 질문 드리겠는데요.
이 원문은 최근게시물로 불러드릴때는 첨부이미지가 있을시 보여주고,
없을땐, noimg.gif를 보여줬습니다.

하지만 그룹최근게시물로 불러드릴때는 첨부이미가 있어도 noimg.gif를 보여주고,
없어도 noimg.gif를 보여줍니다.
찾아보고 찾아봐도 여러가지 다 대입해봤는데,
통 모르겠네요 ㅠㅠ

고수분들 최근그룹게시물로 불러올 수 있게 수정 부탁드립니다 ㅠㅠ

아 그리고 정말 염치없지만,
마지막에 있는 자바스크립은 어떤 용도 인지 모르겠습니다. 없어도 되는 걸까요?

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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