갤러리 최신글에서 마음에 드는 이미지만 선택해서 최신글에 나오게~

갤러리 최신글에서 마음에 드는 이미지만 선택해서 최신글에 나오게할순없나요?
쇼핑몰처럼 MD 추천이라는 상품리스트에 선택된 이미지만 나오게하는거죠~~
도움 부탁드립니다.
|

댓글 2개

latest.lib.php파일에 아래함수 추가하시고
<?=latest_option("photo", "photo",6, 30, "wr_1!= 'on' and wr_2='1'");?>
이런형식으로 불러오면 됩니다.


function latest_option($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";

$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_is_comment = 0 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where $options order by wr_last 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;
}
게시판 리스트에서 선택해서 나오게 할순없는건가요?
그 기능이 있으면 좋을것 같은데요... 만들능력은 안되고... 에효..
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
16년 전 조회 979
16년 전 조회 918
16년 전 조회 1,001
16년 전 조회 979
16년 전 조회 817
16년 전 조회 984
16년 전 조회 1,546
16년 전 조회 1,501
16년 전 조회 1,545
16년 전 조회 1,034
16년 전 조회 2,432
16년 전 조회 975
16년 전 조회 781
16년 전 조회 980
16년 전 조회 889
16년 전 조회 971
16년 전 조회 905
16년 전 조회 1,577
16년 전 조회 983
16년 전 조회 1,678