최신글 추출할때 특정게시판제외? 채택완료
jjem
8년 전
조회 2,523
작업사이트는
designgmall.com/index2.php 입니다
보시면 확인할 수 있는데요...
메인페이지에 여러게시판에서 최신글들만 올라오게 되어 있습니다.
최신글들은 이미지상품들이 올라와 있습니다.
그러다 Notice 게시판에 공지사항을 테스트하는중에.. 이 글도 같이 메인에 올라오는걸 확인했어요!
Notice 게시물은 메인에 올라오면 안되거든요.. ㅜㅜ
당연한 결과임에도 불구하고 해결방법이 잘 나오지 않아 이렇게 글을 써 봅니다.
코드에서 뭘 수정하면 가능할지.... ㅜㅜ 여기에서 수정이 될까요? ㅜㅜ
</p><p><?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');</p><p>$imgwidth = 200; //표시할 이미지의 가로사이즈
$imgheight = 140; //표시할 이미지의 세로사이즈
$img_quality = 100;
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);</p><p>?></p><p>
<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></p><p> <div class="subject_set2"></p><p> <div class="sub_title2"></p><p>
<a href="<?php echo $list[$i]['href'] ?>">
<font color="#696969">
<?php echo cut_str($list[$i]['subject'], 13, "..") ?></font>
</a></div></p><p> <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></p><p>
<div class="view"></p><p><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></p><p><font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font></p><p><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></p><p><font style="font-family:Dotum,Verdana,Arial; font-size:11px;" color="#D3D3D3"> | </font></p><p><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></p><p><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']?>&sfl=tags&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></p><p>
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인
위치를 잘 정해야되겠더군요~~ 아무튼 잘 해결하였습니다. 감사합니다.^^