채택완료

그룹내에 모든 게시판에서 조회수 높은 순으로 출력하는 방법(소스첨부)

2016-09-19 (월) 16:34:45 6,792

아래 소스는 게시판내에서 조회수 높은 순서대로 출력하는  lib/latest_hit.lib.php  소스에요..

그룹 내에 속한 모든 게시판에서 조회수 높은 순서대로 출력하는 방법이 궁금합니다 ㅠ

어느부분을 어떻게 수정해야 출력이 될까요?...ㅠㅠ

도움 부탁드립니다..

Copy
<?phpif (!defined('_GNUBOARD_')) exit; // 최신글 추출function latest_hit($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="") {     global $g5;     if ($skin_dir)         $latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;     else         $latest_skin_path = G5_SKIN_URL.'/latest/basic';      $list = array();      $sql = " select * from {$g5['board_table']} where bo_table = '$bo_table'";     $board = sql_fetch($sql);      $tmp_write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름     //$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";     // 위의 코드 보다 속도가 빠름     $sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_hit desc limit 0, $rows ";     //explain($sql);     $result = sql_query($sql);     for ($i=0; $row = sql_fetch_array($result); $i++)         $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);      ob_start();    include $latest_skin_path.'/latest.skin.php';    $content = ob_get_contents();    ob_end_clean();     return $content;}?>
|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

답변에 대한 댓글 1개

저대로 하였는데~
이미지가 출력이 잘 안되네요 ㅠㅠ

참고 주소로 남겨준 곳의 소스는 그룹에서 출력하는 소스인데

최근게시물 스킨자체에서는 아래처럼 게시판에서 뽑아오는거라..

이미자 자체가 인식못해서 출력이 안되는것 같은데 하단에 어떤부분을 수정해야할까요?


<div class="img">
<a href="<?php echo $list[$i]['href'] ?>">
<?php
$thumb = get_list_thumbnail($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 = '스크린샷 없음';
}
echo $img_content;
?>
</a>
</div>

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