Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmosfarm committed Jun 12, 2023
2 parents 64250d6 + 7c9e606 commit 91e4d9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions plugins/kboard/class/KBoard.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,19 +664,19 @@ public function isUsePreventCopy(){
public function getExceptCountList(){
global $wpdb;
$results = '';
if($this->meta->except_count_type == '1'){
if($this->meta->except_count_type == '1'){//답변 제외
$results = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `board_id`='$this->id' AND `parent_uid` = 0 AND `status`!='trash'");
return intval($results);
}
else if($this->meta->except_count_type == '2'){
else if($this->meta->except_count_type == '2'){//공지사항 제외
$results = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `board_id`='$this->id' AND `notice` != 'true' AND `status`!='trash'");
return intval($results);
}
else if($this->meta->except_count_type == '3'){
else if($this->meta->except_count_type == '3'){//답변, 공지사항 제외
$results = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `board_id`='$this->id' AND `parent_uid` = 0 AND `notice` != 'true' AND `status`!='trash'");
return intval($results);
}
else if($this->meta->except_count_type == '4'){
else if($this->meta->except_count_type == '4'){//글 제목 키워드 설정 제외
if($this->meta->except_count_type_keyword){
$results = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `board_id`='$this->id' AND `title` NOT LIKE '%{$this->meta->except_count_type_keyword}%' AND `status`!='trash'");
return intval($results);
Expand Down
5 changes: 3 additions & 2 deletions plugins/kboard/pages/kboard_setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -1634,16 +1634,17 @@
<td>
<select name="except_count_type" id="except_count_type">
<option value="">기본 설정</option>
<option value="1"<?php if($meta->except_count_type == '1'):?> selected<?php endif?>>답변 제외</option>
<option value="1"<?php if($meta->except_count_type == '1'):?> selected<?php endif?>>답글 제외</option>
<option value="2"<?php if($meta->except_count_type == '2'):?> selected<?php endif?>>공지사항 제외</option>
<option value="3"<?php if($meta->except_count_type == '3'):?> selected<?php endif?>>답변, 공지사항 제외</option>
<option value="4"<?php if($meta->except_count_type == '4'):?> selected<?php endif?>>글 제목 키워드 설정 제외</option>
</select>
<div>
<label>제외 할 키워드 설정 <input type="text" name="except_count_type_keyword" value="<?php echo $meta->except_count_type_keyword?>"></label>
<label>제외 할 키워드<input type="text" name="except_count_type_keyword" value="<?php echo $meta->except_count_type_keyword?>"></label>
</div>
<p class="description">게시글 수 제외 옵션입니다.</p>
<p class="description">설정한 옵션이 게시판 리스트 전체글 수 에서 제외 됩니다.</p>
<p class="description">글 제목 키워드 설정 제외 옵션 선택시 제외 할 키워드를 입력 안하시면 게시판에 등록된 전체 게시글 숫자가 표시됩니다.</p>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 91e4d9b

Please sign in to comment.