Net4TV
Front
News
Features
Op n' Ed
Voxpop
Community
Archive
Subscription


Switch background color
<IMG SRC="graphics/section/voice_voice.jpg" Width="448" Height="90" border=0>
Feature
Make Your Own Basic Chat Plus


By Diane Dumas
(November 7, 1999)

It's been a very long time since I've written new IRC chat code. It was about time to do an updated chat IRC for WebTV. This is my latest code for a basic chat IRC for WebTV.

I've incorporated some new design changes in this chat IRC that have never been used before in other chat's that I've written.

Some of the new changes are; Plus upgrade audio ready, new room changer code, background colors with no background on the screen text provided from WebTV, and chatURL variable is now automatically located for you no matter what file name you use to save the chat on your homepage.

This chat will default load to my chat room on Net4TV chat server. To modify the code to default to your own chat room, change HPCK[0]="YOUR CHAT SERVER", HPCK=[1]="YOUR PORT", and HPCK[2]="YOUR CHAT ROOM NAME". HPCK[3]="PASSWORD" is used if you have room operator previlages.

You may also use your WebTV "save" button to save a chat room to your "favorites" folder. You can then set up a "F" key shortcut to load back your favorite chat rooms.

This chat has the plus audio fix so that the WebTV Plus will not stop playing audio (music) when you type text or press buttons while your are chatting.

You can also change the Background Color of the chat screen by pressing the BG button. You can type a 3 number #RBG code or use a color name, such as "black". I've set the default color as #181818, which is a light black color.

To send a private message, use the 1-1 button. This will whisper a message which can only be seen by you and the person you are sending it to.

The (4) boxes located at the bottom of the chat allow you to change chat rooms. The first box is for the Chat Server. Second is for the Port Number. The Third one, is for the name of the Chat Room. The last box, is for a Password for Room OPS if you are the room owner.

I hope you will enjoy using this chat and I will continue to write more in the future! :)

Sincerely,
Diane Dumas~

Use the LINK below to Transload the Chat IRC to your Homepage or use the Cut & Paste code.

Transload

NOTE: If you use the Cut & Paste Code, use WebTV text size "Small" to edit the file. Sometimes "hidden" space will creap into the code causing the lines of code to break to a new line. If this happens, the chat won't work until the line of code is restored back to one line again.

CUT & PASTE CODE

<HTML>
<!-- Basic Chat Plus 1 by Diane Dumas -->
<!-- This is NOT copyrighted - you may Transload Chat -->
<HEAD>
<TITLE>Basic Chat Plus 1</TITLE>
<SCRIPT>
HPCK=new Array(5)
// Find Chat IRC file Name
chatURL=document.URL.toString()
chatURL=chatURL.substring(chatURL.lastIndexOf("/")+1)
//
if (chatURL.indexOf("?") < 0) {
//
// CHANGE CODE BELOW TO DEFAULT TO YOUR OWN CHAT ROOM
HPCK[0]="chat.net4tv.com"
HPCK[1]="6667"
HPCK[2]="Diane's_Place"
HPCK[3]=""
//
}else{
chatserv=chatURL.substring(chatURL.lastIndexOf("?")+1)
HPCK=chatserv.split("&")
}
// Connect to Chat Server
document.write("<wtvchat host="+HPCK[0]+" port="+HPCK[1]+" channel=#"+HPCK[2]+" key="+HPCK[3]+">")
//
function addMessage() {
Chat.addChannelMessage(document.chat.input.value)
document.chat.input.value=""
}
function ChangeBG() {
BG=prompt('Enter Background Color: RGB# or Color Name')
document.bgColor=BG
document.chat.input.focus()
}
function Connect() {
chatserv=document.settings.serv.value+"&"
chatserv+=document.settings.port.value+"&"
chatserv+=document.settings.chan.value+"&"
chatserv+=document.settings.key.value
location.href=chatURL+"?"+chatserv
}
</SCRIPT>
</HEAD>
<BODY bgcolor=181818 onLoad="timer=setTimeout('document.chat.input.focus()',3000)">
<center>
<table><tr>
<td align=center>
<a href="http://net4tv.com/chat/index.html">
<img src="http://net4tv.com/chat/bg/dianeIRC.gif"></a>
</table>
<table><tr>
<td>
<wtvchattranscript height=200 width="100%" nobackground>
</table>
<table><tr>
<td>
<form id="chat">
<input id="input" action="javascript:void()" width="100%" bgcolor=181818 text=gold cursor=gold font=proportional autoactivate nohighlight onClick="addMessage()">
<td>
<input type="button" text=gold value="1-1" borderimage=file://ROM/Borders/ButtonBorder2.bif onClick="window.open('whisper.panel','whisper'); document.chat.input.focus()">
<td>
<input type="button" text=gold value="BG" borderimage=file://ROM/Borders/ButtonBorder2.bif onClick="ChangeBG()">
</table>
<table><tr>
<td>
<form name="settings">
<input name="serv" bgcolor=black text=gold cursor=gold size=17>
<input name="port" bgcolor=black text=gold cursor=gold size=4>
<input name="chan" bgcolor=black text=gold cursor=gold size=14>
<input type="password" name="key" bgcolor=black text=gold cursor=gold size=4>
<input type="button" text=gold value="Connect" borderimage=file://ROM/Borders/ButtonBorder2.bif onClick="Connect()">
<script>
document.settings.serv.value=HPCK[0]
document.settings.port.value=HPCK[1]
document.settings.chan.value=HPCK[2]
document.settings.key.value=HPCK[3]
</script>
</table>
</center>
</BODY>
</HTML>


To Top of Page

Welcome to Net4TV Voice
Meet your fellow users who create
Net4TV Voice in the Masthead.

View our Privacy Policy.


Net4TV, Net4TV Voice, Chat4TV, and Surfari
are trademarks of Net4TV Corporation
© 1998 - 2001, Net4TV Corporation. All Rights Reserved.