• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Phylix

#1
Spht's Forum / Re: Web chat user login
January 15, 2006, 03:20 AM
Have the page with the framesets point to name.htm where you want them to submit the message.  It's not a login page, but adding that shouldn't be too hard with a little modification to name.htm.

-Users don't need to know the password to submit messages.
-If the first character in the message is "/" then their name won't be added to the message.

name.htm:

<head><title>Enter Your Name</title>
<script language="Javascript"><!--
function sf(){document.forms[0].Name.focus();}
//--></script></head>
<body bgcolor="black" onLoad=sf()>
<form method="GET" action="/message.php">
<font color=white>Enter Your Name to Chat:&nbsp;&nbsp;<input type="text" name="Username" size="25" maxlength="20">&nbsp;
<input type="submit" value="Submit" name="cmdSubmit"></form></body>


message.php:

<?php
$BotName
="YourBotName";
$Password="YourChatPassword";
$Username=$_GET['Username'];
$RedirectURL="http://www.yourwebhost.com/message.php?Username=" $Username;

if (
$message != '' && $message{0} != '/') {
$Msg=$Username ": " $message;
$RemoteURL "http://www.valhallalegends.com/skywing/isapi/BinaryChatISAPI.dll?sendtext&bot=" $BotName "&message=" $Msg "&password=" $Password "&redirect=" $RedirectURL;
header("location:$RemoteURL");
} else {
if ($message{0} == '/') {
$Msg=$message;
$RemoteURL "http://www.valhallalegends.com/skywing/isapi/BinaryChatISAPI.dll?sendtext&bot=" $BotName "&message=" $Msg "&password=" $Password "&redirect=" $RedirectURL;
header("location:$RemoteURL");
}
}

?>

<script language="Javascript"><!--
function sf(){document.forms[0].message.focus();}
//--></script>

<body bgcolor="black" onLoad=sf()>
<form method="GET" action="/message.php">
<input type="hidden" name="Username" value="<?php echo $_GET['Username']; ?>">
<input type="text" name="message" size="100">&nbsp;
<input type="submit" value="Send" name="cmdSubmit"></form>


Doing it in PHP was much easier.  I'm still having problems doing it in ASP, but I'll post again when I get it working.
#2
Got it working perfectly.  Thanks!  I'll work on doing this:
Quote from: Phylix on January 05, 2006, 11:44 PM
Is it possible to have a custom "web chat" page?

Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.
Quote

Sounds great.  I proposed something like that here.
Quote

And post if I get it working.
#3
Quote from: Spht on January 06, 2006, 12:00 PM
Yes, take a look at this page.  That is a simple send form which uses binarychat_isapi_submission_page_send.asp to send a message.  Look at the source of binarychat_isapi_submission_page.asp to see how it works.  binarychat_isapi_submission_page_send.asp sends a simple send query to the BinaryChatISAPI.dll then redirects you back to the send form page.  I was planning on writing little documentation on exactly how to send messages from the web using BinaryChatISAPI.dll.  I'll probably do it at some point...
Ah...  I see.  What I've been trying to do was submitting the data to binarychat_isapi_submission_page_send.asp and my custom web chat page.  Then have it load that custom page instead of the binarychat_isapi_submission_page_send.asp page.  Can you show an example of that query or the ASP part of the source?

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PM
Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.
Sounds great.  I proposed something like that here.

Hm...  I think it'll be pretty easy if I get the custom web chat page working.

Quote from: Spht on January 06, 2006, 12:00 PM
That's doable.  I added that non-toggible feature because I like the idea of knowing everything is being logged without any effort from me.  I'd be interested in knowing your reason for wanting it toggible.

I have another bot running for that since WebBot doesn't have commands to allow users to view their latency (My friends are obsessed with their ping.  Most command used), last few users the bot had seen, and other things.

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PMoption to sign on to Battle.net on start up,

That's planned for the next update.

Oh, awesome.

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PMautomatically going to the bottom of the text feed on page load,

That's a good idea, but I don't have much control over it.  BinaryChatISAPI.dll creates all the web content you see, and that project is maintained by Skywing. 

Oh.  I guessed that much, but thought you might have a little influence over it.

Quote from: Spht on January 06, 2006, 12:00 PM
It does automatically scroll when new content is added when you use the default BinaryChatISAPI.dll?channeltextstream instead of channeltextex, hence "live channel feed."
Yeah, noticed that part.  Didn't know about channeltextex.  Good to know, though.
#4
Ah...  Thanks.  Thought it was two hours fast because of my bad military to GMT conversion.  It's still an hour ahead, but I guess I'll probably get it after some more fiddling around.
#5
Is it possible to have a custom "web chat" page?  I have a lot of time on my hands and not much to do so I've been trying to make the page as close to perfect as I can and easy for people viewing the channel through their browser.  I've managed to make it easier so far by just automatically inserting the password.  I know, a little stupid, but I can trust my friends to not spam and people I don't know don't know the URL to the page with the saved password.  I'd like to have it a little neater and have the Message text box take focus when the page loads.  A short javascript function does it:

<body onLoad=sf()>
<SCRIPT LANGUAGE="JavaScript">
<!--
function sf(){document.forms[0].message.focus();}
//-->
</script>

Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.

But, yeah...  Thank you for WebBot.  Been using it for a few years now and it's great.

Oh, and five more things.  Option to turn logging off, option to sign on to Battle.net on start up, automatically going to the bottom of the text feed on page load, option for GMT or Military time, and have it display the time on the computer running WebBot instead of where ever the time comes from when it's displayed on the text feed (I'm guessing BotNet).  Heh...  I just keep seeing more things to change.