테스트 사이트 - 개발 중인 베타 버전입니다

메인페이지 최신글 클릭시 이동경로 문제 채택완료

토키맘 9년 전 조회 4,033

우선 현재 제작중인 사이트 주소는 http://www.kimmooho.com">http://www.kimmooho.com 입니다.

 

메인페이지에서 공지사항의 최신글 목록 중 글 하나를 클릭해 바로가기 할 경우 (공지사항 페이지 내에서)해당 내용이 바로 나왔으면 좋겠는데 페이지의 리스트로만 이동만 되네요.

 

그리고 페이지는 html로 코딩해서 게시판 영역을 div로 비워두고 그자리에 아이프레임으로 삽입했는데, 원래 게시판 삽입은 어떻게 하는 것이 바람직한 것인지요..?

 

↓ 메인의 최신글 클릭시 현재는 이렇게 뜨는데..

 

 

↓ 이렇게 띄우고 싶은 것입니다.

 

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=left>
        <table width=100%>
        <tr>
            <td height=30 valign="middle">ㆍ&nbsp;&nbsp;
            <?
   $arr = explode('&',$list[$i]['href']); //배열로 나누기
   echo $list[$i]['icon_reply'] . " ";
   echo "<a href='http://www.kimmooho.com/sub_b1.html?$arr[1]">http://www.kimmooho.com/sub_b1.html?$arr[1]'target=\"_parent\">";
          
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#000;'>{$list[$i]['subject']}</font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#000;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:9pt; color:#000;'>{$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_link'];
            echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?></td></tr>
        <tr><td height=1px style="border-bottom:#ebebeb solid 1px"></td></tr>
        </table></td>
</tr>
<? } ?>

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

</table> 

 

 

sub_b1.html(공지사항 페이지)

 

     <div id="sub_container">
                   
       <div class="sub_title">
        <h1>공지사항</h1>
        <h2>Notice</h2>
                            </div>
                        
                       

 

                           
                            <div class="sub_page">

<SCRIPT type=text/javascript>
// IFrame script Ver 1.0

//여러개의 IFrame는 다음과 같이 사용합니다.
// 예 : ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["ifrm"]
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0

function resizeCaller() {
var dyniframe=new Array()

for (i=0; i<iframeids.length; i++) {
if (document.getElementById)
resizeIframe(iframeids[i])

if ((document.all || document.getElementById) && iframehide=="no") {
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid) {
var currentfr=document.getElementById(frameid)

if (currentfr && !window.opera){
currentfr.style.display="block"

if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight)
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight)
currentfr.height = currentfr.Document.body.scrollHeight;

if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe)
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement

if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url) {
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</SCRIPT>

                    <iframe src="http://www.kimmooho.com/gnuboard5/bbs/board.php?bo_table=notice&wr_id=http://www.kimmooho.com/gnuboard5/bbs/board.php?bo_table=notice&wr_id=<?=$_GET['wr_id']?>" id="ifrm" name="board" width="925px" scrolling="no" frameborder="0" ></iframe>


                      </div>
                            <!-- sub_page --> 


* 스크립트는 게시판 내용 길이에 따라 전체길이가 자동조정되는 스크립트입니다.



index.html(메인페이지)

 

<?php
include_once('./gnuboard5/common.php');
include_once("./_common.php");
include_once(G5_LIB_PATH.'/latest.lib.php')
?>

 


.

.

.



 <div class="box4">
        <div class="header">
            <h2>공지사항</h2>
            <span>BOARD</span>
            <a href="sub_b1.html" class="button3"></a>
        </div>
               
               
          <div class="latest_notice">   
         
         
         
           
      <p><?=latest("basic", "notice", 5, 28);?></p>
                 
                 
                 
           </div>     
               

 </div>


 

그누보드4 사용할 때는 저렇게 해서 되었던 것 같은데..어디가 잘못되었는지 아무리해도 안되네요... ㅠㅠ

도움부탁드립니다!! 감사합니다~~


 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

echo "<a href='http://www.kimmooho.com/sub_b1.html?$arr%5B1%5D">http://www.kimmooho.com/sub_b1.html?$arr[1]'target=\"_parent\">";

=========>

echo "<a href='http://www.kimmooho.com/sub_b1.html?$arr%5B1%5D">http://www.kimmooho.com/sub_b1.html?".$arr[1]."'target=\"_parent\">";

 


<?=latest("basic", "notice", 5, 28);?>이페이지에서 경로가

 

도메인명/sub_b1.html?amp;wr_id=번호의 형태인데 이것을

==========>

도메인명/sub_b1.html?wr_id=번호    로 변경 

 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

토키맘
9년 전
답변 감사합니다.



그렇게 수정해 보았으나 마찬가지로

" www.kimmooho.com/sub_b1.html?amp;wr_id=번호 " 의 형태로 넘어갑니다. ㅠㅠ



​혹시 공지사항 페이지의 아이프레임 경로가 잘못 된건 아닌지요?



<iframe src="http://www.kimmooho.com/gnuboard5/bbs/board.php?bo_table=notice&wr_id=<?=$_GET['wr_id']?>" id="ifrm" name="board" width="925px" scrolling="no" frameborder="0" ></iframe>



한번 봐주세요~!!!​
불량학생
9년 전
보시면 sub_b1.html?wr_id=번호 이게 정상적인 링크입니다
그리고 amp; 이렇게 하면 당연히 변수로 잡히겠죠

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인