그누보드 처음 이용자인데요.. 정보
그누보드 처음 이용자인데요..본문
그누보드를 이용해서 사이트를 제작을 해볼려고하는데요.
그런데, 그누보드를 설치 후에 보면 index.html 안에는 아래와 같은 내용이 있네요.
------------------------------------------------------------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.php");
?>
include_once("./_head.php");
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("scroll", $row['bo_table'], 12, 70, "4,25");
echo "<p>\n";
}
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("scroll", $row['bo_table'], 12, 70, "4,25");
echo "<p>\n";
}
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>
include_once("./_tail.php");
?>
----------------------------------------------------------------------------------
head.php 파일을 살펴보니 다음과 같은 내용이 있고요. 이 파일이 메인 파일 같기도하고.
-----------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//print_r2(get_defined_constants());
// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
$table_width = 1004;
?>
?>
<!-- 상단 배경 시작 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td background="<?=$g4['path']?>/img/top_img_bg.gif">
<table width="100%" height="52" cellspacing="0" cellpadding="0">
<tr>
<td><img src="<?=$g4['path']?>/img/top_img.gif" width="100%" height="52"></td>
</tr>
</table></td>
</tr>
</table>
<!-- 상단 배경 끝 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td background="<?=$g4['path']?>/img/top_img_bg.gif">
<table width="100%" height="52" cellspacing="0" cellpadding="0">
<tr>
<td><img src="<?=$g4['path']?>/img/top_img.gif" width="100%" height="52"></td>
</tr>
</table></td>
</tr>
</table>
<!-- 상단 배경 끝 -->
<!-- 상단 로고 및 버튼 시작 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="57"></td>
<!-- 로고 -->
<td width="220"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/logo.jpg" width="220" height="57" border="0"></a></td>
<td>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td> </td>
</tr>
</table>
</td>
<td width="390" align="right">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- 처음으로 버튼 -->
<td width="78"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/top_m01.gif" width="78" height="31" border="0"></a></td>
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="57"></td>
<!-- 로고 -->
<td width="220"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/logo.jpg" width="220" height="57" border="0"></a></td>
<td>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td> </td>
</tr>
</table>
</td>
<td width="390" align="right">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- 처음으로 버튼 -->
<td width="78"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/top_m01.gif" width="78" height="31" border="0"></a></td>
<? if (!$member['mb_id']) { ?>
<!-- 로그인 이전 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/login.php?url=<?=$urlencode?>"><img src="<?=$g4['path']?>/img/top_m02.gif" width="78" height="31" border="0"></a></td>
<td width="78"><a href="<?=$g4['bbs_path']?>/register.php"><img src="<?=$g4['path']?>/img/top_m03.gif" width="78" height="31" border="0"></a></td>
<? } else { ?>
<!-- 로그인 이후 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/logout.php"><img src="<?=$g4['path']?>/img/top_m04.gif" width="78" height="31" border="0"></a></td>
<td width="78"><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php"><img src="<?=$g4['path']?>/img/top_m05.gif" width="78" height="31" border="0"></a></td>
<? } ?>
<!-- 최근게시물 버튼 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/new.php"><img src="<?=$g4['path']?>/img/top_m06.gif" width="78" height="31" border="0"></a></td>
<!-- 로그인 이전 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/login.php?url=<?=$urlencode?>"><img src="<?=$g4['path']?>/img/top_m02.gif" width="78" height="31" border="0"></a></td>
<td width="78"><a href="<?=$g4['bbs_path']?>/register.php"><img src="<?=$g4['path']?>/img/top_m03.gif" width="78" height="31" border="0"></a></td>
<? } else { ?>
<!-- 로그인 이후 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/logout.php"><img src="<?=$g4['path']?>/img/top_m04.gif" width="78" height="31" border="0"></a></td>
<td width="78"><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php"><img src="<?=$g4['path']?>/img/top_m05.gif" width="78" height="31" border="0"></a></td>
<? } ?>
<!-- 최근게시물 버튼 -->
<td width="78"><a href="<?=$g4['bbs_path']?>/new.php"><img src="<?=$g4['path']?>/img/top_m06.gif" width="78" height="31" border="0"></a></td>
</tr>
</table></td>
<td width="35"></td>
</tr>
</table>
<!-- 상단 로고 및 버튼 끝 -->
</table></td>
<td width="35"></td>
</tr>
</table>
<!-- 상단 로고 및 버튼 끝 -->
<!-- 검색 시작 -->
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="11"></td>
<td width="220"></td>
<td width=""></td>
<td width="234"><img src="<?=$g4['path']?>/img/search_top.gif" width="234" height="11"></td>
<td width="35"></td>
</tr>
<tr>
<td height="33"><img src="<?=$g4['path']?>/img/bar_01.gif" width="43" height="33"></td>
<td><img src="<?=$g4['path']?>/img/bar_02.gif" width="220" height="33"></td>
<td background="<?=$g4['path']?>/img/bar_03.gif" width="472" height="33"><table width=100% cellpadding=0 cellspacing=0><tr><td width=25> </td><td><?//=popular();?></td></tr></table></td>
<td>
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="25" height="25"><img src="<?=$g4['path']?>/img/search_01.gif" width="25" height="25"></td>
<td width="136" valign="middle" bgcolor="#F4F4F4"><INPUT name="stx" maxlengt=20 style="BORDER : 0px solid; width: 125px; HEIGHT: 20px; BACKGROUND-COLOR: #F4F4F4" maxlength="20"></td>
<td width="12"><img src="<?=$g4['path']?>/img/search_02.gif" width="12" height="25"></td>
<td width="48"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="48" height="25" border="0"></td>
<td width="13"><img src="<?=$g4['path']?>/img/search_03.gif" width="13" height="25"></td>
</tr>
<tr>
<td width="234" height="8" colspan="5"><img src="<?=$g4['path']?>/img/search_down.gif" width="234" height="8"></td>
</tr>
</form>
</table></td>
<td></td>
</tr>
</table>
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="11"></td>
<td width="220"></td>
<td width=""></td>
<td width="234"><img src="<?=$g4['path']?>/img/search_top.gif" width="234" height="11"></td>
<td width="35"></td>
</tr>
<tr>
<td height="33"><img src="<?=$g4['path']?>/img/bar_01.gif" width="43" height="33"></td>
<td><img src="<?=$g4['path']?>/img/bar_02.gif" width="220" height="33"></td>
<td background="<?=$g4['path']?>/img/bar_03.gif" width="472" height="33"><table width=100% cellpadding=0 cellspacing=0><tr><td width=25> </td><td><?//=popular();?></td></tr></table></td>
<td>
<table width="100%" height="33" cellspacing="0" cellpadding="0">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<tr>
<td width="25" height="25"><img src="<?=$g4['path']?>/img/search_01.gif" width="25" height="25"></td>
<td width="136" valign="middle" bgcolor="#F4F4F4"><INPUT name="stx" maxlengt=20 style="BORDER : 0px solid; width: 125px; HEIGHT: 20px; BACKGROUND-COLOR: #F4F4F4" maxlength="20"></td>
<td width="12"><img src="<?=$g4['path']?>/img/search_02.gif" width="12" height="25"></td>
<td width="48"><input type="image" src="<?=$g4['path']?>/img/search_button.gif" width="48" height="25" border="0"></td>
<td width="13"><img src="<?=$g4['path']?>/img/search_03.gif" width="13" height="25"></td>
</tr>
<tr>
<td width="234" height="8" colspan="5"><img src="<?=$g4['path']?>/img/search_down.gif" width="234" height="8"></td>
</tr>
</form>
</table></td>
<td></td>
</tr>
</table>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
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++;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
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;
}
*/
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
</script>
<!-- 검색 끝 -->
f.submit();
}
</script>
<!-- 검색 끝 -->
<div style='height:18px;'></div>
<style type="text/css">
#middiv {
width:<?=$table_width?>px;
position:relative;
margin:0px auto;
vertical-align:top;
float:left;
}
#middiv #mleft { width:220px; float:left; padding:0 0 0 43; }
#middiv #mright { width:683px; float:left; padding:0 0 0 15; }
</style>
#middiv {
width:<?=$table_width?>px;
position:relative;
margin:0px auto;
vertical-align:top;
float:left;
}
#middiv #mleft { width:220px; float:left; padding:0 0 0 43; }
#middiv #mright { width:683px; float:left; padding:0 0 0 15; }
</style>
<table width='<?=$table_width?>' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=43></td>
<!-- 왼쪽 메뉴 -->
<td width=220 valign=top>
<?=outlogin("basic"); // 외부 로그인 ?>
<tr>
<td width=43></td>
<!-- 왼쪽 메뉴 -->
<td width=220 valign=top>
<?=outlogin("basic"); // 외부 로그인 ?>
<div style='height:10px;'></div>
<?=poll("basic"); // 설문조사 ?>
<div style='height:10px;'></div>
<?=visit("basic"); // 방문자수 ?>
<div style='height:10px;'></div>
<?=connect(); // 현재 접속자수 ?>
</td>
<td width=18></td>
<!-- 중간 -->
<td width=683 valign=top>
</td>
<td width=18></td>
<!-- 중간 -->
<td width=683 valign=top>
----------------------------------------------------------
tail.php에는 다음과 같은 내용이...
---------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>
</td>
<td width=40></td>
</tr></table>
<td width=40></td>
</tr></table>
<div style='height:5px;'></div>
<div style="clear:both;"></div>
<div style="clear:both;"></div>
<!-- 카피라이트 시작 -->
<div style='float:left;'>
<table width="<?=$table_width?>" border="0" cellspacing="10" cellpadding="10">
<tr>
<td valign="top" background="<?=$g4['path']?>/img/copyright.gif"><a href="#g4_head"><img src="<?=$g4['path']?>/img/icon.gif" width="15" height="12" border="0"></a><font color="#848484">Copyright ⓒ your-domain. All rights reserved.</font></td>
</tr>
</table>
</div>
<!-- 카피라이트 끝 -->
<div style='float:left;'>
<table width="<?=$table_width?>" border="0" cellspacing="10" cellpadding="10">
<tr>
<td valign="top" background="<?=$g4['path']?>/img/copyright.gif"><a href="#g4_head"><img src="<?=$g4['path']?>/img/icon.gif" width="15" height="12" border="0"></a><font color="#848484">Copyright ⓒ your-domain. All rights reserved.</font></td>
</tr>
</table>
</div>
<!-- 카피라이트 끝 -->
<?
include_once("$g4[path]/tail.sub.php");
?>
include_once("$g4[path]/tail.sub.php");
?>
------------------------------------------------------------------------------
저렇게 복잡하게 있는데..제가 만든 index.htm 파일의 내용은 어느 파일에 어디에다가 어떻게 넣어야하죠? 줄곧 전 제로보드를 쓰려다 그누보드가 스킨이 많아서 사용해볼려했더만 어렵네요.
index.html 파일이나 head.php 파일의 안에 있는 내용을 모두 지우고 제가 만든 index.htm 내용을 넣어도되는건가요? 그리고 메인에 필요한것은 최근글을 볼수있는 것들과 최근 사진을 볼수있는 내용을 넣었으면 하는데요.
위에 내용이 어떤것이 최근글과 최근 사진을 넣는 것인지, 또 로그인도 넣어야하는데..
최신글은 아래 내용 넣어주면 되는건가요?
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("scroll", $row['bo_table'], 12, 70, "4,25");
echo "<p>\n";
}
?>
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("scroll", $row['bo_table'], 12, 70, "4,25");
echo "<p>\n";
}
?>
제로보드와 좀 틀린것 같기도하고요..
좀 자세히 알려주시면 감사하겠습니다.
그리고, 처음에 설치해서 생성된 파일처럼 파일들을 나누어서 안해도 되는건가요?
자세한 답변 부탁합니다.