게시판 글쓰기 시 '파일 선택' 등 변경하기 > 그누보드5 팁자료실

그누보드5 팁자료실

게시판 글쓰기 시 '파일 선택' 등 변경하기 정보

게시판 글쓰기 시 '파일 선택' 등 변경하기

본문

33282748_1725950249.6314.png게시판 폴더 write.skin.php 에서 아래와 같이 수정 하세요.


    <?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
    <div class="bo_w_flie write_div">
        <div class="file_wr write_div">
            <label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-folder-open" aria-hidden="true"></i><span class="sound_only"> 파일 #<?php echo $i+1 ?></span></label>
            <input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
        </div>
        <?php if ($is_file_content) { ?>
        <input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="full_input frm_input" size="50" placeholder="파일 설명을 입력해주세요.">
        <?php } ?>
        <?php if($w == 'u' && $file[$i]['file']) { ?>
        <span class="file_del">
            <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>
        </span>
        <?php } ?>
        
    </div>
    <?php } ?>
=>
    <?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
    <div class="bo_w_flie write_div">
        <div class="file_wr write_div">
            <label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-folder-open" aria-hidden="true"></i><span class="sound_only"> _파일 #<?php echo $i+1 ?></span></label>
            <input type="button" value="_파일 선택" id="ba_file_<?php echo $i+1 ?>" onclick="document.getElementById('bf_file_<?php echo $i+1 ?>').click()" title="_파일첨부 <?php echo $i+1 ?> : _용량 <?php echo $upload_max_filesize ?> _이하만 업로드 가능" class="frm_file ">
            <label for="<?php echo $i ?>" id="file-name_<?php echo $i+1 ?>" class="homepage"><?php if($i == 0)echo '_선택된 파일 없음1';if($i == 1)echo '_선택된 파일 없음2';if($i == 2)echo '_선택된 파일 없음3';?></label>
            <input type="file" name="bf_file[]" style="display:none" id="bf_file_<?php echo $i+1 ?>" title="_파일첨부 <?php echo $i+1 ?> : _용량 <?php echo $upload_max_filesize ?> _이하만 업로드 가능" class="frm_file ">
            <script>
            inputElement<?php echo $i+1 ?> = document.getElementById('bf_file_<?php echo $i+1 ?>');
            labelElement<?php echo $i+1 ?> = document.getElementById('file-name_<?php echo $i+1 ?>');
            inputElement<?php echo $i+1 ?>.onchange = function(event) {
            var path = inputElement<?php echo $i+1 ?>.value;
            labelElement<?php echo $i+1 ?>.innerHTML = path.split(/(\\|\/)/g).pop();
            }
            </script>
        </div>
        <?php if ($is_file_content) { ?>
        <input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="_파일 설명을 입력해주세요." class="full_input frm_input file_wr" size="50" placeholder="_파일 설명을 입력해주세요.">
        <?php } ?>
        <?php if($w == 'u' && $file[$i]['file']) { ?>
        <span class="file_del">
            <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>
        </span>
        <?php } ?>
    </div>
    <?php } ?>

_로 시작하는 한글을 필요한 언어나 글자로 변경 하시면 됩니다.

추천
3
  • 복사

댓글 8개

답변 너무나 감사했습니다.

들레아빠님 덕분에 세련되게 수정할 수 있었어요.

또한 원하는 문구를 넣을 수 있어 너무 좋았고요~^^

© SIRSOFT
현재 페이지 제일 처음으로