울라프

게시판 글쓰기에서 분류 선택 radio 버튼으로 바꾸기

  • bbs/write.php 

    263라인 

  •  

     

     

    function get_category_option1($bo_table='', $ca_name='')
    {
        global $g5, $board, $is_admin;

        $categories = explode("|", $board['bo_category_list'].($is_admin?"|공지":"")); // 구분자가 | 로 되어 있음
        $str = "";
        for ($i=0; $i<count($categories); $i++) {
            $category = trim($categories[$i]);
            if (!$category) continue;

            $str .= "<label class='radio'><input type=\"radio\" name=\"ca_name\" value=\"$categories[$i]\" ";
            if($i==0) $str .= ' checked';
            if ($category == $ca_name) {
                $str .= ' checked';
            }
            $str .= ">  $categories[$i]     </label>";
        }

        return $str;
    }
    $category_option1 = '';
    if ($board['bo_use_category']) {
        $ca_name = "";
        if (isset($write['ca_name']))
            $ca_name = $write['ca_name'];
        $category_option1 = get_category_option1($bo_table, $ca_name);
        $is_category = true;
    }

     

     

     

     

     

  •  

  •  

  •  

  • write.skin.php 

  •  

  • <?php if ($is_category) { echo $category_option1;}?>

|

댓글 3개

좋은 팁 공유 감사합니다.
bbs/write.php 위 라인에 저것을 넣으라는 말인가요? 어떤 소스 아래 넣어야 하는 것인지? 조금만 더 자세한 설명 부탁드려도 될까요?
댓글을 작성하시려면 로그인이 필요합니다.
+
제목 글쓴이 날짜 조회
21-11-23 조회 8,757
21-11-23 조회 7,648
21-11-23 조회 6,850
21-11-22 조회 8,173
21-11-19 조회 8,030
21-11-17 조회 8,474
21-11-14 조회 9,067
21-11-12 조회 7,668
21-11-10 조회 8,500
21-11-10 조회 9,022
21-11-09 조회 1.3만
21-11-09 조회 8,211
21-11-08 조회 7,187
21-11-06 조회 8,423
21-11-06 조회 9,208
21-11-01 조회 1.7만
21-10-31 조회 7,011
21-10-30 조회 7,877
21-10-23 조회 6,947
21-10-20 조회 8,314
21-10-16 조회 6,825
21-10-16 조회 7,398
21-10-14 조회 7,687
21-10-12 조회 7,729
21-10-08 조회 9,777
21-10-07 조회 7,875
21-10-05 조회 7,849
21-10-03 조회 7,957
21-10-02 조회 7,587
21-09-29 조회 6,945