galley 라는 게시판 안의 내용을 랜덤으로 최신글(겔러리) 로 보여지게 하려 합니다.
현 사용 스킨 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=142856&sca=&sfl=wr_subject%7C%7Cwr_content&stx=swfupload
swfupload 를 제외한 일반 파일첨부 게시판은 <?=random_latest('')?> 로 정상적으로 출력됩니다.
swfupload 스킨으로 업로드된 사진 중
<?=latest('')?> 는 가장 최신글의 사진은 뽑아지지만
<?=random_latest('')?> 로는 "게시물이 없습니다." 가 출력됩니다.
random_latest.lib.php 의 내용은 아래와 같으며
[code]
//최신글 랜덤 추출 방법
function random_latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$current_time = time();
$opentime = date("Ymd", $current_time); // 컬랜트 타임을 일반시간으로 전환
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_10 >='$opentime' order by rand() desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
[/code]
아마도 swfupload 스킨의 이미지 업로드 처리가 달라 게시물이 없다고 나오는듯 한데
어느부분을 수정하고 추가해야할지 도움을 요청합니다 ㅠㅠㅠㅠㅠ
현 사용 스킨 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=142856&sca=&sfl=wr_subject%7C%7Cwr_content&stx=swfupload
swfupload 를 제외한 일반 파일첨부 게시판은 <?=random_latest('')?> 로 정상적으로 출력됩니다.
swfupload 스킨으로 업로드된 사진 중
<?=latest('')?> 는 가장 최신글의 사진은 뽑아지지만
<?=random_latest('')?> 로는 "게시물이 없습니다." 가 출력됩니다.
random_latest.lib.php 의 내용은 아래와 같으며
[code]
//최신글 랜덤 추출 방법
function random_latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$current_time = time();
$opentime = date("Ymd", $current_time); // 컬랜트 타임을 일반시간으로 전환
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_10 >='$opentime' order by rand() desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
[/code]
아마도 swfupload 스킨의 이미지 업로드 처리가 달라 게시물이 없다고 나오는듯 한데
어느부분을 수정하고 추가해야할지 도움을 요청합니다 ㅠㅠㅠㅠㅠ
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기