(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
번호 제목 글쓴이 날짜 추천 수 조회 수sort
공지 모바일 코딩하시는 분들 참고하세요. title: [ani]깜빡이는 표정빽짱구 2014-05-07   2639
66 hit html 특수문자 코드표 [1] title: [ani]깜빡이는 표정빽짱구 2009-02-10   40532
65 hit best of best Span 태그와 Div 태그 (HTML) [2] title: [ani]깜빡이는 표정빽짱구 2007-01-21 70 16641
64 hit iframe대신 div를 응용해보자 [4] title: [ani]깜빡이는 표정빽짱구 2007-12-17   16339
63 hit 글자위에 마우스 오버시 툴팁띄우기 file title: [ani]깜빡이는 표정빽짱구 2007-11-08   15177
62 hit DIV를 이용한 Display 핸들링 title: [ani]깜빡이는 표정빽짱구 2007-12-17   12661
61 hit 마우스 드래그 금지태그 [2] title: [ani]깜빡이는 표정빽짱구 2006-04-26 16 11931
60 hit 클릭시 현재 페이지에서 원하는곳으로 위치이동 title: [ani]깜빡이는 표정빽짱구 2008-04-30   11848
59 hit th 태그와 td 태그의 차이점 [2] title: [ani]깜빡이는 표정빽짱구 2005-12-07 7 11507
58 hit png 으로 저장시 IE6에서 투명안될때 [2] title: [ani]깜빡이는 표정빽짱구 2007-12-12   11098
57 hit 메일링 코딩시 이미지맵 [4] title: [ani]깜빡이는 표정빽짱구 2009-04-21   10493
56 hit HTML과 XHTML의 차이 [4] title: [ani]깜빡이는 표정빽짱구 2007-12-07   10444
55 hit best of best input 태그를 이미지버튼으로하기 title: [ani]깜빡이는 표정빽짱구 2006-04-22 20 10331
54 hit 익스7에 잘보이던 사이트가 익스8에서 제대로 안보일때 title: [ani]깜빡이는 표정빽짱구 2009-05-13   10007
53 best of best CHECKBOX클릭시 지정된 내용 보여주기 title: [ani]깜빡이는 표정빽짱구 2006-10-17 42 9972
52 best of best onfocus="this.blur()" 익스,파이어폭스에도 적용 title: [ani]깜빡이는 표정빽짱구 2007-02-21 33 9715
51 best of best input 에 마우스 오버/아웃시 배경바꾸기 title: [ani]깜빡이는 표정빽짱구 2006-07-25 20 9172
50 textarea 나 input 안에 글자 안써지게 하기 title: [ani]깜빡이는 표정빽짱구 2006-05-12 19 9052
49 html5의 모든 것 [3] title: [ani]깜빡이는 표정빽짱구 2010-02-04   8833
48 한글기본폰트 영문명 [3] 뉴클리어 2010-03-07   8820
47 best of best 아이디 입력란에 탭키 눌렀을때 순서정하기 [2] title: [ani]깜빡이는 표정빽짱구 2006-09-28 25 8491