head,main,tail 적용방법 일반소스 > 그누3질답

그누3질답

head,main,tail 적용방법 일반소스 정보

그누보드 head,main,tail 적용방법 일반소스

본문

[1] main.php파일의 일반형태

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
define("_DOCTYPE_", "DESIGN");
$html_title = "그누보드3";
?>

<table width='100%' cellpadding=0 cellspacing=0>
<colgroup width=''>
<colgroup width=5>
<colgroup width=170><!--배너영역 지정 폭-->
<tr>
    <td valign=top>

                <!--최신글 시작-->
                        <table width=100%>
                                <tr valign=top>
                                        <td width=48%><?latest('', comment, 4, 30);?></td>
                                        <td width=4%></td>
                                        <td width=48%><?latest('', dic_test, 4, 30);?></td>
                                </tr>
                                <tr valign=top>
                                        <td width=48%><?latest('', keyword_test, 4, 30);?></td>
                                        <td width=4%></td>
                                        <td width=48%><?latest('', banner, 4, 30);?></td>
                                </tr>
                        </table>
    <!--최신글 끝-->

    </td>
    <td></td>
    <td valign=top>
        <!-- 투표 -->
        <? include "./bbs/vote.php"; ?>

        <!-- 공백 -->
        <table width=100% height=5><tr><td></td></tr></table>

    </td>
</tr>
</table>


[2] head.php파일의 일반형태
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
    사용자 화면 상단과 좌측을 담당하는 페이지입니다.
    상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
*/
include "./bbs/gblayer.php";
?>

<table width=100% align=center><tr><td>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
    <td height=60>
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td><a href='./'><img src='image/logo.gif' border=0 alt='그누보드'></a></td>
        </tr>
        </table>
    </td>
    <td align=right valign=top>
                &nbsp;
                <?
                echo "<a href='./' class=tm>HOME</a> | ";
                if (!$member[mb_id]) {
                    echo "<a href='./?doc=bbs/mblogin.php&url=$urlencode'  class=tm>로그인</a> | ";
                    echo "<a href='./?doc=bbs/mbform.php'  class=tm>회원가입</a>";
                } else {
                    echo "<a href='./?doc=bbs/mblogout.php&url=$urlencode'  class=tm>로그아웃</a> | ";
                    echo "<a href='./?doc=bbs/mbform.php&w=u'  class=tm>정보수정</a>";
                    if ($is_admin == "default" || $is_admin == "group") {
                        echo " <a href='./?doc=bbs/admin/index.php'  class=tm>(ADMIN)</a>";
                    }
                }
                ?>
    </td>
</tr>
<tr>
    <td colspan=2>
        <table width=100%  height=30 cellpadding=0 cellspacing=0>
        <tr>
            <td bgcolor=#217AF9 width=75%>
                &nbsp;
                <?
                echo "<a href='./' class=tm2>HOME</a>&nbsp;&nbsp; ";
                if (!$member[mb_id]) {
                    echo "<a href='./?doc=bbs/mblogin.php&url=$urlencode'  class=tm2>로그인</a>&nbsp;&nbsp;  ";
                    echo "<a href='./?doc=bbs/mbform.php'  class=tm2>회원가입</a>";
                } else {
                    echo "<a href='./?doc=bbs/mblogout.php&url=$urlencode'  class=tm2>로그아웃</a>&nbsp;&nbsp; ";
                    echo "<a href='./?doc=bbs/mbform.php&w=u'  class=tm2>정보수정</a>";
                    if ($is_admin == "default" || $is_admin == "group") {
                        echo " <a href='./?doc=bbs/admin/index.php'  class=tm2>(ADMIN)</a>";
                    }
                }
                ?>
            </td>
            <td width=25% align=right background='image/bg_search.gif'>
                <!-- 그누보드 외부 검색 폼 -->
                <table cellpadding=0 cellspacing=0>
                <form name=fgnusearch method=get action='<?="./"?>'>
                <tr>
                    <td>
                        <input type='hidden' name='doc'          value='bbs/gnusearch.php'>
                        <input type='hidden' name='sselect'      value='concat(wr_subject,wr_content)'>
                        <input type='hidden' name='soperator'    value='1'>
                        <input type='hidden' name='srch_rows'    value='5'>
                        <input type='hidden' name='srch_comment'  value='1'>
                        <input type='hidden' name='srch_days'    value='0'>

            <img src='image/title_search.gif' align=absmiddle> &nbsp;
                        <input type=text class=input name='stext' size=15 required minlength=2 itemname='검색어'>
                        <input type=image src='image/btn_go.gif' border=0 align=absmiddle>&nbsp;&nbsp;
                    </td>
                </tr>
                </form>
                </table>
            </td>
        </tr>
        </table>
    </td>
</tr>
</table>

<table width='100%' cellpadding=0 cellspacing=0>
<colgroup width=170>
<colgroup width=5>
<colgroup width=''>
<tr>
    <!-- 왼쪽 메뉴 부분 -->
    <td valign=top>

        <!-- 외부 로그인 -->
        <? include "./bbs/outlogin.php"; ?>

        <!-- 공백 -->
        <table width=100% height=5><tr><td></td></tr></table>

        <? include "./bbs/count.php"; ?>

    </td>
    <td></td>
    <td valign=top>


[3] tail.php파일의 일반형태
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

/*
    사용자 화면 우측과 하단을 담당하는 페이지입니다.
    우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
*/
?>
&nbsp;
</td>
</tr>
</table>

<!-- 공백 -->
<table width=100% height=5><tr><td></td></tr></table>

<table width='100%' cellpadding=0 cellspacing=0>
<tr><td height=1 bgcolor=#8C8C8C></td></tr>
<tr>
        <td height=30 align=right><font color=#9B9B9B>Copyright &copy; your-domain. All rights reserved.</font>&nbsp;</td>
</tr>
</table>

</td></tr></table>


[4] 참조
기존의 소스를 백업하시고, 적용되는 형태를 게시물에 포함된 소스코드를 복사해서 테스트 해 보시기 바랍니다.
아울러 웹브라우저에서 '소스보기' 또는 웹에디터(나모,드림위버,프론트페이지,모질라에디터 등)를 사용해서,
<table></table>구성 구조를 파악하시면 이해가 쉬울 듯 합니다.
또한, 좀 더 자세히 검색하시면 팁/텍게시판에 이미지와 함께 <table>의 구조를 한눈에 알아볼 수 있는
게시물들이 많이 등록되어 있습니다.
저는 여기까지만...
성공하시기 바랍니다.

댓글 전체

전체 9,564
그누3질답 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT