대댓글 수신자 표기
스케치북 기준입니다.
<!--@if($comment->get('parent_srl'))-->
<!--@if(!isset($commenter[$comment->get('parent_srl')]))-->
{@
$comment_args->comment_srl = $comment->get('parent_srl');
$output = executeQuery('comment.getComment', $comment_args);
$commenter[$comment->get('parent_srl')] = $output->data->nick_name;
}
<!--@end-->
<div style="word-break:break-all; word-wrap:break-word" class="c_text" cond="$comment->get('parent_srl')"><font class="comment<!--@if($comment->comment_srl)-->_{$comment->comment_srl}<!--@end--><!--@if($comment->member_srl)-->_{$comment->member_srl}<!--@end--> xe_content"><!--@if($module_info->use_anonymous=='N')--><span style="color:#038464">[@{$commenter[$comment->get('parent_srl')]}]</span> <!--@end--> {$comment->getContent(false)}</font>
</div>
<!--@else-->
<div style="word-break:break-all; word-wrap:break-word" class="c_text" ><font class="comment<!--@if($comment->comment_srl)-->_{$comment->comment_srl}<!--@end--><!--@if($comment->member_srl)-->_{$comment->member_srl}<!--@end--> xe_content"><!--@if($module_info->use_anonymous=='N')--><span style="color:#009caa">[@{$oDocument->getNickName()}]</span><!--@end-->{$comment->getContent(false)}</font>
</div>
---
{$comment->getContent(false)}
이 부분을 위처럼 감싸 주시면 됩니다.
댓글 6
먼저 답변 주셔서 감사합니다. 위의 코드가 아래 이미지 처럼 댓글달때 ...님에게 라고 표기가 되는 코드가 맞는건가요?
@nickname 부분에서 @ 제거하고 뒤에 님에게 부분 추가하시면 됩니다.
<!--@end-->
어떤 에러인지 모르겠지만, 이거를 각각 삭제해보세요.
감사 합니다 뭔가 제가 잘못할수도 있고요 저는 아래 처럼 했습니다
<!--@if($comment->get('parent_srl'))-->
<!--@if(!isset($commenter[$comment->get('parent_srl')]))-->
{@
$comment_args->comment_srl = $comment->get('parent_srl');
$output = executeQuery('comment.getComment', $comment_args);
$commenter[$comment->get('parent_srl')] = $output->data->nick_name;
}
<!--@end-->
그냥 저것으로 교체를 햇습니다