최신글 경로 오류... bbs 경로가 가끔씩 추가됩니다.. > 그누4 질문답변

그누4 질문답변

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

최신글 경로 오류... bbs 경로가 가끔씩 추가됩니다.. 정보

최신글 경로 오류... bbs 경로가 가끔씩 추가됩니다..

본문

안녕하세요.

latest.skin 을 메인화면 head.php 에 적용하고 있는데요.

가끔씩 경로가 달라지는 오류가 생기고 있습니다.

예컨대, 최신글을 클릭했을 때의 게시물 주소 경로가 아래와 같아야 정상인데

http://도메인.com/bbs/board.php?bo_table=ABC&wr_id=777


종종 아래와 같이 경로가 달라집니다.(bbs가 추가되는 경우가 있습니다)

http://도메인.com/bbs/bbs/board.php?bo_table=ABC&wr_id=777



해당 소스는 아래와 같습니다.

고수님들의 도움을 부탁드립니다.





---------------------------------------------------------
 latest.skin 소스입니다.



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
<!--
.style3 {
color: #333333;
font-weight: bold;
}
.style18 {color: #000000}
.style19 {color: #666666}
-->
</style>

<table bgcolor="#CCCCCC" width="185" cellpadding="1" cellspacing="0">
  <form method="post" name="fhead" id="fhead" onsubmit="return fhead_submit(this);" autocomplete="off">
    <input type="hidden" name="url" value="<?=$url?>" />
    <tr>
      <td><table width="215" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" border="0" height="76">
        <tr>
          <td height="76"><table width="100%" cellpadding="5" cellspacing="0" style="border:0 solid #cccccc">
            <tr>
              <td height="20" bgcolor="#FFFFFF">&nbsp;&nbsp;<span class="style3"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><span class="style20 style19">최신글</span> </a></span></td>
              <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
            </tr>
            <tr>
              <td height="44" colspan="2"><table width="100%" height="34" cellpadding="1" cellspacing="1">
                <? for ($i=0; $i<count($list); $i++) { ?>
                <tr>
                  <td align="left" height="15" valign="top">&nbsp;<img src='<?=$latest_skin_path?>/img/latest_icon02.gif' width="5" height="5" border="0" align="absmiddle" />
                            <?
echo $list[$i]['icon_reply'] . " ";
        echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
        echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
        echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
echo "</a>";
        if ($list[$i]['comment_cnt'])
        echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-size:10px; color:#FF0000;'>{$list[$i]['comment_cnt']}</span></a>";

// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
        // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
echo " " . $list[$i][''];
        // echo " " . $list[$i]['icon_file'];
// echo " " . $list[$i]['icon_link'];
        // echo " " . $list[$i]['icon_hot'];
// echo " " . $list[$i]['icon_secret'];
echo " " . $list[$i]['icon_new'];
        ?></td>
                </tr>
                <? } ?>
                <? if (count($list) == 0) { ?>
                <tr>
                  <td colspan="2" align="center" height="14"><font color=#6A6A6A>게시물이 없습니다.</a></td>
                </tr>
                <? } ?>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
  </form>
</table>
  • 복사

댓글 전체

$g4['path'] 가 적용되지 않는 페이지가 있으면 그럴수 있습니다.
그누가 사용되는 모든 디렉토리에 _common.php을 생성하여
각 디렉토리에서 그누의 디렉토리를 지정하세요.
안녕하세요.

답변을 주셔서 정말 감사합니다.

그런데 제가 말씀이 어려워서 이해를 못하고 있습니다.

bbs 폴더에 _common.php 파일이 있던데,

이 파일을 다른 폴더에도 복사해서 넣으라는 의미인가요?

답답하시겠지만 조금만 쉽게 설명해주시면 감사하겠습니다.

도움을 부탁드립니다.
$g4_path 에 대해 설명들이기가 좀 긴데..
어느 폴더에서도 $g4[path]를 이용해 그누 폴더로 접근하기 위한 변수입니다.
그러므로 만드신 폴더에서 그누폴더사이의 경로를 지정해주셔야 합니다.
안녕하세요.

친절히 도와주셔서 정말 감사합니다.

제대로 이해는 못했지만 해주신 말씀을 토대로 공부를 해보겠습니다.

다시한번 감사드립니다..^^
© SIRSOFT
현재 페이지 제일 처음으로