플래시 업로드시 화면에 꽉차게 하는방법 좀 알려주세요..
플래시 업로드하고 다시 읽을때 화면에 꽉차게 나오게 해야하는데..계속해서 왼쪽으로 쪼그라드네요...가로폭이 700픽셀이 나와야하는데...고수님들 도와주세요...
기본 스킨 사용...
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 7개
제가 php에 대해 잘 몰라서 ... 이미지는 꽉차게 보이는데 플래시만 쪼그라드네요..
이분과 똑같은 질문이었네요..
function view_file_link($file, $width, $height, $content="")
{
global $config, $board;
global $g4;
static $ids;
if (!$file) return;
$ids++;
// 파일의 폭이 게시판설정의 이미지폭 보다 크다면 게시판설정 폭으로 맞추고 비율에 따라 높이를 계산
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))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'>";
else if (preg_match("/\.($config[cf_flash_extension])$/i", $file))
//return "<embed src='$g4[path]/data/file/$board[bo_table]/$file' $attr></embed>";
return "<script>doc_write(flash_movie('$g4[path]/data/file/$board[bo_table]/$file', '_g4_{$ids}', '$width', '$height', 'transparent'));</script>";
else if (preg_match("/\.($config[cf_movie_extension])$/i", $file))
//return "<embed src='$g4[path]/data/file/$board[bo_table]/$file' $attr></embed>";
return "<script>doc_write(obj_movie('$g4[path]/data/file/$board[bo_table]/$file', '_g4_{$ids}', '$width', '$height'));</script>";
}
==================================================================================================================
요기에서 파일의 폭이 게시판설정의 이미지폭 보다 크다면을 작다면으로 바꾸고 싶은데 어케하면 좋을까요?
↓
if ($width < $board[bo_image_width] && $board[bo_image_width])
어떤 게시판에서는 아래와 같은 경고메시지가 뜹니다.
Warning: Division by zero in D:\seoboo\seoboomt\lib\common.lib.php on line 885
소스를 보니깐 이 구문인데 ...
$rate = $board[bo_image_width] / $width;
어떻게 해결해야 하나요?
$rate = $board[bo_image_width] / $width; 를
$rate = $board[bo_image_width] >$width; 로 바꿔야 하는군요.....