아래의 소스를 그누보드5에 적용 시키려면 어떻게 해야죠? 채택완료
http://sir.kr/g4_tiptech/16170?sfl=wr_subject||wr_content&stx=%EC%9B%8C%ED%84%B0%EB%A7%88%ED%81%AC&sop=and">http://sir.kr/g4_tiptech/16170?sfl=wr_subject||wr_content&stx=%EC%9B%8C%ED%84%B0%EB%A7%88%ED%81%AC&sop=and
아래의 소스를 그누보드5에 적용 시키려면 어떻게 해야죠?
답변 3개
$g4['path'] > G5_PATH
$g4['url'] > G5_URL
$g4['???_table'] > $g4['???_table']
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
$img = '<a href="'.G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($file).'" target="_blank" class="view_image">';
$img .= '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'" '.$attr.'>';
$img .= '</a>';
return $img;
}
}
아래 처럼 수정 하는것이 맞나요
$img .= '<img src="makeimg.php?photo='.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'" '.$attr.'>';
답변에 대한 댓글 4개
앗 그런데 주소 가서 소스 열어보니... 그냥 워터파크 php 하나밖에 없어서... 확인불가능 ..ㅜㅜ..
이렇게 적용 했는데 안되네요
또한 $board['bo_table'] 를 $bo_table 로도 바꿔보세요.
그리고 또한 $board['bo_table'] 를 $bo_table 로도 바꿔보세요. 바꾸니 이미지 엑박이 뜨네요
lib/common.lib.php 파일 1290 번째 부터 1311 까지 원본 소스 입니다
// 파일의 폭이 게시판설정의 이미지폭 보다 크다면 게시판설정 폭으로 맞추고 비율에 따라 높이를 계산
if ($width > $board['bo_image_width'] && $board['bo_image_width'])
{
$rate = $board['bo_image_width'] / $width;
$width = $board['bo_image_width'];
$height = (int)($height * $rate);
}
// 폭이 있는 경우 폭과 높이의 속성을 주고, 없으면 자동 계산되도록 코드를 만들지 않는다.
if ($width)
$attr = ' width="'.$width.'" height="'.$height.'" ';
else
$attr = '';
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
$img = '<a href="'.G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($file).'" target="_blank" class="view_image">';
$img .= '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'" '.$attr.'>';
$img .= '</a>';
return $img;
}
}
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
요위치를 적확히 찾지 좃하겠네요
* 일반게시판에서 사용법
1. 첨부파일 압축을 풀면 2가지 파일이 나옵니다. 아래 경로에 업로드 하세요.
(watermark.png는 샘플로 보시고,자신에게 맞게 제작 하여 사용 하세요.)
2. 도메인/bbs/makeimg.php
3. 도메인/bbs/img/watermark.png
4. lib/common.lib.php 파일 933번째 행쯤을 아래와 같이 수정 합니다.(검색활용)
----------------------------------------------------------------------------------
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<img src=makeimg.php?photo=$g4[path]/data/file/$board[bo_table]/".urlencode($file)." name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'>";
-----------------------------------------------------------------------------------
4. lib/common.lib.php 파일 933번째 행쯤을 아래와 같이 수정 합니다.(검색활용)