추

$bo_table 변수에 관련해서 질문합니다.

· 2012-07-03 (화) 01:38:26 · 3321
배추 게시판 스킨의 베스트글 소스입니다.

#mw_basic #mw_basic_hot_list li.hot_icon_1 { background:url(<?=$board_skin_path?>/img/icon_hot_1.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_2 { background:url(<?=$board_skin_path?>/img/icon_hot_2.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_3 { background:url(<?=$board_skin_path?>/img/icon_hot_3.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_4 { background:url(<?=$board_skin_path?>/img/icon_hot_4.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_5 { background:url(<?=$board_skin_path?>/img/icon_hot_5.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_6 { background:url(<?=$board_skin_path?>/img/icon_hot_6.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_7 { background:url(<?=$board_skin_path?>/img/icon_hot_7.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_8 { background:url(<?=$board_skin_path?>/img/icon_hot_8.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_9 { background:url(<?=$board_skin_path?>/img/icon_hot_9.gif) no-repeat left 2px; }
#mw_basic #mw_basic_hot_list li.hot_icon_10 { background:url(<?=$board_skin_path?>/img/icon_hot_10.gif) no-repeat left 2px; }
</style>

<? if ($mw_basic[cf_hot]) { ?>
<?
switch ($mw_basic[cf_hot]) {
    case "1": $hot_start = ""; $hot_title = "실시간"; break;
    case "2": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*7); $hot_title = "주간"; break;
    case "3": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*30); $hot_title = "월간"; break;
    case "4": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24); $hot_title = "일간"; break;
    case "5": $hot_start = date("Y-m-d H:i:s", $g4[server_time]-60*60*24*365); $hot_title = "연간"; break;
}
$sql_between = 1;
if ($mw_basic[cf_hot] > 1) {
    $sql_between = " wr_datetime between '$hot_start' and '$g4[time_ymdhis]' ";
}
$sql_except = "";
$tmp = explode("\n", $board[bo_notice]);
for ($i=0, $m=sizeof($tmp); $i<$m; $i++) { 
    if (!trim($tmp[$i])) continue;
    $bo_notice[] = trim($tmp[$i]);
}
if (count($bo_notice)>0)
    $sql_except = " and wr_id not in (".implode(",", $bo_notice).") ";
$sql = "select * 
          from $write_table 
         where wr_is_comment = 0 
           and $sql_between $sql_except
         order by wr_{$mw_basic[cf_hot_basis]} desc 
         limit 10";
$qry = sql_query($sql);
?>
<div id=mw_basic_hot_list>
<h3> <?=$hot_title?> 인기 게시물 </h3>
<ul class=mw_basic_hot_dot>
<? for ($i=0; $row = sql_fetch_array($qry); $i++) { ?>
<? $row[wr_subject] = mw_reg_str($row[wr_subject]); ?>
<? $row[wr_subject] = bc_code($row[wr_subject], 0); ?>
<li class=hot_icon_<?=($i+1)?>> 
    <nobr><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$row[wr_id]?>"><?=cut_str($row[wr_subject], 40)?></a></nobr>
</li>
<? if (($i+1)%5==0) echo "</ul><ul>"; ?>
<? } ?>
</ul>
</div>
<? } ?>


출력되는 부분이 베스트글 스킨을 적용한 해당하는 그 게시판의 글만 출력되는데,

사이트의 모든 글을 대상으로 출력되게 하는 방법이 없나요?

그리고 head.php의 좌측 부분에 넣고싶은데, 

        <?include "$g4[path]/skin/board/spawn/mw.proc/mw.list.hot.skin.php"; // 베스트10 ?>

이렇게 include해도 그냥 빈 공간(아무것도 적용되지 않은 것처럼 보임)만 만들어지네요..

며칠간 계속 고생했습니다..ㅠㅠ 답변 부탁드릴게요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-07-13 조회 2,171
16-07-12 조회 2,354
16-07-12 조회 2,378
16-07-11 조회 2,193
16-06-05 조회 2,921
16-06-03 조회 3,039
16-05-26 조회 2,960
15-09-22 조회 4,991
15-06-10 조회 4,836
14-10-25 조회 6,361
14-10-22 조회 8,987
14-09-21 조회 5,793
14-09-16 조회 5,076
14-08-22 조회 1.1만
14-08-13 조회 5,909
14-08-12 조회 5,440
14-08-12 조회 6,304
14-08-11 조회 6,929
14-06-12 조회 6,210
14-06-11 조회 5,117
14-05-09 조회 5,428
14-05-09 조회 6,388
14-05-09 조회 6,420
14-05-08 조회 5,752
14-04-17 조회 4,753
14-04-16 조회 4,585
14-04-15 조회 4,590
14-04-15 조회 4,537
14-04-15 조회 4,307
14-04-14 조회 4,290
14-04-14 조회 4,260
14-04-14 조회 4,634
14-04-14 조회 4,782
14-04-14 조회 4,762
14-04-13 조회 4,668
14-04-12 조회 4,239
14-04-12 조회 4,382
14-04-12 조회 4,486
14-04-11 조회 5,010
14-04-10 조회 4,751
14-04-10 조회 4,780
14-04-09 조회 4,937
14-04-09 조회 5,308
14-04-08 조회 6,974
13-10-30 조회 7,655
13-07-11 조회 5,135
13-03-28 조회 1.1만
13-02-27 조회 6,791
13-02-14 조회 5,607
13-01-10 조회 4,523
12-12-31 조회 5,104
12-12-20 조회 6,121
12-12-12 조회 5,280
12-12-07 조회 4,504
12-11-28 조회 4,855
12-11-22 조회 5,296
12-11-12 조회 5,657
12-09-22 조회 4,515
12-09-18 조회 4,705