최신글 특정 글 지정해서 보이게 하기!!!!(고수님들 도움 좀 주세요)




<td width="281" height="130"><?=latest("notice","samsungict31",1,20);?></td>
<td width="281" height="130"><?=latest("notice","samsungict31",1,20);?></td>


위 사진은 <?=latest("notice","samsungict31",1,20);?> 2번 적용된것입니다.

게시판 따로만들면 일거리가 커지고 위 처럼 특정 게시물을따로 뽑고 싶습니다.

<?=latest("notice","samsungict31",1,20,1);?>
<?=latest("notice","samsungict31",1,20,2);?>
이렇게하는게 아니겠죠.ㅎㅎ 
고수님들 도움좀 주세요.
한 게시판 게시물 특정글만 따로 따로 추출하고 싶어요

|

댓글 1개

힌트나갑니다....

1. 특정글만 뽑는다면 글쓰기시 여분필드를 사용해서 특정글임을 알려줘야겠죠?
ex) wr_10 = 'special'

2. lib/latest.lib.php 를 latest2.lib.php 복사하고 내용 수정
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
=>function latest2($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")

$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
=> $sql = " select * from $tmp_write_table where wr_is_comment = 0 AND wr_10 = 'special' order by wr_num limit 0, $rows ";

3. 인덱스 페이지 상단에 include_once("$g4[path]/lib/latest2.lib.php"); 추가하고
<?=latest2("notice","samsungict31",1,20,1);?>

++++++++++++++++++++++++++++++++++++++++++++++++++
이런식으로 작업했던 기억이 ㅡ,.ㅡ;;
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
16년 전 조회 2,483
16년 전 조회 1,552
16년 전 조회 994
16년 전 조회 935
16년 전 조회 969
16년 전 조회 772
16년 전 조회 1,536
16년 전 조회 938
16년 전 조회 2,336
16년 전 조회 967
16년 전 조회 751
16년 전 조회 979
16년 전 조회 1,556
16년 전 조회 957
16년 전 조회 1,811
16년 전 조회 1,801
16년 전 조회 941
16년 전 조회 1,032
16년 전 조회 869
16년 전 조회 907