갤러리게시판을 수정하고싶습니다. 아래글과다른... 소스추가.. > 그누4 질문답변

그누4 질문답변

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

갤러리게시판을 수정하고싶습니다. 아래글과다른... 소스추가.. 정보

갤러리게시판을 수정하고싶습니다. 아래글과다른... 소스추가..

본문

현재 제 게시판이구요.http://dellee.woobi.co.kr/lee/bbs/board.php?bo_table=FF
http://hmstudio.co.kr/gnuboard4/ 사이트 게시판처럼바꾸고싶네요..
첫째로 스킨 색깔은 흰색으로 바꾸고싶구요.
둘째로 좌측에 있는 목록을 없애고 싶습니다..

어디 부분을 수정해야할까요??


<?
///---------------갤러리 스킨(jQuery용) -- by 균이,  2011.05
// 필수화일
// extent /resize_image.php -- 리사이징 및 썸네일 생성
// skin 폴더/jquery-ui.min.js -- 이미지 변환 효과
///---------------------------------------------------------
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$listNum) $listNum=0;
$imgPath="$g4[path]/data/file/$bo_table";

$view_width=630;  $view_height=450; // 보여질 큰 이미지 가로, 세로

//$resizex=630;  $resizey=450; //큰 이미지 리사이징 가로,세로(리사이징 하지않으면 주석처리)

$thumbx=60;  $thumby=45; //썸네일 가로, 세로

$thumbViewNum=6; //보여질 리스트용 썸네일 갯수

$thumb_div_width=($thumbViewNum * ($thumbx+9))."px";;

        $write_pages = str_replace("처음", "《 ", $write_pages);
        $write_pages = str_replace("이전", "〈 ", $write_pages);
        $write_pages = str_replace("맨끝", "》", $write_pages);
        $write_pages = str_replace("다음", "〉", $write_pages);
      $write_pages = str_replace("listNum=", "prev=", $write_pages);
        $write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><span style=\"color:#FF8040; font-size:12pt; text-decoration:none;\"> $1 </span></b>", $write_pages);

$update_href="$g4[bbs_path]/write.php?w=u&bo_table=$bo_table&wr_id={$list[$listNum][wr_id]}";
$thumbNum=$list[$listNum][file][count];
?>

<style type='text/css'>
.thumb{padding:2px; border:1px solid #ccc; cursor:pointer;}
.pre_next{font:bold 40pt 굴림;color:#ccc; cursor:pointer;}
.preBtnOver{font:bold 40pt 굴림;color:#FF854A; cursor:pointer;}

#orgdiv{ width:<?=$view_width?>px;  height:<?=$view_height?>px; overflow:hidden; z-index:10;
text-align:center;  cursor:pointer; background:#efefef; }

 .board_page{font:normal 11pt Arial;  text-align:center; margin-bottom:7px;}
 .board_page a:link, a:visited{color:#0067CE; text-decoration:none;}
 .board_page a:hover{color:red; text-decoration:none;}

.title,.ctitle {text-align:left; padding:5px 0px; cursor:pointer; }
.title{color:#0067CE;}
.ctitle {color:#F04E00;}

.thumbpre_next{font:bold 20pt 굴림;color:#0067CE; cursor:pointer;}
.thumbBtnOver{font:bold 20pt 굴림;color:#FF854A; cursor:pointer;}

#menutd{border:1px solid #cdcdcd; padding:7px; background:#efefef;}
#img_td{border:1px solid #cdcdcd; background:#efefef;}
#btn_td, #thum_td{border:1px solid #cdcdcd; padding:5px; background:#efefef;}
#btn_td a:link, a:hover, a:visited{color:#004080}
</style>

<table width="995" align="center" cellpadding="0" cellspacing="7" border='0'>
<tr><td width='180' valign='top' id='menutd'>
<div style='width:160px; margin:7px 0 20px 0px;color:#666; font-weight:bold; border-bottom:1px solid #cdcdcd;'> <?=$board[bo_subject]?></div>

<?for($i=0; $i<count($list); $i++){
if($listNum==$i) $class='ctitle'; else $class='title';
?>
<div class='<?=$class?>' onmouseover="this.className='ctitle';" onmouseout="title_mout(<?=$i?>,this);" onmousedown="location.href='board.php?bo_table=<?=$bo_table?>&listNum=<?=$i?>&page=<?=$page?>';">
》<?=$list[$i][wr_subject]?></div>
<?}?>
</td>

<td align='center' width="800" height='<?=($view_height+30)?>'  id='img_td'><!-- 큰 이미지-->

<?if($list[$listNum][file][count]){?>
<table  align="center" cellpadding="0" cellspacing="0" border="0" width='100%' height='100%'>
<tr><td width='20' class='pre_next' onmousedown="pre_view(1)" onmouseover="this.className='preBtnOver';" onmouseout="this.className='pre_next';">《</td>

<td width='760' align="center"><div  id="orgdiv" onclick="pre_view(2)"><img  id="orgmg"></div></td>

<td width='20' class='pre_next' onmousedown="pre_view(2)" onmouseover="this.className='preBtnOver';" onmouseout="this.className='pre_next';">》</td>
</tr></table>

<?}else echo "<div style='color:#666666'>< 등록된 자료가 없습니다 ></div>";?>
</td></tr>

<tr><td  align='center' height='45' id='btn_td'>
<div class="board_page"> <?=$write_pages; ?> </div>
<? if($is_admin) { ?><a href="<?=$write_href?>">등록</a>&nbsp;&nbsp;&nbsp;
<?if(count($list)){?><a href="<?=$update_href?>&page=<?=$page?>&listNum=<?=$listNum?>">수정</a>&nbsp;&nbsp;&nbsp;<a href="javascript:deletek()">삭제</a><?}?>
<? } ?>
</td>

<td align="center" pstyle="padding-top:3px;" id='thum_td'><!--썸네일-->
<table align="center" cellpadding="0" cellspacing="1" border="0">
<tr>
<?if($thumbNum>$thumbViewNum){?>
<td width='40' class='thumbpre_next' onmousedown="thumbpre_view(1)" onmouseover="this.className='thumbBtnOver';" onmouseout="this.className='thumbpre_next';" align='center'>〈 </td>
<?}?>
<td align='center'>
<?if($thumbNum>$thumbViewNum){?>
<div style='position:relative;overflow:hidden;width:<?=$thumb_div_width?>; height:<?=($thumby+10)?>px;' id='thumDivk'>
  <div style='position:absolute;top:0; left:0; text-align:center;' id='thumDivk2'>
<?}?>

<table align="center" cellpadding="0" cellspacing="3" border="0"><tr>
<? $h=-1;
for($i=0;$i<$list[$listNum][file][count]; $i++){
if(!$list[$listNum][file][$i][view]){$thumbNum--;  continue; }
    $thum_img="$imgPath/thumbs/{$list[$listNum][wr_id]}_{$i}.jpg";
$h++;

//큰 이미지 리사이즈
  if($resizex && $resizey &&  ($list[$listNum][file][$i][image_width]>$resizex || $list[$listNum][file][$i][image_height]>$resizey) ){ 
  $ret_wh= image_resizetg($list[$listNum][file][$i][file], $resizex, $resizey, $bo_table, $list[$listNum][wr_id], $i);
      if($ret_wh[0] && $ret_wh[1]){
    $list[$listNum][file][$h][image_width]=$ret_wh[0]; $list[$listNum][file][$h][image_height]=$ret_wh[1];
      }
    }
 //썸네일 만들기
if(!file_exists($thum_img))
tg_thumb($list[$listNum][file][$i][file],$thumbx, $thumby, $bo_table, $list[$listNum][wr_id], $i );

?>
<td class='thumb'  align='center' onmouseover="over_cell(<?=$h?>, this)" onmouseout="out_cell(<?=$h?>,this)" onmousedown="view_image(<?=$h?>)"  id="thumTD<?=$h?>"><img src="<?=$thum_img?>" ></td>
<?}?>
</tr></table>

<?if($thumbNum>$thumbViewNum){?>
  </div></div>
<?}?>

</td>
<?if($thumbNum>$thumbViewNum){?>
<td width='40' class='thumbpre_next' onmousedown="thumbpre_view(2)" onmouseover="this.className='thumbBtnOver';" onmouseout="this.className='thumbpre_next';" align='center'>  〉 </td>
<?}?>

</tr></table>

</td></tr>
</table>
<script src="<?=$board_skin_path?>/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
imgSize=new Array();
<? $data=''; $deli=''; $h=-1;
for($k=0; $k<$list[$listNum][file][count]; $k++){ if(!$list[$listNum][file][$k][view]) continue;
$data.=$deli.$list[$listNum][file][$k][file]; $deli="|"; $h++;
      echo "imgSize[$h]=\"{$list[$listNum][file][$k][image_width]}|{$list[$listNum][file][$k][image_height]}\";";
}
?>
data="<?=$data?>";
imgPath="<?=$imgPath?>";
temp=data.split("|");
var imgObj= document.getElementById('orgmg');
var current=1;
var objk;
var thumbViewNum=<?=$thumbViewNum?>;

var cNum=0;
var page= Math.ceil(temp.length/thumbViewNum)
var eek=(<?=$thumbx?>+9)*thumbViewNum;
var movek;
var preTD=0;

$(document).ready(function(){ if(!data) return;
preload_Image=new Array();
for(i=0; i<temp.length; i++){
preload_Image[i] = new Image();
preload_Image[i].src=imgPath+"/"+temp[i];
if(i==0) imgObj.src=preload_Image[0].src
}

 objk=document.getElementById("orgdiv");
sizek=imgSize[0].split('|');
 if(sizek[1]<parseInt("<?=$view_height?>"))  objk.style.height=sizek[1]+'px';
$('#thumTD0').css('backgroundColor','#FF0000');

});

var c_old=0;
function pre_view(vv){ if(!data) return;
  if(vv==1){ current--;    if(current<0) current=temp.length-1; }
  else{current++;  if(current>temp.length-1) current=0; }

 view_image(current);

    for(h=0; h<temp.length; h++) document.getElementById('thumTD'+h).style.backgroundColor='';

  document.getElementById('thumTD'+current).style.backgroundColor='#FF0000';
    ccp=Math.floor(current/thumbViewNum)
    if(ccp!=cNum){cNum=ccp;    cmovek=ccp*eek*-1; $("#thumDivk2").animate({left: cmovek+'px'}, 1000); }
    c_old=current;
}

var effectk=new Array( "fade","explode","explode");
var rnd;
var selectedEffect;
var Rnd=0;
var hhk;
function view_image(vv){
sizek=imgSize[vv].split('|');
current=vv;
///////////////////////////////
if(sizek[1]<=<?=$view_height?> ) hhk=sizek[1]; else hhk="<?=$view_height?>";
objk.style.height=hhk+'px';
objk.style.width="<?=$view_width?>px";

    Rnd=Math.round(Math.random()*2);
selectedEffect=effectk[Rnd];
    options = {}; ani_time=400;
$('#orgdiv').effect( selectedEffect, options, ani_time, callback );

}

function callback() {
//$('#orgdiv').removeAttr( "style" ).hide().fadeIn();
imgObj.src=preload_Image[current].src;
sizek=imgSize[current].split('|');
imgObj.width=sizek[0]; imgObj.height=sizek[1];
objk.style.height=hhk+'px';
window.status=hhk
//$('#orgdiv').css({"width":"<?=$view_width?>px", "height":(sizek[1])+"px","overflow":"hidden"});


var Rd2=Math.round(Math.random()) %2;
if(Rd2 ==0 ) $('#orgdiv').fadeIn("slow");
    else $('#orgdiv').slideDown("slow");
}

function over_cell(num, obj){
document.getElementById('thumTD'+current).style.backgroundColor='';
document.getElementById('thumTD'+c_old).style.backgroundColor='';
  document.getElementById('thumTD'+preTD).style.backgroundColor='';
    obj.style.backgroundColor="#FF0000";
c_old=preTD=num;
}

function out_cell(num, obj){
if(current!=num) obj.style.background='';
 document.getElementById('thumTD'+current).style.backgroundColor='#FF0000';
}


function title_mout(vv,obj){
 if(vv!=<?=$listNum?>) obj.className='title';
}


function thumbpre_view(vv){
 if(vv==1){ cNum--; if(cNum<0) cNum=page-1; }
else{cNum++; if(cNum>page-1) cNum=0;  }
  movek=-1*cNum*eek;
  $("#thumDivk2").animate({left: movek+'px' }, 1000);
}


<?if($is_admin){?>
function deletek(){
if(!confirm('삭제가 확실합니까?\n\n현재 리스트의 등록된 이미지가 모두 삭제 됩니다') ) return;
location.href="<?=$g4[bbs_path]?>/delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$listNum][wr_id]?>&page=<?=$page?>";
}
<?}?>
</script>
  • 복사

댓글 전체

<td width='180' valign='top' id='menutd'>
<div style='width:160px; margin:7px 0 20px 0px;color:#666; font-weight:bold; border-bottom:1px solid #cdcdcd;'> Gallery</div>

<div class='ctitle' onmouseover="this.className='ctitle';" onmouseout="title_mout(0,this);" onmousedown="location.href='board.php?bo_table=FF&listNum=0&page=1';">
》X</div>
</td>
 
부분을 삭제하시면 될거같네요 기본적으로 테이블 코딩에 대해서 아셔야 할거같네요 ~
© SIRSOFT
현재 페이지 제일 처음으로