묻고답하기
댓글 회원정보에 [최초 가입일]정보를 표시하려합니다. 수정부탁드립니다.
2018.02.08 06:06
1.스케치북 게시판을 사용하고 있습니다.
2.여러가지 글을 보고 코드를 넣었는데...가입일이 표시되긴 하지만 댓글작성자의 가입일이 아니라 게시글 작성자의 가입일로 전부 표시되고 있습니다.
3.해당 코드는 아래와 같습니다.
<!-- 회원정보를 불러옴 -->
{@
$oMemberModel = &getModel('member');
$group_list = $oMemberModel->getGroups($module_info->site_srl);
$member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->getMemberSrl(), $module_info->site_srl);
$extend_form_list = $oMemberModel->getCombineJoinForm($member_info);
}
<!--// Comment v2 -->
<a cond="$mi->fdb_style=='fdb_v2' && $mi->default_style!='guest'" class="nametag ui_font bubble" href="#" onclick="jQuery(this).nextAll('ul,.bd_pg').slideToggle();return false" title="Click! {$lang->comment} {$lang->cmd_view}~"><strong class="bg_color bx_shadow">Comment <b>'{$oDocument->getCommentcount()}'</b></strong></a>
<!--// Comment v1 -->
<block cond="$oDocument->getCommentcount()">
<div cond="!$mi->fdb_style" class="fdb_tag<!--@if($mi->cmt_wrt_position=='cmt_wrt_btm')--> bg_f_f9 css3pie<!--@end-->">
<a class="ui_font bubble" href="#" onclick="jQuery(this).parent().nextAll('ul,.bd_pg').slideToggle();return false" title="{$lang->comment} {$lang->cmd_view}">Comments <b>'{$oDocument->getCommentcount()}'</b></a>
</div>
<ul class="fdb_lst_ul {$mi->fdb_hide}">
<block loop="$oDocument->getComments()=>$key,$comment">
<!--@if($comment->get('depth'))-->
<li id="comment_{$comment->comment_srl}" class="fdb_itm clear re bg{($comment->get('depth'))%2}" style="margin-left:{(($comment->get('depth')-1)%10+1)*2}%">
<i class="fa fa-share fa-flip-vertical re"></i><i cond="$comment->get('depth')>10" class="fa fa-share fa-flip-vertical re rere"></i>
<!--@else-->
<li id="comment_{$comment->comment_srl}" class="fdb_itm clear">
<!--@end-->
<!--// 프로필 -->
<block cond="!$mi->profile_img">
<img cond="$comment->getProfileImage()" class="profile img" src="{$comment->getProfileImage()}" alt="profile" />
<span cond="!$comment->getProfileImage()" class="profile img no_img">?</span>
</block>
<!--// 댓글 정보 -->
<div class="meta">
<a cond="$comment->member_srl" href="#popup_menu_area" class="member_{$comment->member_srl}" onclick="return false">{$comment->getNickName()}</a>
<a cond="!$comment->member_srl && $comment->homepage" href="{$comment->getHomepageUrl()}" target="_blank">{$comment->getNickName()}</a>
<b cond="!$comment->member_srl && !$comment->homepage">{$comment->getNickName()}</b>
<span>가입일 : {zdate($member_info->regdate, "Y-m-d")}</span></b>
<span class="date">{getTimeGap($comment->get('regdate'), "Y.m.d H:i")}</span></b>
<!--댓글 글작상자인경우 표시 추가-->
<!--@ if($comment->member_srl==$oDocument->variables[member_srl])-->
<span style="display: inline-block; width: 66px; height: 18px; margin-right: 2px; border-style: solid; border-width: 1px; border-radius: 10px;font-size: 11px; font-weight: normal; letter-spacing: -1px; line-height: 22px; text-align: center;text-indent: -1px;">작성자 댓글</sapn>
<!--@end-->
4.그림 첨부합니다. 감사합니다.
댓글 6
-
sejin7940
2018.02.08 08:09
-
Sean19
2018.02.08 12:49
Sejin7940 님 이렇게 하는것이 맞나요? modules/board/skins/sketchbook5/_comment.html
적용화면 입니다. 게시판이 깨집니다. 댓글도 보이지 않구요.
---------------------------------------------------------------------------<!--// Comment v2 -->
<a cond="$mi->fdb_style=='fdb_v2' && $mi->default_style!='guest'" class="nametag ui_font bubble" href="#" onclick="jQuery(this).nextAll('ul,.bd_pg').slideToggle();return false" title="Click! {$lang->comment} {$lang->cmd_view}~"><strong class="bg_color bx_shadow">Comment <b>'{$oDocument->getCommentcount()}'</b></strong></a><!--// Comment v1 -->
<block cond="$oDocument->getCommentcount()">
<div cond="!$mi->fdb_style" class="fdb_tag<!--@if($mi->cmt_wrt_position=='cmt_wrt_btm')--> bg_f_f9 css3pie<!--@end-->">
<a class="ui_font bubble" href="#" onclick="jQuery(this).parent().nextAll('ul,.bd_pg').slideToggle();return false" title="{$lang->comment} {$lang->cmd_view}">Comments <b>'{$oDocument->getCommentcount()}'</b></a>
</div><ul class="fdb_lst_ul {$mi->fdb_hide}">
<block loop="$oDocument->getComments()=>$key,$comment">
{@
$oMemberModel = getModle('comment');
$member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl);
}
<!--@if($comment->get('depth'))-->
<li id="comment_{$comment->comment_srl}" class="fdb_itm clear re bg{($comment->get('depth'))%2}" style="margin-left:{(($comment->get('depth')-1)%10+1)*2}%">
<i class="fa fa-share fa-flip-vertical re"></i><i cond="$comment->get('depth')>10" class="fa fa-share fa-flip-vertical re rere"></i>
<!--@else-->
<li id="comment_{$comment->comment_srl}" class="fdb_itm clear">
<!--@end-->
<!--// 프로필 -->
<block cond="!$mi->profile_img">
<img cond="$comment->getProfileImage()" class="profile img" src="{$comment->getProfileImage()}" alt="profile" />
<span cond="!$comment->getProfileImage()" class="profile img no_img">?</span>
</block>
<!--// 댓글 정보 -->
<div class="meta">
<a cond="$comment->member_srl" href="#popup_menu_area" class="member_{$comment->member_srl}" onclick="return false">{$comment->getNickName()}</a>
<a cond="!$comment->member_srl && $comment->homepage" href="{$comment->getHomepageUrl()}" target="_blank">{$comment->getNickName()}</a>
<b cond="!$comment->member_srl && !$comment->homepage">{$comment->getNickName()}</b>
<span>가입일 : {zdate($member_info->regdate, "Y-m-d")}</span></b>
<span class="date">{getTimeGap($comment->get('regdate'), "Y.m.d H:i")}</span></b> -
sejin7940
2018.02.08 13:20
오타가 있었네요 왜 저렇게 쓴건지 모르겠네요 ㅡㅡ;
$oMemberModel = getModle('comment'); 가 아니라
$oMemberModel = getModel('member'); 로 고쳐주시면 될거예요
-
Sean19
2018.02.08 13:38
죄송하지만
<block loop="$oDocument->getComments()=>$key,$comment">
밑에 바로
{@
$oMemberModel = getModle('member');
$member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl);
}이렇게 코드만 넣으면 그림에서와 같이 게시판이 깨지네요. 제가 잘못하나봐요....
-
sejin7940
2018.02.08 13:44
$oMemberModel = getModle('member');
이 아니라
$oMemberModel = getModel('member');
-
Sean19
2018.02.08 13:48
정말 감사합니다. 글자 하나를 제가 그냥 지나쳤군요. 세세한 부분까지 신경써 주셔서 감사합니다.
작동 잘 됩니다.
제일 위의 부분은 빼고...
<block loop="$oDocument->getComments()=>$key,$comment">
아래에다가 추가
{@
$oMemberModel = getModle('comment');
$member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl);
}