최신글 오류 문의드립니다. > 그누4 질문답변

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

그누4 질문답변

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

최신글 오류 문의드립니다. 정보

최신글 오류 문의드립니다.

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=129503&sca=%EC%B5%9C%EC%8B%A0%EA%B8%80&sfl=wr_subject||wr_content&stx=%EB%A1%A4%EB%A7%81

위에 최신글 스킨을 사용중입니다.

메인에 하나만 사용 했을 경우 아무 문제 없이 나오는데

두개를 사용 했을 경우 하나는 롤링이 되지 않고 멈춰 있네여

관련 글을 찾아 보니 스크립트 id값 문제라고 해서 수정을 해 봐도 답이 나오질 않아 이렇게 도움 구합니다.

밑에는 스킨 코드입니다.

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
?>
<script>
/*
rolling page by hong..
*/
var leftCt = 0;
$(function(){
$("#album").attr("top", "0");
$("#imgList").attr("timer", setInterval("imgRight()", 3000)); // 멈춰있는 시간
$("#_sub0").css("color", "ff7200");
$("#_sub4").css("color", "6A6A6A");
});
function imgStart(tp){
clearInterval($("#imgList").attr("timer"));
if(tp == "R"){ // 오른쪽 이동

$("#imgList").attr("timer", setInterval("imgRight()", 3000)); // 멈춰있는 시간
imgRight();
}else{ // 왼쪽이동
if(leftCt == 0){
var leng = $("#imgList div").size();
$("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1));
$("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList"));
$("#imgList>div").eq(leng).remove();
leftCt = 1;
}

$("#imgList").attr("timer", setInterval("imgLeft()", 3000));
imgLeft();
}
}
function imgRight(){
$("#imgList").animate({
left : parseInt($("#imgList div").eq(0).width() * -1)
},300,function(){
$("#imgList").css("left", "0px");
$("#imgList>div").eq(0).clone().appendTo($("#imgList"));
$("#imgList>div").eq(0).remove();
});

var cnt = parseInt($("#hidd_cnt").val());
var precnt = cnt - 1;

if (cnt==0)
{
$("#_sub0").css("color", "ff7200");
$("#_sub4").css("color", "6A6A6A");
}else{
$("#_sub"+cnt).css("color", "ff7200");
$("#_sub"+precnt).css("color", "6A6A6A");
}

cnt = cnt + 1;
// precnt = cnt - 1;

if (cnt > 4)
{
cnt = 0;
}
$("#hidd_cnt").val(cnt);

}
function imgLeft(){
var leng = $("#imgList div").size();
$("#imgList").animate({
left : 0
},300,function(){
$("#imgList").css("left", "0px");
$("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1));
$("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList"));
$("#imgList>div").eq(leng).remove();
});
}
</script>
<style>
/*
이미지 사이즈 맞춰서 수정해주세요... (#viewArea)
*/
#back {position:relative; width:170px; height:110px;  background-color:#fafafa; border:#e2e6e9 0px solid;}
#viewArea {position:relative; width:150px; height:110px; overflow:hidden; left:0px; top:0px;}
#imgList {position:absolute; width:800px; left:0px; top:0px;}
#imgList div {float:left; padding:0px; }
#btnLeft {position:absolute; left:10px; float:left; z-index:10; top:43px; cursor:hand;}
#btnRight {position:absolute; right:10px; float:right; z-index:10; top:43px; cursor:hand;}
</style>
<input type="hidden" id="hidd_cnt" value="1">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="160" align="center" valign="top">
<div id="back">
<div id="viewArea">
<div id="imgList">
    <? for ($i=0; $i<count($list); $i++) {

$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $list[$i][wr_id];
?>
<div><a href="<?=$list[$i]['href']?>"><img src='<?=$img?>' width="150" height="110" border="0"></a></div>
    <? } ?>
</div>
</div>
<!--<div id="btnLeft">
<span onClick="imgStart('L')"><img src='<?=$latest_skin_path?>/img/btn_left.gif' border="0" align=absmiddle></span>
</div>
<div id="btnRight">
<span onClick="imgStart('R')"><img src='<?=$latest_skin_path?>/img/btn_right.gif' border="0" align=absmiddle></span>
</div>-->
</div>
</td>
<td>
<table width=180 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td height=17><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>&nbsp;&nbsp;
            <?
            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; font:bold;' id='_sub".$i."'>{$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;'>{$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></tr>
        </table></td>
</tr>
<? } ?>

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

</table>
</td></tr></table>

댓글 전체

예를 들어 말씀드릴게요
function aa()
이렇게 변수가 aa로설정되있으면
사용하고자 하는곳에서 id값을 aa을 불러오게될겁니다.

이부분을 function aa()
복사후 bb()이렇게 바꺼주시고
출력하고자하는곳 id값을 bb로하면 funtion의 값이 변경되기에 사용할수 있는거구요
스크립트중 imgList 요값과imgStart 요값을 검색하셔서 다른 명칭으로바꿔주시구요 그래도문제가되신다면
위에서 말했듯이 어차피 id값만 중복되지않으면 당연히 에러가나지않고 한화면에 2개의 스킨을 사용할수있어요~  id값이나 class값을 바꿔가면서 점검해보시면 될겁니다.
전체 5 |RSS
그누4 질문답변 내용 검색
  • 개별 목록 구성 번호 제목 작성자 작성일 조회
  • 게시물이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT