board.controller.php
procBoardDeleteComment 펑션에
// 댓글 삭제 시 게시물 추천수 차감하기 $obj = Context::getRequestVars(); $obj->module_srl = $this->module_srl; $document_srl = Context::get('document_srl'); $oDocumentModel = &getModel('document'); $oDocument = $oDocumentModel->getDocument($document_srl); $comment_srl = Context::get('comment_srl'); $oCommentModel = getModel('comment'); $oComment = $oCommentModel->getComment($comment_srl, FALSE, FALSE); $star_obj->module_srl = $this->module_srl; $star_obj->document_srl = $obj->document_srl; $star_obj->voted_count = $oDocument->get('voted_count')-$oComment->get('voted_count'); $output = executeQuery('board.voteAdd', $star_obj);
이렇게 넣어줬습니다. 드디어 성공한듯 합니다. ㅠ_ㅠ)/
http://fun.eond.com/index.php?mid=client20170327&comment_srl=380705&document_srl=380082
테스트해봐주세요.
참고
https://github.com/xpressengine/xe-core/blob/master/modules/document/document.model.php#L127
https://github.com/xpressengine/xe-tutorial/tree/master/XML_Query/13_execute_query
http://4880.net/?mid=xe&document_srl=12622&listStyle=viewer&page=5
https://chongmoa.com:45183/xe
https://xe1.xpressengine.com/qna/18275325
http://pilgoo.tistory.com/140
$comment->get('voted_count')
$oCommentModel->getComment
oComment->voted_count
$args->voted_count = $oComment->get('voted_count')