/*
// 이미 등록된 내역이라면 건너뜀
if ($rel_table || $rel_id || $rel_action)
{
$sql = " select count(*) as cnt from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ";
$row = sql_fetch($sql);
if ($row[cnt])
return -1;
}
*/
댓글 8개
/*
// 이미 등록된 내역이라면 건너뜀
if ($rel_table || $rel_id || $rel_action)
{
$sql = " select count(*) as cnt from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ";
$row = sql_fetch($sql);
if ($row[cnt])
return -1;
}
*/
ps- 모든 게시판이 차감 되내요...에궁.
매개 게시판 클릭한번하면 포인트가 -1되는데
==========================================
특정게시판만 적용하고 다른게시판은 원래되로 하시려면 약간의 편법이 필요하겠네요.
1. insert_point() ====>>
insert_point_02() 새로운 함수 만드시고...(위 주석을 적용한 함수를 하나 만듭니다.)
2. gnuboard4/bbs/board.php 소스를 손대야 합니다. 130 line insert_point()
if($bo_table == 'test'){ // 테이블이 test 이면
insert_point_02(생략...................);
}
else{
insert_point(생략....)
}
^^ insert_point () <<=== 특정게시판만 적용할 경우 위처럼 하면 될거 같내요.
switch 구문으로 소스변형 하시면 되겠네요.
on 이라고 넣어주고 스킨/view.skin.php 에
//여분필드1에 on 이라고 넣을경우
if ($board[bo_1) =="on"){
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, "{$wr_id}{$g4[time_ymdhis]}", '읽기');
}
//여분필드1에 on 이라고 넣을경우
if ($board[bo_1]) =="on"){
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, "{$wr_id}{$g4[time_ymdhis]}", '읽기');
}