그누보드로 Q&A 설치했습니다.
메인이구요....
메인에 Q&A부분에 게시글 4개 올라오게 하고싶은데 어떻게 해야할까요???
|
답변 9개 / 댓글 2개
채택된 답변
+20 포인트
이렇게 해보세요
<?=latest('basic','01',4,'35');?>
2014-05-02 (금) 22:40:02

혹시 메인게시판 상단 Q&A 회색바 없애구 아이콘이랑 라인 폰트색 변경하구 싶어서요.
여기처럼 만들고 싶은데 어디서 수정해야하나요???
2014-05-02 (금) 22:37:09
감사합니다..^^
됐어요..
2014-05-02 (금) 21:01:24
_comment.php 파일에
$g4_path = "./board"; // common.php 의 상대 경로 이렇게 넣어보세요
정상적인 설치가 아닌가 board/lib/latest.lib.php 파일이있는지 확인해주세요
답변에 대한 댓글 1개
2014-05-02 (금) 12:47:14
2014-05-02 (금) 11:07:47
main.html 상단에 넣었구요
--------------------------------------------------------------------------

_common.php 를 main.html 과 같은경로에 넣었습니다.
그리구 그누보드는 board 폴더안에 있어서 이렇게 했는데 안되네요.. ㅜㅜ

함바주세요..
번거롭게 해드려서 죄송해요.. ㅜㅜ
_common.php 파일이 일단 없네요
그누보드 설치 경로가시면 _common.php 파일이 있으실꺼에요
복사 하셔서 main.html 과 같은 경로에 넣으시고
_common.php 열어서 그누보드 경로를 적어주세요
<img src="image/board_txt.jpg" width="321"> 부분 삭제 하시고
<?=latest('01','basic',4,'35');?>
삽입해주세요
삽입 하시기전에
index.html 상단에
Copy
<?include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");?>
를 넣어주셔야 하고요
_common.php 를 index.html 과 같은경로에 만드셔서
Copy
<?
$g4_path = "./board"; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?>
넣어주셔야 합니다.
답변에 대한 댓글 1개
2014-05-02 (금) 00:02:23
답변을 작성하려면 로그인이 필요합니다.
<?
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 ";
// 위의 코드 보다 속도가 빠름
$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;
}
?>