최신게시물 클릭시 링크페이지로 이동 문의

최신게시물 클릭시 링크페이지로 이동 문의

QA

최신게시물 클릭시 링크페이지로 이동 문의

답변 2

본문

최신 게시물을 클릭하면
해당 게시판의 게시글로 이동하는게 아니라
글쓸 때 등록된 Link_#1 으로 이동되게 하려면
최근게시물 스킨에서 링크를 어떻게 넣어줘야 하나요?ㅠㅠ

 

참고로 메인페이지에 최신글은 아이프레임으로 구현됬습니다.

 <li class="rolling2">
 </li>
 <p class="more"><iframe width="600" height="220" src="/g1/news.php" frameborder="0" scrolling="no"></iframe></p>
 </div><!-- text_wrap end -->
 </li>​

 

 

메인페이지에는 news.php 파일이 인클루딩 (아래는 소스입니다.)

<?
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.

echo latest("basic", "news_1", 5, 30); // basic 스킨으로 free 라는 게시판을 출력합니다.
?>

------------------------------------------------------------------------------------

 

 

아래는 latest.skin.php소스입니다.

 

<?

?><style type="text/css">
<!--
a:link {
 text-decoration: none;
}
a:visited {
 text-decoration: none;
}
a:hover {
 text-decoration: none;
}
a:active {
 text-decoration: none;
}
-->
</style>

<table width="525" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2"><a href="/g1/bbs/board.php?bo_table=news_1"><img src="/g1/images/main/news_tle.gif" width="525" height="51" border="0" /></a></td>
  </tr>
  <tr>
    <td width="188" rowspan="2" valign="top" bgcolor="#FFFFFF"><img src="/g1/images/main/news_img.gif" width="188" height="130" /></td>
    <td height="8" valign="top" bgcolor="#FFFFFF"></td>
  </tr>
  <tr>
    <td width="337" height="135" valign="top" bgcolor="#FFFFFF"><table width="325" cellpadding="0" cellspacing="0">
      <? for ($i=0; $i<count($list); $i++) { ?>
      <tr>
        <td colspan="4"><table width="100%" cellpadding="0" cellspacing="1">
            <tr>
              <td width="78%" height="18" ><?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}' target='_blank'>";   

            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#054f83;'><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']}target='_blank' \" ><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$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]['icon_new'];
            echo " " . $list[$i]['icon_file'];
            echo " " . $list[$i]['icon_link'];
            echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?></td>
              <td width="22%" style='padding-top:1px;padding-right:2px;padding-bottom:2px;'><span style='font-size:8pt; color:#666666;'>
                <?=$list[$i][datetime]?>
              </span></td>
            </tr>
        </table></td>
      </tr>
      <? } ?>
      <? if (count($list) == 0) { ?>
      <tr>
        <td align="center" height="50"><font color=#6A6A6A>게시물이 없습니다.</a></td>
      </tr>
      <? } ?>
    </table></td>
  </tr>
</table>


 

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 10,637
© SIRSOFT
현재 페이지 제일 처음으로