제

write_update.skin.php 모바일 PC 동시 사용하기

· 2019-01-24 (목) 20:18:07 · 6970

스킨수정을 할때 업데이트 파일 한쪽만 수정해서 난감한때가 간혹 있습니다..

그래서 PC쪽에만 사용하도록 수정해 보았습니다..

 

common.php

 

//==============================================================================
//------------------------------------------------------------------------------
if (G5_IS_MOBILE) {
    $board_skin_path    = get_skin_path('board', $board['bo_mobile_skin']);
    $board_skin_url     = get_skin_url('board', $board['bo_mobile_skin']);
    $member_skin_path   = get_skin_path('member', $config['cf_mobile_member_skin']);
    $member_skin_url    = get_skin_url('member', $config['cf_mobile_member_skin']);
    $new_skin_path      = get_skin_path('new', $config['cf_mobile_new_skin']);
    $new_skin_url       = get_skin_url('new', $config['cf_mobile_new_skin']);
    $search_skin_path   = get_skin_path('search', $config['cf_mobile_search_skin']);
    $search_skin_url    = get_skin_url('search', $config['cf_mobile_search_skin']);
    $connect_skin_path  = get_skin_path('connect', $config['cf_mobile_connect_skin']);
    $connect_skin_url   = get_skin_url('connect', $config['cf_mobile_connect_skin']);
    $faq_skin_path      = get_skin_path('faq', $config['cf_mobile_faq_skin']);
    $faq_skin_url       = get_skin_url('faq', $config['cf_mobile_faq_skin']);
} else {
    $board_skin_path    = get_skin_path('board', $board['bo_skin']);
    $board_skin_url     = get_skin_url('board', $board['bo_skin']);
    $member_skin_path   = get_skin_path('member', $config['cf_member_skin']);
    $member_skin_url    = get_skin_url('member', $config['cf_member_skin']);
    $new_skin_path      = get_skin_path('new', $config['cf_new_skin']);
    $new_skin_url       = get_skin_url('new', $config['cf_new_skin']);
    $search_skin_path   = get_skin_path('search', $config['cf_search_skin']);
    $search_skin_url    = get_skin_url('search', $config['cf_search_skin']);
    $connect_skin_path  = get_skin_path('connect', $config['cf_connect_skin']);
    $connect_skin_url   = get_skin_url('connect', $config['cf_connect_skin']);
    $faq_skin_path      = get_skin_path('faq', $config['cf_faq_skin']);
    $faq_skin_url       = get_skin_url('faq', $config['cf_faq_skin']);
}
$board_skin_pc_path    = get_skin_pc_path('board', $board['bo_skin']);
//==============================================================================

 

write_update.php

@include_once($board_skin_pc_path.'/write_update.skin.php');
@include_once($board_skin_path.'/write_update.tail.skin.php');

 

 

common.lib.php

 

function get_skin_pc_path($dir, $skin)
{
    global $config;

    if(preg_match('#^theme/(.+)$#', $skin, $match)) {
        $theme_path = '';
        $cf_theme = trim($config['cf_theme']);

        $theme_path = G5_PATH.'/'.G5_THEME_DIR.'/'.$cf_theme;
        $skin_path = $theme_path.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
    } else {
        $skin_path = G5_SKIN_PATH.'/'.$dir.'/'.$skin;
    }

    return $skin_path;
}

 

이렇게 바꿔버리면 pc쪽 파일을 동시에 사용합니다..

 

 

 

 

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

그누보드5 팁자료실

2,790건
+
제목 글쓴이 날짜 조회
19-02-08 조회 8,968
19-02-07 조회 6,666
19-02-07 조회 8,739
19-02-06 조회 8,285
19-02-02 조회 6,605
19-02-01 조회 6,345
19-01-31 조회 5,777
19-01-28 조회 1만
19-01-28 조회 6,816
19-01-27 조회 7,502
19-01-24 조회 6,971
19-01-22 조회 8,567
19-01-22 조회 7,771
19-01-21 조회 6,605
19-01-20 조회 8,107
19-01-18 조회 6,398
19-01-15 조회 1.2만
19-01-15 조회 1.5만
19-01-14 조회 1만
19-01-14 조회 6,621
19-01-13 조회 7,884
19-01-10 조회 9,326
19-01-10 조회 7,668
19-01-08 조회 6,904
19-01-06 조회 7,398
19-01-06 조회 1.1만
18-12-31 조회 1만
18-12-31 조회 8,210
18-12-28 조회 7,291
18-12-28 조회 1만