소스 좀 수정하고 싶은데 방법 좀 부탁드립니다. > 그누4 질문답변

그누4 질문답변

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

소스 좀 수정하고 싶은데 방법 좀 부탁드립니다. 정보

소스 좀 수정하고 싶은데 방법 좀 부탁드립니다.

본문

그누보드의 스킨을 다운로드 받아서 사용하고싶은데요.

배너 사이즈 조정을 했습니다. 그러니까 클릭하는 부분이 배너 안쪽에 있어야 하는데 따로 동떨어져 있네요.

배너 안쪽으로 넣는 방법 좀 가르쳐 주시면 감사하겠습니다. 수정전에는 안쪽에 있던건데..어떻게 하는지 모르겟습니다.

부탁드립니다...

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

$img_width = 700;
$img_height = 90;
$img_quality = 90;

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_ch01';
$ym = date("ym", $g4[server_time]);

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);

?>

<SCRIPT type=text/javascript>
<!--
old_debate_T='1';
function ComeonT(objid_T){
document.getElementById("debate_T"+old_debate_T).style.display="none";
document.getElementById("debate_T"+old_debate_T+"#1").style.display="";
document.getElementById("debate_T"+objid_T+"#1").style.display="none";
document.getElementById("debate_T"+objid_T).style.display="";
document.getElementById("debate_content_T"+old_debate_T).style.display="none";
document.getElementById("debate_content_T"+objid_T).style.display="";
old_debate_T=objid_T;
}
var objid_T = 1;
var interval_best;

function best_changeT()
{
 if( objid_T == 10 ) // 오버랩되는 갯수
  objid_T = 1;
 else
  objid_T++;

 ComeonT(objid_T);
}
function setInterval_best()
{
 interval_best = setInterval("best_changeT()",3000);//속도조절
}
function clearInterval_best()
{
 clearInterval(interval_best);
}
setInterval_best();
//-->
</SCRIPT>
<style type="text/css">
#ifocus { margin:0px; border:0px;position:relative; }
/* 만약 이미지에 테두리를 넣고 싶다면, 아래의 border:0; 을 border:1px solid #666; 로 수정하면 됩니다.*/
#ifocus img { display:inline; position:relative;border:0px; overflow:hidden; }
#ifocus .imglist { position:relative; }
#onetapbutton {position:absolute; top:135px;right:10px; z-index:30;}
</style>

<!--
이 스킨은 불량감자님의 갤러리 최신글 02(오토탭무빙)을 TopSchooL님께서 보완하신 소스를 배너형태로 사용하기 위해 수정한 소스입니다.
원본 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=90060
수정본 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=90864
-->

<div style="position:relative">

<? for ($i=0; $i<count($list); $i++) {
$j = $i + 1; 
if ($j == "1") {
echo "<DIV>";
echo "<DIV id=debate_content_T$j onmouseover=clearInterval_best() onmouseout=setInterval_best()>"; }
else { echo "<DIV id=debate_content_T$j onmouseover=clearInterval_best() onmouseout=setInterval_best() style='DISPLAY: none;'>\n"; }
?>


<?
//썸네일 생성
$thumfile = "";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        // 업로드된 파일이 이미지라면
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        } else { //게디터에서 삽입한 이미지 뽑자ㅠㅠ
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4/{$ym}/[^<>]*\.(gif|jpg|png|bmp)", $edit_img, $tmp)) { // data/geditor------
$file = './' . $tmp[0]; // 파일명
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
    }
}

    if (file_exists($thumb))
        $thumfile = "<img src='$thumb' width='{$img_width}' height='{$img_height}'></a>";
else
//이미지가 없으면
$thumfile="<img src='$latest_skin_path/img/no_image.gif' width='{$img_width}' height='{$img_height}'></a>";
//이미지가 아니네
        if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
      { $thumfile = "<script>doc_write(flash_movie('$file', 'flash$i', '$img_width', '$img_height', 'transparent'));</script>"; }
?>

<div id="ifocus">
<div  class="imglist"> 

<? if ($list[$i][wr_link1]) {
echo "<a href='{$list[$i][wr_link1]}' target='_blank'>{$thumfile}</a>"; //새창으로 링크 연결
//echo "<a href='{$list[$i][wr_link1]}' target='_self'>{$thumfile}</a>"; //현재창으로 링크 연결
} else {
echo "<a href='{$list[$i][href]}'>{$thumfile}</a>";
}
?>

</div>
</div>
<?
echo "</DIV>";
}
?>

 <div id="onetapbutton">
<? for ($i=0; $i<count($list); $i++) {
$k = $i + 1;
?>
<a href="<?=$list[$i][href]?>" onmouseover="javascript:ComeonT('<?=$k?>')"><img src="<?=$latest_skin_path?>/img/<?=$k?>_on.gif" width="12" height="12" border="0" id="debate_T<?=$k?>" onmouseover="clearInterval_best()" onmouseout="setInterval_best()" <? if($k == "1") { echo ""; } else { echo "style='DISPLAY: none;' "; } ?>><img src="<?=$latest_skin_path?>/img/<?=$k?>.gif" width="12" height="12" border="0"  id="debate_T<?=$k?>#1"  <? if($k == "1") { echo "style='DISPLAY: none;'"; } else { echo ""; } ?>></a>
<?}?>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/icon_admin.gif" width="12" height="12" border="0" alt="목록으로"></a>
</div>

</div>

댓글 전체

style 지정한부분중에
#onetapbutton {position:absolute; top:135px;right:10px; z-index:30;}

아래 처럼 top 값을 조정해보세요
#onetapbutton {position:absolute; top:50px;right:10px; z-index:30;}

이렇게 ^^
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

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