테스트 사이트 - 개발 중인 베타 버전입니다

특정페이지에서만 모바일 접속시 모바일페이지로

뚜비두밥밥 10년 전 조회 3,409

현재 반응형 웹으로 작업 중이여서 

common.php 파일에서

 

if (G5_USE_MOBILE && $set_device) {

    if ($_REQUEST['device']=='pc')

        $is_mobile = false;

    else if ($_REQUEST['device']=='mobile')

        $is_mobile = false;

    else if (isset($_SESSION['ss_is_mobile']))

        $is_mobile = $_SESSION['ss_is_mobile'];

    else if (is_mobile())

        $is_mobile = false;

} else {

    $set_device = false;

}

 

이렇게 수정을 해놓았습니다.

 

그리고 특정페이지에서만 모바일로 접속시 모바일 스킨을 사용하려고 하는데요.

 

혼자서 해결해보려 하는데 방법을 모르겠네요..

 

위 코드를 복사해서 특정페이지 부분에만

 

if (G5_USE_MOBILE && $set_device) {

    if ($_REQUEST['device']=='pc')

        $is_mobile = false;

    else if ($_REQUEST['device']=='mobile')

        $is_mobile = true;

    else if (isset($_SESSION['ss_is_mobile']))

        $is_mobile = $_SESSION['ss_is_mobile'];

    else if (is_mobile())

        $is_mobile = true;

} else {

    $set_device = false;

}

 

if (G5_IS_MOBILE) {

$itemuseform_skin = G5_MSHOP_SKIN_PATH.'/itemuseform.skin.php';

} else {

echo G5_MSHOP_SKIN_PATH;

$itemuseform_skin = G5_SHOP_SKIN_PATH.'/itemuseform.skin.php';

}

 

이런식으로 해보아도 안됩니다..

 

혹시 어떻게 하시는지 아시는 분 있나요? ㅠㅠ

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

답변 1개

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

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

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

로그인