(x)html 관련된 팁을 공유하는 공간입니다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 66

0

조회 수 : 7840 신고 : 0

작성자 : 이병준
포인트 : 0 | 레벨 : 0
미리보기 :  





작업하다 만들어봤는데 나름,,, 쓸만합니다 ^^
(흔하디 흔한 alpha값처리죠 머,,)


실제 페이지(html - 소스 다운로드 가능)






참고로 제로보드에 적용 예 입니다




제로보드에 적용하실 분들은 참고



순서 1. 스킨폴더안에 있는 write.php 파일에서 기존 업로드부분을 아래와 같이 수정



<?=$hide_pds_start?> 부터 <?=$hide_pds_end?> 까지의 코드를 말합니다
아래의 코드는 두개의 td로 나뉘어져 있으니까 본인에 맞게 잘 수정하세요



<?
if($setup[use_pds]=='1'){ // 자료실 기능 사용시, 자료실 미 사용시 주석처리가 되는것이 싫어 setup로 처리함
?>
    <tr>
        <td>Upload</td>
        <td>
            <?
// 스킨에서 바로 처리(뺄거 빼고,,), 원래는 bbs/write.php에 있는 코드
if($data[file_name1])$file_name1="&nbsp;".$data[s_file_name1]." <input type=checkbox name=del_file1 id=delF1 value=1 style='vertical-align:middle;' /><label for='delF1'>삭제</label>";
if($data[file_name2])$file_name2="&nbsp;".$data[s_file_name2]." <input type=checkbox name=del_file2 id=delF2 value=1 style='vertical-align:middle;' /><label for='delF2'>삭제</label>";

                if($mode=="modify"){ // 수정시
                    if($file_name1){
                        $fileName_text1 = $file_name1;
                    }else{
                        $fileName_text1 = "&nbsp;업로드할 파일1을 선택하세요";
                    }

                    if($file_name2){
                        $fileName_text2 = $file_name2;
                    }else{
                        $fileName_text2 = "&nbsp;업로드할 파일2를 선택하세요";
                    }

                }else{
                    $fileName_text1 = "&nbsp;업로드할 파일1을 선택하세요";
                    $fileName_text2 = "&nbsp;업로드할 파일2를 선택하세요";
                }
            ?>
            <table id="ferJoin" cellSpacing="0" cellpadding="0" border="0">
            <colgroup><col width="87px" /><col /></colgroup>
            <tbody>
                <tr>
                    <td class="divinputfile" onmouseover="this.className='divinputfile_on';" onmouseout="this.className='divinputfile';">
                        <input name="file1" type="file" size="1" maxlength="255" onchange="inputFileOnChange(this, 'vlu_in1')" />
                    </td>
                    <td id="vlu_in1">&nbsp;<?=$fileName_text1?></td>
                </tr>
                <tr>
                    <td class="divinputfile" onmouseover="this.className='divinputfile_on';" onmouseout="this.className='divinputfile';">
                        <input name="file2" type="file" size="1" maxlength="255" onchange="inputFileOnChange(this, 'vlu_in2')" />
                    </td>
                    <td id="vlu_in2">&nbsp;<?=$fileName_text2?></td>
                </tr>
            </tbody>
            </table>
        </td>
    </tr>
<?}?>










순서 2. 동일 파일의 제일 하단에 삽입



<?
if($setup[use_pds]=='1'){ // 자료실 기능 사용시

?>
<script type="text/javascript" language="JavaScript">
//<![CDATA]

function fileIpt_con(){
var f_ipt = document.getElementById("ferJoin").getElementsByTagName("input");
var v_console = document.getElementById('iptValue');

    for(i = 0; i < f_ipt.length; i++) {
        if(f_ipt[i].type=="file"){
            f_ipt[i].style.opacity = (0/100);
            f_ipt[i].style.MozOpacity = (0 /100);
            f_ipt[i].style.KhtmlOpacity = (0/100);
            f_ipt[i].style.filter = "alpha(opacity="+ 0 +")";
            f_ipt[i].style.marginTop = '-4px';
            f_ipt[i].style.marginLeft = '-28px';
            f_ipt[i].style.fontSize = '18px';
        }
    }
    try { document.execCommand('BackgroundImageCache', false, true); }catch(e){}
}

function inputFileOnChange(obj, vluin) {
    var v_console = '';
    v_console = obj.value;
    document.getElementById(vluin).innerHTML = "&nbsp;"+v_console;
};

window.onload = function() {
    fileIpt_con();
}
//]]>

</script>
<?}?>











순서 3. 해당 스킨의 style.css에 추가



/* upload file */
.divinputfile{background:url(images/upload_file.gif) no-repeat;}
.divinputfile_on{background:url(images/upload_file.gif) 0 -26px no-repeat;}
#ferJoin {table-layout:fixed; width:98%;}
 #ferJoin td{height:26px; font-size:11px;}


이미지는 첨부파일 다운로드해서 스킨폴더안에 images 안에 업로드








끄읏~~

소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

첫번째 댓글을 남겨주세요!

List of Articles
번호 제목 글쓴이 날짜 추천 수 조회 수
공지 모바일 코딩하시는 분들 참고하세요. title: [ani]깜빡이는 표정빽짱구 2014-05-07   2637
65 반응형 캘린더 소스 [1] title: [ani]깜빡이는 표정빽짱구 2018-09-16   555
64 html 인라인요소와 블록요소 title: [ani]깜빡이는 표정빽짱구 2016-06-03   374
63 모바일 키패드 입력창 title: [ani]깜빡이는 표정빽짱구 2016-02-16   645
62 모바일 코딩시 확대 축소(가능, 불가능) title: [ani]깜빡이는 표정빽짱구 2014-07-21   1197
61 모바일에서 전화번호,이메일,지도 자동링크 제거하기 [1] title: [ani]깜빡이는 표정빽짱구 2014-03-07   4363
60 아이폰에서 숫자 사이즈 title: [ani]깜빡이는 표정빽짱구 2014-02-06   1915
59 안드로이드에서 placeholder이 적용안될때 [1] title: [ani]깜빡이는 표정빽짱구 2014-02-03   2926
58 모바일에서 position:fixed 문제 title: [ani]깜빡이는 표정빽짱구 2014-01-13   3089
57 html5 (section, article, nav, aside) title: [ani]깜빡이는 표정빽짱구 2012-08-30   3148
56 모바일 코딩시 손가락으로 확대/축소 가능하게 할려면? title: [ani]깜빡이는 표정빽짱구 2012-08-06   6415
55 html5 + CSS3 브라우저별 호환성 비교 [1] title: [ani]깜빡이는 표정빽짱구 2011-09-30   4284
54 글자 중간에 선을 그어주는 del 태그 [1] title: [ani]깜빡이는 표정빽짱구 2011-07-13   5802
53 셀렉트박스 (selectbox) 세로크기 file title: [ani]깜빡이는 표정빽짱구 2011-05-12   7512
52 스크립트 한 줄로 IE6 죽이기 [2] 이병준 2010-05-27   5353
51 브라우저 리셋 CSS [2] 이병준 2010-05-27 1 5816
50 찾아보기 버튼모양 바꾸기 이병준 2010-05-27   7840
49 정규식 실시간 웹테스터 입니다 컴센스 2010-05-27   5535
48 한글기본폰트 영문명 [3] 뉴클리어 2010-03-07   8819
47 html5의 모든 것 [3] title: [ani]깜빡이는 표정빽짱구 2010-02-04   8833