회원 프로필 옆 인증아이콘 추가
본문
커뮤니티 사이트에서 공식채널이라는 서비스를 운영하려고 하는데요,
아래 사진처럼 정해진 그룹에 해당될경우 닉네임 옆에 아이콘을 추가하려고 합니다.
어떻게 해야 하나요?
제가 초보라서 쉽게 설명 해 주세요!
답변 4
회원은 레벨로 관리됩니다.
정해진 그룹에 해당되는 회원인경우 > 레벨 5라고 가정하고 뷰페이지를 예로들면
<?php
if ($member[mb_level] == 5) {
echo $view['name']."<img src=\"인증아이콘주소\">";
} else {
echo $view['name'];
}
?>
위와같이 사용 가능하겠네요.
!-->jquery로드하셨나요?
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>
<head>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<script src="<?php echo G5_JS_URL; ?>/jquery-1.12.4.min.js"></script>
</head>
<!-- 게시물 읽기 시작 { -->
<article id="bo_v" style="width:<?php echo $width; ?>">
<header>
<h2 id="bo_v_title">
<?php if ($category_name) { ?>
<span class="bo_v_cate"><?php echo $view['ca_name']; // 분류 출력 끝 ?></span>
<?php } ?>
<span class="bo_v_tit">
<?php
echo cut_str(get_text($view['wr_subject']), 70); // 글제목 출력
?></span>
</h2>
</header>
<section id="bo_v_info">
<h2>페이지 정보</h2>
<div class="profile_info">
<div class="pf_img"><?php echo get_member_profile_img($view['mb_id']) ?></div>
<div class="profile_info_ct">
<span class="sound_only">작성자</span> <strong><?php echo $view['name'] ?><?php if ($member[mb_level] == 4) { echo "<img src="https://clean-writing.site/img/official.png">"; } ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong><br>
<span class="sound_only">댓글</span><strong><a href="#bo_vc"> <i class="fa fa-commenting-o" aria-hidden="true"></i> <?php echo number_format($view['wr_comment']) ?>건</a></strong>
<span class="sound_only">조회</span><strong><i class="fa fa-eye" aria-hidden="true"></i> <?php echo number_format($view['wr_hit']) ?>회</strong>
<strong class="if_date"><span class="sound_only">작성일</span><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
</div>
</div>
현재상태를보면 아래 공지사항 https://clean-writing.site/virus_info head부분과
<head>
<link rel="shortcut icon" href="./theme/community54/img/favicon.ico">
<meta charset="utf-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>바이러스 정보봇 1 페이지 | Clean Writing</title>
<link rel="stylesheet" href="https://clean-writing.site/theme/community54/css/default.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/js/font-awesome/css/font-awesome.min.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/theme/community54/skin/connect/basic/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/theme/community54/skin/outlogin/basic/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/theme/community54/skin/latest/basic/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/skin/board/basic/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/plugin/google_otp/skin/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/skin/social/style.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/js/remodal/remodal.css?ver=191202">
<link rel="stylesheet" href="https://clean-writing.site/js/remodal/remodal-default-theme.css?ver=191202">
<!--[if lte IE 8]>
<script src="https://clean-writing.site/js/html5.js"></script>
<![endif]-->
<script>
// 자바스크립트에서 사용하는 전역변수 선언
var g5_url = "https://clean-writing.site";
var g5_bbs_url = "https://clean-writing.site/bbs";
var g5_is_member = "";
var g5_is_admin = "";
var g5_is_mobile = "";
var g5_bo_table = "virus_info";
var g5_sca = "";
var g5_editor = "smarteditor2";
var g5_cookie_domain = "";
</script>
<script src="https://clean-writing.site/js/jquery-1.12.4.min.js"></script>
<script src="https://clean-writing.site/js/jquery-migrate-1.4.1.min.js"></script>
<script src="https://clean-writing.site/js/jquery.menu.js?ver=191202"></script>
<script src="https://clean-writing.site/js/common.js?ver=191202"></script>
<script src="https://clean-writing.site/js/wrest.js?ver=191202"></script>
<script src="https://clean-writing.site/js/placeholders.min.js"></script>
<script src="https://clean-writing.site/js/remodal/remodal.js"></script>
</head>
아래 공지글 보여지는 view페이지 https://clean-writing.site/virus_info/2 의 head내용이 다르게 보여지네요.
<head>
<link rel="shortcut icon" href="./theme/community54/img/favicon.ico">
<meta charset="utf-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>[바이러스 정보봇] 신종 코로나바이러스 [20-03-08-01호] > 바이러스 정보봇 | Clean Writing</title>
<link rel="stylesheet" href="https://clean-writing.site/theme/community54/css/default.css?ver=191202">
<!--[if lte IE 8]>
<script src="https://clean-writing.site/js/html5.js"></script>
<![endif]-->
<script>
// 자바스크립트에서 사용하는 전역변수 선언
var g5_url = "https://clean-writing.site";
var g5_bbs_url = "https://clean-writing.site/bbs";
var g5_is_member = "";
var g5_is_admin = "";
var g5_is_mobile = "";
var g5_bo_table = "virus_info";
var g5_sca = "";
var g5_editor = "smarteditor2";
var g5_cookie_domain = "";
</script>
</head>
주소표기방식을보더라도 기본 그누보드와 달라보이는데 뭔가 변경이 많이된 상태라면 전체 데이터를 체크해보지 않는이상 정확한 답변을 드리기 어렵습니다.
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.