소스만 봐주면 되는거예요.포인트 99999 입니다. > 그누4 질문답변

그누4 질문답변

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

소스만 봐주면 되는거예요.포인트 99999 입니다. 정보

소스만 봐주면 되는거예요.포인트 99999 입니다.

본문

http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=62588&sca=%C3%D6%BD%C5%B1%DB

최근글 적용할려고 위에 링크 적용중인데요.
사진 첨부처럼 최근 이미지 클릭하면
크게 보여지는건데
보여지는 작은사진은 게시판에서 첫번째 첨부파일이 보여지고
클릭시 2번째 첨부파일이 뜨게끔 할려고 하는데..
소스에서 간단히 수정할수 있는거 아닌가요?
아님 거스트마이징까지 해야하는 건가요?

포인트 99999 걸었습니다.
도와주세요.
-----------------------------
참고 설명
최근이미지로 뽑을라고 하는데
큰 이미지를 첨부하면 추출한 최근글에선 아주 작게나와서 께지거든요.
그래서 최근글 추출하여 보여지는 이미지는 게시에 글쓸면서 첨부한 1번쨰 사진이 보여지고
확대시 2번째 첨부한 파일을 보여지게끔 할려고 하는 거에요.
-----------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 제목길이 잘 맞추세요.
$thu_width = '80';  //썸네일 폭
$thu_height = '80'; //썸네일 높이
$thu_quality = '100'; //썸네일 퀄리티_100 이하

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

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';

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

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>

/*
$tmp_bo_table = "cm_gallery_request";
$tmp_write_table = $g4[write_prefix] . $tmp_bo_table;
$sql = " select wr_id, wr_subject from $tmp_write_table where wr_is_comment = 0 and wr_comment = 0 order by wr_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    echo "<div align=center><a href='$g4[bbs_path]/board.php?bo_table=$tmp_bo_table&wr_id=$row[wr_id]'><span style='height:18px; color:crimson; cursor:pointer;'>★ 이미지 요청 : $row[wr_subject] ★</span></a></div><br>";
}
*/
?>

<script type="text/javascript" src="<?=$latest_skin_path?>/highslide/highslide.js"></script>

<script type="text/javascript">   

// remove the registerOverlay call to disable the controlbar
hs.registerOverlay(
    {
    thumbnailId: null,
    overlayId: 'controlbar',
    position: 'top right',
    hideOnMouseOut: true
}
);

    hs.graphicsDir = '<?=$latest_skin_path?>/highslide/graphics/';
    hs.outlineType = 'rounded-white';
    window.onload = function() {
        hs.preloadImages(5);
    }
</script>

<style type="text/css">
.highslide {
cursor: url(<?=$latest_skin_path?>/highslide/graphics/zoomin.cur), pointer;
    outline: none;
}
.highslide img {
border: 2px solid gray;
}
.highslide:hover img {
border: 2px solid white;
}

.highslide-image {
    border: 2px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
    display: none;
   
    border: 2px solid white;
    border-top: none;
    font-family: Verdana, Helvetica;
    font-size: 10pt;
    padding: 5px;
    background-color: white;
}
.highslide-loading {
    display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
    text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
    background-color: black;
    /*
    padding-left: 22px;
    background-image: url(highslide/graphics/loader.gif);
    background-repeat: no-repeat;
    background-position: 3px 1px;
    */
}
a.highslide-credits,
a.highslide-credits i {
    padding: 2px;
    color: silver;
    text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
    color: white;
    background-color: gray;
}

.highslide-move {
    cursor: move;
}

.highslide-overlay {
display: none;
}
/* Controlbar example */
.controlbar {
background: url(<?=$latest_skin_path?>/highslide/graphics/controlbar4.gif);
width: 167px;
height: 34px;
}
.controlbar a {
display: block;
float: left;
margin: 0px 0 0 4px;
height: 29px;
width: 34px;
}

/* Necessary for functionality */
.highslide-display-block {
    display: block;
}
.highslide-display-none {
    display: none;
}
</style>

<div><?

for ($i=0; $i<count($list); $i++){

  $filename = $list[$i]['file'][0]['file'];

  $dest_file = $data_path .'/'. $filename;

  if (preg_match("/\.(jp[e]?g|gif|png)$/i", $filename) && file_exists($dest_file)){

    $thumb = $thumb_path.'/'. $filename;
    if (!file_exists($thumb)) {

      $size = getimagesize($dest_file);
      if ($size[2] == 1)
        $src = imagecreatefromgif($dest_file);
      else if ($size[2] == 2)
        $src = imagecreatefromjpeg($dest_file);
      else if ($size[2] == 3)
        $src = imagecreatefrompng($dest_file);
      else
        break;

      //가로,세로 최대사이즈 제한
      if ($size[0] >= $size[1]) {
        $rate = $board[bo_1] / $size[0];
        $width = $board[bo_1];
        $height = (int)($size[1] * $rate);
        }
        else {
        $rate = $board[bo_1] / $size[1];
        $width = (int)($size[0] * $rate);
        $height = $board[bo_1];
        }
        $dst = imagecreatetruecolor($width, $height);
        imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
        imagepng($dst, $thumb, $board['bo_2']);
        chmod($thumb, 0707);
        }
      }     
  //---------------------------------
  $no_image = $latest_skin_path."/img/noimage.gif";

  $tumblink = file_exists($thumb)? $thumb:$no_image;

  $subject = ($list[$i]['is_notice'])?"<a href='".$list[$i]['href']."' style='color:#2C8CB9;font-weight:bold;'>".$list[$i]['subject']."</a>":"<a href='".$list[$i]['href']."' style='color:#CCC;'>".$list[$i]['subject']."</a>";
  //---------------------------------

  //목록 출력
  ?><a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$dest_file?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
    <img src="<?=$tumblink?>" alt="Highslide JS" title="Click to enlarge" /></a>

  <div class='highslide-caption' id='caption_<?=$list[$i]['wr_id']?>'>
    <?=$subject?>
    <p><? echo "Date:".$list[$i]['datetime']; echo ($list[$i]['datetime2'] != $list[$i]['last2'])?" 댓글:".$list[$i]['last2']."":'';?> Hit:<?=$list[$i]['wr_hit']?></p>
  </div><?

}//for

?><div id="controlbar" class="highslide-overlay controlbar">
<a href="#" onclick="return hs.previous(this)" title="Previous (left arrow key)"></a>
<a href="#" onclick="return hs.next(this)" title="Next (right arrow key)"></a>
    <a href="#" class="highslide-move" title="Click and drag to move"
    style="margin-left: 10px"></a>
    <a href="#" onclick="return hs.close(this)" title="Close"></a>
</div>

</div><?

if (count($list) == 0){
  ?><div style='width:100%;border:0px solid silver;margin:0;'>자료가 없습니다.</div><?
}
?>

댓글 전체

for 문 사이에 추가해주시고.

$oriFILE = $list[$i]['file'][1]['file'];

$oriPATH = $data_path .'/'. $oriFILE;


다음과 같은 부분을.
<img src="<?=$tumblink?>" alt="Highslide JS" title="Click to enlarge" /></a>

아래처럼.
<img src="<?=$oriPATH?>" alt="Highslide JS" title="Click to enlarge" /></a>
아휴 살았다~~
정확하게 알려주셔서 너무 감사합니다.
아주 잘되요
이 은혜를 포인트로 갚는점 죄송스럽게 생각합니다.

행복한 하루 되세요~
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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