이미지의 위치를 마음대로 정보
그누호환 이미지의 위치를 마음대로
본문
bbs/gbview.php
//이미지 패턴 사용시 임의 위치에 삽입 가능 [image:1 align=top] 과 같이 사용
// 만일 그림이 1개일 경우에는 좌우 사용이 가능함.
// 그림이 여러개일 경우 상하좌우 사용 금지.
// 사이즈를 구하지 않을 때
// $image_pattern = "/\[image:".$i."(.*?)\]/i"; // 커스텀 이미지1 태그 검색 패턴 문자열
// if(preg_match($image_pattern,$write[wr_content])) { $content=preg_replace($image_pattern, "<img src=./data/file/$bo_table/$wr_file \\1>", $write[wr_content]); }
// else { $file[$i][view] = view_file_link($wr_file); }
//
//이미지 패턴 사용시 임의 위치에 삽입 가능 [image:1 align=center] 와 같이 사용
// 사이즈를 구할 때
$image_pattern = "/\[image:".$i."(.*?)\]/i"; // 커스텀 이미지1 태그 검색 패턴 문자열
if(preg_match($image_pattern,$content)) {
$size = @getimagesize("./data/file/$bo_table/$wr_file");
$source_width = $size[0];
$source_height = $size[1];
if ($board[bo_table_width] <= 100) {
if ($size[0] > $cfg[large_image_size]) {
$rate = $size[1] / $size[0];
$size[0] = $cfg[large_image_size];
$size[1] = (int)($size[0] * $rate);
}
} else {
if ($size[0] > $board[bo_table_width]) {
$rate = $size[1] / $size[0];
$size[0] = $board[bo_table_width];
$size[1] = (int)($size[0] * $rate);
}
}
$width1 = $size[0];
$height1 = $size[1];
$content=preg_replace($image_pattern, "<img src='./data/file/$bo_table/$wr_file' width=$width1 height=$height1 hspace=15 \\1>", $content); }
else { $file[$i][view] = view_file_link($wr_file); }
// 여기까지
$file[$i][add] = "./data/file/$bo_table/$wr_file";
}
}
$is_comment = false;
$is_comment_write = false;
if ($board[bo_use_comment]) {
$is_comment = true;
unset($list);
// 코멘트 출력
사용법
그림 업로드 후에
원하는 내용의 위치에 [image:1] 과 같이 사용합니다.
그림이 1개일 경우 [image:1 align=center] 이 가능하나 여러개일 경우 align을 주면 그림이 겹쳐집니다.
//이미지 패턴 사용시 임의 위치에 삽입 가능 [image:1 align=top] 과 같이 사용
// 만일 그림이 1개일 경우에는 좌우 사용이 가능함.
// 그림이 여러개일 경우 상하좌우 사용 금지.
// 사이즈를 구하지 않을 때
// $image_pattern = "/\[image:".$i."(.*?)\]/i"; // 커스텀 이미지1 태그 검색 패턴 문자열
// if(preg_match($image_pattern,$write[wr_content])) { $content=preg_replace($image_pattern, "<img src=./data/file/$bo_table/$wr_file \\1>", $write[wr_content]); }
// else { $file[$i][view] = view_file_link($wr_file); }
//
//이미지 패턴 사용시 임의 위치에 삽입 가능 [image:1 align=center] 와 같이 사용
// 사이즈를 구할 때
$image_pattern = "/\[image:".$i."(.*?)\]/i"; // 커스텀 이미지1 태그 검색 패턴 문자열
if(preg_match($image_pattern,$content)) {
$size = @getimagesize("./data/file/$bo_table/$wr_file");
$source_width = $size[0];
$source_height = $size[1];
if ($board[bo_table_width] <= 100) {
if ($size[0] > $cfg[large_image_size]) {
$rate = $size[1] / $size[0];
$size[0] = $cfg[large_image_size];
$size[1] = (int)($size[0] * $rate);
}
} else {
if ($size[0] > $board[bo_table_width]) {
$rate = $size[1] / $size[0];
$size[0] = $board[bo_table_width];
$size[1] = (int)($size[0] * $rate);
}
}
$width1 = $size[0];
$height1 = $size[1];
$content=preg_replace($image_pattern, "<img src='./data/file/$bo_table/$wr_file' width=$width1 height=$height1 hspace=15 \\1>", $content); }
else { $file[$i][view] = view_file_link($wr_file); }
// 여기까지
$file[$i][add] = "./data/file/$bo_table/$wr_file";
}
}
$is_comment = false;
$is_comment_write = false;
if ($board[bo_use_comment]) {
$is_comment = true;
unset($list);
// 코멘트 출력
사용법
그림 업로드 후에
원하는 내용의 위치에 [image:1] 과 같이 사용합니다.
그림이 1개일 경우 [image:1 align=center] 이 가능하나 여러개일 경우 align을 주면 그림이 겹쳐집니다.
추천
0
0
댓글 전체
스킨 배포하세요 ^_^ 셈플 주소도 ^^
고맙습니다. 이제 그림창고에 무작위로 올라간 그림파일들 정리되겠습니다.....