게시판 기능 설정에서 "파일 설명 사용" 사용시 글쓰기 파일#1이후 보이지 않는 현상에 대하여...

게시판 기능 설정에서 "파일 설명 사용" 사용시 글쓰기 파일#1이후 보이지 않는 현상에 대하여...

QA

게시판 기능 설정에서 "파일 설명 사용" 사용시 글쓰기 파일#1이후 보이지 않는 현상에 대하여...

본문

관리자의 게시판 관리에서
게시판 기능 설정의 "파일 설명 사용" 사용시 일부 보드 skin에서 글쓰기를 하면  파일#1이후 보이지 않는 현상이 있네요.

예로
board/webzin2의 경우
bug_shot1.png

 위와 같이 파일#1 이후가 나타나지 않습니다.
소스를 보면
            <th scope="row">파일 #1</th>            <td>                <input type="file" name="bf_file[]" title="파일첨부 1 :  용량 1,048,576 바이트 이하만 업로드 가능" class="frm_file frm_input">                                <input type="text" name="bf_content[]" value="<br /><b>Fatal error</b>:  Cannot use string offset as an array in <b>/home/myhost/www/yc5/skin/board/webzin2/write.skin.php</b> on line <b>154</b><br />


그래서 해결한 방법은
1. 파일 설명 사용: 사용안함
2. write_skin.php를 아래와 같이 수정
[pre]<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>
<input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">
<?php if ($is_file_content) { ?>
<input type="text" name="bf_content[]" value="<?php echo $file[$i]['bf_content']; ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
<?php } ?>
<?php if($w == 'u' && $file[$i]['file']) { ?>
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
<?php } ?>
</td>
</tr>
<?php } ?>[/pre]
를 아래와 같이 수정.

[pre]<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
        <tr>
            <th scope="row">파일 #<?php echo $i+1 ?></th>
            <td>
                <input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> :  용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">
                <?php if ($is_file_content) { ?>
                <input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : '';  ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
                <?php } ?>
                <?php if($w == 'u' && $file[$i]['file']) { ?>
                <input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i;  ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')';  ?> 파일 삭제</label>
                <?php } ?>
            </td>
        </tr>
        <?php } ?>[/pre]

즉,

 <input type="text" name="bf_content[]" value="<?php echo $file[$i]['bf_content'];  ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">

<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : '';  ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">

그래서 해결한 방법은
1. 파일 설명 사용: 사용안함
2. write_skin.php를 위와 같이 수정

몇군대 서버 환경에서 설치하고 테스트 해 보았는데 위와 같이 작성되지 않은 스킨들은 모두 동일한 현상이 발생되어
위 2.번 방법으로 해결을 했습니다.

글이 장황하군요.^^
다른 분들도 동일한 문제가 발생이 되는지 궁금합니다.



이 질문에 댓글 쓰기 :

답변 1

파일설명 관련 버그가 있어 스킨 write.skin.php 수정된 내역이 있습니다.
최신 버전의 그누보드5 기본 스킨을 보시고 파일 스킨 파일을 수정해 주시기 바랍니다.
답변을 작성하시기 전에 로그인 해주세요.
전체 125,873 | RSS
QA 내용 검색

회원로그인

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