Skip to content

Commit

Permalink
Merge pull request gnuboard#251 from damoang/feature/hide-nick
Browse files Browse the repository at this point in the history
fix: 닉네임 가리기 기능 개선
  • Loading branch information
damaong authored Jul 5, 2024
2 parents 20860ea + aa7e3fc commit 5c03010
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,17 @@
<i class="bi bi-arrow-return-right"></i>
<span class="visually-hidden">대댓글</span>
<?php } ?>

<!-- 댓글 작성자 -->
<?php if ($boset->isProfileRenderable() || $member->isAuthor($list[$i]['mb_id'])) { ?>
<span class="visually-hidden">작성자</span>
<span class="d-inline-block"><?php echo na_name_photo($list[$i]['mb_id'], $list[$i]['name']); ?></span>
<?php
// 회원 메모
echo $list[$i]['da_member_memo'] ?? '';
?>
(<?php echo $list[$i]['ip'] ?>)
<?php } ?>
</div>
<div>
<?php include(G5_SNS_PATH.'/view_comment_list.sns.skin.php'); // SNS ?>
Expand All @@ -213,13 +217,15 @@
</div>
<?php } ?>
<div class="<?php echo $is_convert ?>">
<?php if ($boset->isProfileRenderable()) { ?>
<?php if ($comment_depth) { ?>
<?php if ($parent_wr_name) { ?>
<em class="da-commented-to"><strong>@<?= $parent_wr_name ?></strong>님에게 답글</em>
<?php } else { ?>
<em class="da-commented-to">다른 누군가에게 답글</em>
<?php } ?>
<?php } ?>
<?php } ?>
<?php
$is_lock = false;
if (strstr($list[$i]['wr_option'], "secret")) {
Expand Down Expand Up @@ -249,7 +255,7 @@
}
?>
<?php if ($list[$i]['is_reply']) { ?>
<button type="button" class="btn btn-basic" onclick="comment_box('<?php echo $comment_id ?>','c','<?php echo $comment_name;?>');" class="btn btn-basic btn-sm" title="답글">
<button type="button" class="btn btn-basic" onclick="comment_box('<?php echo $comment_id ?>','c','<?php echo ($boset->isProfileRenderable()) ? $comment_name : '*'; ?>');" class="btn btn-basic btn-sm" title="답글">
<i class="bi bi-chat-dots"></i>
답글
</button>
Expand Down
4 changes: 2 additions & 2 deletions theme/damoang/skin/board/basic/list/list/list.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
</span>
<?php } ?>

<?php if (($boset['check_list_hide_profile'] ?? null) !== '1' || ($is_admin === 'super' || $row['mb_id'] === ($member['mb_id'] ?? ''))) { ?>
<?php if ($boset->isProfileRenderable() || $row['mb_id'] === ($member['mb_id'] ?? null)) { ?>
<?php /* 회원메모 출력 */
if ($row['da_member_memo'] ?? '') { ?>
<!-- 다모앙 회원 메모 -->
Expand All @@ -176,7 +176,7 @@
<div class="da-list-meta">
<div class="d-flex gap-2">
<?php /******** 글쓴이 프사+이름 ********/ ?>
<?php if (($boset['check_list_hide_profile'] ?? null) !== '1' || ($is_admin === 'super' || $row['mb_id'] === ($member['mb_id'] ?? ''))) { ?>
<?php if ($boset->isProfileRenderable() || $member->isAuthor($row['mb_id'])) { ?>
<div class="wr-name ms-auto order-last order-md-1 text-truncate">
<?php
$wr_name = ($row['mb_id']) ? str_replace('sv_member', 'sv_member text-truncate d-block', $row['name']) : str_replace('sv_guest', 'sv_guest text-truncate d-block', $row['name']);
Expand Down
62 changes: 31 additions & 31 deletions theme/damoang/skin/board/basic/view/basic/view.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@
<div
class="d-flex justify-content-end align-items-center line-top border-bottom bg-body-tertiary py-2 px-3 small">
<div class="me-auto">
<span class="visually-hidden">작성자</span>
<span class="d-inline-block"><?= na_name_photo($view['mb_id'], $view['name']); ?></span>
<?php
// 회원 메모
echo $view['da_member_memo'] ?? '';
?>
<span class="d-block"><?php echo $ip; ?></span>
<?php if ($boset->isProfileRenderable() || $member->isAuthor($view['mb_id'])) { ?>
<span class="visually-hidden">작성자</span>
<span class="d-inline-block"><?= na_name_photo($view['mb_id'], $view['name']); ?></span>
<?php
// 회원 메모
echo $view['da_member_memo'] ?? '';
?>
<span class="d-block"><?php echo $ip; ?></span>
<?php } ?>
</div>
<div>
<span class="visually-hidden">작성일</span>
Expand Down Expand Up @@ -529,32 +531,30 @@ class="btn good-border <?php echo ($bg_status == 'nogood') ? 'btn-primary' : 'bt

<?php //echo na_widget('damoang-image-banner', 'board-head'); ?>

<?php if ($is_signature && $view['mb_id']) { // 서명 ?>
<?php
// 캐시에 문제가 있어서 일단 주석 구원자님 오시면 해결 후 다시 적용해야 함
//echo na_widget('mb-sign', "member-{$view['mb_id']}."-".$bo_table", 'cache=10');
?>
<?php echo na_widget('mb-sign'); ?>
<?php } else { ?>
<div class="row row-cols-1 row-cols-md-2 align-items-center">
<div class="text-center mb-2 mb-sm-0">
<img src="<?php echo na_member_photo($mbs['mb_id']) ?>" class="rounded-circle">
</div>
<div class="clearfix f-sm">
<span class="float-start d-flex">
<?php echo na_xp_icon($mbs['mb_id'], '', $mbs) ?>
<?php echo $view['name'] ?>
</span>
<span class="float-end">
Exp <?php echo number_format($mb['as_exp']) ?>
</span>
</div>
<div class="progress" title="레벨업까지 <?php echo number_format($mbs['as_max'] - $mbs['as_exp']);?> 경험치 필요">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?php echo $per ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $per ?>%">
<span class="sr-only"><?php echo $per ?>%</span>
<?php if ($boset->isProfileRenderable() || $member->isAuthor($view['mb_id'])) { ?>
<?php if ($is_signature && $view['mb_id']) { // 서명 ?>
<?php echo na_widget('mb-sign'); ?>
<?php } else { ?>
<div class="row row-cols-1 row-cols-md-2 align-items-center">
<div class="text-center mb-2 mb-sm-0">
<img src="<?php echo na_member_photo($mbs['mb_id']) ?>" class="rounded-circle">
</div>
<div class="clearfix f-sm">
<span class="float-start d-flex">
<?php echo na_xp_icon($mbs['mb_id'], '', $mbs) ?>
<?php echo $view['name'] ?>
</span>
<span class="float-end">
Exp <?php echo number_format($mb['as_exp']) ?>
</span>
</div>
<div class="progress" title="레벨업까지 <?php echo number_format($mbs['as_max'] - $mbs['as_exp']); ?> 경험치 필요">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?php echo $per ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $per ?>%">
<span class="sr-only"><?php echo $per ?>%</span>
</div>
</div>
</div>
</div>
<?php } ?>
<?php } ?>

<?php if ($view['wr_8']) { ?>
Expand Down

0 comments on commit 5c03010

Please sign in to comment.