swf 파일첨부시 바로재생되게는 못하나요?
다음카페 이런데 보면 파일첨부하면 자동으로 재생이 되던데
그누에서는 안되서 여쭤봅니다
lib파일이나 스킨에서 만져주면 될것 같은데
도움좀 부탁드립니다~~
그누에서는 안되서 여쭤봅니다
lib파일이나 스킨에서 만져주면 될것 같은데
도움좀 부탁드립니다~~
댓글 2개
12년 전
"110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음" 부분부터
주석처리되어 있는데
주석을 제거해주세요~!
[code]
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상)
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'>";
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
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>";
*/
//=============================================================================================
}
[/code]
주석처리되어 있는데
주석을 제거해주세요~!
[code]
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상)
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'>";
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
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>";
*/
//=============================================================================================
}
[/code]
12년 전
감사합니다~
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66554 | 11년 전 | 17733 | ||
| 66553 | 11년 전 | 12554 | ||
| 66552 |
alexseo
|
11년 전 | 10188 | |
| 66551 | 11년 전 | 10924 | ||
| 66550 | 11년 전 | 10496 | ||
| 66549 | 11년 전 | 11846 | ||
| 66548 | 11년 전 | 15029 | ||
| 66547 |
스타크루즈
|
11년 전 | 11493 | |
| 66546 |
kimch
|
11년 전 | 11599 | |
| 66545 | 11년 전 | 11423 | ||
| 66544 | 11년 전 | 12271 | ||
| 66543 |
별을기다리며
|
11년 전 | 14432 | |
| 66542 |
별을기다리며
|
11년 전 | 11924 | |
| 66541 | 11년 전 | 9692 | ||
| 66540 | 11년 전 | 10566 | ||
| 66539 | 11년 전 | 16399 | ||
| 66538 | 11년 전 | 10451 | ||
| 66537 | 11년 전 | 9134 | ||
| 66536 | 11년 전 | 10574 | ||
| 66535 |
alexseo
|
11년 전 | 5590 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기