허

최근게시물에서 원글만 나타나게 하고 싶습니다.

여태까지 검색해 보다가 찾지 못해서 질문을 드립니다
 
최근게시물에서 코멘트는 제외하고 원글만 나타나게 하려고 하는데요.
 
어떻게 하면 되는지요.
 
메인에 있는 최신글이 아니고 오른 쪽에 있는 최근게시물에서요..

댓글 8개

wr_is_comment = 0

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를 어디다 넣어야 하는지요
위 소스에선 없고, 해당 스킨을 알려주세요~^ ^
위
<?
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
해결하였습니다.

유아원님 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
07-05-07 조회 1,647
07-05-07 조회 1,635
07-05-07 조회 1,628
07-05-07 조회 1,743
07-05-07 조회 1,619
07-05-06 조회 1,658
07-05-06 조회 1,719
07-05-06 조회 1,453
07-05-06 조회 1,646
07-05-06 조회 1,313
07-05-06 조회 1,615
07-05-06 조회 1,968
07-05-05 조회 1,622
07-05-05 조회 1,677
07-05-05 조회 2,366
07-05-05 조회 1,625
07-05-05 조회 1,665
07-05-04 조회 2,616
07-05-04 조회 1,696
07-05-04 조회 1,311