갤러리 최신글에서 마음에 드는 이미지만 선택해서 최신글에 나오게~ 정보
갤러리 최신글에서 마음에 드는 이미지만 선택해서 최신글에 나오게~본문
갤러리 최신글에서 마음에 드는 이미지만 선택해서 최신글에 나오게할순없나요?
쇼핑몰처럼 MD 추천이라는 상품리스트에 선택된 이미지만 나오게하는거죠~~
도움 부탁드립니다.
쇼핑몰처럼 MD 추천이라는 상품리스트에 선택된 이미지만 나오게하는거죠~~
도움 부탁드립니다.
댓글 전체
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;
}
<?=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;
}
게시판 리스트에서 선택해서 나오게 할순없는건가요?
그 기능이 있으면 좋을것 같은데요... 만들능력은 안되고... 에효..
그 기능이 있으면 좋을것 같은데요... 만들능력은 안되고... 에효..