울라프

게시판 글쓰기에서 분류 선택 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 조회 9,815
21-11-23 조회 8,714
21-11-23 조회 7,958
21-11-22 조회 9,650
21-11-19 조회 9,550
21-11-17 조회 9,554
21-11-14 조회 1.2만
21-11-12 조회 8,792
21-11-10 조회 9,562
21-11-10 조회 1만
21-11-09 조회 1.4만
21-11-09 조회 9,254
21-11-08 조회 8,224
21-11-06 조회 9,464
21-11-06 조회 1만
21-11-01 조회 1.8만
21-10-31 조회 8,080
21-10-30 조회 8,931
21-10-23 조회 7,999
21-10-20 조회 9,369
21-10-16 조회 7,896
21-10-16 조회 8,416
21-10-14 조회 8,757
21-10-12 조회 8,773
21-10-08 조회 1.1만
21-10-07 조회 8,917
21-10-05 조회 8,936
21-10-03 조회 8,999
21-10-02 조회 8,679
21-09-29 조회 7,993