인덱스 페이지 초보적인 질문 드립니다. > 그누4 질문답변

그누4 질문답변

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

인덱스 페이지 초보적인 질문 드립니다. 정보

인덱스 페이지 초보적인 질문 드립니다.

본문

맨위 사진 페이지의 소스입니다.

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

$g4['title'] = "";
include_once("./_head.php");
?>


<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<td valign=top>

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

//  최신글
$sql = " select * from $g4[group_table] order by gr_order_search, gr_id ";
$result = sql_query($sql);

$col_width = 100 / 2 . "%"; // 2개씩 채워서 넣기 위해서
$ja = 0;

echo "<table width='100%'><tr valign=top>";

// 전체 최근글 출력
// function latest_group($skin_dir="", $gr_id="", $rows=10, $subject_len=40, $content_len="", $skin_title="", $skin_title_link="")
echo "<td width='" . $col_width ."' valign=top>";
echo latest_group("simple", "", 12, 40, "", "전체최근글", "$g4[bbs_path]/new.php");
$ja++;
echo "</td>";

// 최근에 답글이나 코멘트가 달린 글
// function latest_group($skin_dir="", $gr_id="", $rows=10, $subject_len=40, $content_len="", $skin_title="", $skin_title_link="")
echo "<td width='" . $col_width ."' valign=top>";
echo latest_group("simple", "", 12, 40, "", "전체 내글의반응", "$g4[bbs_path]/new.php","my_datetime");
$ja++;
echo "</td>";

for ($i=0; $row=sql_fetch_array($result); $i++) {

    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
    // 사용방법
    // latest(스킨, 게시판아이디, 출력라인, 글자수);

   if ($ja == 2) { // 줄바꿈
     echo "</tr><tr valign=top>";
     $ja = 0;
    }

    echo "<td width='" . $col_width ."' valign=top>";
    echo latest_group("simple", $row['gr_id'], 12, 40);
    $ja++;
    echo "</td>";
}
echo "</tr>";

// 최근글
echo "</tr><tr valign=top>";
echo "<td>" . latest('simple', info) . "</td>";
echo "<td>" . latest('simple', style) . "</td>";
echo "</td>";

echo "</table>";
?>

</td>
</tr>
</table>
<!-- 메인화면 최신글 끝 -->

<!-- 스피드맵 -->
<BR>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td valign="top" align="center">
    <? include_once("$g4[path]/lib/sitemap.lib.php")?>
    <?=sitemap("speedmap", 40);?>
    </td>
</tr>
</table>

<?
include_once("./_tail.php");
?>



소스가 이렇게 되어있습니다.
2번째 첨부된사진처럼..
설정 하고픈데.. 설정을 하는 그 부분을 못찾네요..

// 최근글
echo "</tr><tr valign=top>";
echo "<td>" . latest('simple', info) . "</td>";
echo "<td>" . latest('simple', style) . "</td>";
echo "</td>";

echo "</table>";
?>

제가 알수 있는건 밑에 2줄부분만 어떤부분인지 알기에..수정할수가 있구요..
전체최근글 옆에 부분부터는 어디를 수정해야 하는지 모르겠어요 ㅠㅠ 
나모만 해온 저로서는 너무 어렵네요 ㅠㅠ

  • 복사

댓글 전체

이 질문의 답은 질문에 답이 있어서 답변이 없는거 같네요.

기본적으로 최신글 호출함수를 아셔야 겠구요.
화면구성을 보시려면 div로 쪼개놓은건 추상적이라 치더라도
테이블 쪼개서 화면구성한것 정도는 아셔야 할 듯합니다.
나모는 말그대로 위지윅입니다.

테이블 뼈대를 만드셨으면 테이블내에 호출함수를 넣어주시면 됩니다.
echo "<tr><td>호출게시판 <- 이곳</tr></td>";
이런식으로요
소스를 간단하게 만들려면

아래와 같이 인덱스 안에 테이블 구성을 하고 그 안에다가 최신글을 넣으면 됩니다.


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

$g4['title'] = "";
include_once("./_head.php");
?>

<!-- 메인화면 최신글 시작 -->

<table width="700" height="600" cellpadding="0" cellspacing="0">
    <tr>
        <td width="350">최신글</td>
        <td width="350" rowspan="2">
          <table width="350" cellpadding="0" cellspacing="0" height="600">
          <tr><td width="348">최신글 </td></tr>
          <tr><td width="348">최신글</td></tr>
          <tr><td width="348">최신글</td></tr>
          </table>
        </td>
    </tr>
    <tr>
        <td width="350" height="300">최신글</td>
    </tr>
</table>

<!-- 메인화면 최신글 끝 -->

<?
include_once("./_tail.php");
?>

위아래 간격조절은 최신글을 넣으시고 줄수를 늘리 시면 됩니다.
너무 간단하지요.
쪽지를 보내 셔서 여기다 아예 다시 설명을 드릴 께요.
전체개시물 과 최신글 적용례입니다.
아래 처럼 하시면 됩니다.

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

$g4['title'] = "";
include_once("./_head.php");
?>

<!-- 메인화면 최신글 시작 -->

<table width="700" height="600" cellpadding="0" cellspacing="0">
    <tr>
        <td width="350"><?php echo my_new("49", "35", "220px"); // "줄수", "글자수" ,"최대허용너비" ?></td>
        <td width="350" rowspan="2">
          <table width="350" cellpadding="0" cellspacing="0" height="600">
          <tr><td width="348"><?=latest("line3", "40", 6, 25);?></td></tr>
          <tr><td width="348"><?=latest("line3", "40", 6, 25);?></td></tr>
          <tr><td width="348"><?=latest("line3", "40", 6, 25);?></td></tr>
          </table>
        </td>
    </tr>
    <tr>
        <td width="350" height="300"><?=latest("gallery", "40", 5, 25);?></td>
    </tr>
</table>
<!-- 메인화면 최신글 끝 -->

이런 식으로 적용하세요.

최신글을 잘 찾아서 맘에 드는 것으로 하시구요


전체게시물은

연후아빠님 것을 적용하셔도되구요
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=47284&sca=%C3%D6%B1%D9%B0%D4%BD%C3%B9%B0&sfl=wr_name%2C1&stx=%BF%AC%C8%C4%BE%C6%BA%FC&sop=and

pomm님이 수정한
 http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=95344
을 적용하셔도 됩니다.

늘 행복하셔요 ^^
족지 주셔서 답변 드립니다.

전체게시물 적용방법은  사실 아주 간단한 것입니다.

설치한 그누보드 루트에 extend폴더를 한개 만듭니다.
거기에다  ftp로  연후 아버님의 my_new.php파일을 올리면 됩니다.

my_new.php파일은 여기서 받으시구요
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=47284&sca=%C3%D6%B1%D9%B0%D4%BD%C3%B9%B0&sfl=wr_name%2C1&stx=%BF%AC%C8%C4%BE%C6%BA%FC&sop=and



그리고 호출 구문은

<?php echo my_new("49", "35", "220px"); // "줄수", "글자수" ,"최대허용너비" ?>
이렇게 호출하면 됩니다.

이젠 정말 다 되셨으리라 믿습니다. ^^
© SIRSOFT
현재 페이지 제일 처음으로