게시판에 플래시파일 꽉차게 보이게하기 정보
게시판에 플래시파일 꽉차게 보이게하기관련링크
본문
게시판에 플래시파일 꽉차게 보이게하기
lib폴더 common.lib.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 ($width > $board[bo_image_width] && $board[bo_image_width])
↓
if ($width < $board[bo_image_width] && $board[bo_image_width])
==================================================================================================================================================
(편법) 게시판에 플래시 업로드
1. 서버에 폴더하나 만들고 그곳에 플래시 파일 업로드
2. 게시판 관리자페이지에서 DHTML 에디터 사용--체크표시
3. 쓰기에서 미디어를 클릭하여 플래시있는 url을 적어준다
(http://www.xxx.com/pro_data/bohoprogram01.swf)
쓰기에서 html박스에 체크표시하고 플래시 크기를 임의로 조정한다.
예>
<HTML><HEAD></HEAD>
<BODY contentEditable=true style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 9pt; MARGIN: 0px; COLOR: #222222; LINE-HEIGHT: 1.1; PADDING-TOP: 10px; FONT-FAMILY: 굴림; BACKGROUND-COLOR: #ffffff"><EMBED style="WIDTH: 730px; HEIGHT: 800px" src=http://bundo2007.cafe24.com/pro_data/bohoprogram03.swf type=application/x-shockwave-flash autostart="true" loop="true"></BODY></HTML>
lib폴더 common.lib.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 ($width > $board[bo_image_width] && $board[bo_image_width])
↓
if ($width < $board[bo_image_width] && $board[bo_image_width])
==================================================================================================================================================
(편법) 게시판에 플래시 업로드
1. 서버에 폴더하나 만들고 그곳에 플래시 파일 업로드
2. 게시판 관리자페이지에서 DHTML 에디터 사용--체크표시
3. 쓰기에서 미디어를 클릭하여 플래시있는 url을 적어준다
(http://www.xxx.com/pro_data/bohoprogram01.swf)
쓰기에서 html박스에 체크표시하고 플래시 크기를 임의로 조정한다.
예>
<HTML><HEAD></HEAD>
<BODY contentEditable=true style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 9pt; MARGIN: 0px; COLOR: #222222; LINE-HEIGHT: 1.1; PADDING-TOP: 10px; FONT-FAMILY: 굴림; BACKGROUND-COLOR: #ffffff"><EMBED style="WIDTH: 730px; HEIGHT: 800px" src=http://bundo2007.cafe24.com/pro_data/bohoprogram03.swf type=application/x-shockwave-flash autostart="true" loop="true"></BODY></HTML>
추천
0
0
댓글 3개
플래시 파일은 꽉차지만 ...
어떤 게시판에서는 아래와 같은 경고메시지가 뜹니다.
Warning: Division by zero in D:\seoboo\seoboomt\lib\common.lib.php on line 885
소스를 보니깐 이 구문인데 ...
$rate = $board[bo_image_width] / $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; 로 바꾸세요
$rate = $board[bo_image_width] > $width; 로 바꾸세요
감솨