제외게시판 또는 제외그룹 다는 방법 좀 알려 주세요. > 그누4 질문답변

그누4 질문답변

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

제외게시판 또는 제외그룹 다는 방법 좀 알려 주세요. 정보

제외게시판 또는 제외그룹 다는 방법 좀 알려 주세요.

본문

extend/new.php입니다.
나타나지 말아야 할 게시판이 있는데요.
제외그룹이나 제외게시판 다는 방법이 있을까요?
실력이 딸려서 적용하기 너무 어렵네요.

======================================

<?php
/*
사용 예) <?php echo my_new(20, 40, "120px");
*/
function get_new($rowCnt, $maxStr)
{
global $g4, $gr_id, $config;

$maxRow = 100;

$s = "
select
a.*, b.bo_subject, c.gr_subject, c.gr_id
from
$g4[board_new_table] a,
$g4[board_table] b,
$g4[group_table] c
where
a.bo_table = b.bo_table
and b.gr_id = c.gr_id
and b.bo_use_search = '1'
order by a.bn_id desc
limit $maxRow
";

$i = 0;
$res = mysql_query($s);

while ($row = mysql_fetch_array($res))
{
if ($i >= $rowCnt) break;

if ($row[wr_id] == $row[wr_parent]) // 원글이라면
{
$s = "
select wr_id, wr_subject, wr_comment, wr_datetime
from $g4[write_prefix]$row[bo_table]
where wr_id = '$row[wr_id]'
";
$list[$i] = mysql_fetch_array(mysql_query($s));
$list[$i][commentCnt] = $list[$i][wr_comment];
$list[$i][subject] = cut_str(get_text($list[$i][wr_subject]), $maxStr);
$list[$i][href] = "$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id={$list[$i][wr_id]}";
$list[$i][title] = addslashes(get_text($list[$i][wr_subject])." / ".$list[$i][wr_datetime]);

$i++;
}
}
 
return $list;
}

function my_new($rowCnt = 10, $maxStr = 20, $maxWidth = "100%") { global $g4; $list = get_new($rowCnt, $maxStr); ?>

<table width="220" border="0" cellpadding="0" cellspacing="1" bgcolor="C0C0C0">
    <tr>
      <td>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" >
       
<tr>
        <td valign="top" bgcolor="FFFFFF" style="padding:0px">
       
<table width=100% cellpadding=0 cellspacing=0>
      <tr>

<td>
<table width="100%"  cellpadding="0" cellspacing="0" height="28">
    <tr>
        <td width="4%" height="30">&nbsp;</td>
        <td width="96%" height="30"><strong><a href="<?=$g4['bbs_path']?>/new.php"><span style="font-size:9pt;"><font face="돋움" color="#000000">새로운 게시물</font></span></a>
</strong></td>
    </tr>
</table>
        </td>
    </tr>

<tr><td>
<table width="100%"  cellpadding="0" cellspacing="0" >
<tr>
<td width="5"></td>
<td width="210" height="1" bgcolor="#DDDDDD"></td>
<td width="5"></td>
</tr>
</table>
</td>
</tr>

<?php $n = count($list); for ($i = 0; $i < $n; $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td height=19>
     
<nobr style='display:block; overflow:hidden; width:210;'>
<span style="font-weight:normal;">


<!-- 코멘트 수 -->
<?php if ($list[$i][commentCnt]) { ?>
    <font color="#E60000">(<?php echo $list[$i][commentCnt]; ?>)</font>
<?php } ?>
<!-- // 코멘트 수 -->

<!-- 제목 -->
        <a href="<?php echo $list[$i][href]; ?>"  title="<?php echo $list[$i][title]; ?>">
        <font color="#000000">
<?php echo $list[$i][subject]; ?>
     
<!-- // 제목 -->
</span>
</a>
      </nobr>
</td></tr>
        </table></td>
</tr>

<?php } ?>

</table>

</td></tr>
</table>
</td></tr>
</table>
<?php } ?>

댓글 전체

$s 가 정의 되어 있는
select 구문 a.bo_table = b.bo_table 아래 형태로 코드를 추가 시키면 될 듯 합니다~^^

and a.bo_table != '제외시킬 테이블명01'
and a.bo_table != '제외시킬 테이블명02'
and c.gr_id != '제외시킬 그룹명01'
and c.gr_id != '제외시킬 그룹명02'
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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