글쓴 시간 list에서 표시될때요 ! 정보
글쓴 시간 list에서 표시될때요 !본문
혹시
페이스북 같이
글쓴 시간이
몇초전 / 5분전 / 어제
이런식으로 표시될수도 있을까요 ?
고수님들 부탁드려요 !!
페이스북 같이
글쓴 시간이
몇초전 / 5분전 / 어제
이런식으로 표시될수도 있을까요 ?
고수님들 부탁드려요 !!
댓글 전체

네 가능합니다.
잠시만요 소스 만들고 올께요~ ㅎ
잠시만요 소스 만들고 올께요~ ㅎ

스킨 파일중 list.skin.php 부분에서 for문 안쪽에 날짜표시 바로 전에 넣으심 되요!~
$sWriteTime = strtotime($list[$i][wr_datetime]);
$sNowTime = time();
$sTimeGap = $sNowTime - $sWriteTime;
$sWriteTime = "";
if($sTimeGap < 60*60)
$sWriteTime = round($sTimeGap/60)."분전";
else if($sTimeGap < 60*60*24)
$sWriteTime = floor($sTimeGap/(60*60))."시간 전";
else
$sWriteTime = floor($sTimeGap/(60*60*24))."일 전";
echo "<!-- {$sWriteTime} -->";
$sWriteTime = strtotime($list[$i][wr_datetime]);
$sNowTime = time();
$sTimeGap = $sNowTime - $sWriteTime;
$sWriteTime = "";
if($sTimeGap < 60*60)
$sWriteTime = round($sTimeGap/60)."분전";
else if($sTimeGap < 60*60*24)
$sWriteTime = floor($sTimeGap/(60*60))."시간 전";
else
$sWriteTime = floor($sTimeGap/(60*60*24))."일 전";
echo "<!-- {$sWriteTime} -->";
감사합니다 :-) !!
좋은답변 감사합니다 !! 근데 제가 적용하면 1341469315 이런식으로 뜨네요~~

날짜가 나와야 할 부분에 $sWriteTime 이것을 사용하시면 되실껀되요... ^^
기본게시판이 아니라서 for문안쪽에 어디써야하는지...초보라서...ㅠ_ㅜ 잘알려주신것같은데 적용을 못해서 죄송해요ㅜ_ㅜ

소스가 없으면 상세하게 알려드리기 힘이 듭니다.
적용소스를 안오리셨네요
<!-- 게시판 리스트 시작 -->
<form name="fboardlist" method="post" action="" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0 >
<tr><td height="10" colspan='5'></td></tr>
<tr>
<td width="120" rowspan='3' align=center class="f_14px"><? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?> <?=$list[$i][name]?>
</td>
<td width=11 height=11><img src='<?=$board_skin_path?>/img/box_1.gif' width=11 height=11 border=0></td>
<td background='<?=$board_skin_path?>/img/box_2.gif'></td>
<td width=11><img src='<?=$board_skin_path?>/img/box_3.gif' width=11 height=11 border=0></td>
<td width="75" rowspan='3' align=center class="l10 f_11px"><span class="no">
<?=$list[$i][wr_datetime]?> 여기가 날짜가 나오는곳이 되겠네요 !! </span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<p class="t5">
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">수정</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}" >삭제</a>
</p>
<? } ?>
</td>
</tr>
<form name="fboardlist" method="post" action="" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0 >
<tr><td height="10" colspan='5'></td></tr>
<tr>
<td width="120" rowspan='3' align=center class="f_14px"><? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?> <?=$list[$i][name]?>
</td>
<td width=11 height=11><img src='<?=$board_skin_path?>/img/box_1.gif' width=11 height=11 border=0></td>
<td background='<?=$board_skin_path?>/img/box_2.gif'></td>
<td width=11><img src='<?=$board_skin_path?>/img/box_3.gif' width=11 height=11 border=0></td>
<td width="75" rowspan='3' align=center class="l10 f_11px"><span class="no">
<?=$list[$i][wr_datetime]?> 여기가 날짜가 나오는곳이 되겠네요 !! </span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<p class="t5">
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">수정</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}" >삭제</a>
</p>
<? } ?>
</td>
</tr>

<!-- 게시판 리스트 시작 -->
<form name="fboardlist" method="post" action="" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0 >
<tr><td height="10" colspan='5'></td></tr>
<tr>
<td width="120" rowspan='3' align=center class="f_14px"><? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?> <?=$list[$i][name]?>
</td>
<td width=11 height=11><img src='<?=$board_skin_path?>/img/box_1.gif' width=11 height=11 border=0></td>
<td background='<?=$board_skin_path?>/img/box_2.gif'></td>
<td width=11><img src='<?=$board_skin_path?>/img/box_3.gif' width=11 height=11 border=0></td>
<td width="75" rowspan='3' align=center class="l10 f_11px"><span class="no">
<?
$sWriteTime = strtotime($list[$i][wr_datetime]);
$sNowTime = time();
$sTimeGap = $sNowTime - $sWriteTime;
$sWriteTime = "";
if($sTimeGap < 60*60)
$sWriteTime = round($sTimeGap/60)."분전";
else if($sTimeGap < 60*60*24)
$sWriteTime = floor($sTimeGap/(60*60))."시간 전";
else
$sWriteTime = floor($sTimeGap/(60*60*24))."일 전";
echo $sWriteTime;
?></span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<p class="t5">
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">수정</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}" >삭제</a>
</p>
<? } ?>
</td>
</tr>
<form name="fboardlist" method="post" action="" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0 >
<tr><td height="10" colspan='5'></td></tr>
<tr>
<td width="120" rowspan='3' align=center class="f_14px"><? if ($is_checkbox) { ?><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?> <?=$list[$i][name]?>
</td>
<td width=11 height=11><img src='<?=$board_skin_path?>/img/box_1.gif' width=11 height=11 border=0></td>
<td background='<?=$board_skin_path?>/img/box_2.gif'></td>
<td width=11><img src='<?=$board_skin_path?>/img/box_3.gif' width=11 height=11 border=0></td>
<td width="75" rowspan='3' align=center class="l10 f_11px"><span class="no">
<?
$sWriteTime = strtotime($list[$i][wr_datetime]);
$sNowTime = time();
$sTimeGap = $sNowTime - $sWriteTime;
$sWriteTime = "";
if($sTimeGap < 60*60)
$sWriteTime = round($sTimeGap/60)."분전";
else if($sTimeGap < 60*60*24)
$sWriteTime = floor($sTimeGap/(60*60))."시간 전";
else
$sWriteTime = floor($sTimeGap/(60*60*24))."일 전";
echo $sWriteTime;
?></span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<p class="t5">
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">수정</a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}" >삭제</a>
</p>
<? } ?>
</td>
</tr>
너무감사합니다 ㅠ,ㅜ 포인트 어케 드리는질 모르겠네요.. 있는거 다드려도 모자랄거같아요 ...
아 정말정말 감사합니다. 즐거운 금요일되세요!!
아 정말정말 감사합니다. 즐거운 금요일되세요!!

한달전까지는 표시 못하나요?