누구나 쉽게 접할수있는 모바일 글쓸때 모바일 아이콘달기 > 그누보드5 팁자료실

그누보드5 팁자료실

누구나 쉽게 접할수있는 모바일 글쓸때 모바일 아이콘달기 정보

누구나 쉽게 접할수있는 모바일 글쓸때 모바일 아이콘달기

본문

원본 팁은 링크 1 에 있습니다.

셋팅 방법
common.lib.php 파일을 열어서 get_list 를 검색한다.
 
그럼 대략 아래쪽에 보시면


    $list['icon_new'] = '';
    if ($board['bo_new'] && $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - ($board['bo_new'] * 3600)))
        $list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" alt="새글">';
 
    $list['icon_hot'] = '';
    if ($board['bo_hot'] && $list['wr_hit'] >= $board['bo_hot'])
        $list['icon_hot'] = '<img src="'.$skin_url.'/img/icon_hot.gif" alt="인기글">';
 
    $list['icon_secret'] = '';
    if (strstr($list['wr_option'], 'secret'))
        $list['icon_secret'] = '<img src="'.$skin_url.'/img/icon_secret.gif" alt="비밀글">';
 

//이게 보이는데 바로 비밀글 밑에다가

    // 모바일 아이콘
    if (strstr($list['wr_10'], 'mobile'))
        $list['icon_secret'] = '<img src="'.$skin_url.'/img/icon_mobile.gif" alt="모바일">';

를 추가 한다 .. 그럼 기본적인 셋팅은 다끝납니다.
 
write.skin.php 를 연다.
 
이 아래의 코드를 찾는다.

    <input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
    <input type="hidden" name="w" value="<?php echo $w ?>">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
    <input type="hidden" name="sca" value="<?php echo $sca ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="sst" value="<?php echo $sst ?>">
    <input type="hidden" name="sod" value="<?php echo $sod ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
//바로 밑에 아래의 소스를 넣는다.
 
<?php if(is_mobile()){ ?>
    <input type="hidden" name="wr_10" value="mobile">
<?php } ?> 
 

그럼 끝!! 그럼 모바일에서 글쓰면 알아서 모바일 아이콘 뜹니다. 이제 모바일 댓글 부분 입니다.
 

 view_comment.skin.php / PC 스킨

$comment = $list[$i]['content'];​
//요넘을 찾아서 아래 와 같이 수정합니다.
 
       if (strstr($list[$i]['wr_10'], 'mobile')){
            $comment = '<img src="'.$board_skin_url.'/img/icon_mobile.gif" alt="모바일"><br>';
        } else {
            $comment = '';
        }
        $comment .= $list[$i]['content']; 

//= = = = = = = = = 요까지
 
 view_comment.skin.php / 모바일 스킨

//댓글쓰는부분에
    <input type="hidden" name="w" value="<?php echo $w ?>" id="w">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
    <input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
    <input type="hidden" name="sca" value="<?php echo $sca ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
    <input type="hidden" name="is_good" value="">
//를 찾아서아래의 소스를 넣는다
<?php if(is_mobile()){ ?>
    <input type="hidden" name="wr_10" value="mobile">
<?php } ?>


그후 모바일에다가 글쓰면 똬!! 간단하죠 ?? 이리저리 스킨 막뜯을필요 없습니다...
추천
2

댓글 7개

common.lib.php 고치고

write.skin.php 에 아래 넣고

<?php if(is_mobile()){ ?>

    <input type="hidden" name="wr_10" value="mobile">

<?php } ?>

모바일에서 글을 쓰니 아이콘이 잘 나나타네요..

그런데 글을 수정하면 아이콘이 어디로 간건지...
찾을 수가 없네요,,유유
왜 그렇까요?
다른거 만들어서 쓰는게 아니라 저 아예 저런 시스템 쓰지두 않아요.. 저지금
http://app.theplug.co.kr/ 개발중이라서...
전체 2,432 |RSS
그누보드5 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT