테스트 사이트 - 개발 중인 베타 버전입니다

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

· 1년 전 · 918 · 8

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

[code]

    <?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 } ?>
[/code]

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

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 8개

감사합니다.

즐거운 추석연휴 보내세요 ^^

1년 전

@김철용 풍요로운 한가위 되십시요. 감사 드립니다.

1년 전

감사합니다

1년 전

@너나잘해 감사 합니다.

다국어에서 사용하기 좋아요.

1년 전

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

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

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

1년 전

@하늘그루터기 님 댓글 감사 합니다.

감사합니다.

1년 전

@Moondo 감사 합니다.

게시글 목록

번호 제목
22569
22566
22565
22559
22530
22527
22525
22521
22518
22506
22500
22490
22487
22481
22480
22473
22471
22468
22453
22449
22440
22436
22435
22415
22407
22404
22376
22364
22362
22353