|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Hi..
I am not very good at programming.. and wanted to ask someone how I might go about doing something.
We use a Java chat program, called realchat, which is basically kicked off from a simple Java Applet. The program can be set to take information from a current login session, like username etc.. the only information I want to use, is the users login name, or forum display name.. but I have no idea how to get that information to the applett..
Ideally, id love to add a CHAT button to the top, that loads up the applett, and pipes the display name straight into it, and logs that user into chat.
Can anyone give me any help? If its not a huge job id be happy to pay a bit to have it done?
I am using 6.2.3
-applet codebase = "." archive = "RealChat.jar" code = "rcs.client.RealChatClient.class" name = "ChatClient" width = "300" height = "100" MAYSCRIPT>
<param name="nick" value="BadJohn">
<param name="pValue1" value="John Doe"> <param name="pValue2" value="35">
<param name="pLabel3" value="Favorite drink:"> <param name="pValue3" value="beer">
<param name="canChangeProfile" value="no">
The "Nick" field would need to be the display name.. the others are not required.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
There is a mod in this forum that allows you to put your chat inside a generic threads page.
it has the authenticate() function at the top, and defines the Username as $Username.
Then you simply put $Username where you want the name to go in your chat stuff.
I use it at measurection.com so when they enter chat, their username is already defined.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Like try this one But replace the jpilot applet code with the code needed for your chat software, and put $Username where you want the name filled in. 
|
|
|
|
Joined: Jan 2002
Posts: 674
Junior Member
|
Junior Member
Joined: Jan 2002
Posts: 674 |
Cool just found I can pass this info with my raidersoft applet too. What is the passed on name for password?
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Thanks Josh..
However I do not understand where I have to paste the code into online.php?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
That entry in the online.php language file would go just above this:
?>
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Password is not as easy (or possible) as the threads password is done with a one-way MD5 encryption. Which can't be reversed. So if you pulled the password from the DB, it wouldn't match the chat password.
What I do is simply require that they are logged in (which chat does) then their chat name is the same as the username. Passwords aren't needed. I use JPilot, so I don't know how raiderchat does it.
You could create another field in the DB to store the chat password.
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Thanks. If your on MSN josh any chance I can ask a few things, as I have no idea what im doing <blush> [] [email protected][/]
|
|
|
|
Joined: Jan 2002
Posts: 674
Junior Member
|
Junior Member
Joined: Jan 2002
Posts: 674 |
Thanks Josh I was just realizing that for the login and made it auto login so it passes their user name right in. Only the admins get stopped at login and asked for a password... which is perfect 
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I don't really have any chat things installed. Sort of by design. Impossible to get work done with the instant messenger things. 
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Its working!
What a superb addon.. full marks!
Is there a list of items that we can pass across anywhere, you know, items from the profile etc?
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
I notice when people are in chat, that they "whos online" status is shown as "Private". Is there any way to change this to something like "In chat" ?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Sure.... you need to add an entry to the online.php language file. See this.
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Aha that would explain the earlier one.. I was putting it in the wrong file..
Is there a way of pulling other info across from the user profile?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
yes, Basically depending on what it is.... you need to add the field names into the authenticate function at the top. Something like this: $user = $userob -> authenticate("U_Title,U_Groups,U_Number"); $Username = $user['U_Username']; $Password = $user['U_Password']; $Usernumber = $user['U_Number']; $Groups = $user['U_Groups']; $Profile = $user['U_Title']; Then use those variables as needed. 
|
|
|
|
Joined: Aug 2002
Posts: 22
Newbie
|
Newbie
Joined: Aug 2002
Posts: 22 |
If it helps, here's my RealChat applet file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"><br /><?<br /><br />// Require the library<br /> require ("C:/inetpub/wwwroot/ubbthreads/main.inc.php");<br /> $userob = new user;<br /> $user = $userob -> authenticate("U_Username,U_Name,U_Location,U_Homepage,U_Fakeemail,U_Title,U_Hobbies");<br /> $Username = $user['U_Username'];<br /> $Email = $user['U_Fakeemail'];<br /> $RealName = $user['U_Name'];<br /> $Location = $user['U_Location'];<br /> $Homepage = $user['U_Homepage'];<br /> $Title = $user['U_Title'];<br /> $Hobbies = $user['U_Hobbies'];<br /><br /><br /><br />if ($user['U_Username'] == "") {<br />// $Username = guest;<br /> exit("There has been a login error. Please close this window and login to the forums before retrying.");<br />}<br />?><br /><html><br /><head><br /><title>applet frame</title><br /></head><br /><br /><body topmargin=0 leftmargin=0><br /><br /><!-- Begin: RealChat Client code --><br /><applet<br /> archive = "RealChat.jar"<br /> codebase = "../"<br /> code = "rcs.client.RealChatClient.class"<br /> name = "ChatClient"<br /> width = "100%"<br /> height = "100%"<br /> align = "top"<br /> MAYSCRIPT><br /><br /><param name="embedded" value="yes"><br /><br /><param name="logoImage" value="IHIQSlogo.jpg"><br /><param name="hasLogoImage" value="yes"><br /><param name="logoImageAlignment" value="left"<br /><br /><param name="onCloseURL" value="IHIQS/exit.html"><br /><param name="onCloseURLTarget" value="_top"><br /><br /><param name="nick" value='<? print $Username ?>'><br /><br /><param name="canChangeProfile" value="yes"><br /><br /><param name="pValue1" value='<? print $RealName ?>'><br /><param name="pValue2" value=""><br /><param name="pValue3" value=""><br /><param name="pValue4" value='<? print $Location ?>'><br /><param name="pValue5" value='<? print $Homepage ?>'><br /><param name="pValue6" value='<? print $Email ?>'><br /><br /><param name="pLabel7" value="Forum Title:"><br /><param name="pValue7" value='<? print $Title ?>'><br /><param name="pLabel8" value="Hobbies:"><br /><param name="pValue8" value='<? print $Hobbies ?>'><br /><br /><br /><param name="mainPanelColors" value="FFFFFF,0A1849"><br /><param name="loginPanelColors" value="FFFFFF,BE262C"><br /><param name="tabPanelColors" value="FFFFFF,336699"><br /><param name="listColors" value="FFFFFF,CCCCCC"><br /><param name="userPanelColors" value="FFFFFF,336699"><br /><param name="myChatPanelColors" value="FFFFFF,336699"><br /><param name="dialogColors" value="FFFFFF,336699"><br /><br /><br />RealChat Client requires a Java Compatible web browser to run. Please visit our <a target="_blank" href="http://www.rcsoft.net/">Java support page</a> for details.<br /><br /></applet><br /><br /><br /><!-- End: RealChat Client code --><br /></body><br /></html> Bill
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|