또 질문 ㅠ.ㅠ;;; 죄송합니다. 워낙 초보라서.. > 그누4 질문답변

그누4 질문답변

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

또 질문 ㅠ.ㅠ;;; 죄송합니다. 워낙 초보라서.. 정보

또 질문 ㅠ.ㅠ;;; 죄송합니다. 워낙 초보라서..

본문

<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

$g4['title'] = "LJUNU.COM 입니다 방문을 환영합니다.";
include_once("./_head.php");
?>

<!-- 메인화면 최신글 시작 --><style type="text/css">
<!--
@import url("css/css.css");
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
text-decoration: none;
color: #333333;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #333333;
}
body,td,th {
font-family: 돋움;
font-size: 11px;
}
a {
font-family: 돋움체;
font-size: 11px;
}
-->
</style>
<script src="/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<table width="840" cellpadding=0 cellspacing=0>
  <tr><td width="252" rowspan="2" valign=top><table width="252" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <th scope="col"><?
//  최신글
$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("sanha_basic","news","5","23");
    echo "<p>\n";
}
?></th>
    </tr>
  </table></td>
    <td width="586" valign=top><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','586','height','183','src','/flash/product','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/flash/product' ); //end AC code
    </script>
      <noscript>
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="586" height="183">
        <param name="movie" value="/flash/product.swf" />
        <param name="quality" value="high" />
        <embed src="/flash/product.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="586" height="183"></embed>
      </object>
      </noscript>    </td>
</tr>
  <tr>
    <td height="172" valign=top><table width="586" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="/img/main_line.gif" alt="" width="586" height="30" /></td>
      </tr>
      <tr>
        <td><?
//  최신글
$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("sanha_basic","review","3","50");
    echo "<p>\n";
}
?></td>
      </tr>
      <tr>
        <td><img src="/img/main_line.gif" alt="" width="586" height="30" /></td>
      </tr>
      <tr>
        <td><table width="586" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><?
//  최신글
$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("sanha_basic","q_a","5","23");
    echo "<p>\n";
}
?></td>
            <td><?
//  최신글
$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("sanha_basic","free","5","23");
    echo "<p>\n";
}
?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="/img/main_line.gif" alt="" width="586" height="30" /></td>
      </tr>
    </table></td>
  </tr>
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>

왜 이런지 모르겠네요.. 어디서 잘못이 되는지.. 최신글이 이상하게 6개씩 나오고 있습니다. 한스킨으로 테스트중인데 ㅠ.ㅠ;;;

모가 잘못된건가요? ㅠ.ㅠ
  • 복사

댓글 전체

echo latest("sanha_basic","free","5","23");  이부분을 보시면 sanha_basic 이라는 스킨으로 free 게시판에서 최근게시물을
5개씩...글자수는 23으로 제한하여 뽑아오도록 하는것입니다. 최신글을 보통 10개 이하니깐...6개든 상관없겟지만, 원하시는 수치로 바꿔주심 되겟죠...1개면 1로 바꾸시구요..-_-;; 질문을 제가 잘못이해한건가요;
><?
//  최신글
$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("sanha_basic","review","3","50");
    echo "<p>\n";
}
?>
이렇게하시지 마시고
<?=latest("sanha_basic","review","3","50"); ?>
이런식으로 사용해보세요^^
© SIRSOFT
현재 페이지 제일 처음으로