Extra Form
PHP PHP 7.4
CMS Rhymix 2.0

{@
$oComment = &getModel('comment');
$comment_parent = $oComment->getComment($comment->parent_srl);
}
{$comment_parent->getNickName()}

 

대댓글 작성시 위의 내용으로 @닉네임을 사용하는데요

이미지닉네임으로 사용할수 있는 방법이 있을까요?

 

  • ?

    https://xetown.com/thirdparties/694847
    에 해당 기능이 있습니다

     

  • profile

    더 간단한 방법도 있을지 모르겠는데, 일단 이렇게요?
    {@
    $oComment = getModel('comment');
    $comment_parent = $oComment->getComment($comment->parent_srl);
    $memberModel = getModel('member');
    }
    {$memberModel->getImageName($comment_parent->getMemberSrl())}

     

    덧. 실제로 해본 건 아니고 구조상 그런 것 같아요ㅎ

  • ?
    {@
    $oComment = &getModel('comment');
    $comment_parent = $oComment->getComment($comment->parent_srl);
    }
    <a class="member_{$comment_parent->getMemberSrl()}">{$comment_parent->getNickName()}</a>
  • ? profile
    오, a태그를 씌워줘야 이미지 네임이 나오는 거예요?
  • profile ?
    꼭 a 태그는 아닐겁니다. div , span , a 태그 모두 가능할거예요
    ( 그냥 습관적으로 a 태그를 쓰다보니 ^^; )
    member_extra_info 애드온에서 기능을 담당합니다.
  • ? profile
    애드온에서 처리를 해서 가능한 거군요. 덕분에 또 하나 알게 됐습니다. 감사합니다~!
  • ? profile
    알려주신 class="member_{$comment_parent->getMemberSrl()}" 를 추가하니 이미지닉네임으로 잘되네요.

    _comment.html에
    <!--@if($comment->parent_srl !== 0)-->
    {@
    $oComment = &getModel('comment');
    $comment_parent = $oComment->getComment($comment->parent_srl);
    }

    <div class="parent">
    <span style="float: left;" class="member_{$comment_parent->getMemberSrl()}">@{$comment_parent->getNickName()}</span>
    {$comment->getContent(false)}
    </div>
    <!--@end-->

    이렇게 하니 원하는데로 잘되네요.
    감사합니다.