2026, 새로운 도약을 시작합니다.

권한에 따라 링크1과 링크2를 줄수 없을까요 채택완료

아미나위젯폴더에 아래부분에

권한이 7일때  link_href'][1]  그밖에는 link_href'][2] 로 코드을 추가하고 싶은데 

어떻게 하나요

/thema/Basic/widget/basic-post-gallery/widget.rows.php

67줄

// 링크이동

$target = '';

if($is_link_target && $list[$i]['wr_link1']) {

$target = $is_link_target;

$list[$i]['href'] = $list[$i]['link_href'][1];

}

1948365965_1554710543.9131.jpg

답변 1개

채택된 답변
+20 포인트

라미나가 뭔지 모르겠지만 ..

Copy


67줄

// 링크이동

$target = '';

if($is_link_target && $list[$i]['wr_link1']) {

$target = $is_link_target;

if($member[mb_level] >= 7){

$list[$i]['href'] = $list[$i]['link_href'][1];

}else{

$list[$i]['href'] = $list[$i]['link_href'][2];

}

}

구문상 링크값1 이 있을때의 경우인데 2값이 필수적으로 들어가야 저 구문이 맞을듯합니다.

위아래 구현된 부분이 어떻게 된지 모르겠네요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

감사합니다 덕분에 해결되었습니다^^
// 링크이동
$target = '';
if($is_link_target && $list[$i]['wr_link1']) {
$target = $is_link_target;
//$list[$i]['href'] = $list[$i]['link_href'][1];
if($_SESSION['ss_mb_id']){
$member = get_member($_SESSION['ss_mb_id']);
if($member['mb_level'] >= 7){
$list[$i]['href'] = $list[$i]['link_href'][1];
}else{
$list[$i]['href'] = $list[$i]['link_href'][2];
}
} else {
$list[$i]['href'] = $list[$i]['link_href'][1];
}
}

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고