스킨 커스터마이징, 리스트창에 미리보기 바꾸기

이 사이트에 있는 케이보드 입력창 추가와 블로그에 올리신걸 보고 수정은 했습니다만 워낙 왕초보라서 수정을 잘못해서 php파일문제로 서버가 문제가 생겼었습니다.

그래서 이번에는 한번 맞는지 확인하고 그리고 저를 통해서 정확히 이렇게 하는게 맞는지 정해졌으면 좋겠습니다.

아래의 두 그림은 제가 최종적으로 바꾸고자하는 형태입니다.

1. 글쓰기창



2. 글 리스트 창

 

질문은 크게 두가지입니다. 

 

1.업체에서 알려준대로 플러그인의 스킨을 변형하여 요약창을 넣었는지?

 

2. 어떻게하면 요약창의 내용을 리스트에 표시 가능한지에 관해서입니다.

 

 

 

1. 업체에서 알려준대로 플러그인의 스킨을 변형하여 요약창을 넣었는지?

 

 1) 업체에서 가르쳐준 플러그인 수정 방법

http://blog.naver.com/PostView.nhn?blogId=chan2rrj&logNo=221216931199 

 

게시판 스킨에서 자주 사용되는 파일은 아래와 같습니다.
list.php 파일은 게시판 리스트 페이지 레이아웃입니다.
document.php 파일은 게시글 본문이 출력되는 레이아웃입니다.
editor.php 파일은 게시글 작성폼의 레이아웃입니다.
latest.php 파일은 최신글 레이아웃입니다.
style.css 파일에는 해당 스킨의 CSS 속성이 정의되어 있습니다.

새로운 입력 필드를 추가하시려면 editor.php 파일에 HTML 코드를 추가해주시면 됩니다.

필드의 이름을 "kboard_option_*" 이러한 형식으로 입력해주시면 KBoard(케이보드)에서 자동으로 인식해서 값을 저장하게 됩니다.

 

텍스트(text)

<!-- editor.php 파일에 입력 필드 추가 --> <div class="kboard-attr-row"> <label class="attr-name" for="kboard_option_tel">전화번호</label> <div class="attr-value"><input type="text" id="kboard_option_tel" name="kboard_option_tel" value="<?php echo $content->option->tel?>"></div> </div>

<!-- list.php 혹은 document.php 파일에 저장된 값 출력 --> <?php echo $content->option->tel?>


 

셀렉트(select)

<!-- editor.php 파일에 입력 필드 추가 --> <div class="kboard-attr-row"> <label class="attr-name" for="kboard_option_inquiry_type">문의 유형</label> <div class="attr-value"> <select id="kboard_option_inquiry_type" name="kboard_option_inquiry_type"> <option value="">선택하세요</option> <option value="제작의뢰"<?php if($content->option->inquiry_type == '제작의뢰'):?> selected<?php endif?>>제작의뢰</option> <option value="홍보의뢰"<?php if($content->option->inquiry_type == '홍보의뢰'):?> selected<?php endif?>>홍보의뢰</option> </select> </div> </div>

<!-- list.php 혹은 document.php 파일에 저장된 값 출력 --> <?php echo $content->option->inquiry_type?>


 

라디오(radio)

<!-- editor.php 파일에 입력 필드 추가 --> <div class="kboard-attr-row"> <label class="attr-name" for="kboard_option_inquiry_type">문의 유형</label> <div class="attr-value"> <label> <input type="radio" name="kboard_option_inquiry_type" value="제작의뢰"<?php if($content->option->inquiry_type == '제작의뢰'):?> checked<?php endif?>> 제작의뢰 </label> <label> <input type="radio" name="kboard_option_inquiry_type" value="홍보의뢰"<?php if($content->option->inquiry_type == '홍보의뢰'):?> checked<?php endif?>> 홍보의뢰 </label> </div> </div>

<!-- list.php 혹은 document.php 파일에 저장된 값 출력 --> <?php echo $content->option->inquiry_type?>


 

체크박스(checkbox)

<!-- editor.php 파일에 입력 필드 추가 --> <div class="kboard-attr-row"> <label class="attr-name" for="kboard_option_attendance">참석 여부</label> <div class="attr-value"> <label> <!-- 아래 히든(hidden) 필드의 값은 체크박스가 체크되지 않았을 때 저장할 기본값입니다. --> <input type="hidden" name="kboard_option_attendance" value=""> <input type="checkbox" name="kboard_option_attendance" value="참석함"<?php if($content->option->attendance == '참석함'):?> checked<?php endif?>> 참석함 </label> </div> </div>

<!-- list.php 혹은 document.php 파일에 저장된 값 출력 --> <?php echo $content->option->attendance?> <!-- 저장된 값의 유무에 따라서 원하는 값을 출력할 수 있습니다. --> <?php echo $content->option->attendance ? '참석함' : '참석안함'?>


 

텍스트 에어리어(textarea)

<!-- editor.php 파일에 입력 필드 추가 --> <div class="kboard-attr-row"> <label class="attr-name" for="kboard_option_introduction">자기소개</label> <div class="attr-value"> <textarea id="kboard_option_introduction" name="kboard_option_introduction"><?php echo $content->option->introduction?></textarea> </div> </div>

<!-- list.php 혹은 document.php 파일에 저장된 값 출력 --> <?php echo $content->option->introduction?> <!-- nl2br() 함수 사용 --> <?php echo nl2br($content->option->introduction)?> <!-- wpautop() 함수 사용 --> <?php echo wpautop($content->option->introduction)?>


저장된 입력 필드의 값은 list.php, document.php, latest.php 파일 어디서나 동일하게 출력해서 사용하실 수 있습니다.

 

 

 2) 제가 수정한 내용(추가한부분 굵게 표시)

 - 결과적으로 editor와 document파일만 수정해도 해당 요약 창을 추가할수 있다고 판단했습니다.

  (1) editor.php

<div id="kboard-forum-one-editor">

<form class="kboard-form" method="post" action="<?php echo $url->getContentEditorExecute()?>" enctype="multipart/form-data" onsubmit="return kboard_editor_execute(this);">

<?php wp_nonce_field('kboard-editor-execute', 'kboard-editor-execute-nonce')?>

<input type="hidden" name="action" value="kboard_editor_execute">

<input type="hidden" name="mod" value="editor">

<input type="hidden" name="uid" value="<?php echo $content->uid?>">

<input type="hidden" name="board_id" value="<?php echo $content->board_id?>">

<input type="hidden" name="parent_uid" value="<?php echo $content->parent_uid?>">

<input type="hidden" name="member_uid" value="<?php echo $content->member_uid?>">

<input type="hidden" name="member_display" value="<?php echo $content->member_display?>">

<input type="hidden" name="date" value="<?php echo $content->date?>">

<input type="hidden" name="user_id" value="<?php echo get_current_user_id()?>">

 

<div class="kboard-attr-wrap">

<div class="kboard-attr-row kboard-attr-title">

<label class="attr-name" for="kboard-input-title"><?php echo __('Title', 'kboard')?></label>

<div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>" placeholder="<?php echo __('Title', 'kboard')?>..."></div>

</div>

 

<div class="kboard-attr-row">

<div class="attr-name"><?php echo __('Options', 'kboard')?></div>

<div class="attr-value">

<label class="attr-value-option"><input type="checkbox" name="secret" value="true" onchange="kboard_toggle_password_field(this)"<?php if($content->secret):?> checked<?php endif?>> <?php echo __('Secret', 'kboard')?></label>

<?php if($board->isAdmin()):?>

<label class="attr-value-option"><input type="checkbox" name="notice" value="true"<?php if($content->notice):?> checked<?php endif?>> <?php echo __('Notice', 'kboard')?></label>

<?php endif?>

<?php do_action('kboard_skin_editor_option', $content, $board, $boardBuilder)?>

</div>

</div>

 

<?php if($board->use_category):?>

<?php if($board->isTreeCategoryActive()):?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-tree-category"><?php echo __('Category', 'kboard')?></label>

<div class="attr-value">

<?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>

<input type="hidden" id="tree-category-check-<?php echo $i?>" value="<?php echo $content->option->{'tree_category_'.$i}?>">

<input type="hidden" name="kboard_option_tree_category_<?php echo $i?>" value="">

<?php endfor?>

<div class="kboard-tree-category-wrap"></div>

</div>

</div>

<?php else:?>

<?php if($board->initCategory1()):?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-select-category1"><?php echo __('Category', 'kboard')?>1</label>

<div class="attr-value">

<select id="kboard-select-category1" name="category1">

<option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>

<?php while($board->hasNextCategory()):?>

<option value="<?php echo $board->currentCategory()?>"<?php if($content->category1 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>

<?php endwhile?>

</select>

</div>

</div>

<?php endif?>

<?php if($board->initCategory2()):?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-select-category2"><?php echo __('Category', 'kboard')?>2</label>

<div class="attr-value">

<select id="kboard-select-category2" name="category2">

<option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>

<?php while($board->hasNextCategory()):?>

<option value="<?php echo $board->currentCategory()?>"<?php if($content->category2 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>

<?php endwhile?>

</select>

</div>

</div>

<?php endif?>

<?php endif?>

<?php endif?>

 

<?php if($board->viewUsernameField()):?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-input-member-display"><?php echo __('Author', 'kboard')?></label>

<div class="attr-value"><input type="text" id="kboard-input-member-display" name="member_display" value="<?php echo $content->member_display?>" placeholder="<?php echo __('Author', 'kboard')?>..."></div>

</div>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?></label>

<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('Password', 'kboard')?>..."></div>

</div>

<?php else:?>

<input style="display:none" type="text" name="fake-autofill-fields">

<input style="display:none" type="password" name="fake-autofill-fields">

<!-- 비밀글 비밀번호 필드 시작 -->

<div class="kboard-attr-row secret-password-row"<?php if(!$content->secret):?> style="display:none"<?php endif?>>

<label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?></label>

<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('Password', 'kboard')?>..."></div>

</div>

<!-- 비밀글 비밀번호 필드 끝 -->

<?php endif?>

 

<?php if($board->useCAPTCHA() && !$content->uid):?>

<?php if(kboard_use_recaptcha()):?>

<div class="kboard-attr-row">

<label class="attr-name"></label>

<div class="attr-value"><div class="g-recaptcha" data-sitekey="<?php echo kboard_recaptcha_site_key()?>"></div></div>

</div>

<?php else:?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-input-captcha"><img src="<?php echo kboard_captcha()?>" alt=""></label>

<div class="attr-value"><input type="text" id="kboard-input-captcha" name="captcha" value="" placeholder="<?php echo __('CAPTCHA', 'kboard')?>..."></div>

</div>

<?php endif?>

<?php endif?>

</div>

 

<div class="kboard-content">

<?php if($board->use_editor):?>

<?php wp_editor($content->content, 'kboard_content', array('media_buttons'=>$board->isAdmin(), 'editor_height'=>400))?>

<?php else:?>

<textarea name="kboard_content" id="kboard_content" placeholder="<?php echo __('Content', 'kboard')?>..."><?php echo $content->content?></textarea>

<?php endif?>

</div>

 

<div class="kboard-attr-row">

<label class="attr-name" for="kboard_option_surmmary">요약</label>

<div class="attr-value">

<textarea id="kboard_option_surmmary" name="kboard_option_surmmary"><?php echo $content->option->surmmary?></textarea>

</div>

</div>

 

<div class="kboard-attr-wrap">

<div class="kboard-attr-row">

<label class="attr-name"><?php echo __('Photos', 'kboard')?></label>

<div class="attr-value">

<a href="#" onclick="kboard_editor_open_media();return false;"><?php echo __('KBoard Add Media', 'kboard')?></a>

</div>

</div>

 

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-input-thumbnail"><?php echo __('Thumbnail', 'kboard')?></label>

<div class="attr-value">

<?php if($content->thumbnail_file):?><?php echo $content->thumbnail_name?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid);?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>

<input type="file" id="kboard-input-thumbnail" name="thumbnail" accept="image/*">

</div>

</div>

 

<?php if($board->meta->max_attached_count > 0):?>

<!-- 첨부파일 시작 -->

<?php for($attached_index=1; $attached_index<=$board->meta->max_attached_count; $attached_index++):?>

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-input-file<?php echo $attached_index?>"><?php echo __('Attachment', 'kboard')?><?php echo $attached_index?></label>

<div class="attr-value">

<?php if(isset($content->attach->{"file{$attached_index}"})):?><?php echo $content->attach->{"file{$attached_index}"}[1]?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid, "file{$attached_index}");?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>

<input type="file" id="kboard-input-file<?php echo $attached_index?>" name="kboard_attach_file<?php echo $attached_index?>">

</div>

</div>

<?php endfor?>

<!-- 첨부파일 끝 -->

<?php endif?>

 

<div class="kboard-attr-row">

<label class="attr-name" for="kboard-select-wordpress-search"><?php echo __('WP Search', 'kboard')?></label>

<div class="attr-value">

<select id="kboard-select-wordpress-search" name="wordpress_search">

<option value="1"<?php if($content->search == '1'):?> selected<?php endif?>><?php echo __('Public', 'kboard')?></option>

<option value="2"<?php if($content->search == '2'):?> selected<?php endif?>><?php echo __('Only title (secret document)', 'kboard')?></option>

<option value="3"<?php if($content->search == '3'):?> selected<?php endif?>><?php echo __('Exclusion', 'kboard')?></option>

</select>

</div>

</div>

</div>

 

<div class="kboard-control">

<div class="left">

<?php if($content->uid):?>

<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>" class="kboard-forum-one-button-small"><?php echo __('Back', 'kboard')?></a>

<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-forum-one-button-small"><?php echo __('List', 'kboard')?></a>

<?php else:?>

<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-forum-one-button-small"><?php echo __('Back', 'kboard')?></a>

<?php endif?>

</div>

<div class="right">

<?php if($board->isWriter()):?>

<button type="submit" class="kboard-forum-one-button-small"><?php echo __('Save', 'kboard')?></button>

<?php endif?>

</div>

</div>

</form>

</div>

 

<?php wp_enqueue_script('kboard-forum-one-script', "{$skin_path}/script.js", array(), KBOARD_VERSION, true)?>

 

 

 

  (2) document.php

<div id="kboard-document">

<div id="kboard-forum-one-document">

<div class="kboard-header">

<div class="kboard-control">

<div class="left">

<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-forum-one-button-gray"><?php echo __('List', 'kboard')?></a>

<?php if($board->isWriter() && !$content->notice):?><a href="<?php echo $url->set('parent_uid', $content->uid)->set('mod', 'editor')->toString()?>" class="kboard-forum-one-button-gray"><?php echo __('Reply', 'kboard')?></a><?php endif?>

</div>

<?php if($content->isEditor() || $board->permission_write=='all'):?>

<div class="right">

<a href="<?php echo $url->getContentEditor($content->uid)?>" class="kboard-forum-one-button-gray"><?php echo __('Edit', 'kboard')?></a>

<a href="<?php echo $url->getContentRemove($content->uid)?>" class="kboard-forum-one-button-gray" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete', 'kboard')?></a>

</div>

<?php endif?>

</div>

</div>

 

<div class="kboard-document-wrap" itemscope itemtype="http://schema.org/Article">

<meta itemprop="name" content="<?php echo kboard_htmlclear(strip_tags($content->title))?>">

 

<h1 class="kboard-title"><?php echo $content->title?></h1>

 

<div class="kboard-content" itemprop="description">

<div class="content-view">

<?php echo $content->content?>

</div>

</div>

 

<div class="kboard-content" itemprop="description">

<div class="content-view">

<?php echo $content->option->surmmary?>

</div>

</div>

 

<div class="kboard-detail">

<a>

<?php echo get_avatar($content->member_uid, 20, '', $content->member_display, array('class'=>'kboard-avatar'))?>

<?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?>

</a>

 

·

<?php echo date('Y-m-d H:i', strtotime($content->date))?>

 

·

<?php echo __('Views', 'kboard')?> <?php echo $content->view?>

 

<?php if($content->category1):?>

·

<a href="<?php echo $url->set('category1', $content->category1)->set('pageid', '')->set('target', '')->set('keyword', '')->set('mod', '')->toString()?>#kboard-forum-one-list"><?php echo $content->category1?></a>

<?php endif?>

 

<?php if($content->category2):?>

·

<a href="<?php echo $url->set('category2', $content->category2)->set('pageid', '')->set('target', '')->set('keyword', '')->set('mod', '')->toString()?>#kboard-forum-one-list"><?php echo $content->category2?></a>

<?php endif?>

<?php if($content->option->tree_category_1):?>

<?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>

<?php echo $content->option->{'tree_category_'.$i}?>

<?php endfor?>

<?php endif?>

</div>

 

<div class="kboard-document-action">

<div class="left">

<button type="button" class="kboard-button-action kboard-button-like" onclick="kboard_document_like(this)" data-uid="<?php echo $content->uid?>" title="<?php echo __('Like', 'kboard')?>"><?php echo __('Like', 'kboard')?> <span class="kboard-document-like-count"><?php echo intval($content->like)?></span></button>

<button type="button" class="kboard-button-action kboard-button-unlike" onclick="kboard_document_unlike(this)" data-uid="<?php echo $content->uid?>" title="<?php echo __('Unlike', 'kboard')?>"><?php echo __('Unlike', 'kboard')?> <span class="kboard-document-unlike-count"><?php echo intval($content->unlike)?></span></button>

</div>

<div class="right">

<button type="button" class="kboard-button-action kboard-button-print" onclick="kboard_document_print('<?php echo $url->getDocumentPrint($content->uid)?>')" title="<?php echo __('Print', 'kboard')?>"><?php echo __('Print', 'kboard')?></button>

</div>

</div>

 

<?php if($content->isAttached()):?>

<div class="kboard-attach">

<div class="kboard-attach-title">첨부파일 <?php echo intval(count((array)$content->getAttachmentList()))?>개</div>

<?php foreach($content->getAttachmentList() as $key=>$attach):?>

<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, $key)?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $attach[1])?>"><?php echo $attach[1]?></button>

<?php endforeach?>

</div>

<?php endif?>

</div>

<?php if($content->visibleComments()):?>

<div class="kboard-comments-area"><?php echo $board->buildComment($content->uid)?></div>

<?php else:

$list = new KBContentList();

$list->getReplyList($content->uid);?>

<?php while($reply = $list->hasNextReply()):?>

<div class="kboard-reply-area">

<div class="reply-list-username" itemprop="author">

<?php echo get_avatar($content->member_uid, 20, '', $content->member_display, array('class'=>'kboard-avatar'))?>

<?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?>

</div>

<div class="reply-list-create" itemprop="dateCreated"><?php echo date('Y-m-d H:i', strtotime($content->date))?></div>

<div class="reply-list-content" itemprop="description"><?php echo wpautop($reply->content)?></div>

<div class="reply-list-votes">

<button type="button" class="kboard-button-action kboard-button-like" onclick="kboard_document_like(this)" data-uid="<?php echo $reply->uid?>" title="<?php echo __('Like', 'kboard')?>"><?php echo __('Like', 'kboard')?> <span class="kboard-document-like-count"><?php echo intval($reply->like)?></span></button>

<button type="button" class="kboard-button-action kboard-button-unlike" onclick="kboard_document_unlike(this)" data-uid="<?php echo $reply->uid?>" title="<?php echo __('Unlike', 'kboard')?>"><?php echo __('Unlike', 'kboard')?> <span class="kboard-document-unlike-count"><?php echo intval($reply->unlike)?></span></button>

</div>

<?php if(count((array)$reply->getAttachmentList())):?>

<div class="reply-list-attach">

<?php foreach($reply->getAttachmentList() as $key=>$attach):?>

<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($reply->uid, $key)?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $attach[1])?>"><?php echo $attach[1]?></button>

<?php endforeach?>

</div>

<?php endif?>

<?php if($content->isEditor() || $board->permission_write=='all'):?>

<div class="reply-list-contol">

<a href="<?php echo $url->getContentEditor($reply->uid)?>" class="kboard-forum-one-button-gray"><?php echo __('Edit', 'kboard')?></a>

<a href="<?php echo $url->getContentRemove($reply->uid)?>" class="kboard-forum-one-button-gray" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete', 'kboard')?></a>

</div>

<?php endif?>

</div>

<?php endwhile?>

<?php endif?>

 

<div class="kboard-document-navi">

<div class="kboard-prev-document">

<?php

$bottom_content_uid = $content->getPrevUID();

if($bottom_content_uid):

$bottom_content = new KBContent();

$bottom_content->initWithUID($bottom_content_uid);

?>

<a href="<?php echo $url->getDocumentURLWithUID($bottom_content_uid)?>">

<span class="navi-arrow">«</span>

<span class="navi-document-title kboard-forum-one-cut-strings"><?php echo $bottom_content->title?></span>

</a>

<?php endif?>

</div>

 

<div class="kboard-next-document">

<?php

$top_content_uid = $content->getNextUID();

if($top_content_uid):

$top_content = new KBContent();

$top_content->initWithUID($top_content_uid);

?>

<a href="<?php echo $url->getDocumentURLWithUID($top_content_uid)?>">

<span class="navi-document-title kboard-forum-one-cut-strings"><?php echo $top_content->title?></span>

<span class="navi-arrow">»</span>

</a>

<?php endif?>

</div>

</div>

 

<?php if($board->contribution() && !$board->meta->always_view_list):?>

<div class="kboard-forum-one-poweredby">

<a href="https://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">Powered by KBoard</a>

</div>

<?php endif?>

</div>

</div>

 

 

2. 리스트의 제목하단에 요약 내용 넣기

-어딜 수정할 지 모르겠습니다. views쪽일 것 같긴한데 솔직히 문재가 생길까봐걱정입니다.

   (1) list.php

​<div id="kboard-forum-one-list">

 

<!-- 게시판 정보 시작 -->

<div class="kboard-list-header">

<div class="kboard-left">

<!-- 카테고리 시작 -->

<?php

if($board->use_category == 'yes'){

if($board->isTreeCategoryActive()){

$category_type = 'tree-select';

}

else{

$category_type = 'default';

}

$category_type = apply_filters('kboard_skin_category_type', $category_type, $board, $boardBuilder);

echo $skin->load($board->skin, "list-category-{$category_type}.php", $vars);

}

?>

<!-- 카테고리 끝 -->

</div>

 

<div class="kboard-right">

<form id="kboard-sort-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">

<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->set('kboard_list_sort_remember', $board->id)->toInput()?>

 

<select name="kboard_list_sort" onchange="jQuery('#kboard-sort-form-<?php echo $board->id?>').submit();">

<option value="newest"<?php if($list->getSorting() == 'newest'):?> selected<?php endif?>><?php echo __('Newest', 'kboard')?></option>

<option value="best"<?php if($list->getSorting() == 'best'):?> selected<?php endif?>><?php echo __('Best', 'kboard')?></option>

<option value="viewed"<?php if($list->getSorting() == 'viewed'):?> selected<?php endif?>><?php echo __('Viewed', 'kboard')?></option>

<option value="updated"<?php if($list->getSorting() == 'updated'):?> selected<?php endif?>><?php echo __('Updated', 'kboard')?></option>

</select>

</form>

</div>

</div>

<!-- 게시판 정보 끝 -->

 

<?php if($board->use_category == 'yes'):?>

<div class="kboard-category category-mobile">

<form id="kboard-category-form-<?php echo $board->id?>-mobile" method="get" action="<?php echo $url->toString()?>">

<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>

 

<?php if($board->initCategory1()):?>

<select name="category1" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>-mobile').submit();">

<option value=""><?php echo __('All', 'kboard')?></option>

<?php while($board->hasNextCategory()):?>

<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category1() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>

<?php endwhile?>

</select>

<?php endif?>

 

<?php if($board->initCategory2()):?>

<select name="category2" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>-mobile').submit();">

<option value=""><?php echo __('All', 'kboard')?></option>

<?php while($board->hasNextCategory()):?>

<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category2() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>

<?php endwhile?>

</select>

<?php endif?>

</form>

</div>

<?php endif?>

 

<!-- 리스트 시작 -->

<ul class="kboard-list">

<?php while($content = $list->hasNextNotice()):?>

<li class="kboard-list-notice<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">

<div class="kboard-list-detail">

<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-document">

<div class="kboard-list-item votes">

<?php echo __('Votes', 'kboard')?><br>

<?php echo $content->vote?>

</div>

<div class="kboard-list-item comment">

<?php if($content->visibleComments()):?><?php echo __('댓글', 'kboard')?><br>

<?php echo intval($content->getCommentsCount('', '', '0'))?>

<?php else:?>답글<br>

<?php

global $wpdb;

$reply_count = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `parent_uid` = '{$content->uid}'");

?>

<?php echo $reply_count?>

<?php endif?>

</div>

<div class="kboard-list-item views">

<?php echo __('Views', 'kboard')?><br>

<?php echo $content->view?>

</div>

</a>

</div>

<div class="kboard-list-group">

<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-document">

<div class="kboard-list-title kboard-forum-one-cut-strings">

<?php if($content->isNew()):?><span class="kboard-forum-one-new-notify">New</span><?php endif?>

<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" class="kboard-icon-lock" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>

[<?php echo __('Notice', 'kboard')?>]

<?php echo $content->title?>

</div>

<div class="kboard-list-content kboard-forum-one-cut-strings">

<?php if($content->category1):?><span class="kboard-category"><?php echo $content->category1?> ·</span><?php endif?>

<?php if($content->category2):?><span class="kboard-category"><?php echo $content->category2?> ·</span><?php endif?>

<?php if($content->secret):?>

<?php echo __('Secret', 'kboard')?>

<?php else:?>

<?php

$content->content = str_replace('[', '&#91;', $content->getContent());

$content->content = str_replace(']', '&#93;', $content->getContent());

echo strip_tags($content->content)

?>

<?php endif?>

</div>

</a>

</div>

<div class="kboard-list-moreinfo">

<div class="kboard-list-item author">

<a>

<?php echo get_avatar($content->member_uid, 20, '', $content->member_display, array('class'=>'kboard-avatar'))?><br>

<?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?>

</a>

</div>

<div class="kboard-list-item date">

<?php echo __('Date', 'kboard')?><br>

<?php echo $content->getDate()?>

</div>

</div>

</li>

<?php endwhile?>

<?php while($content = $list->hasNext()):?>

<li class="<?php if($content->uid == kboard_uid()):?>kboard-list-selected<?php endif?>">

<div class="kboard-list-detail">

<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-document">

<div class="kboard-list-item votes">

<?php echo __('Votes', 'kboard')?><br>

<?php echo $content->vote?>

</div>

<div class="kboard-list-item comment">

<?php if($content->visibleComments()):?><?php echo __('댓글', 'kboard')?><br>

<?php echo intval($content->getCommentsCount('', '', '0'))?>

<?php else:?>답글<br>

<?php

global $wpdb;

$reply_count = $wpdb->get_var("SELECT COUNT(*) FROM `{$wpdb->prefix}kboard_board_content` WHERE `parent_uid` = '{$content->uid}'");

?>

<?php echo $reply_count?>

<?php endif?>

</div>

<div class="kboard-list-item views">

<?php echo __('Views', 'kboard')?><br>

<?php echo $content->view?>

</div>

</a>

</div>

<div class="kboard-list-group">

<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-document">

<div class="kboard-list-title kboard-forum-one-cut-strings">

<?php if($content->isNew()):?><span class="kboard-forum-one-new-notify">New</span><?php endif?>

<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" class="kboard-icon-lock" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>

<?php echo $content->title?>

</div>

<div class="kboard-list-content kboard-forum-one-cut-strings">

<?php if($content->category1):?><span class="kboard-category"><?php echo $content->category1?> ·</span><?php endif?>

<?php if($content->category2):?><span class="kboard-category"><?php echo $content->category2?> ·</span><?php endif?>

<?php if($content->option->tree_category_1):?>

<?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>

<span class="kboard-category"><?php echo $content->option->{'tree_category_'.$i}?> ·</span>

<?php endfor?>

<?php endif?>

<?php if($content->secret):?>

<?php echo __('Secret', 'kboard')?>

<?php else:?>

<?php

$content->content = str_replace('[', '&#91;', $content->getContent());

$content->content = str_replace(']', '&#93;', $content->getContent());

echo strip_tags($content->content)

?>

<?php endif?>

</div>

</a>

</div>

<div class="kboard-list-moreinfo">

<div class="kboard-list-item author">

<?php echo get_avatar($content->member_uid, 20, '', $content->member_display, array('class'=>'kboard-avatar'))?><br>

<a><?php echo apply_filters('kboard_user_display', $content->member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?></a>

</div>

<div class="kboard-list-item date">

<?php echo __('Date', 'kboard')?><br>

<?php echo $content->getDate()?>

</div>

</div>

</li>

<?php if($content->visibleComments()):?>

<?php $boardBuilder->builderReply($content->uid)?>

<?php endif?>

<?php endwhile?>

</ul>

<!-- 리스트 끝 -->

 

<!-- 페이징 시작 -->

<div class="kboard-pagination">

<ul class="kboard-pagination-pages">

<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>

</ul>

</div>

<!-- 페이징 끝 -->

 

<!-- 검색폼 시작 -->

<div class="kboard-search">

<form id="kboard-search-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">

<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>

 

<select name="target">

<option value=""><?php echo __('All', 'kboard')?></option>

<option value="title"<?php if(kboard_target() == 'title'):?> selected="selected"<?php endif?>><?php echo __('Title', 'kboard')?></option>

<option value="content"<?php if(kboard_target() == 'content'):?> selected="selected"<?php endif?>><?php echo __('Content', 'kboard')?></option>

<option value="member_display"<?php if(kboard_target() == 'member_display'):?> selected="selected"<?php endif?>><?php echo __('Author', 'kboard')?></option>

</select>

<input type="text" name="keyword" value="<?php echo kboard_keyword()?>">

<button type="submit" class="kboard-forum-one-button-search" title="<?php echo __('Search', 'kboard')?>"><img src="<?php echo $skin_path?>/images/icon-search.png" alt="<?php echo __('Search', 'kboard')?>"></button>

</form>

</div>

<!-- 검색폼 끝 -->

 

<?php if($board->isWriter()):?>

<div class="kboard-control">

<a href="<?php echo $url->getContentEditor()?>" class="kboard-forum-one-button-small"><?php echo __('New', 'kboard')?></a>

</div>

<?php endif?>

 

<?php if($board->contribution()):?>

<div class="kboard-forum-one-poweredby">

<a href="https://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">Powered by KBoard</a>

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기