채택완료

최신글 추출할때 특정게시판제외?

작업사이트는

designgmall.com/index2.php 입니다

보시면 확인할 수 있는데요...

메인페이지에 여러게시판에서 최신글들만 올라오게 되어 있습니다.

최신글들은 이미지상품들이 올라와 있습니다.

그러다 Notice 게시판에 공지사항을 테스트하는중에.. 이 글도 같이 메인에 올라오는걸 확인했어요!

Notice 게시물은 메인에 올라오면 안되거든요.. ㅜㅜ

당연한 결과임에도 불구하고 해결방법이 잘 나오지 않아 이렇게 글을 써 봅니다.

코드에서 뭘 수정하면 가능할지.... ㅜㅜ 여기에서 수정이 될까요? ㅜㅜ

Copy
<?phpif (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가include_once(G5_LIB_PATH.'/thumbnail.lib.php');$imgwidth = 200; //표시할 이미지의 가로사이즈$imgheight = 140; //표시할 이미지의 세로사이즈$img_quality = 100;add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);?><div id="oneshot"> <ul> <?php for ($i=0; $i<count($list); $i++) { ?>   <li>  <div class="img_border">  <div class="img_set">   <div class="img">    <a href="<?php echo $list[$i]['href'] ?>">     <?php                     $botable = sql_fetch(" select * from g5_board where bo_subject = '{$list[$i]['bo_subject']}' ");                $thumb = get_list_thumbnail($botable['bo_table'], $list[$i]['wr_id'], $imgwidth, $imgheight);                        if($thumb['src']) {     $img_content = '<img class="img_left" src="'.$thumb['src'].'" alt="'.$list[$i]['subject'].'" width="'.$imgwidth.'" height="'.$imgheight.'">';     } else {     $img_content = 'NO IMAGE';     }                     echo $img_content;                                ?>    </a>   </div>   </div>   <div class="subject_set2">    <div class="sub_title2">    <a href="<?php echo $list[$i]['href'] ?>">    <font color="#696969">    <?php echo cut_str($list[$i]['subject'], 13, "..") ?></font>    </a></div>    <div class="sub_content">    Sold by : <?=$list[$i][wr_name]?>        <?//=cut_str(strip_tags($list[$i]['wr_content']), 30, '..')?>    <!--게임 간략설명     <?=cut_str(strip_tags($list[$i][wr_4]),128,"..")?>--></div><div class="view"><span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_hit_13.png"></font></span><span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#CC6018"><b><?=$list[$i][wr_hit]?></b></font></span><font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font><span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_c_13.png"></font></span><span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#CC6018"><b><?=$list[$i][wr_comment]?></b> </font><font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font><span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/icon_g_13.png"></font></span><span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#A9A9A9"><b><?=$list[$i][wr_good]?></b></font></span><font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font><span style="margin-right:2px; font-family:Dotum,Verdana,Arial; font-size:12px;"><font color="#737373"><img src="./img/point2.png"></font></span><span style="font-family:Dotum,Verdana,Arial; font-size:13px;"><font color="#b6253d"><b><?=$list[$i][wr_1]?></b></font></span> </div>    <?$arrtag = explode(",", $list[$i][tags]);?><?if( $list[$i][tags] ){?><div class="comp_tags comp_tags_view">   <?php foreach( $arrtag as $key => $val ){ $val = trim($val);?><a href="<?php echo G5_BBS_URL?>/board.php?bo_table=<?php echo $botable['bo_table']?>&amp;sfl=tags&amp;stx=<?php echo $val?>"><?php echo $val?></a><?php }?><?php }?></div>   </div>  </li> <?php } ?> </ul></div><div style="clear:both;"></div></div><div style="padding-bottom:10px"></div>

|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

g5_board  테이블에  필드 하나 추가해서 그것이 있는 것만 검색되도록 해보세요

답변에 대한 댓글 1개

여러가지 생각해보고 해봤었는데...
위치를 잘 정해야되겠더군요~~ 아무튼 잘 해결하였습니다. 감사합니다.^^

답변을 작성하려면 로그인이 필요합니다.