지정 기간제 그룹별 인기,추천글 출력 > 그누4 스킨

그누4 스킨

스킨의 저작권은 해당 스킨 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
스킨 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y
그누보드와 관련이 있지만 스킨과 빌더가 아니면 플러그인 게시판에 올려주세요.

지정 기간제 그룹별 인기,추천글 출력 정보

최근게시물 지정 기간제 그룹별 인기,추천글 출력

첨부파일

topclick.zip (11.9K) 1715회 다운로드 2007-01-10 11:01:25

본문

안녕하세요..

신문사 페이지를 운영하다 보니..

필요에의해 만들었습니다..



- 추출방법 -

izen_group('스킨', '그룹명', 정렬필드, 출력갯수, 자를 문자열, 최근 몇일간을 출력할 것인가?);
예) echo izen_group('gr_best_news', 'news', wr_hit, 10, 28, 30);


참고한 게시물

- izen님의 지정 기간제 히트순 최근 게시물 -

http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=8790
추천
9

댓글 전체

추출은 되는데요, 아래와 같은화면이 화면 제일 상단에 나오네요.

추출 이외의 다른 게시판에서도 나오는데, 어떻게 고쳐야 하나요?

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/songpagu/www/bbs/extend/izen_hit.lib.php:108) in /home/hosting_users/songpagu/www/bbs/head.sub.php on line 38
저도 출력은 잘되는데요..
Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/sayboom/public_html/extend/izen_hit.lib.php:109) in /home/sayboom/public_html/head.sub.php on line 38

도와주세요..머가 문제인지.ㅡㅡ
아...드뎌 방법 알아냈습니다. 오류코드 보시면요
izen_hit.lib.php:109  이줄을 보시면...빈칸을 없애주세요..^^
아주 간단한 방법이었습니다.ㅋㅋ 다덜 수고용~~잘됩니다.
usort($list, 'izen_usort2');
}

$list = array_slice($list, 0, $rows);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content; } ?>        <----이 부분이 문서의 '맨 마지막 줄'이 되어야 함.


휴, 헤매다가 해결했네요. 즉 위에서 말씀드린 줄이 문서의 가장 마지막 줄이 되어야 한다는 말이었던 것 같습니다. 다시 말하면 마우스로 그 다음 줄을 클릭해서 클릭이 되면 그 공백 줄을 없애주시라는 말씀이죠. 만약에 이거 다음에 공백이 있으면 지워[한 칸을 올려] 주세요.
단지 최근게시순으로 소팅을 하려면 아래 소스 중 어디를 고쳐야하는지요 ?


<?
if (!defined('_GNUBOARD_')) exit;

/*
izen.group.lib.php
제작일 : 2006-12-08

지정 기간제 히트순 최근 게시물 수정본
http://www.sir.co.kr/bbs/tb.php/g4_tiptech/7328

그룹 최신글 관련하여 통합하도록 하였다.
정렬 필드값에 의해서 SQL 문을 추가하도록 하면 된다.

izen_group('스킨', '그룹명', 정렬필드, 출력갯수, 자를 문자열, 최근 몇일간을 출력할 것인가?);
예) echo izen_group('gr_best_news', 'news', wr_hit, 10, 28, 30);
*/

# 인기글
function izen_usort1($a, $b)
{
return $b['wr_hit'] - $a['wr_hit'];
}

# 헤드라인
function izen_usort2($a, $b)
{
return $b['wr_good'] - $a['wr_good'];
}

# 최신글 추출
function izen_group($skin_dir="", $gr_id, $izen_sort, $rows=10, $subject_len=40, $listdate)
{
global $g4;

$nowYmd = date(Ymd); # 시작시간을 구합니다.
$time = time();
$startYmd = date("Ymd",strtotime("-".$listdate." day", $time));

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 bo_table from {$g4['board_table']} where gr_id='$gr_id' and bo_use_search='1' order by bo_order_search ";
$ress = sql_query($sql);
for($i=0, $ii=0; $board=sql_fetch_array($ress); $ii++)
{
$tmp_write_table = $g4['write_prefix'] . $board['bo_table']; # 게시판 테이블 전체이름
#$sql = "select * from `$tmp_write_table` where wr_is_comment <> '1' and  date_format(wr_datetime, '%Y%m%d') between '$startYmd' and '$nowYmd' order by $sort desc limit 0, $rows ";

# 정렬 필드에 의해서 전체적으로 정렬, 관리한다.
if ($izen_sort == 'wr_hit')
{
$sql_gr_Q = " wr_is_comment <> '1' and date_format(wr_datetime, '%Y%m%d') between '$startYmd' and '$nowYmd' order by $izen_sort desc limit 0, $rows ";
}
elseif ($izen_sort == 'wr_scrap')
{
$sql_gr_Q = " wr_is_comment <> '1' and date_format(wr_datetime, '%Y%m%d') between '$startYmd' and '$nowYmd' and wr_scrap <> 0 order by $izen_sort desc limit 0, $rows ";
}
elseif ($izen_sort == 'wr_datetime') # wr_1 헤드라인
{
$sql_gr_Q = " wr_is_comment <> '1' and date_format(wr_datetime, '%Y%m%d') between '$startYmd' and '$nowYmd' and wr_datetime <> 0 order by $izen_sort desc limit 0, $rows ";
}
elseif ($izen_sort == 'wr_good') #
{
$sql_gr_Q = " wr_is_comment <> '1' and date_format(wr_datetime, '%Y%m%d') between '$startYmd' and '$nowYmd' and wr_good <> '0'  order by $izen_sort desc limit 0, $rows ";
}
elseif ($izen_sort == 'wr_id')
{
$sql_gr_Q = " wr_is_comment <> '1' order by $izen_sort desc limit 0, $rows ";
}

$sql = " select * from `$tmp_write_table` where $sql_gr_Q ";
$result = sql_query($sql);

#for (; $row=sql_fetch_array($result); $i++) # *오류* 전체 게시물 가운데 날짜에 상관없이 히트순으로 지정한 갯수만큼 출력된다.
for ($i==0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len, $listdate);
}
}

if ($izen_sort == 'wr_hit')
{
usort($list, 'izen_usort1');
}

elseif ($izen_sort == 'wr_good')
{
usort($list, 'izen_usort2');
}

$list= array_slice($list, 0, $rows);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();

return $content;
}
?>
메인페이지에 넣으려고 하는데요.
index파일에
<? echo izen_group('izen_group_new', 'sonamu',wr_hit, 10, 28, 30); ?>
이렇게 넣으니까 안되거든요. izen_group()이 없다고 나오는데, 어떻게 해야 할까요?
Fatal error: Call to undefined function: izen_group()
첨부되어있는 파일 중  extend 폴더 안에 있는 izen.hit.lip.php 파일을
FTP상의 gnuboard4/extends에 올리세요!!
2007년도 글이네요 ㅎㅎ
혹시라도 나중에 저처럼 헤메는 분 계실까 글 남깁니다.
참고한 게시물  - izen님의 지정 기간제 히트순 최근 게시물 -
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=8790  에서 올리셨던,

extens/izen.group.lib.php를 삭제하시고,
izen_hit.lib.php만 남기셔야 합니다.
이거 메인에 어떻게 넣어야 하나요??
하라는대로 햇는데.. 안되네요.....제발 가르쳐주세요~ ^^;
<? echo izen_group('gr_best_news', 'news', wr_hit, 10, 28, 30); ?>
izen_group가 없다고 나오는데요..
테이블 관련 변수가 다 먹히질 안네용...

링크가 {$list[$i]['href']} 이렇게 되있어서 내용말구 리스트로 가구 싶어서

<a href='{$g4['bbs_path']}/board.php?bo_table={$list[$i]['bo_table']}

라고 해줘도 테이블 명을 불러 드리지 못하네용... 이유가 무엇일까요 ....
헬푸미 ㅜㅜ
전체 5,850 |RSS
그누4 스킨 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT