codingeverybody / codingyahac

https://coding.yah.ac
291 stars 50 forks source link

워드프레스 플러그인 커스터마이징 #713

Open jha21vvv opened 5 years ago

jha21vvv commented 5 years ago

해결하고자 하는 문제

현재 워드프레스의 Kboard를 커스터마이징을 해보고 있습니다. 해당업체에서 가르쳐주는것이 초보인 저에게는 이해가 안되서 수정하던중 서버에 오류가 뜨면서 이번에는 미리 코드를 보여드리고 조언을 받고자 합니다. 1.업체에서 알려준대(http://blog.naver.com/PostView.nhn?blogId=chan2rrj&logNo=221216931199 )로 플러그인의 스킨을 변형하여 <요약>창을 적절히 넣었는지?

위의 코드를 제가 editor.php에서 수정했습니다.

option->surmmary?>

위의 코드는 document에서 수정하여 해당문서가 출력되도록 하고자합니다.

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

코드 혹은 오류

isAdmin()):?>
use_category):?> isTreeCategoryActive()):?>
getTreeCategoryDepth(); $i++):?>
initCategory1()):?>
initCategory2()):?>
viewUsernameField()):?>
secret):?> style="display:none">
useCAPTCHA() && !$content->uid):?>
use_editor):?> content, 'kboard_content', array('media_buttons'=>$board->isAdmin(), 'editor_height'=>400))?>
thumbnail_file):?>thumbnail_name?> -
meta->max_attached_count > 0):?> meta->max_attached_count; $attached_index++):?>
attach->{"file{$attached_index}"})):?>attach->{"file{$attached_index}"}[1]?> - " onclick="return confirm('');">
uid):?>
isWriter()):?>

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

(2) document.php

isWriter() && !$content->notice):?>
isEditor() || $board->permission_write=='all'):?>

title?>

content?>
option->surmmary?>
member_uid, 20, '', $content->member_display, array('class'=>'kboard-avatar'))?> member_display, $content->member_uid, $content->member_display, 'kboard', $boardBuilder)?> · date))?> · view?> category1):?> · category1?> category2):?> · category2?> option->tree_category_1):?> getTreeCategoryDepth(); $i++):?> option->{'tree_category_'.$i}?>
isAttached()):?>
첨부파일 getAttachmentList()))?>개
getAttachmentList() as $key=>$attach):?>
visibleComments()):?>
buildComment($content->uid)?>
getReplyList($content->uid);?> hasNextReply()):?>
date))?>
content)?>
getAttachmentList())):?>
getAttachmentList() as $key=>$attach):?>
isEditor() || $board->permission_write=='all'):?>
getPrevUID(); if($bottom_content_uid): $bottom_content = new KBContent(); $bottom_content->initWithUID($bottom_content_uid); ?> « title?>
getNextUID(); if($top_content_uid): $top_content = new KBContent(); $top_content->initWithUID($top_content_uid); ?> title?> »
contribution() && !$board->meta->always_view_list):?>
  1. 리스트의 제목하단에 요약 내용 넣기

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

(1) list.php

​

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); } ?>
set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->set('kboard_list_sort_remember', $board->id)->toInput()?>

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

set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?> initCategory1()):?> initCategory2()):?>

<?php endif?>

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

<?php endif?>

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

Powered by KBoard

<?php endif?>

환경

사용중인 운영체제, 언어, 라이브러리의 버전을 적어주세요. 윈도우 10, html

시도해본 방법

TahoLee commented 5 years ago

위에서 textarea 에 있는것들을 div로 넣고 작업하시려는것으로 생각됩니다. 물론 html에서 작동하는것이라면 문제없을 수 있지만, wordpress 안에서 해당 클래스나 태그가 없어지면 표시가 되던것이 없어질 수 있습니다. 이게 의미하는것은 플러그인이 잘짜여진 세트라는 의미이고, 그런 의존관계를 잘 살펴야만 확실하게 의도하신 일들을 할 수 있을거 같습니다. 그러니까, php파일도 봐야하고, html에서 바뀐부분이 css나 js등에서 다루고 있는지 확인하고, 해당부분을 적절하게 수정해야 할거 같습니다.