최근게시물에서 원글만 나타나게 하고 싶습니다. 정보
최근게시물에서 원글만 나타나게 하고 싶습니다.본문
여태까지 검색해 보다가 찾지 못해서 질문을 드립니다
최근게시물에서 코멘트는 제외하고 원글만 나타나게 하려고 하는데요.
어떻게 하면 되는지요.
메인에 있는 최신글이 아니고 오른 쪽에 있는 최근게시물에서요..
댓글 전체
wr_is_comment = 0
0 값이 1일 경우에는 코멘트만...
0 값이 1일 경우에는 코멘트만...
현재 7쟁이님이 만드신 art_new스킨을 사용중이거든요.
소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
.n_title1 { font-family:돋움; font-size:9pt; color:#FFFFFF; }
.n_title2 { font-family:돋움; font-size:9pt; color:#FF9933; }
</style>
</style>
<!-- 분류 시작 -->
<table height=20 width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height=20>
<?=$group_select?>
<script language="JavaScript">
function group_change(fld)
{
document.location.href = "./new.php?gr_id="+fld.value;
}
document.getElementById("gr_id").value = "<?=$gr_id?>";
</script>
</td>
</tr>
</table>
<!-- 분류 끝 -->
<!-- 제목 시작 -->
<table width="570" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="5" height="28"><img src="img/list_top_01.gif" width="3" height="30"></td>
<td width="64" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>그룹</strong></td>
<td width="5" align="center" valign="middle" background="<?=$new_skin_path?>/img/list_top_01.gif"></td>
<td width="10" align="center" valign="middle" background="<?=$new_skin_path?>/img/list_top_01.gif"></td>
<td width="86" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>게시판</strong></td>
<td width="254" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>제목</strong></td>
<td width="108" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>이름</strong></td>
<td width="41" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>일시</strong></td>
<td width="7"><img src="img/list_top_01.gif" width="3" height="30"></td>
</tr><br>
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
echo <<<HEREDOC
<tr>
<td align="center" height="28" colspan=3><a href='./group.php?gr_id={$list[$i][gr_id]}'>{$gr_subject}</a></td>
<td align="center" colspan=2><a href='./board.php?bo_table={$list[$i][bo_table]}'>{$bo_subject}</a></td>
<td width=""> <a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject}</a></td>
<td align="center">{$list[$i][name]}</td>
<td align="center" colspan=2>{$list[$i][datetime2]}</td>
</tr>
<tr>
<td colspan="9" height="1" background="{$new_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
}
?>
<? if ($i == 0) { ?>
<tr><td colspan="9" height=50 align=center>게시물이 없습니다.</td></tr>
<? } ?>
<tr><td colspan=9 height=2 bgcolor=#FF9933></td></tr>
<tr>
<td colspan="9" height="30" align="center"><?=$write_pages?></td>
</tr>
</table>
입니다.
wr_is_comment = 0를 어디다 넣어야 하는지요
소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
.n_title1 { font-family:돋움; font-size:9pt; color:#FFFFFF; }
.n_title2 { font-family:돋움; font-size:9pt; color:#FF9933; }
</style>
</style>
<!-- 분류 시작 -->
<table height=20 width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height=20>
<?=$group_select?>
<script language="JavaScript">
function group_change(fld)
{
document.location.href = "./new.php?gr_id="+fld.value;
}
document.getElementById("gr_id").value = "<?=$gr_id?>";
</script>
</td>
</tr>
</table>
<!-- 분류 끝 -->
<!-- 제목 시작 -->
<table width="570" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="5" height="28"><img src="img/list_top_01.gif" width="3" height="30"></td>
<td width="64" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>그룹</strong></td>
<td width="5" align="center" valign="middle" background="<?=$new_skin_path?>/img/list_top_01.gif"></td>
<td width="10" align="center" valign="middle" background="<?=$new_skin_path?>/img/list_top_01.gif"></td>
<td width="86" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>게시판</strong></td>
<td width="254" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>제목</strong></td>
<td width="108" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>이름</strong></td>
<td width="41" align="center" background="<?=$new_skin_path?>/img/list_top_01.gif"><strong>일시</strong></td>
<td width="7"><img src="img/list_top_01.gif" width="3" height="30"></td>
</tr><br>
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
echo <<<HEREDOC
<tr>
<td align="center" height="28" colspan=3><a href='./group.php?gr_id={$list[$i][gr_id]}'>{$gr_subject}</a></td>
<td align="center" colspan=2><a href='./board.php?bo_table={$list[$i][bo_table]}'>{$bo_subject}</a></td>
<td width=""> <a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject}</a></td>
<td align="center">{$list[$i][name]}</td>
<td align="center" colspan=2>{$list[$i][datetime2]}</td>
</tr>
<tr>
<td colspan="9" height="1" background="{$new_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
}
?>
<? if ($i == 0) { ?>
<tr><td colspan="9" height=50 align=center>게시물이 없습니다.</td></tr>
<? } ?>
<tr><td colspan=9 height=2 bgcolor=#FF9933></td></tr>
<tr>
<td colspan="9" height="30" align="center"><?=$write_pages?></td>
</tr>
</table>
입니다.
wr_is_comment = 0를 어디다 넣어야 하는지요
위 소스에선 없고, 해당 스킨을 알려주세요~^ ^
위
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
에서
<?
for ($i=0; $i<count($list); $i++)
if($list[$i][wr_comment] = 0)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
와 같이 하면 게시물(원글,코멘트)이 전혀 나타나지 않고
if($list[$i][wr_comment] <= 0)
를 넣으면 해당 그룹에서 제일 나중에 올린 게시물(원글)만 나타나는군요
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
에서
<?
for ($i=0; $i<count($list); $i++)
if($list[$i][wr_comment] = 0)
{
$gr_subject = cut_str($list[$i][gr_subject], 10);
$bo_subject = cut_str($list[$i][bo_subject], 10);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 35));
와 같이 하면 게시물(원글,코멘트)이 전혀 나타나지 않고
if($list[$i][wr_comment] <= 0)
를 넣으면 해당 그룹에서 제일 나중에 올린 게시물(원글)만 나타나는군요
bbs/new.php?gr_id=&view=w
해결하였습니다.
유아원님 감사합니다.
유아원님 감사합니다.
감사합니다