최신글에서 클릭시 링크주소가 보이는데 없애는 방법은

최신글에서 클릭시 링크주소가 보이는데 없애는 방법은

QA

최신글에서 클릭시 링크주소가 보이는데 없애는 방법은

답변 3

본문

메인화면에서 최신글을 뽑았는데 최신글을 클릭하면 게시판 주소가 잠시 보였다가

이동하는 현상이 있는데 이거 없애는 방법이 있을까요?

1번사진 처럼 있다가 링크를 클릭하면 게시판 주소가 2번사진 약 0.5초정도 보임.

어떻게 없애야 할까요

도움 부탁드립니다.~~!!

여기저기 건들여 보고는 있는데 무서워서 확 못해겠어요 ㅎㅎ;;


1.jpg
 
2.jpg
 

이 질문에 댓글 쓰기 :

답변 3

이 부분에 대한 소스를 보여 주셔야 알 거 같은데요..


대부분의 스킨은 경로가 안보이는 데 이건 좀 특이하네요.



제가 그누보드를 사실 코딩에 문외한이라 그누보드에서 이것저것 조합해서 index.html에 아이프레임으로 우겨넣었습니다. ㅎㅎ;; 그부분의 html 소스는 이것이며


<td width="205" height="90" rowspan="2"><iframe src="http://*******.co.kr/gnuboard4/news.php" name="news" width="195" height="85" frameborder="0" scrolling="no" ALLOWTRANSPARENCY="true"></iframe></td>
<td rowspan="2">
<img src="images/index_14.jpg" width="47" height="90" alt=""></td>
<td width="205" height="90" rowspan="2"><iframe src="http://*******.co.kr/gnuboard4/qna.php" name="qna" width="195" height="85" frameborder="0" scrolling="no" ALLOWTRANSPARENCY="true"></iframe></td>
<td rowspan="2">



여기에 연결되어 있는 php파일 news.php는 아래이고  qna도 경로를 제외하고 같음


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

<!-- 메인화면 최신글 시작 -->
<body style="background-color:transparent">
<table width="100%" cellpadding=0 cellspacing=0><tr> <td valign=top>
<?
{
    echo latest("basic", "news", 4, 28);
  }
?>
</table></body>
</code>




latest.skin.php 파일의 소스는 아래와 같습니다. 스킨은 복사해서 2개로 만들어서 news와 qna를 분류시킴



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95% cellpadding=0 cellspacing=0>
        <tr>
          <td height=5><img src='<?=$latest_skin_path?>/img/board_icon.gif' align=absmiddle> 
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href=javascript:parent.location.href='http://********.co.kr/sub04.php?wr_id={$list[$i]['wr_id']}' style='text-decoration:none;'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9; text-decoration:none;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; text-decoration:none;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A; text-decoration:none;'>{$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'];

            ?></td></tr>
              </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=10><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>


여기보드 게시판을 뒤지면서 강제적으로 최신글을 불러오게 되기는 했는데 스킨경로가 마지막 문제점으로 남았습니다.
특히 echo "<a href=javascript:parent.location.href='http://*******.co.kr/sub04.php?wr_id={$list[$i]['wr_id']}' style='text-decoration:none;'>";  <=== 링크주소가 보이는것으로 생각되는데 어찌해야될지 모르겠어요 ㅠ_ㅠ
도움 부탁드립니다.

굳이 자바스크립트로 해야 되나요?

<a href='http://lhcbiz.co.kr/sub04.php?wr_id={$list[$i]['wr_id']}'>"
바꾸면 될거 같네요

자바스트립트를 쓰지 않으면 최신게시물 링크에 링크줄이 달리면서 클릭시 테이블 안에서 출력되버려요
게시물의 탑이미지가 출력되버립니다. ㅠ_ㅠ 계속 답변 주셔서 정말 감사해요

아무래도 아이프레임을 사용해서 그런거 같습니다.

주소 경로를 자바스크립트로 빼주면 글씨는 안나올거같습니다.

스킨하단에
//-----------------------------------------------------------------
echo "<a href=javascript:parent.location.href='http://lhcbiz.co.kr/sub04.php?wr_id={$list[$i]['wr_id']}' style='text-decoration:none;'>";  을
//-----------------------------------------------------------------


$wr_id_link = $list[$i][wr_id];
echo "<a href=javascript:GoPage('$wr_id_link');>";
//-----------------------------------------------------------------

로 바꿔주시고

최신글 스킨 하단에

<script>

function GoPage(code) {
window.location.href='http://lhcbiz.co.kr/sub04.php?wr_id='+code;

}
</script>

하시면 될거예요

latest.skin.php 파일을 겸손님께서 추가한 말씀주신대로 추가하여 넣었는데
밑줄이 생기면서 같은 현상이 반복됩니다. ㅠ_ㅠ 아래는 말씀주신 형태로 latest.skin.php를 수정했는데
수정을 제가 정확히 한것이 맞지요?  자꾸 질문드려서 죄송합니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95% cellpadding=0 cellspacing=0>
        <tr>
          <td height=5><img src='<?=$latest_skin_path?>/img/board_icon.gif' align=absmiddle> 
            <?
            echo $list[$i]['icon_reply'] . " ";
            $wr_id_link = $list[$i][wr_id];    <=  수정한 부분
            echo "<a href=javascript:GoPage('$wr_id_link');>";  <=  수정한 부분
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9; text-decoration:none;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A; text-decoration:none;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A; text-decoration:none;'>{$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'];

            ?></td></tr>
              </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=10><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>

</table>
======아래는 추가한 스크립트 ======
<script>

function GoPage(code) {
window.location.href='http://lhcbiz.co.kr/sub04.php?wr_id='+code;

}
</script>

function GoPage(code) {
window.parent.location.href='http://lhcbiz.co.kr/sub04.php?wr_id='+code;
 
} 이부분을 바꾸시고요 밑줄은
list.skin.php 상단에 스타일 추가해주세요

<style type="text/css">
a:link {text-decoration: none}
</style>

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