그룹최신글이 갑자기 안됩니다 정보
그룹최신글이 갑자기 안됩니다본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
잘나오던 그룹최신글이 갑자기 안나옵니다..ㅠㅠ 원인이 뭘까요??
사용 스킨은 그랜드님이 만드신 그룹 최신글입니다.
index.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
include_once("$g4[path]/lib/search.lib.php");
include_once("$g4[path]/lib/search7.lib.php");
$g4['title'] = "nodemo.co.kr";
include_once("./head.php")
?>
<!-- 메인화면 최신글 시작 -->
<base target="_parent">
<table width="732" cellpadding=0 cellspacing=0 align="center">
<tr>
<td valign=top height="177" width="474">
<div align="left">
<table cellpadding="0" cellspacing="0" width="461" align="center">
<tr>
<td width="461" height="18">
<p align="left"></p>
</tr>
<tr>
<td width="461" height="8"> <p><? include_once("./tap_menu.php"); // 탭메뉴?>
</p>
</td>
</tr>
<tr>
<td width="461" height="15"></td>
</tr>
<tr>
<td width="461" height="5">
<p><?=latest_group("basice456", "k1", 3, 50); ?> </p>
</td>
</tr>
<tr>
<td width="461" height="14"></td>
</tr>
<tr>
<td width="461" height="36"> <p><?=latest_group("basice456", "k2", 3, 50); ?> </p>
</td>
</tr>
</table>
<p></p>
<table width="460" border="1" bordercolordark="#CCCCCC" bordercolorlight="#CCCCCC" cellspacing="0" bordercolor="#CCCCCC" align="center">
<tr>
<td width="454">
<p><? echo latest("j2latest","k3_1", 5, 70);?></p>
</td>
</tr>
</table>
</div>
</td>
<td width="258" height="177" valign="top" align="left">
<p align="left">
<div align="right">
<table width="236" cellpadding="0" cellspacing="0" border="0" valign="top">
<tr>
<td width="251" height="17" align="right">
<div align="right">
</div>
</td>
</tr>
<tr>
<td width="251" height="17" align="right">
<table width="222" height="22" border="0" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject">
<input type="hidden" name="sop" value="and">
<tr>
<td width="3" align="left"> </td>
<td align="center" width="179">
<p align="left"><input name="stx" maxlengt=20 onblur="this.style.background='#ffffff'"
style="BORDER-RIGHT: rgb(204,204,204) 1px solid; BORDER-TOP: rgb(204,204,204) 1px solid; BACKGROUND-IMAGE: url(http://dmbuser.com/search/images/sc_bg.gif); BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 190px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; HEIGHT: 19px"
onfocus="this.style.background='#ffffff'" size="20" maxlength="20"></p>
</td>
<td width="40" align="right">
<p align="left"><input type="image" src="<?=$g4[path]?>/img/scin.gif" width="47" height="21" border="0"></p>
</td>
</tr>
</form>
</table>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script></td>
</tr>
<tr>
<td width="251" height="20" align="right"></td>
</tr>
<tr>
<td width="251" height="8" align="right">
<p align="right"><?=search();?></p>
</td>
</tr>
<tr>
<td height="20" width="251" align="right">
<p align="right"></p>
</td></tr>
<tr>
<td width="251" align="right">
<p align="right"><?=search7();?></p>
</td>
</tr>
<tr>
<td width="251" height="15" align="right">
<p align="right"></p>
</td>
</tr>
<tr>
<td width="251" height="15" align="right">
<p align="right"><? echo latest("basice1","k2_1", 5, 70);?></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?
include_once("./tail.php");
?>
////////////////////////////////////////////////////////////////////////////////////
extend\group.lib.php
<?
if (!defined('_GNUBOARD_')) exit;
/// 함수 정의 시작
// 최신글 추출 - 선택한 그룹별로 원하는 수만큼 보여줌
function latest_group($skin_dir="", $gr_id, $rows=10, $subject_len=40, $category="", $orderby="")
{
global $config;
global $g4;
$list = array();
$limitrows = $rows;
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_order_search";
$rsgroup = sql_query($sqlgroup);
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
for ($j=0, $k=0; $rowgroup=sql_fetch_array($rsgroup); $j++) {
$bo_table = $rowgroup[bo_table];
// 테이블 이름구함
$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 ";
$sql .= (!$category) ? "" : " and ca_name = '$category' ";
$sql .= (!$orderby) ? " order by wr_id desc " : " order by $orderby desc, wr_id desc ";
$sql .= " limit $limitrows";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++, $k++) {
if(!$orderby) $op_list[$k] = $row[wr_datetime];
else {
$op_list[$k] = is_string($row[$orderby]) ? sprintf("%-256s", $row[$orderby]) : sprintf("%016d", $row[$orderby]);
$op_list[$k] .= $row[wr_datetime];
}
$list[$k] = get_list($row, $board, $latest_skin_path, $subject_len);
$list[$k][bo_table] = $board[bo_table];
$list[$k][bo_subject] = $board[bo_subject];
$list[$k][bo_wr_subject] = cut_str($board[bo_subject] . $list[$k][wr_subject], $subject_len);
}
}
if($k>0) array_multisort($op_list, SORT_DESC, $list);
if($k>$rows) array_splice($list, $rows);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/// 함수 정의 끝
?>
오류 주소 :
잘나오던 그룹최신글이 갑자기 안나옵니다..ㅠㅠ 원인이 뭘까요??
사용 스킨은 그랜드님이 만드신 그룹 최신글입니다.
index.php
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
include_once("$g4[path]/lib/search.lib.php");
include_once("$g4[path]/lib/search7.lib.php");
$g4['title'] = "nodemo.co.kr";
include_once("./head.php")
?>
<!-- 메인화면 최신글 시작 -->
<base target="_parent">
<table width="732" cellpadding=0 cellspacing=0 align="center">
<tr>
<td valign=top height="177" width="474">
<div align="left">
<table cellpadding="0" cellspacing="0" width="461" align="center">
<tr>
<td width="461" height="18">
<p align="left"></p>
</tr>
<tr>
<td width="461" height="8"> <p><? include_once("./tap_menu.php"); // 탭메뉴?>
</p>
</td>
</tr>
<tr>
<td width="461" height="15"></td>
</tr>
<tr>
<td width="461" height="5">
<p><?=latest_group("basice456", "k1", 3, 50); ?> </p>
</td>
</tr>
<tr>
<td width="461" height="14"></td>
</tr>
<tr>
<td width="461" height="36"> <p><?=latest_group("basice456", "k2", 3, 50); ?> </p>
</td>
</tr>
</table>
<p></p>
<table width="460" border="1" bordercolordark="#CCCCCC" bordercolorlight="#CCCCCC" cellspacing="0" bordercolor="#CCCCCC" align="center">
<tr>
<td width="454">
<p><? echo latest("j2latest","k3_1", 5, 70);?></p>
</td>
</tr>
</table>
</div>
</td>
<td width="258" height="177" valign="top" align="left">
<p align="left">
<div align="right">
<table width="236" cellpadding="0" cellspacing="0" border="0" valign="top">
<tr>
<td width="251" height="17" align="right">
<div align="right">
</div>
</td>
</tr>
<tr>
<td width="251" height="17" align="right">
<table width="222" height="22" border="0" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<input type="hidden" name="sfl" value="wr_subject">
<input type="hidden" name="sop" value="and">
<tr>
<td width="3" align="left"> </td>
<td align="center" width="179">
<p align="left"><input name="stx" maxlengt=20 onblur="this.style.background='#ffffff'"
style="BORDER-RIGHT: rgb(204,204,204) 1px solid; BORDER-TOP: rgb(204,204,204) 1px solid; BACKGROUND-IMAGE: url(http://dmbuser.com/search/images/sc_bg.gif); BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 190px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; HEIGHT: 19px"
onfocus="this.style.background='#ffffff'" size="20" maxlength="20"></p>
</td>
<td width="40" align="right">
<p align="left"><input type="image" src="<?=$g4[path]?>/img/scin.gif" width="47" height="21" border="0"></p>
</td>
</tr>
</form>
</table>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script></td>
</tr>
<tr>
<td width="251" height="20" align="right"></td>
</tr>
<tr>
<td width="251" height="8" align="right">
<p align="right"><?=search();?></p>
</td>
</tr>
<tr>
<td height="20" width="251" align="right">
<p align="right"></p>
</td></tr>
<tr>
<td width="251" align="right">
<p align="right"><?=search7();?></p>
</td>
</tr>
<tr>
<td width="251" height="15" align="right">
<p align="right"></p>
</td>
</tr>
<tr>
<td width="251" height="15" align="right">
<p align="right"><? echo latest("basice1","k2_1", 5, 70);?></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?
include_once("./tail.php");
?>
////////////////////////////////////////////////////////////////////////////////////
extend\group.lib.php
<?
if (!defined('_GNUBOARD_')) exit;
/// 함수 정의 시작
// 최신글 추출 - 선택한 그룹별로 원하는 수만큼 보여줌
function latest_group($skin_dir="", $gr_id, $rows=10, $subject_len=40, $category="", $orderby="")
{
global $config;
global $g4;
$list = array();
$limitrows = $rows;
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_order_search";
$rsgroup = sql_query($sqlgroup);
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
for ($j=0, $k=0; $rowgroup=sql_fetch_array($rsgroup); $j++) {
$bo_table = $rowgroup[bo_table];
// 테이블 이름구함
$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 ";
$sql .= (!$category) ? "" : " and ca_name = '$category' ";
$sql .= (!$orderby) ? " order by wr_id desc " : " order by $orderby desc, wr_id desc ";
$sql .= " limit $limitrows";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++, $k++) {
if(!$orderby) $op_list[$k] = $row[wr_datetime];
else {
$op_list[$k] = is_string($row[$orderby]) ? sprintf("%-256s", $row[$orderby]) : sprintf("%016d", $row[$orderby]);
$op_list[$k] .= $row[wr_datetime];
}
$list[$k] = get_list($row, $board, $latest_skin_path, $subject_len);
$list[$k][bo_table] = $board[bo_table];
$list[$k][bo_subject] = $board[bo_subject];
$list[$k][bo_wr_subject] = cut_str($board[bo_subject] . $list[$k][wr_subject], $subject_len);
}
}
if($k>0) array_multisort($op_list, SORT_DESC, $list);
if($k>$rows) array_splice($list, $rows);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/// 함수 정의 끝
?>
댓글 전체
혼자 해결했습니다; 게시판 관리 업그레이드 추가했다가 실수로인지.. 검색기능을전부 취소해서 안보였던겁니다..ㅡㅡ; ㅎㅎ
저두 그룹 최신글이 갑자기 안나오길래 검색해보니..
님처럼 검색기능이 꺼져있던..
감사합니다.. 저두 해결 ㅎㅎ
님처럼 검색기능이 꺼져있던..
감사합니다.. 저두 해결 ㅎㅎ