수동으로 짠 메뉴에 new 아이콘 붙이는 방법? 정보
수동으로 짠 메뉴에 new 아이콘 붙이는 방법?
본문
예를 들어, 아래 처럼 수동으로 링크걸어 메뉴를 짠 경우,
질문답변이나 스킨다운 게시판에 새글이 올라온 경우 N(new 아이콘)을 붙이려면 어떻게 해야 하나요?
<a href=http://sir.co.kr/bbs/write.php?bo_table=g4_qa>질문답변</a> N
<a href=http://sir.co.kr/bbs/write.php?bo_table=g4_qa>스킨다운</a> N
질문답변이나 스킨다운 게시판에 새글이 올라온 경우 N(new 아이콘)을 붙이려면 어떻게 해야 하나요?
<a href=http://sir.co.kr/bbs/write.php?bo_table=g4_qa>질문답변</a> N
<a href=http://sir.co.kr/bbs/write.php?bo_table=g4_qa>스킨다운</a> N
댓글 전체
1. /skin/latest/latest_new 폴더 생성
2. /skin/latest/latest_new/img/icon_new.gif 생성(다른 게시판에 있는 이미지 복사하여 사용)
3. /skin/latest/latest_new/latest.skin.php 작성
<?=$list[0]['icon_new'];?> <= 요거 한 줄만 작성합니다.
4. new아이콘 출력을 원하는 메뉴에 <?=latest("latest_new","g4_qa",1,1);?> 와 같은 코드 삽입
위 방법은 메뉴마다 latest()함수가 호출되어 약간의 부하가 있지만, 그냥 간편히 사용할 때 (즉, 내홈피가 아닐 때^^) 사용하시면 됩니다.
2. /skin/latest/latest_new/img/icon_new.gif 생성(다른 게시판에 있는 이미지 복사하여 사용)
3. /skin/latest/latest_new/latest.skin.php 작성
<?=$list[0]['icon_new'];?> <= 요거 한 줄만 작성합니다.
4. new아이콘 출력을 원하는 메뉴에 <?=latest("latest_new","g4_qa",1,1);?> 와 같은 코드 삽입
위 방법은 메뉴마다 latest()함수가 호출되어 약간의 부하가 있지만, 그냥 간편히 사용할 때 (즉, 내홈피가 아닐 때^^) 사용하시면 됩니다.
메뉴를 출력하는 화일 상단에서
$new_date= date("Y-m-d H:i:s", $g4['server_time'] - 3600 * 24); //24시간 동안 new
$row1=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bn_datetime >= '$new_date' and bo_table='g4_qa' "); //질답
$row2=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bn_datetime >= '$new_date' and bo_table='g4_dn' "); //다운
if($row1[cnt]) $new1='N';
if($row2[cnt]) $new2='N';
링크에서
<a href=~~>질문답변</a> <?=$new1?>
<a href=~~>스킨다운</a> <?=$new2?>
$new_date= date("Y-m-d H:i:s", $g4['server_time'] - 3600 * 24); //24시간 동안 new
$row1=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bn_datetime >= '$new_date' and bo_table='g4_qa' "); //질답
$row2=sql_fetch("select count(*) as cnt from $g4[board_new_table] where bn_datetime >= '$new_date' and bo_table='g4_dn' "); //다운
if($row1[cnt]) $new1='N';
if($row2[cnt]) $new2='N';
링크에서
<a href=~~>질문답변</a> <?=$new1?>
<a href=~~>스킨다운</a> <?=$new2?>

고맙습니다. ^^ 덕분에 잘 해결했습니다. ^^