게시판에 조회수,추천수 베스트 붙일려고 하는데 자꾸오류가 나네요 > 그누4 질문답변

그누4 질문답변

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

게시판에 조회수,추천수 베스트 붙일려고 하는데 자꾸오류가 나네요 정보

게시판에 조회수,추천수 베스트 붙일려고 하는데 자꾸오류가 나네요

본문

 
여기에 있는 스킨을 쓰고 싶은데  이상하게 설치시에   http://ng.to/board/best5.php  이런 오류가 나네요
 
혹시 누가 설치하는 방법좀 조금 설명해주실수 없나요
 
 
밑에는 제가 지금 올려놓은 소스 상태입니다
 
코멘드에 본면  latest.lip  에 소스 추가하라고 하는데 어떻게 하는지를 잘몰라사  latest1.lip   파을을 만들어서 업로드 하였습니다 .
 
latest.lip  을 수정하니까 게시판 전체가 안보여지더라구여 ~
 
 
 
 
---- best5.php -------------
 
<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>
<table width=700 cellpadding=0 cellspacing=0 border=0 valign="top">
<tr>
<td width="554" valign="top">
<?
//    $g4[title] = "$group[gr_subject] > $board[bo_subject] $page 페이지";
//include_once("./_head.php");
//  최신글
echo "<table width='554' border='0' cellpadding=0 cellspacing=0 valign='top'><tr>";
    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
 echo "<td valign='top' width='272' height='174'>";
    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수, 정렬, 날짜(기간), 구분(1=추천수타이틀이미지, 2=조회수타이틀이미지));
    echo latest1("chuchun", $bo_table, 5, 36, "wr_good", 30, 1);
    echo "<p>\n";
 echo "</td><td width='10'> </td>";
 echo "<td valign='top' width='272'>";
    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수, 정렬, 날짜(기간), 구분(1=추천수타이틀이미지, 2=조회수타이틀이미지);
    echo latest1("chuchun", $bo_table, 5, 36, "wr_hit", 30, 2);
    echo "<p>\n";
 echo "</td>";
?>
</tr>
<tr>
<td colspan="3"><img src="$g4[path]/skin/latest/chuchun/img/best_bottom.jpg" width="553" height="31">
</td>
</tr>
</table>
</td>
<td width="147" align="center">
<?
$aa = rand(0,3);
 if($aa == 1) { ?>
 <a onmouseover="window.status='http://www.ikong.co.kr';return true" onmouseout="window.status=' ';return true" target="_blank" href="http://click.linkprice.com/click.php?m=ikong&a=A100212504&l=0011&u_id="><img src="http://www.ikong.co.kr/images/banner/linkprice/20060208/120x200.gif" border="0" alt="정말이지 돈되는 놀라운 리얼게임 아이콩" width="142" height="205"></a>
<img src="http://track.linkprice.com/lpshow.php?m_id=ikong&a_id=A100212504&p_id=0000&l_id=0011&l_cd1=2&l_cd2=0" width="1" height="1" border="0" nosave style="display:none">
<? } else { ?>
 <a onmouseover="window.status='http://www.hit1004.co.kr';return true" onmouseout="window.status=' ';return true" href="http://click.linkprice.com/click.php?m=hit1004&a=A100212504&l=0000&u_id=<?=$member[mb_id]?>" target=_blank><img src="http://www.7korea.net/image/banner/hit1004_142_200.gif" border="0" width="142" height="205">
<img src="http://track.linkprice.com/lpshow.php?m_id=hit1004&a_id=A100212504&p_id=0000&l_id=0000&l_cd1=2&l_cd2=0" width="1" height="1" border="0" nosave style="display:none">
<? } ?>
</td>
</tr>
</table></body><br>
 
 
 
------ latest.lib.php ------------
 
 
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
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 ";
    //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;
}
?>
 
 
------ latest1.lib.php ------------
 
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
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;
}
?>
 
------ 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]);
?>
  • 복사

댓글 전체

해당 링크 코멘트를 보면 아래내용을 추가하라고 나와있네요..


/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;
}

?>
이걸 추가하시면 됩니다...
<?
include_once("./_common.php");
//include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/latest1.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
best5.php상단에 추가해보세요.
위에는 해결이 됬는데 ~~
select * from g4_write_ where wr_is_comment = 0 and wr_datetime >= '2007-04-11 15:30:38' order by wr_good desc limit 0, 5

1146 : Table 'ngto.g4_write_' doesn't exist

error file : /board/best5.php 

이건 어떤오류인가요  ~에효 이거 설치하기 정말 어렵네요
1146 : Table 'ngto.g4_write_' doesn't exist
에러내용을 잘보세요.
해당테이블이 없다고 나오잖아요.
테이블명을 지정해주세요.
best5.php 

echo latest1("chuchun", $bo_table, 5, 36, "wr_good", 30, 1);
echo latest1("chuchun", $bo_table, 5, 36, "wr_hit", 30, 2);
요부분에서 $bo_table에
해당테이블명을 넣으세요.
© SIRSOFT
현재 페이지 제일 처음으로