Sendu gallery skin 입니다...
아래대로 수정을 안하셔도 갤러리를 쓰시는데 아무 지장이 없으나..
아래처럼 수정을 하게되면 photo, movie 아이콘이 구별되어서 뜨게 됩니다.
-- 사진 올리면 photo 아이콘이 뜨고 동영상을 올리면 movie 가 뜨구요
-- 둘다 같이 올리면 리스트에는 사진이 뜨고 안에는 동영상이 나옵니다.
1. bbs/gblist.php 에서 192번째 줄 즈음해서 아래 문구로 대체합니다.
for ($k=1; $k<=$cfg[file_count]; $k++) {
if (@preg_match($cfg[image_extension], $row["wr_file".$k])) {
$list[$i]["file_image".$k] = "./data/file/$bo_table/" . $row["wr_file".$k];
}
}
for ($k=1; $k<=$cfg[file_count]; $k++) {
if (@preg_match($cfg[movie_extension], $row["wr_file".$k])) {
$list[$i]["file_movie".$k] = "./data/file/$bo_table/" . $row["wr_file".$k];
}
}
2. bbs/gbview.php 에서 181번째 줄에서....아래처럼 수정
$file[$i][view] = view_file_link($wr_file);
$file[$i][view1] = view_file_link1($wr_file);
3. lib/gnuboard.lib.php 에서 495 번째 줄 즈음하여
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상)
function view_file_link($file)
{
global $cfg, $board;
if (!$file) return;
$size = @getimagesize("./data/file/$board[bo_table]/$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);
}
}
$width = $size[0];
$height = $size[1];
if (preg_match($cfg[image_extension], $file))
return "<img src='./data/file/$board[bo_table]/$file' width='$width' height='$height' border=0><p>";
}
// 파일을 보이게 하는 링크 (플래쉬, 동영상)
function view_file_link1($file)
{
global $cfg, $board;
if (!$file) return;
if (preg_match($cfg[movie_extension], $file))
return "<embed src='./data/file/$board[bo_table]/$file'></embed><p>";
}
아래처럼 수정을 하게되면 photo, movie 아이콘이 구별되어서 뜨게 됩니다.
-- 사진 올리면 photo 아이콘이 뜨고 동영상을 올리면 movie 가 뜨구요
-- 둘다 같이 올리면 리스트에는 사진이 뜨고 안에는 동영상이 나옵니다.
1. bbs/gblist.php 에서 192번째 줄 즈음해서 아래 문구로 대체합니다.
for ($k=1; $k<=$cfg[file_count]; $k++) {
if (@preg_match($cfg[image_extension], $row["wr_file".$k])) {
$list[$i]["file_image".$k] = "./data/file/$bo_table/" . $row["wr_file".$k];
}
}
for ($k=1; $k<=$cfg[file_count]; $k++) {
if (@preg_match($cfg[movie_extension], $row["wr_file".$k])) {
$list[$i]["file_movie".$k] = "./data/file/$bo_table/" . $row["wr_file".$k];
}
}
2. bbs/gbview.php 에서 181번째 줄에서....아래처럼 수정
$file[$i][view] = view_file_link($wr_file);
$file[$i][view1] = view_file_link1($wr_file);
3. lib/gnuboard.lib.php 에서 495 번째 줄 즈음하여
// 파일을 보이게 하는 링크 (이미지, 플래쉬, 동영상)
function view_file_link($file)
{
global $cfg, $board;
if (!$file) return;
$size = @getimagesize("./data/file/$board[bo_table]/$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);
}
}
$width = $size[0];
$height = $size[1];
if (preg_match($cfg[image_extension], $file))
return "<img src='./data/file/$board[bo_table]/$file' width='$width' height='$height' border=0><p>";
}
// 파일을 보이게 하는 링크 (플래쉬, 동영상)
function view_file_link1($file)
{
global $cfg, $board;
if (!$file) return;
if (preg_match($cfg[movie_extension], $file))
return "<embed src='./data/file/$board[bo_table]/$file'></embed><p>";
}
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 25개
Fatal error: Cannot redeclare view_file_link() (previously declared in /www/도메인/board/lib/gnuboard.lib.php:496) in /www/도메인/board/lib/gnuboard.lib.php on line 611
이런에러가납니다..lib파일의작업을 안하고 나머지 작업부분만 한 상태에서 보여지기는하는데..
정상적으로 보여지기는하는데..좀..찝찝해서요...
무슨이유인지요??...그누의버전은최신입니다.(3.37)
아쉬운점은 리스트에서 검색이 안되네요. 수정 해보려고 하였지만 잘 안됩니다.
유용하게 사용하겠읍니다.
아예 소스수정부분을 고쳐서 올려주시면 고맙겠습니다.
제가 너무 초보라서 봐도 잘 모르거든요^^
사진이나 동영상에 따라 아이콘이 바뀌고.. 둘다 올릴경우 리스트는 사진이 안에는 동영상만 나옵니다.
글수정을 위에 파일명으로 고치시기 바람
근데 만도님꺼는 어려워서 어케 하다보니 제 나름대로의 방법을 찾았습니다.
스킨파일이랑 이미지랑 새로 올렸습니다.
참고해 보세요.