Copy
이렇게 index 파일에 넣고 <?php echo latest2("oneshot", array("b1","b2"), 5, 70); ?>
latest.lib.php 하단에 아래를 추가하면 나온다고 하는데 그냥 아무것도 아뜹니다.
한그룹 안에 있는 갤러리 3개 게시판을 출력하려고 하는데 소스를 볼줄 몰라서 어떤 소스가 더 들어가야 하는지 고수님들 부탁드립니다.
Copy
<?php function latest2($skin_dir = "", Array $bo_tableIds, $rows = 10, $subject_len = 40) { global $g4; if (!$skin_dir) $skin_dir = 'basic'; if (G4_IS_MOBILE) { $latest_skin_path = G4_MOBILE_PATH . '/' . G4_SKIN_DIR . '/latest/' . $skin_dir; $latest_skin_url = G4_MOBILE_URL . '/' . G4_SKIN_DIR . '/latest/' . $skin_dir; } else { $latest_skin_path = G4_SKIN_PATH . '/latest/' . $skin_dir; $latest_skin_url = G4_SKIN_URL . '/latest/' . $skin_dir; } $sql_select = " "; $list = array(); $sql = " select b.gr_id, a.bo_table, a.wr_id, a.wr_parent, a.bn_datetime, b.bo_subject, b.bo_subject from $g4[board_new_table] a, $g4[board_table] b where a.bo_table = b.bo_table and a.bo_table in('" . implode("','", $bo_tableIds) . "') and a.wr_id = a.wr_parent order by a.bn_id desc limit $rows "; $_boardInfo = array(); $_notExistsBoards = array(); $result = sql_query($sql); foreach ($bo_tableIds as $tableId) { $board = sql_fetch("select * from {$g4['board_table']} where bo_table = '" . addslashes($tableId) . "'"); if ($board === false) $_notExistsBoards[] = $tableId; $_boardInfo[$board['gr_id']] = $board; } for ($i = 0; $row = sql_fetch_array($result); $i++) { $tmp_write_table = $g4['write_prefix'] . $row['bo_table']; $row2 = sql_fetch("select * from $tmp_write_table where wr_id = '$row[wr_id]'"); $list[$i] = $row2; $list[$i] = get_list($row2, $_boardInfo[$row['gr_id']], $latest_skin_path, $subject_len); $bo_href[$i] = $row['bo_table']; $bo_name[$i] = $row['bo_subject']; $list[$i]['wr_date'] = $row2['wr_datetime']; } ob_start(); if ($_notExistsBoards) { echo join(", ", $_notExistsBoards) . " 게시판이 존재하지 않습니다."; } include "$latest_skin_path/latest.skin.php"; $content = ob_get_contents(); ob_end_clean(); return $content;} ?>
답변 2개 / 댓글 1개
채택된 답변
+20 포인트
캐시 삭제 해보시고 하세요~
답변에 대한 댓글 1개
2016-10-18 (화) 11:32:52
답변 감사합니다. 캐시 삭제랑 복사한 게시물은 최신글에 안뜨기도 하고 그랬네요. 해결~
2016-10-11 (화) 14:10:31
아마 최신글이 지정기간을 넘어서 삭제가 된것 같아요. 글을 다시 등록해보세요.
답변을 작성하려면 로그인이 필요합니다.