테스트 사이트 - 개발 중인 베타 버전입니다

메인에 게시판 4개를 불러오고 싶은데 어떻게 해야 할까요??? 채택완료

하울파파 11년 전 조회 4,249
그누보드로 Q&A 설치했습니다.
 
메인이구요....
메인에 Q&A부분에 게시글 4개 올라오게 하고싶은데 어떻게 해야할까요???
 
 
댓글을 작성하려면 로그인이 필요합니다.

답변 9개

채택된 답변
+20 포인트
SLOOP
11년 전
이렇게 해보세요
<?=latest('basic','01',4,'35');?>

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

11년 전
4.jpg
 
혹시 메인게시판 상단 Q&A 회색바 없애구 아이콘이랑 라인 폰트색 변경하구 싶어서요.
여기처럼 만들고 싶은데 어디서 수정해야하나요???
 
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

11년 전
감사합니다..^^
됐어요..
 
 
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

11년 전
ㅜㅜ 안됩니다.
 
 
그냥 이케 뜨네요..
이렇게 신경써 주시는데 미얀해요.. ㅠㅠ
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

SLOOP
11년 전
_comment.php 파일에

$g4_path = "./board"; // common.php 의 상대 경로 이렇게 넣어보세요
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

SLOOP
11년 전
정상적인 설치가 아닌가 board/lib/latest.lib.php 파일이있는지 확인해주세요
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

하울파파
11년 전
네 있어요....

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

댓글을 작성하려면 로그인이 필요합니다.

11년 전
 
main.html 상단에 넣었구요
--------------------------------------------------------------------------
 
 
 
2.jpg
 
 
_common.php 를 main.html 과 같은경로에 넣었습니다.
그리구 그누보드는 board 폴더안에 있어서 이렇게 했는데 안되네요.. ㅜㅜ
 
3.jpg
 
함바주세요..
 
번거롭게 해드려서 죄송해요.. ㅜㅜ
 
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

SLOOP
11년 전
_common.php 파일이 일단 없네요

그누보드 설치 경로가시면 _common.php 파일이 있으실꺼에요

복사 하셔서 main.html 과 같은 경로에 넣으시고

_common.php 열어서 그누보드 경로를 적어주세요
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

SLOOP
11년 전
<img src="image/board_txt.jpg" width="321"> 부분 삭제 하시고

<?=latest('01','basic',4,'35');?>

삽입해주세요
삽입 하시기전에

index.html 상단에
</pre></div>
<div><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap"><?</pre><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap">include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");</pre><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap">?></pre><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap"><pre style="word-wrap: break-word; white-space: pre-wrap">
를 넣어주셔야 하고요
_common.php 를 index.html 과 같은경로에 만드셔서
</pre><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap"><pre style="word-wrap: break-word; white-space: pre-wrap"><?
$g4_path = "./board"; // common.php 의 상대 경로
include_once("$g4_path/common.php");
?></pre></pre></div>
<div><pre style="line-height: normal; word-wrap: break-word; white-space: pre-wrap">
넣어주셔야 합니다.
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

하울파파
11년 전
메인으로 테스트 했는데 에러가 나네요..
함 바주세요.. ㅠㅠ
http://wmper.godohosting.com/main.html

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인