갤러리 최신게시물에 날짜를 나오게 하는 방법이 ??? > 그누4 질문답변

그누4 질문답변

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

갤러리 최신게시물에 날짜를 나오게 하는 방법이 ??? 정보

갤러리 최신게시물에 날짜를 나오게 하는 방법이 ???

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://ddolggi.com/index2.php

최신글 추출소스는 이거구요..
<?=latest("gallery", "testphoto", 9, 100,"80,3,15,40");?>


갤러리 최신글 스킨은 요 밑에 있는것들 입니다.
저 밑에 ★ 부분에 날짜 소스넣어봣는데 않돼네요..
어떻게 방법이 있을까요...^^;;
도움 요청합니다!!


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

list($height, $row_cnt, $cut_len) = explode(",", $options);
$all_cnt = 0;
?>

<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width='100%' cellpadding='0' cellspacing='0' border='0' align='left'>
<tr><td align='center'>

<table width=100% align=center cellpadding=0 cellspacing=0>
<colgroup width=20>
<colgroup>
<colgroup width=37>
<tr>
    <td style="padding-left:8; border-top-width:1; border-right-width:0; border-bottom-width:1; border-left-width:1; border-top-color:silver; border-right-color:silver; border-bottom-color:silver; border-left-color:silver; border-style:solid;" bgcolor="#FFFFFF" height="30"><img src='<?=$latest_skin_path?>/img/newdoc.gif' border=0></td>
    <td width="85%" style="padding-top:4; padding-left:10; border-top-width:1; border-right-width:0; border-bottom-width:1; border-left-width:0; border-top-color:silver; border-right-color:black; border-bottom-color:silver; border-left-color:black; border-style:solid;" height="30" bgcolor="#FFFFFF"><strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#000000"><?=$board[bo_subject]?></font></a></strong></td>
    <td align="center" style="padding-right:12; border-top-width:1; border-right-width:1; border-bottom-width:1; border-left-width:0; border-top-color:silver; border-right-color:silver; border-bottom-color:silver; border-left-color:black; border-style:solid;" bgcolor="#FFFFFF" height="30"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
</tr>
</table>

</td></tr>

<tr><td align='center'>

<table width='100%'>
  <? for ($k=0; $k<$row_cnt; $k++ ) { ?>
<tr>
<?
for ($i=0; $i<count($list)/$row_cnt; $i++)
{
    if ($i > 0)
        echo '<td width=20>&nbsp;</td>';
$title = get_text($list[$all_cnt][wr_subject]);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$all_cnt][file][0][file]);
if (!file_exists($img) || !$list[$all_cnt][file][0][file])
{ $img = "$latest_skin_path/img/no_image.gif"; }

$href = "$g4[bbs_path]/board.php?bo_table=$bo_table";
$stitle = cut_str($list[$all_cnt][subject],$cut_len,"..");
   
    echo <<<HEREDOC
    <td width='<?=$subject_len?>' valign='top' align='center'>

        <table width='<?=$subject_len?>' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
            <td width='<?=$subject_len?>' height='5' align='center'><div> ★ 요부분!! [<?=$list[$i][datetime]?>]</div></td>
</tr>

        <tr>
            <td align=center style='border:0px solid #CCCCCC; padding:0px' width='<?=$subject_len?>' height='<?=$height?>'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id][wr_datetime]}'><img src='{$img}' width='$subject_len' height='$height' border='0' align='absmiddle' title='$title' alt='$title'></a>
    </td>
        </tr>

<tr>
            <td width='<?=$subject_len?>' height='5' align='center'></td>
</tr>

<tr>
            <td width='<?=$subject_len?>' height='20' align='center' nowrap><nobr><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$all_cnt][wr_id]}'>{$stitle}</a>
HEREDOC;

if ($list[$i][comment_cnt]) {
echo <<<HEREDOC
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>
<span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span>


</a>
HEREDOC;
 }
 
echo <<<HEREDOC
            </td>
</tr>
</table>

    </td>
HEREDOC;
$all_cnt++;
   
}
?>
</tr>
<? } ?>

<? if (count($list) == 0) { ?>
<tr><td colspan=2 align='center' height=25>게시물이 없습니다.</td></tr>
<? } ?>
</table>

</td></tr>
</table>

댓글 전체

for 문 밑 정다한 곳에 아래 내용이 들어가야 할 것 같습니다만...

//날짜표시
$date1 = substr($list[$i][datetime],0,10); //날짜표시형식변경
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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