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

· 7년 전 · 4099

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

그래서 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 팁자료실

+
제목 글쓴이 날짜 조회
7년 전 조회 3,406
7년 전 조회 5,851
7년 전 조회 4,828
7년 전 조회 7,386
7년 전 조회 6,028
7년 전 조회 3,706
7년 전 조회 5,627
7년 전 조회 5,150
7년 전 조회 3,620
7년 전 조회 3,526
7년 전 조회 3,006
7년 전 조회 7,365
7년 전 조회 4,019
7년 전 조회 4,688
7년 전 조회 4,100
7년 전 조회 5,641
7년 전 조회 4,855
7년 전 조회 3,736
7년 전 조회 5,151
7년 전 조회 3,582
7년 전 조회 8,752
7년 전 조회 1.2만
7년 전 조회 6,652
7년 전 조회 3,688
7년 전 조회 5,040
7년 전 조회 6,386
7년 전 조회 4,832
7년 전 조회 4,029
7년 전 조회 4,449
7년 전 조회 7,842