이미지리사이즈 정보
이미지리사이즈
본문
블로그에 블 자도 모릅니다. 단지 궁금하면 못배기는 성미라서요...^^
extend/gblog.extend.php의 최하단에
$gb4[upload_image_width]를 생성토록하였고
$gb4[upload_image_width] = 570; 정도로 주고
skin/blog/index.skin.php의 하단에
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=$gb4[upload_image_width]?>);
drawFont();
}
</script>
window.onload=function() {
resizeBoardImage(<?=$gb4[upload_image_width]?>);
drawFont();
}
</script>
blog/index.php의 170 줄 부근에
$post[$index]['content'] = preg_replace("/(\<img )([^\>]*)(\>)/i", "\\1 name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' \\2 \\3", $post[$index][content]);
를 넣어서 처리를 했습니다....
댓글 전체
천상재회님 멋쟁이~!
별말씀을.....^^
그런데 블로그에서는 첨부화일이 게시판처럼 나오지 않는게 맞나요....?
그런데 블로그에서는 첨부화일이 게시판처럼 나오지 않는게 맞나요....?
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$gb4[upload_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$gb4[upload_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
구버전 스크립트로군요.....신버전은 위의 본문대로 합니다....^^
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$gb4[upload_image_width]?>);
drawFont();
}
</script>
<script language="JavaScript">
window.onload=function() {
resizeBoardImage(<?=(int)$gb4[upload_image_width]?>);
drawFont();
}
</script>
왜 안 되나 했더니 한줄 빠졌습니다.
메롱입니다. :)
메롱입니다. :)
http://www.morssola.com/blog/aone/14
위 링크를 보면 두 이미지를 올렸습니다.
하나는 에디터로 올렸고,
하나는 일반 게시판처럼 찾아보기 형식으로 올렸더니..
이미지 우측 상단부분에 파일명처럼 되어있고 다운이 되네요. ^^
위 링크를 보면 두 이미지를 올렸습니다.
하나는 에디터로 올렸고,
하나는 일반 게시판처럼 찾아보기 형식으로 올렸더니..
이미지 우측 상단부분에 파일명처럼 되어있고 다운이 되네요. ^^
로칼에서 utf-8 버전으로 테스트를 합니다.
첨부이미지도 게시판처럼 나타나는게 맞다면....^^
이미 처리를 하였는데......무식파 삽질이라서요....ㅠ.ㅠ
첨부이미지도 게시판처럼 나타나는게 맞다면....^^
이미 처리를 하였는데......무식파 삽질이라서요....ㅠ.ㅠ