웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
게시판 확장변수에 라디오버튼 추가해서 사용하기
2008.03.04 02:56
2틀간의 삽질끝에 알아낸 방법입니다.
![](https://xe1.xpressengine.com/files/attach/images/121/16568343/radio.gif)
아래 방법은 부족한 프로그램 실력으로 머릴 최대한 쥐어짜서 나름대로 만든것이니 그냥 귀엽게 봐주세요.
분명 이것 말고 더 간단한 방법이 있는것 같은데...ㅡ.ㅡ;;;
일단 수정해야 할 파일은 3가지 입니다.
$lang->column_type_list['+ 'radio'] = '라디오버튼 (radio)';
이부분을 추가해줍니다.
<!-- 라디오버튼 -->
<!--@elseif($val->type == 'radio')-->
{htmlspecialchars($val->value)}
이부분을 추가해 줍니다.
마지막으로
이부분을 추가해 줍니다.
추가하는 위치는
<!-- 단일 선택 -->
<!-- 라디오버튼 -->
<!-- 날짜 입력 -->
붉은색 부분입니다.
위 소스가 조건문의 한 부분이기때문에 위 붉은색 부분 위치에 넣으시면 문제가 없을겁니다.
확장필드 추가에 주소와 이미지 업로드 기능도 빨리 밝혀 내었으면 좋겠는데..
고수님들 실력 발휘좀 해주삼.
![](https://xe1.xpressengine.com/files/attach/images/121/16568343/radio.gif)
아래 방법은 부족한 프로그램 실력으로 머릴 최대한 쥐어짜서 나름대로 만든것이니 그냥 귀엽게 봐주세요.
분명 이것 말고 더 간단한 방법이 있는것 같은데...ㅡ.ㅡ;;;
일단 수정해야 할 파일은 3가지 입니다.
/zbxe/common/lang/ko.lang.php 파일 213라인 정도 $lang->column_type = '형식'; $lang->column_type_list['text'] = '한줄 입력칸 (text)'; $lang->column_type_list['+ '+ 'homepage'] = '홈페이지 형식 (url)'; $lang->column_type_list['email_address'] = '이메일 형식 (email)'; $lang->column_type_list['tel'] = '전화번호 형식 (phone)'; $lang->column_type_list['textarea'] = '여러줄 입력칸 (textarea)'; $lang->column_type_list['checkbox'] = '다중 선택 (checkbox)'; $lang->column_type_list['select'] = '단일 선택 (select)'; $lang->column_type_list['radio'] = '+ '라디오버튼 (radio)'; $lang->column_type_list['kr_zip'] = '한국주소 (zip)'; $lang->column_type_list['date'] = '일자 (년월일)'; //$lang->column_type_list['jp_zip'] = '일본주소 (zip)'; $lang->column_name = '입력항목 이름'; $lang->column_title = '입력항목 제목'; $lang->default_value = '기본 값'; $lang->is_active = '활성'+ '; $lang->is_required = '필수항목';
$lang->column_type_list['+ 'radio'] = '라디오버튼 (radio)';
이부분을 추가해줍니다.
/zbxe/modules/board/skins/xe_board/extra_var_value.html 파일 에서 <!-- 단일 선택 --> <!--@elseif($val->type == 'select')--> {htmlspecialchars($val->value)} <!-- 라디오버튼 --> <!--@elseif($val->type == 'radio')--> {htmlspecialchars($val->value)} <!-- 날짜 입력 -->
<!-- 라디오버튼 -->
<!--@elseif($val->type == 'radio')-->
{htmlspecialchars($val->value)}
이부분을 추가해 줍니다.
마지막으로
/zbxe/modules/board/skins/xe_board/extra_var_form.html 파일 에서 <!-- 라디오버튼 --> <!--@elseif($val->type == 'radio')--> {@$v=explode(",",$val->default)} {@$v_count=count($v)} <!--@for($i = 0; $i < $v_count; $i++)--> <!--@if($val->default)--> <input type="radio" name="{$val->column_name}" value="{$v[$i]}" <!--@if($v[$i] == $val->value)-->checked="checked"<!--@end-->>{$v[$i]} <!--@end--> <!--@end--> <!-- 날짜 입력 -->
이부분을 추가해 줍니다.
추가하는 위치는
<!-- 단일 선택 -->
<!-- 라디오버튼 -->
<!-- 날짜 입력 -->
붉은색 부분입니다.
위 소스가 조건문의 한 부분이기때문에 위 붉은색 부분 위치에 넣으시면 문제가 없을겁니다.
확장필드 추가에 주소와 이미지 업로드 기능도 빨리 밝혀 내었으면 좋겠는데..
고수님들 실력 발휘좀 해주삼.
댓글 6
-
대암지기
2008.03.04 03:06
고맙습니다. -
moonsoo
2008.03.04 11:34
감사합니다 -
한니발
2008.03.08 11:50
이런 에러가 뜨네요...
그래서 다시 원래대로 파일을 바꿔도 계속 이런 에러가 나네요...
살려주세요...
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 201
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 222
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 223
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 224
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 225
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 93
Warning: Cannot modify header information - headers already sent by (output started at /web/home/kamchoman/html/v02/common/lang/ko.lang.php:1) in /web/home/kamchoman/html/v02/classes/display/DisplayHandler.class.php on line 93 -
서강정
2008.03.09 11:07
웨에것 에러 납니다..
맨처음 다운받아놓은것 다시 올려서 겨우 복구했습니다.
두번 했는데 똑같은 에러가 나는 군요. -
손유현
2008.03.21 10:26
위의 설명대로 파일 세개 수정해서 업로드해놨는데요~
분류기능을 라디오버튼으로 바꾸려면 어디서 바꿔야 하는거에요? ^^;;
답변 부탁드립니다~ -
쭈비
2008.03.31 22:47
관리자 페이지에서 설정하시면 되는데요,
예를 들면, 게시판 생성하실 때 확장변수 선언하시면서 변수 형식을 라디오로 선택하시면 됩니다.
이미 생성하셨다면 수정하시면 되고요.
제목 | 글쓴이 | 날짜 |
---|---|---|
전화번호 형식의 확장변수를 목록에 출력하고 싶을 때 | serendip | 2009.01.06 |
통합검색에서 확장변수 검색하기 [5] | StyleD | 2008.10.12 |
확장변수 별로 작성 및 열람 권한 설정하기 [7] | 대암지기 | 2008.10.11 |
초보 헤메다가 팁//인쇄영역 확장변수 포함
[8]
![]() | 리히토 | 2008.07.14 |
[1원짜리팁] 큰 이미지 썸네일 못생성& 확장변수 원하는 곳에 배치하기 ^^ [2] | 파파민 | 2008.06.23 |
확장변수 다중선택에서 체크박스의 선택개수를 제한하기
[5]
![]() | 우야꼬 | 2008.05.30 |
확장변수(textarea)에 html태그 적용 [6] | 오엘 | 2008.05.08 |
[3-1차 수정]확장변수 자유롭게 내 마음대로 게시글 리스트에 표현 합시다!![ver1.0.1]
[16]
![]() | 대암지기 | 2008.04.09 |
확장변수 쉽게 출력하기 [7] | lightnsalt | 2008.03.04 |
게시판 확장변수에 라디오버튼 추가해서 사용하기
[6]
![]() | 똑디 | 2008.03.04 |
게시판 하단 검색 옵션 원하는 것만 넣기 (확장변수 포함) [10] | shtjdals | 2008.01.02 |
확장변수에서 본문 입력 빼기
[10]
![]() | Diver | 2007.11.12 |
확장변수 이용해서 2차 3차 분류 항목 만들기 [3] | VagaBond | 2007.09.08 |
확장변수 [2] | 다케루 | 2007.08.25 |