1

주제: r1281 'ViewCommentListTitle' 이벤트 적용위치 문제

'ViewCommentListTitle' 이벤트가 추가되었는데 현재 위치가 댓글 'rplist_conform'에 위치하여 있는데
저번에 말씀드린 이벤트는 'rplist_rep_body'에 붙혀야 하는 것으로 말씀드린 사항입니다.
'list_conform'에도 이벤트가 붙었으니 'rplist_conform'에도 붙어도 괜찮겠네요. 추가로 'rplist_rep_body'에도 이벤트를
주셨으면 합니다. 'ViewCommentListBody'로 하면 될것 같습니다. 사용스킨에 따라 검색시 댓글 body 목록의 길이제한이
70으로 되어있는데 스킨폭이 작을경우 깨지는 경우가 있어 'rplist_conform'이벤트도 필요하다고 말씀드린 것입니다.
'rplist_conform'이벤트의 경우는 길이제한없는  $mother값을 주어 활용하면 될것 같습니다.
아래 정리를 해봤습니다.

- 수정 희망 코드

<?php
$commentListView = $skin->commentList;
$itemsView = '';
foreach ($commentList['items'] as $item) {
    $itemView = $skin->commentListItem;
    dress('rplist_rep_regdate', fireEvent('ViewCommentListDate', Timestamp::format3($item['written'])), $itemView);
    dress('rplist_rep_link', "$blogURL/{$item['entry']}#comment{$item['id']}", $itemView);
    dress('rplist_rep_name', htmlspecialchars($item['name']), $itemView);
    dress('rplist_rep_body', htmlspecialchars(fireEvent('ViewCommentListBody', UTF8::lessenAsEm($item['comment'], 70), $item['comment'])), $itemView);
    $itemsView .= $itemView;
}
dress('rplist_rep', $itemsView, $commentListView);
dress('rplist_conform', htmlspecialchars(fireEvent('ViewCommentListTitle', $commentList['title'])), $commentListView);
dress('rplist_count', count($commentList['items']), $commentListView);
dress('rplist', $commentListView, $view);
?>

jparker (2006-09-08 23:49:20)에 의해 마지막으로 수정

당신의 삶속에 매화꽃 향기처럼 늘 아름다운 향기로 가득하길...
# J.Parker

2

답글: r1281 'ViewCommentListTitle' 이벤트 적용위치 문제

넵 확인후 붙이겠습니다 smile

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

3

답글: r1281 'ViewCommentListTitle' 이벤트 적용위치 문제

ㅡㅡ;; 죄송합니다. 흘려 들어서 그런 게 아니고... 이벤트 붙일 때 딴 생각을 했...