최근 게시물을 조금수정해서.. 추천베스트, 조회수 베스트,,,
설명 사진
처음으로 스킨을 올려보내요...^.^
다음 텔존 게시판을 보고 만들었습니다...
게시판 상단에 항상 따라다니는 추천베스트, 조회수베스트...
/skin/latest/ 폴더에 chuchun 폴더를 업로드하시구
홈페이지 루트 폴더에 best5.php 파일을 업로드 하시고
/bbs/board_head.php
파일을
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 게시판 관리의 상단 파일 경로
if ($board[bo_include_head])
@include ($board[bo_include_head]);
// 게시판 관리의 상단 이미지 경로
if ($board[bo_image_head])
echo "<img src='$g4[path]/data/file/$bo_table/$board[bo_image_head]' border='0'>";
아래 부분만 추가
####################################################
// cheditor 스킨만 추천글 나오게
if($board_skin_path=='../skin/board/cheditor') { // cheditor 스킨만 추천글나오게
@include ("../best5.php");
}
####################################################
// 게시판 관리의 상단 내용
if ($board[bo_content_head])
echo stripslashes($board[bo_content_head]);
?>
이렇게 수정하시면 링크1에 있는거 처럼 게시판 어디에서나 베스트 추천과 베스트 조회가 나옵니다..
데모사이트 http://www.7korea.net/bbs/board.php?bo_table=board_1_1
다음 텔존 게시판을 보고 만들었습니다...
게시판 상단에 항상 따라다니는 추천베스트, 조회수베스트...
/skin/latest/ 폴더에 chuchun 폴더를 업로드하시구
홈페이지 루트 폴더에 best5.php 파일을 업로드 하시고
/bbs/board_head.php
파일을
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 게시판 관리의 상단 파일 경로
if ($board[bo_include_head])
@include ($board[bo_include_head]);
// 게시판 관리의 상단 이미지 경로
if ($board[bo_image_head])
echo "<img src='$g4[path]/data/file/$bo_table/$board[bo_image_head]' border='0'>";
아래 부분만 추가
####################################################
// cheditor 스킨만 추천글 나오게
if($board_skin_path=='../skin/board/cheditor') { // cheditor 스킨만 추천글나오게
@include ("../best5.php");
}
####################################################
// 게시판 관리의 상단 내용
if ($board[bo_content_head])
echo stripslashes($board[bo_content_head]);
?>
이렇게 수정하시면 링크1에 있는거 처럼 게시판 어디에서나 베스트 추천과 베스트 조회가 나옵니다..
데모사이트 http://www.7korea.net/bbs/board.php?bo_table=board_1_1
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 50개
감사드립니다.
앞으로도 더 좋은 방법있으면 많이 올리도록 하겠습니다...^.^
아름다운 스킨입니다...
포인트 쏴 드리겠습니다...
왜 난 안되지?? 흑흑
시킨대로 안해서 그런가???
저는 아래처럼 나오네요...왜 그럴까요?
http://www.damoa.biz/g40619/bbs/board.php?bo_table=damoa_biz&wr_id=15
제가 바꾼건 cheditor글이 없어서 rookie로 바꿧거든요.
어려워진다...
$titles=1 을 추가했습니다.
<td colspan="3"><img src="/skin/latest/chuchun/img/best_bottom.jpg" width="553">
이걸
<td colspan="3"><img src="/g40619/skin/latest/chuchun/img/best_bottom.jpg" width="553">
이걸로 바꿔주시구요,.,..
47줄에 /image/banner/hit1004_142_200.gif 이 이미지 경로를
http://www.7korea.net/image/banner/hit1004_142_200.gif 이경로로 바꿔주시면 나올겁니다..
다운받을 파일 수정된거 올릴께요..
best5.php에 있는
## latest1("chuchun", $bo_table, 5, 36, "wr_hit", 30, 2);##
이부분의 마직 숫자 2가 적용되는 변수입니다..
1이면 추천수 베스트이구요
2이면 조회수 베스트에요..^.^
/lib/lastest.lib.php
여기에
// 최신글 추출
function latest1($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options, $before_day, $titles)
{
$before_time = date("Y-m-d H:i:s", mktime() - (86400 * $before_day));
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 and wr_datetime >= '$before_time' order by $options 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;
}
?>
이걸 추가하시면 됩니다... 깜빡했었네요...^.^
재밌게 보았습니다.감사 드려요~
스킨이 게시판목록, 보기, 쓰기 페이지에도 다 나오네요
게시판목록에 한번만 노출되면 좋을거 같네요
####################################################
// cheditor 스킨만 추천글 나오게
if($board_skin_path=='../skin/board/cheditor') { // cheditor 스킨만 추천글나오게
@include ("../best5.php");
}
####################################################
이 부분을 /bbs/board_head.php에 삽입하지 말고
/skin/board/cheditor/list.skin.php 첫줄에 삽입하면 한번만 나오더군요
(일단 스크랩 해두고 시간나면 사용해야제~♪ )
댓글수는 찾아봐서 시간나는데로 올리도록 하겠습니다..
echo latest1("chuchun", $bo_table, 5, 36, "wr_comment", 30, 2);
wr_hit를 wr_comment 로 하시면 코멘트 정렬로 나오네요..^.^//
내용이 더 좋네요^^;
'하OO OO'
야하다기 보다는 부럽네요~*
아름다운 총각님 빠른 답변 감사 드립니다.
빨리 아픈것 나으시길 바랍니다.
근데 혹시 갤러리이미지에서 추천이미지만 따로 상단에 출력할수는 없나요???
무진장 궁금합니다~~~~~~!!