혹시 이런 최신글스킨 있나요?

01232.jpg
기본적인 최신갤러리 스킨은 많이 있는데,
게시판에서 조회수 많은 글을 불러오는 최신글 갤러리스킨을 찾고 있습니다.

이거 저걸로 검색해서 찾아봐도 안보이는데 혹시 이런최신스킨 보신분 계신가요?

첨부파일

01232.jpg (114.1 KB)
0회 2013-04-28 22:18
|

댓글 2개

기본적으로
lib/latest.lib.php 에 필요함수를 만드시면되는데요..
기본함수인 latest 가지고 만드시면됩니다.
wr_hit 가 조회수 많은 글이라 가정한다면.. order by wr_hit desc 를 하면 됩니다..즉..

수정전..
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4['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_num 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;
}

수정후..
function latest_hit($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);

$tmp_write_table = $g4['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;
}

order by wr_num -> order by wr_hit desc 부분만 고치시면됩니다.
감사합니다.^^
적용 잘 되네요.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 3,997
12년 전 조회 943
12년 전 조회 857
12년 전 조회 1,673
12년 전 조회 1,515
12년 전 조회 563
12년 전 조회 735
12년 전 조회 1,600
12년 전 조회 882
12년 전 조회 1,672
12년 전 조회 1,691
12년 전 조회 1,566
12년 전 조회 1,577
12년 전 조회 764
12년 전 조회 1,522
12년 전 조회 2,970
12년 전 조회 962
12년 전 조회 980
12년 전 조회 1,008
12년 전 조회 713
🐛 버그신고