view 페이지에서 파일첨부 이미지 눌렀을때 게시판에 따라서 새창 뜨고, 안뜨고 제어하기 정보
view 페이지에서 파일첨부 이미지 눌렀을때 게시판에 따라서 새창 뜨고, 안뜨고 제어하기본문
view 페이지에서 파일첨부된 이미지 눌렀을때 게시판에 따라서 특정 게시판은 새창이 뜨고, 나머지 게시판은 새창이 안뜨게 하고 싶습니다.
검색해보니, lib 에서 common.lib.php파일중 아래의 소스에서 onclick를 삭제하면 되던데요,
위에서 원하는 것처럼 하려면, 사이에 조건문을 걸어주면 될거 같은데, 조건문 구현하는걸
잘 모르겠습니다.
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
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>";
이걸
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
if ($bo_table=tb32)
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
else
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' style='cursor:pointer;' title='$content'></div>";
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>";
이렇게 해봤는데, 안되네요..ㅠㅠ
개념은 알겠는데, 구현하려니, 기본이 안되어 있어서..그런거 같습니다.
도와주십시요~
검색해보니, lib 에서 common.lib.php파일중 아래의 소스에서 onclick를 삭제하면 되던데요,
위에서 원하는 것처럼 하려면, 사이에 조건문을 걸어주면 될거 같은데, 조건문 구현하는걸
잘 모르겠습니다.
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
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>";
이걸
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
if ($bo_table=tb32)
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
else
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' style='cursor:pointer;' title='$content'></div>";
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>";
이렇게 해봤는데, 안되네요..ㅠㅠ
개념은 알겠는데, 구현하려니, 기본이 안되어 있어서..그런거 같습니다.
도와주십시요~
댓글 전체
if($bo_table=="테이블명") {
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' style='cursor:pointer;' title='$content'></div>";
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_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
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>";
}
대충 일케 하면 될꺼 같네요...^^;;안되도 책임 못져요~ㅋㅋ
if (preg_match("/\.($config[cf_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' style='cursor:pointer;' title='$content'></div>";
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_image_extension])$/i", $file))
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<div style=\"overflow:hidden; width:{$width}px\"><img src='$g4[path]/data/file/$board[bo_table]/".urlencode($file)."' name='target_resize_image[]' onclick='image_window(this);' style='cursor:pointer;' title='$content'></div>";
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>";
}
대충 일케 하면 될꺼 같네요...^^;;안되도 책임 못져요~ㅋㅋ