그누보드 최근게시물 달기 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

그누보드 최근게시물 달기 정보

그누보드 최근게시물 달기

본문

메인페이지에 최근게시물을 설치하려고 해보고 있는데 잘 되지 않아 고수님들께 질문드립니다.
제가 진행한 방법은 아래와 같습니다. 검토 부탁드립니다.


■ 제가 진행한과정

1.그누보드를 해당 경로에 설치했습니다(첨부 이미지 참고)

2.제가 만든 index.html파일의 최상단에 아래 코드를 입력했습니다.

<?
$g4_path="../gnuboard4";
include_once("../gnuboard4/common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>

3.최근게시물 노출할 위치에 아래 코드를 입력했습니다.(첨부 이미지 참고)

<?=latest("basic", "Notice", 3, 30);?>

4.저장해서 서버에 올리면 다음과 같은 오류가 발생합니다.


■ 위 과정 진행시 발생하는 오류

1.최근게시물 불러오기 실패.

2.최근게시물 불러오기 코드를 넣으면 하단 깨짐현상(첨부 이미지 참고)


■ 질문 및 해결방법 문의

1.아래입력한 코드와 그누보드 설치경로가 맞지 않는건가요?

<?
$g4_path="../gnuboard4";
include_once("../gnuboard4/common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>

2.어제 하루종일 찾아서 시도해봤는데, 모두 실패했습니다.
  최근게시물 설치할 수 있는 방법좀 알려주세요.ㅠㅠ
  • 복사

댓글 전체

gnuboard4 와 index.html 이 같은 위치에 있다는 가정하에 말씀드립니다.

<?
include_once("./gnuboard4/_common.php");
?>

위의 코드를 index.html 파일에 넣어 주시고

최신글을 불러오기 원하는 곳에

<?=latest("basic", "Notice", 3, 30);?>  넣어 주세요.

_common.php 파일만 정상적으로 불렁게 되면

나머지 필요한 파일들은 자동으로 불러오게 됩니다.

아니면 가정 좋은 방법은 그누보드 폴더 안에 index.html 파일이 같이 있도록 하는 겁니다.

index.html 파일을 그누보드 폴더와 같은 위치에 넣어 주세요.
<?
include_once("./gnuboard4/_common.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome, TableA's Story</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #000;
}
#wrap {
width: 100%;
margin-right: auto;
margin-left: auto;
background-image: url(image/wrap_bg.jpg);
background-position: center top;
background-repeat: no-repeat;
}
#head {
height: 190px;
width: 100%;
background-image: url(image/head_bg.png);
background-position: center top;
background-repeat: no-repeat;
}
#logo {
height: 100px;
width: 1000px;
margin-right: auto;
margin-left: auto;
}
#gnb {
height: 70px;
width: 1000px;
margin-right: auto;
margin-left: auto;
margin-bottom: 20px;
}
#cont_top {
height: 435px;
width: 1000px;
margin-right: auto;
margin-left: auto;
margin-bottom: 20px;
}
#cont_bottom {
height: 280px;
width: 1000px;
margin-right: auto;
margin-left: auto;
}
#foot_info {
height: 100px;
width: 1000px;
margin-right: auto;
margin-left: auto;
}
#cont_left {
float: left;
height: 280px;
width: 350px;
}
#cont_center {
float: left;
height: 280px;
width: 200px;
padding-left: 50px;
padding-right: 50px;
}
#cont_right {
float: left;
height: 280px;
width: 350px;
}
#cont_notice {
height: 120px;
width: 350px;
margin-bottom: 20px;
}
#cont_photo {
height: 140px;
width: 350px;
}
#cont_franc {
height: 120px;
width: 350px;
margin-bottom: 20px;
}
#cont_store {
height: 140px;
width: 350px;
}
#main {
height: 785px;
width: 100%;
}
#foot {
height: 100px;
width: 100%;
background-image: url(image/foot_bg.jpg);
background-repeat: no-repeat;
background-position: center top;
}
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>

<body>
<div id="wrap">
  <div id="head">
    <div id="logo"><img src="image/logo.png" width="1000" height="100" border="0" usemap="#Map" />
      <map name="Map" id="Map"><area shape="rect" coords="954,7,999,25" href="#" target="_self" alt="사이트맵" />
        <area shape="rect" coords="405,22,594,78" href="http://www.table-a.co.kr" target="_self" alt="테이블A" />
        <area shape="rect" coords="828,7,877,25" href="#" target="_self" alt="매장찾기" />
        <area shape="rect" coords="886,7,947,25" href="#" target="_self" alt="프랜차이즈" />
      </map>
    </div>
    <div id="gnb">
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1000" height="70">
        <param name="movie" value="swf/gnb.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="transparent" />
        <param name="swfversion" value="6.0.65.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="swf/gnb.swf" width="1000" height="70">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="swfversion" value="6.0.65.0" />
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>
  </div>
  <div id="main">
    <div id="cont_top">
      <object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1000" height="435">
        <param name="movie" value="swf/center.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="transparent" />
        <param name="swfversion" value="6.0.65.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="swf/center.swf" width="1000" height="435">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="swfversion" value="6.0.65.0" />
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>
    <div id="cont_bottom">
      <div id="cont_left">
        <div id="cont_notice">
          <table width="350" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100" rowspan="2" valign="top"><img src="image/notice_img.png" width="100" height="120" /></td>
              <td width="250" height="33" valign="top"><img src="image/notice_txt.png" width="250" height="33" /></td>
            </tr>
            <tr>
              <td valign="top"><?=latest("basic", "Notice", 3, 30);?></td>
            </tr>
          </table>
        </div>
        <div id="cont_photo"><img src="image/photo.png" width="350" height="140" border="0" usemap="#Map2" />
          <map name="Map2" id="Map2">
            <area shape="rect" coords="102,93,162,114" href="#" target="_self" alt="공유하기" />
          </map>
        </div>
      </div>
      <div id="cont_center">
        <object id="FlashID4" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="200" height="280">
          <param name="movie" value="swf/menu.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="swfversion" value="6.0.65.0" />
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="swf/menu.swf" width="200" height="280">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <param name="swfversion" value="6.0.65.0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </div>
      <div id="cont_right">
        <div id="cont_franc"><img src="image/franchise.png" width="350" height="120" border="0" usemap="#Map3" />
          <map name="Map3" id="Map3">
            <area shape="rect" coords="190,75,250,96" href="#" target="_self" />
          </map>
        </div>
        <div id="cont_store">
          <table width="350" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td valign="top"><img src="image/store_txt.png" width="250" height="29" /></td>
              <td rowspan="2" valign="top"><img src="image/store_img.png" width="100" height="140" /></td>
            </tr>
            <tr>
              <td valign="top"><object id="FlashID3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="111">
                <param name="movie" value="swf/store.swf" />
                <param name="quality" value="high" />
                <param name="wmode" value="transparent" />
                <param name="swfversion" value="6.0.65.0" />
                <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="swf/store.swf" width="250" height="111">
                  <!--<![endif]-->
                  <param name="quality" value="high" />
                  <param name="wmode" value="transparent" />
                  <param name="swfversion" value="6.0.65.0" />
                  <param name="expressinstall" value="Scripts/expressInstall.swf" />
                  <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                  <div>
                    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                  </div>
                  <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
              </object></td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </div>
  <div id="foot">
    <div id="foot_info"><img src="image/foot.png" width="1000" height="100" /></div>
  </div>
</div>
<script type="text/javascript">
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
swfobject.registerObject("FlashID3");
swfobject.registerObject("FlashID4");
</script>
</body>
</html>
index.html 과 그누보드가 같은 위치에 있는건가요?

그렇다면 <? include_once "./_common.php ?> 라고 넣어 주셔야 합니다.

아무래도 그누보드 매뉴얼 보실 것을 권해 드립니다.

지금 그대로 작업한다면 이 문제가 해결 되더라도

앞으로의 작업에 많은 문제가 예견되네요.

마음은 분주하겠지만 매뉴얼을 먼저 보는 것이 순서인것 같네요.
링크가 안걸려 있으니.. 100% 정확한 답변은 어려우나 먼저 확인하실 사항은 html 확장자가 php파싱을 하는지 여부를 확인하시고..

삽입하신 코드는 아래와 같이 수정하세요.
<?
include_once("./gnuboard4/_common.php");
include_once("$g4[path]/lib/latest.lib.php");
?>

그리고 이미지상에는 하단깨짐이 어디서 나타나는지 나와있지 않네요.
© SIRSOFT
현재 페이지 제일 처음으로