채팅방에 이모티콘 달기
- 11-04
- 6,882 회
- 8 건
길호님께서 올린것과는 다른 방식입니다..^^
현제 그누보드용 채팅에 적용한 상태라 그누보드 위주로 설명합니다.
다른 보드 채팅은 경로만 약간 수정하면 되리라 봅니다.
먼저 chat09_emoticon.zip파일을 압축을 풀어서 emo.php파일과 emoticon폴더를
gnu/gnu_chat폴더에 올립니다.
gnu_chat/skin/각스킨폴더/room.php파일을 열어서 아래와 같이 수정..
입력창 : <input type=text name=test autocomplete=off>
</form> <- 이부분 아래에
여기서 부터-------------------------------------
<table>
<TR>
<TD><div align=right>
<input onclick='showEmoticon()' type=checkbox name=Emoticons value='yes'><img src=./emoticon/i_emoticons.gif align=absmiddle border=0>이모티콘
</div>
</TD>
</TR>
<TR>
<TD><? include "../gnu_chat/emo.php"; ?>
</TD>
</TR>
<table>
여기 까지----------------------------------------
<SCRIPT>
// 자동링크 기능....
.....................................................................
.....................................................................
return str.replace(/___---#Done#Src#---___/g, "");
} <- 이줄 다음에
여기서 부터----------------------------------------
function emoticon_html(str)
{
str=str.replace("emtc_001","<img src=http://URL/gnu/gnu_chat/emoticon/1.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_002","<img src=http://URL/gnu/gnu_chat/emoticon/2.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_003","<img src=http://URL/gnu/gnu_chat/emoticon/3.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_004","<img src=http://URL/gnu/gnu_chat/emoticon/4.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_005","<img src=http://URL/gnu/gnu_chat/emoticon/5.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_006","<img src=http://URL/gnu/gnu_chat/emoticon/6.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_007","<img src=http://URL/gnu/gnu_chat/emoticon/7.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_008","<img src=http://URL/gnu/gnu_chat/emoticon/8.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_009","<img src=http://URL/gnu/gnu_chat/emoticon/9.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_010","<img src=http://URL/gnu/gnu_chat/emoticon/10.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_011","<img src=http://URL/gnu/gnu_chat/emoticon/11.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_012","<img src=http://URL/gnu/gnu_chat/emoticon/12.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_013","<img src=http://URL/gnu/gnu_chat/emoticon/13.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_014","<img src=http://URL/gnu/gnu_chat/emoticon/14.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_015","<img src=http://URL/gnu/gnu_chat/emoticon/15.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_016","<img src=http://URL/gnu/gnu_chat/emoticon/16.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_017","<img src=http://URL/gnu/gnu_chat/emoticon/17.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_018","<img src=http://URL/gnu/gnu_chat/emoticon/18.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_019","<img src=http://URL/gnu/gnu_chat/emoticon/19.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_020","<img src=http://URL/gnu/gnu_chat/emoticon/20.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_021","<img src=http://URL/gnu/gnu_chat/emoticon/21.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_022","<img src=http://URL/gnu/gnu_chat/emoticon/22.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_023","<img src=http://URL/gnu/gnu_chat/emoticon/23.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_024","<img src=http://URL/gnu/gnu_chat/emoticon/24.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_025","<img src=http://URL/gnu/gnu_chat/emoticon/25.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_026","<img src=http://URL/gnu/gnu_chat/emoticon/26.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_027","<img src=http://URL/gnu/gnu_chat/emoticon/27.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_028","<img src=http://URL/gnu/gnu_chat/emoticon/28.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_029","<img src=http://URL/gnu/gnu_chat/emoticon/29.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_030","<img src=http://URL/gnu/gnu_chat/emoticon/30.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_031","<img src=http://URL/gnu/gnu_chat/emoticon/31.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_032","<img src=http://URL/gnu/gnu_chat/emoticon/32.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_033","<img src=http://URL/gnu/gnu_chat/emoticon/33.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_034","<img src=http://URL/gnu/gnu_chat/emoticon/34.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_035","<img src=http://URL/gnu/gnu_chat/emoticon/35.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_036","<img src=http://URL/gnu/gnu_chat/emoticon/36.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_037","<img src=http://URL/gnu/gnu_chat/emoticon/37.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_038","<img src=http://URL/gnu/gnu_chat/emoticon/38.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_039","<img src=http://URL/gnu/gnu_chat/emoticon/39.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_040","<img src=http://URL/gnu/gnu_chat/emoticon/40.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_041","<img src=http://URL/gnu/gnu_chat/emoticon/41.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_042","<img src=http://URL/gnu/gnu_chat/emoticon/42.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_043","<img src=http://URL/gnu/gnu_chat/emoticon/43.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_044","<img src=http://URL/gnu/gnu_chat/emoticon/44.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_045","<img src=http://URL/gnu/gnu_chat/emoticon/45.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_046","<img src=http://URL/gnu/gnu_chat/emoticon/46.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_047","<img src=http://URL/gnu/gnu_chat/emoticon/47.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_048","<img src=http://URL/gnu/gnu_chat/emoticon/48.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_049","<img src=http://URL/gnu/gnu_chat/emoticon/49.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_050","<img src=http://URL/gnu/gnu_chat/emoticon/50.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_051","<img src=http://URL/gnu/gnu_chat/emoticon/51.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_052","<img src=http://URL/gnu/gnu_chat/emoticon/52.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_053","<img src=http://URL/gnu/gnu_chat/emoticon/53.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_054","<img src=http://URL/gnu/gnu_chat/emoticon/54.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_055","<img src=http://URL/gnu/gnu_chat/emoticon/55.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_056","<img src=http://URL/gnu/gnu_chat/emoticon/56.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_057","<img src=http://URL/gnu/gnu_chat/emoticon/57.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_058","<img src=http://URL/gnu/gnu_chat/emoticon/58.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_059","<img src=http://URL/gnu/gnu_chat/emoticon/59.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_060","<img src=http://URL/gnu/gnu_chat/emoticon/60.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_061","<img src=http://URL/gnu/gnu_chat/emoticon/61.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_062","<img src=http://URL/gnu/gnu_chat/emoticon/62.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_063","<img src=http://URL/gnu/gnu_chat/emoticon/63.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_064","<img src=http://URL/gnu/gnu_chat/emoticon/64.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_065","<img src=http://URL/gnu/gnu_chat/emoticon/65.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_066","<img src=http://URL/gnu/gnu_chat/emoticon/66.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_067","<img src=http://URL/gnu/gnu_chat/emoticon/67.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_068","<img src=http://URL/gnu/gnu_chat/emoticon/68.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_069","<img src=http://URL/gnu/gnu_chat/emoticon/69.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_070","<img src=http://URL/gnu/gnu_chat/emoticon/70.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_071","<img src=http://URL/gnu/gnu_chat/emoticon/71.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_072","<img src=http://URL/gnu/gnu_chat/emoticon/72.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_073","<img src=http://URL/gnu/gnu_chat/emoticon/73.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_074","<img src=http://URL/gnu/gnu_chat/emoticon/74.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_075","<img src=http://URL/gnu/gnu_chat/emoticon/75.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_076","<img src=http://URL/gnu/gnu_chat/emoticon/76.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_077","<img src=http://URL/gnu/gnu_chat/emoticon/77.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_078","<img src=http://URL/gnu/gnu_chat/emoticon/78.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_079","<img src=http://URL/gnu/gnu_chat/emoticon/79.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_080","<img src=http://URL/gnu/gnu_chat/emoticon/80.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_081","<img src=http://URL/gnu/gnu_chat/emoticon/81.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_082","<img src=http://URL/gnu/gnu_chat/emoticon/82.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_083","<img src=http://URL/gnu/gnu_chat/emoticon/83.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_084","<img src=http://URL/gnu/gnu_chat/emoticon/84.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_085","<img src=http://URL/gnu/gnu_chat/emoticon/85.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_086","<img src=http://URL/gnu/gnu_chat/emoticon/86.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_087","<img src=http://URL/gnu/gnu_chat/emoticon/87.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_088","<img src=http://URL/gnu/gnu_chat/emoticon/88.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_089","<img src=http://URL/gnu/gnu_chat/emoticon/89.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_090","<img src=http://URL/gnu/gnu_chat/emoticon/90.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_091","<img src=http://URL/gnu/gnu_chat/emoticon/91.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_092","<img src=http://URL/gnu/gnu_chat/emoticon/92.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_093","<img src=http://URL/gnu/gnu_chat/emoticon/93.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_094","<img src=http://URL/gnu/gnu_chat/emoticon/94.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_095","<img src=http://URL/gnu/gnu_chat/emoticon/95.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_096","<img src=http://URL/gnu/gnu_chat/emoticon/96.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_097","<img src=http://URL/gnu/gnu_chat/emoticon/97.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_098","<img src=http://URL/gnu/gnu_chat/emoticon/98.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_099","<img src=http://URL/gnu/gnu_chat/emoticon/99.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_100","<img src=http://URL/gnu/gnu_chat/emoticon/100.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_101","<img src=http://URL/gnu/gnu_chat/emoticon/101.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_102","<img src=http://URL/gnu/gnu_chat/emoticon/102.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_103","<img src=http://URL/gnu/gnu_chat/emoticon/103.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_104","<img src=http://URL/gnu/gnu_chat/emoticon/104.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_105","<img src=http://URL/gnu/gnu_chat/emoticon/105.gif width=18 height=18 border=0>",str);
return str;
}
여기 까지------------------------------------------
아래 채팅 출력 부분 원본----------------------------
// 채팅 출력부분
function chattext(str,col)
{
<?
if(file_exists('skin/'.$skinname.'/imoticon'))
{
$handle=@opendir('skin/'.$skinname.'/imoticon/.');
while (($file = @readdir($handle))!==false)
{ $imoticon=str_replace('.gif','',$file);
if(strpos($file,'.gif')>1)
{?>
str=str.replace("<?=$imoticon?>","<img src='imoticon/<?=$file?>'>");
<?}
}
@closedir($handle);
}
?>
str=sw_autolink(str);
chatview.document.body.insertAdjacentHTML('beforeEnd', '<font color='+col+'>'+str+'</font><br>');
chatview.document.body.scrollTop=99999999;
}
원본 끝--------------------------------------------
수정-----------------------------------------------
// 채팅 출력부분
function chattext(str,col)
{
str=emoticon_html(str);
str=sw_autolink(str);
chatview.document.body.insertAdjacentHTML('beforeEnd', '<font color='+col+'>'+str+'</font><br>');
chatview.document.body.scrollTop=99999999;
}
수정 끝--------------------------------------------
이모티콘이 많으면 불러오는데 시간이 약간 걸리뿐만 아니라
이모티콘 약간 깨집니다..적절한 개수로 짤라서 사용하세요..^^
현제 그누보드용 채팅에 적용한 상태라 그누보드 위주로 설명합니다.
다른 보드 채팅은 경로만 약간 수정하면 되리라 봅니다.
먼저 chat09_emoticon.zip파일을 압축을 풀어서 emo.php파일과 emoticon폴더를
gnu/gnu_chat폴더에 올립니다.
gnu_chat/skin/각스킨폴더/room.php파일을 열어서 아래와 같이 수정..
입력창 : <input type=text name=test autocomplete=off>
</form> <- 이부분 아래에
여기서 부터-------------------------------------
<table>
<TR>
<TD><div align=right>
<input onclick='showEmoticon()' type=checkbox name=Emoticons value='yes'><img src=./emoticon/i_emoticons.gif align=absmiddle border=0>이모티콘
</div>
</TD>
</TR>
<TR>
<TD><? include "../gnu_chat/emo.php"; ?>
</TD>
</TR>
<table>
여기 까지----------------------------------------
<SCRIPT>
// 자동링크 기능....
.....................................................................
.....................................................................
return str.replace(/___---#Done#Src#---___/g, "");
} <- 이줄 다음에
여기서 부터----------------------------------------
function emoticon_html(str)
{
str=str.replace("emtc_001","<img src=http://URL/gnu/gnu_chat/emoticon/1.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_002","<img src=http://URL/gnu/gnu_chat/emoticon/2.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_003","<img src=http://URL/gnu/gnu_chat/emoticon/3.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_004","<img src=http://URL/gnu/gnu_chat/emoticon/4.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_005","<img src=http://URL/gnu/gnu_chat/emoticon/5.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_006","<img src=http://URL/gnu/gnu_chat/emoticon/6.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_007","<img src=http://URL/gnu/gnu_chat/emoticon/7.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_008","<img src=http://URL/gnu/gnu_chat/emoticon/8.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_009","<img src=http://URL/gnu/gnu_chat/emoticon/9.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_010","<img src=http://URL/gnu/gnu_chat/emoticon/10.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_011","<img src=http://URL/gnu/gnu_chat/emoticon/11.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_012","<img src=http://URL/gnu/gnu_chat/emoticon/12.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_013","<img src=http://URL/gnu/gnu_chat/emoticon/13.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_014","<img src=http://URL/gnu/gnu_chat/emoticon/14.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_015","<img src=http://URL/gnu/gnu_chat/emoticon/15.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_016","<img src=http://URL/gnu/gnu_chat/emoticon/16.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_017","<img src=http://URL/gnu/gnu_chat/emoticon/17.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_018","<img src=http://URL/gnu/gnu_chat/emoticon/18.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_019","<img src=http://URL/gnu/gnu_chat/emoticon/19.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_020","<img src=http://URL/gnu/gnu_chat/emoticon/20.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_021","<img src=http://URL/gnu/gnu_chat/emoticon/21.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_022","<img src=http://URL/gnu/gnu_chat/emoticon/22.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_023","<img src=http://URL/gnu/gnu_chat/emoticon/23.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_024","<img src=http://URL/gnu/gnu_chat/emoticon/24.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_025","<img src=http://URL/gnu/gnu_chat/emoticon/25.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_026","<img src=http://URL/gnu/gnu_chat/emoticon/26.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_027","<img src=http://URL/gnu/gnu_chat/emoticon/27.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_028","<img src=http://URL/gnu/gnu_chat/emoticon/28.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_029","<img src=http://URL/gnu/gnu_chat/emoticon/29.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_030","<img src=http://URL/gnu/gnu_chat/emoticon/30.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_031","<img src=http://URL/gnu/gnu_chat/emoticon/31.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_032","<img src=http://URL/gnu/gnu_chat/emoticon/32.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_033","<img src=http://URL/gnu/gnu_chat/emoticon/33.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_034","<img src=http://URL/gnu/gnu_chat/emoticon/34.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_035","<img src=http://URL/gnu/gnu_chat/emoticon/35.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_036","<img src=http://URL/gnu/gnu_chat/emoticon/36.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_037","<img src=http://URL/gnu/gnu_chat/emoticon/37.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_038","<img src=http://URL/gnu/gnu_chat/emoticon/38.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_039","<img src=http://URL/gnu/gnu_chat/emoticon/39.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_040","<img src=http://URL/gnu/gnu_chat/emoticon/40.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_041","<img src=http://URL/gnu/gnu_chat/emoticon/41.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_042","<img src=http://URL/gnu/gnu_chat/emoticon/42.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_043","<img src=http://URL/gnu/gnu_chat/emoticon/43.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_044","<img src=http://URL/gnu/gnu_chat/emoticon/44.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_045","<img src=http://URL/gnu/gnu_chat/emoticon/45.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_046","<img src=http://URL/gnu/gnu_chat/emoticon/46.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_047","<img src=http://URL/gnu/gnu_chat/emoticon/47.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_048","<img src=http://URL/gnu/gnu_chat/emoticon/48.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_049","<img src=http://URL/gnu/gnu_chat/emoticon/49.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_050","<img src=http://URL/gnu/gnu_chat/emoticon/50.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_051","<img src=http://URL/gnu/gnu_chat/emoticon/51.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_052","<img src=http://URL/gnu/gnu_chat/emoticon/52.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_053","<img src=http://URL/gnu/gnu_chat/emoticon/53.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_054","<img src=http://URL/gnu/gnu_chat/emoticon/54.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_055","<img src=http://URL/gnu/gnu_chat/emoticon/55.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_056","<img src=http://URL/gnu/gnu_chat/emoticon/56.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_057","<img src=http://URL/gnu/gnu_chat/emoticon/57.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_058","<img src=http://URL/gnu/gnu_chat/emoticon/58.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_059","<img src=http://URL/gnu/gnu_chat/emoticon/59.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_060","<img src=http://URL/gnu/gnu_chat/emoticon/60.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_061","<img src=http://URL/gnu/gnu_chat/emoticon/61.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_062","<img src=http://URL/gnu/gnu_chat/emoticon/62.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_063","<img src=http://URL/gnu/gnu_chat/emoticon/63.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_064","<img src=http://URL/gnu/gnu_chat/emoticon/64.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_065","<img src=http://URL/gnu/gnu_chat/emoticon/65.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_066","<img src=http://URL/gnu/gnu_chat/emoticon/66.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_067","<img src=http://URL/gnu/gnu_chat/emoticon/67.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_068","<img src=http://URL/gnu/gnu_chat/emoticon/68.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_069","<img src=http://URL/gnu/gnu_chat/emoticon/69.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_070","<img src=http://URL/gnu/gnu_chat/emoticon/70.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_071","<img src=http://URL/gnu/gnu_chat/emoticon/71.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_072","<img src=http://URL/gnu/gnu_chat/emoticon/72.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_073","<img src=http://URL/gnu/gnu_chat/emoticon/73.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_074","<img src=http://URL/gnu/gnu_chat/emoticon/74.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_075","<img src=http://URL/gnu/gnu_chat/emoticon/75.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_076","<img src=http://URL/gnu/gnu_chat/emoticon/76.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_077","<img src=http://URL/gnu/gnu_chat/emoticon/77.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_078","<img src=http://URL/gnu/gnu_chat/emoticon/78.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_079","<img src=http://URL/gnu/gnu_chat/emoticon/79.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_080","<img src=http://URL/gnu/gnu_chat/emoticon/80.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_081","<img src=http://URL/gnu/gnu_chat/emoticon/81.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_082","<img src=http://URL/gnu/gnu_chat/emoticon/82.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_083","<img src=http://URL/gnu/gnu_chat/emoticon/83.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_084","<img src=http://URL/gnu/gnu_chat/emoticon/84.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_085","<img src=http://URL/gnu/gnu_chat/emoticon/85.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_086","<img src=http://URL/gnu/gnu_chat/emoticon/86.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_087","<img src=http://URL/gnu/gnu_chat/emoticon/87.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_088","<img src=http://URL/gnu/gnu_chat/emoticon/88.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_089","<img src=http://URL/gnu/gnu_chat/emoticon/89.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_090","<img src=http://URL/gnu/gnu_chat/emoticon/90.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_091","<img src=http://URL/gnu/gnu_chat/emoticon/91.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_092","<img src=http://URL/gnu/gnu_chat/emoticon/92.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_093","<img src=http://URL/gnu/gnu_chat/emoticon/93.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_094","<img src=http://URL/gnu/gnu_chat/emoticon/94.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_095","<img src=http://URL/gnu/gnu_chat/emoticon/95.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_096","<img src=http://URL/gnu/gnu_chat/emoticon/96.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_097","<img src=http://URL/gnu/gnu_chat/emoticon/97.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_098","<img src=http://URL/gnu/gnu_chat/emoticon/98.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_099","<img src=http://URL/gnu/gnu_chat/emoticon/99.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_100","<img src=http://URL/gnu/gnu_chat/emoticon/100.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_101","<img src=http://URL/gnu/gnu_chat/emoticon/101.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_102","<img src=http://URL/gnu/gnu_chat/emoticon/102.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_103","<img src=http://URL/gnu/gnu_chat/emoticon/103.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_104","<img src=http://URL/gnu/gnu_chat/emoticon/104.gif width=18 height=18 border=0>",str);
str=str.replace("emtc_105","<img src=http://URL/gnu/gnu_chat/emoticon/105.gif width=18 height=18 border=0>",str);
return str;
}
여기 까지------------------------------------------
아래 채팅 출력 부분 원본----------------------------
// 채팅 출력부분
function chattext(str,col)
{
<?
if(file_exists('skin/'.$skinname.'/imoticon'))
{
$handle=@opendir('skin/'.$skinname.'/imoticon/.');
while (($file = @readdir($handle))!==false)
{ $imoticon=str_replace('.gif','',$file);
if(strpos($file,'.gif')>1)
{?>
str=str.replace("<?=$imoticon?>","<img src='imoticon/<?=$file?>'>");
<?}
}
@closedir($handle);
}
?>
str=sw_autolink(str);
chatview.document.body.insertAdjacentHTML('beforeEnd', '<font color='+col+'>'+str+'</font><br>');
chatview.document.body.scrollTop=99999999;
}
원본 끝--------------------------------------------
수정-----------------------------------------------
// 채팅 출력부분
function chattext(str,col)
{
str=emoticon_html(str);
str=sw_autolink(str);
chatview.document.body.insertAdjacentHTML('beforeEnd', '<font color='+col+'>'+str+'</font><br>');
chatview.document.body.scrollTop=99999999;
}
수정 끝--------------------------------------------
이모티콘이 많으면 불러오는데 시간이 약간 걸리뿐만 아니라
이모티콘 약간 깨집니다..적절한 개수로 짤라서 사용하세요..^^
-
-
저도 제로보드에 적용을 해봤는데 방만들기를 하면 계속해서 깨진방이라고 나옵니다.
수정은 맞게한것 같은데 뭔가 소스수정이 잘못 되었나 봅니다.
한번 봐주시겠어요?
제로보드를 사용하고 있고 주소는 <a href=http://miso.najoy.net target=_blank>http://miso.najoy.net</a> 입니다.
테스트 아이디 ; test 비밀번호 ; test
부탁좀 드릴께요.- 03-11-11
-
-
이모티콘이 깨지는 것은 그진 이모티콘 이미지 경로 문제입니다.
만약 제로보드라면 아래와 같이 URL경로를 적어주면 해결됩니다..^^
<img src=http://URL/제로보드 폴더명/길호챗 폴더명/emoticon/104.gif width=18 height=18 border=0>",str)- 03-11-11
-
-
-
-
-
-
제로보드에서의 사용법은 비슷합니다.
emo.php파일과 emoticon폴더를 채트 폴더안에 업로드 하시고
include "../gnu_chat/emo.php"; 되는 이경로를
include "../챗트폴더이름/emo.php"; 이렇게 하구요.
이미지경로는
str=str.replace("emtc_097","<img src=http://URL/gnu/gnu_chat/emoticon/97.gif
이걸전부
str=str.replace("emtc_022","<img src=/챗트폴더이름/emoticon/22.gif width=18 height=18 border=0>",str);
이렇게 수정하세요.^^엄청 노가입니다.
그다음 </form> <- 이부분 아래에
홈박스님 스킨중 00 기준
여기에 테이블블이 시작되면 이상하게 되버리더군요.^^
전아래처럼하니까 잘되네요^^
</form>
<TR>
<TD width=12><IMG SRC="skin/homebox00/images/homebox_chat_32.gif" HEIGHT=6></TD>
<TD width=54><IMG SRC="skin/homebox00/images/homebox_chat_33.gif" HEIGHT=6></TD>
<TD width=68 COLSPAN=2><IMG SRC="skin/homebox00/images/homebox_chat_34.gif" HEIGHT=6></TD>
<TD width=100% background="skin/homebox00/images/homebox_chat_35.gif"><IMG SRC="" HEIGHT=6></TD>
<TD width=53><IMG SRC="skin/homebox00/images/homebox_chat_36.gif" HEIGHT=6></TD>
<TD width=16><IMG SRC="skin/homebox00/images/homebox_chat_37.gif" HEIGHT=6></TD>
<TD width=16><IMG SRC="skin/homebox00/images/homebox_chat_38.gif" HEIGHT=6></TD>
<TD width=136><IMG SRC="skin/homebox00/images/homebox_chat_39.gif" HEIGHT=6></TD>
<TD width=13><IMG SRC="skin/homebox00/images/homebox_chat_40.gif" HEIGHT=6></TD>
</TR>
<TABLE width="600" BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"><!--이모티콘출력시작-->
<TR>
<TD align=center><div align=right>
<input onclick='showEmoticon()' type=checkbox name=Emoticons value='yes'><img src=./emoticon/i_emoticons.gif align=absmiddle border=0>이모티콘
</div>
</TD>
</TR>
<TR>
<TD align=center><? include "../kchat3/emo.php"; ?>
</TD>
</TR>
<table><!--이모티콘끝-->
</TABLE>
<OBJECT id="KChat" classid="clsid:86A9E0B2-B22C-4EF9-A29C-7870FAD5C072"- 03-11-04
-