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

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

QA

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

답변 1

본문

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

권한이 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

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


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값이 필수적으로 들어가야 저 구문이 맞을듯합니다.

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

감사합니다 덕분에 해결되었습니다^^
// 링크이동
$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];
}
}

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 37
© SIRSOFT
현재 페이지 제일 처음으로