UBB.Dev
Mod Name / Version: RaiderSoft UBBThreads Integrated Secure Chat 1.5

Description: This integrates RaiderSoft's Java Based Chatroom into your site and updates the who's online information.
This works with all versions of the RaiderSoft Chat Room (including the Free Version) but to get all the features to work (Database Authentication and the ability to view profiles) you'll need the Platinum Level Account (currently $100/year from RaiderSoft.com).
This will also update the Who's Online Screen with "In the Chat Room" if the user is in the chatroom.

Featues:
  • Integrates with the look/stylesheet of your UBB.Threads
  • Can automatically log the user into chat, using their Threads Username
  • Option to limit chat to logged in/registered users
  • Option to temporarily close the chatroom
  • Updates the Threads Who's Online page with "In The Chat Room" when users are using Chat.
  • Optional Instructions included to display the number of users in the chat room at the top of every page of your forum
  • Can Authenticate chat username/password against your UBB.Threads Forum User Database. This eliminates the possibility of users being able to login as or impersonate other users in the chat room. This is the most secure authentication method. (Requires Platinum Level Service)
  • Allws you to right click a user from the list in the chat room and view their profile. (Requires Platinum Level Service)


Demo: Here at ThreadsDev.com - click "Chat Room" in our menu bar. Thanks to Chris at Raidersoft for our License

Working Under: UBB.Threads 6.2-6.3

Mod Status: Finished

Any pre-requisites: A Chat Room at RaiderSoft

Author(s): JoshPet

Date: 08/07/03

Credits: Chris at Raidersoft.com for Commissioning it

Files Altered: ubbt_registerednav.tmpl, ubbt_unregisterednav.tmpl, /languages/english/online.php (ubbt.inc.php -optional)

New Files: chat.php, chatheader.php, chatroom.php, chatauth.php, chatprofile.php, chat.tmpl

Database Altered: No

Info/Instructions: Visit RaiderSoft to signup for an account. Start with a free account, which will enable you to set this up and test. You can upgrade your account at any time by logging in at the RaiderSoft site. While there is a "professional" level service, to make use of the Database authentication and the ability to view profiles in chat, be sure to upgrade to the "Platinum" level service. If you already have a RaiderSoft "Professional" level account, you can login at RaiderSoft and upgrade the account to the "Platinum" level Service.

Additional help/instructions and troubleshooting documentation is included in the Instruction file in the attached ZIP file.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.




Attached File
Josh, I'm glad that this worked out for the best.

Chris at RaiderSoft gave me a call in reference to some questions I had. We talked a bit and I had directed him to the hack you were working on as he was not aware of this. Figured it would be a good thing for the two of you to put your heads together and sort through this for the better of our community. He did mention that he would work on the licensing for ThreadsDev as well.

Glad it's all worked out and now...it's time for me to get this booger working.

Keep up the great work on the hacks!
Thanks to Chuck for helping out on this hack. However, I'm not getting authentication to work.

JOsh, I'm going through your instructions and I see this:

## In chat.tmpl template file
##

- Set the option if you are using AAS (Alternative Authtication System)
Requires a Platinum Raidersoft Account - details at www.raidersoft.com
If you are not using this option - or do not have a Platinum Raidersoft account
make sure you set this to 0.

- Edit your Raidersoft Chat Room ID Number
(If you are not sure, Login to your account at Raidersoft.com and click "Link
Instructions", you'll see your room ID number there - it's usually a 5 digit number).
---------------------------------------

I'm using the Platinum verion of SigmaChat now but even if I choose not to use the authentication directly from RaiderSoft...I don't see where a person would set their option to 0 in their chat.tmpl file.
Hmmm, okay, I got the authentication script working but it only works after the user logs in with his username and password.

Shouldn't this log the user in automatically with his username and password in which he registered with on the forums?
Figured I'd pop in and check out the chat room here but it stops loading after a bit giving the following error:

Exception: java.lang.NullPointerException

I haven't had much luck with Sun's Java on this PC running Win2k. Will take a peek again when I get home.
I don't have the code with me on this machine... but towards the top of the new template it'll say
$aas = 1;

Set that to 0 if you are not using AAS.

Have you altered the Applet code?
Sounds like you've taken out the auto login parameter.

Don't alter the code.... just substitute your chat room id number.

There should be an "auto login = yes" type parameter in there, that's what signs them in automatically.
Here's help in resolving the java setup on your machine:
http://client.sigmachat.com/help_connection.html
UBB Threads v6.3.1
SigmaChat Platinum
URL http://www.f-bodyhideout.com/ubbthreads/ubbthreads.php?Cat=

Thanks Josh for the response. The program is still not automatically logging our members in. Here's what I have in my ubbthreads/templates/chat.tmpl file:

=================================
// ## VARIABLES ##
// Are you using the RaiderSoft Alternative Authentication System (AAS)?
// Put 0 for NO and 1 for YES
$aas = 1;

// What is your Raidersoft Chatroom Number?
// Click "Link Instructions at Raidersoft.com if you're not sure
$roomnumber = 45816;

// END OF VARIABLES - Do Not Edit Below this Line

// if we are using AAS - pass the Password Parameter
if ($aas) {
$aasoutput = "<param name="password" value="$Password">";
}

echo <<<UBBTPRINT
$tbopen
<tr>
<td class="tdheader">
{$config['title']} - Chat Room
</td>
</tr>
$tbclose

$tbopen
<tr>
<td class="lighttable" align="center">

<!-- NOTE: You will need to alter the "room" number -->
<!-- Put the number of your chatroom where you see XXXXX below -->
<!-- Signup for Free or Paid Chatroom at www.raidersoft.com -->

<applet
codebase="http://client.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width=600 height=350 MAYSCRIPT>
<param name="room" value="$roomnumber">
<param name="cabbase" value="scclient_en.cab">
<param name="username" value="$Username">
$aasoutput
<param name="autologin" value="yes">
</applet>

</td>
</tr>
$tbclose
UBBTPRINT;
/* UBBTREMARK */ ?>
====================================
Ahh, it's probably because of the intense firewall they have here at work.

Will try again at home and see if it works.
Doh!

There was the issue...HELLO! Mark....read the damn instructions! Put the chat.tmpl file in the templates/default directory.

She's working like a charm Josh...great job buddy!
Good to hear. I tested pretty well here - but ya never know.
Works great at home. Of course I don't have Sun Java installed on this machine.

Nice job Josh.
Josh, this worked great. I wish RaiderSoft itself were more customizable, but your hack was a breeze. Thank you!
Heyya Josh...

I just pop'd your mod in, set up an account (Free) with raidersoft and when I run the chat.php I'm getting a blank screen??

Everything is set to 755, so uhhh ?? any ideas?

Does your browser support inline frames?

Do you have a link where I can see?
http://www.ladycakes.com/forum/chat.php

I've got both netscape 7.1 and IE 6 running, I'd like to think one of them would handle the Iframes.

I'd double check the chatheader.php and chatroom.php files. I can't think of any reason why they would be blank... but those are the 2 that aren't loading.
I dunno either, but it's odd, I looked at those files in notepad and they're one big run on line, not formatted at all. Looking at them in another editor and they're fine.

What'd you end up saving them in ??

BBEdit - same thing I do everything else.... but they shouldn't be one long line. That's probably the problem.

Both of those files require you to edit them... make sure that whatever you edit them in preserves the Unix linefeeds. That's probably it.

You might want to start with a fresh download or copy of those scripts (before you edit them) and make sure those line feeds get preserved.
Well I downloaded a fresh copy from here and still get the same results.

I used a direct link to the chat room by passing the mod and everything worked great.

Don't know what else to say.

I've probably got this mod running on ~40 or so sites right now. Make sure you are uploading your files in ASCII mode - there should be line feeds in there.
I think that's the biggest clue of what's wrong - when you looked and didn't see line feeds.

PM me with FTP details etc.... and I can see what happens if I drop the script on your server.
works like a charm on my setup.
I followed your install EXACTLY - it worked first time...

All my users love the option to chat if they ever wanted to

Thanks JP!
THANKS Josh....

I seem to have it working fine now. I basically loaded the files up in dreamweaver and then re-saved them and had dreamweaver do the upload to the server. Looks like cuteftp may be having a problem with ascii transfers... Either way, Nice Job on the mod.

Great hack, works fine here, I have just a minor problem: my side menu is cutted like shown in the attacched file...
Any suggestion ?

Attached picture 94730-Cut.jpg
What the chat page has to do - is load the header of the page in an IFRAME which contains the "send header" function. This part of the page refreshes every 9 minutes (or else the user drops off the Who's Online list after 10 minutes of not reloading any pages).

Then the middle of the page is another IFrame containing the chatmodule and the footer of the page.

So for this to work right, you need to turn off the sidebar on the chat page.

If you're using the IIP sidebar mod posted here - you can disable the sidebar on specific pages by placing:

$config['iip_call'] = 1;


above the send_header function on the page you don't want the sidebar.

If this doesn't work for you - you might be able to adapt the RaiderSoft stuff to this older chat mod that Dalantech and I worked on.
https://www.ubbdev.com/forum/showthreaded.php?Cat=0&Number=64465

It uses a regular page - so the sidebar will work fine. But instead of being able to refresh the header, it uses a little popup window which pops under the chat page, and refreshes every 9 minutes to update the who's online page.

But it's an old mod and was written for Jpilot.... but you could probably easily inert the Raidersoft chat code in instead.
Bumping this thread to ask if anyone is having problems with the RaiderSoft integration since RaiderSoft's recent upgrade. Some of my users are reporting difficulty getting out of the integrated chat page -- none of the header links ("main index," etc. -- the UBB links) are working for them, and the Java chat page constantly refreshes. I'm not having the problem myself so it's a little hard to describe.

Also, none of my Mac users can access chat anymore, but I think that is an issue of RaiderSoft's new Java implementations, whereas the other one seemed like it might have something to do with the actual integration with UBBthreads.
Hmm..... I have this on a few sites...... haven't had or heard any problems. I use a Mac as well.

I'd make sure the HTML in your header is prefect/validates (for exmaple no open tags by mistake etc....) as that can sometimes cause havoc with this type of stuff.
Okay, I will check that out. This is a brand new issue, though, and I definitely have not changed anything. It started when Raidersoft upgraded.
Installed this last week on my site and worked like a breeze!! Thanks Josh.

The only problem (with the free version) is that mischief makers can easily logout and login again using any other name. This is being misused by some impersonating as other members. I wish that the ONLY way to get into chatroom was through UBBT and no option for Login was there in the chat room. Anyway to do this?
No - not with the free version. The fully integrated one (paid version) you can authenticate against the Threads Database and even restrict it so it can ONLY be loaded from your domain name. But they don't give you the access to those controls for the free version.
I understood that, but as a policy we try to buy softwares as much as possible on a lifetime licence. Unfortunately Raidersoft doesnt seem to have any scheme like that. I will post on their support forum regarding this.

As a last issue Josh -- is it possible to have a "Invite User to Chat" somehow? Possibly through a popup box, which can be a) Accepted b) Declined c) Ignore for each session?
The links on the chat window don't break you out of the chat room. I had to use open other window commands to get the windows to open. That is on this 6.4 b2 site
Are you sure you added the bits to ubbt.inc.php to define

$target = "target="_top"";

Then make sure every link in your menu bar has the $targe tag in the URL. Or simply add:

target="_top"

To each link in the ubbt_registerednav.tmpl or ubbt_unregisterednav.tmpl

The problem I experienced was on this site.


I don't know. Works for me - and we've got it installed correctly.

What browser are you using? I'll see if I can test it here - but a target="_top" should be standards compliant.
working fine now.. not sure what happened. ie 6
Of interest... I went to raidersoft, registered a chat room, and then went to configure my site to use it.

You should know that they have added another server... In the chat.tmpl file, there is a url to their chat server...

The code in the tmpl file looks like this...

<applet
codebase="http://client.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width=600 height=350 MAYSCRIPT>
<param name="room" value="$roomnumber">
<param name="cabbase" value="scclient_en.cab">
<param name="username" value="$Username">
$aasoutput
<param name="autologin" value="yes">
</applet>

I couldnt get my chat room to connect. It kept saying the chat room was closed.... I talked to the admins there, and we figured it out finally that all chat rooms with a room number of OVER 50000 are on client1.sigmachat.com!! So if you are having problems, just add the "1" in the url and you will be good to go.

Hope this helps.

Deej
Ah - thanks for the tip.
Thank you very much for posting that tip, Deejay. I had the same problem, and came here to see if anyone else did. And sure enough, a solution was here -- posted not even two hours ago. Now everything works.

ThreadsDev.com is a truly excellent resource!
is it possible to have this set to a different timer than whos online? my chatroom says I have way to many folks most of the time with the whos online having a 90 minute setting.
In ubbt.inc.php

Where the query is done to determine how many peopl are in chat - Above the query add this:

$LastOnChat = $this -> get_date() - 600;

600 seconds is 10 minutes.


Then alter the query a bit like this

$query = "
SELECT COUNT(*)
FROM {$config['tbprefix']}Online
WHERE O_Last > '$LastOnChat'
AND (O_What = 'chatheader' OR O_What = 'chatroom' OR O_What = 'chat')
";


That should do it independanly of Who's Online.
Changed it and site still running will let you know if the complaints go down

thanks
[] Thank you very much for posting that tip, Deejay. I had the same problem, and came here to see if anyone else did. And sure enough, a solution was here -- posted not even two hours ago. Now everything works [/]

Cool! I helped people!
Okay, I've got 2 questions. Do these instructions work for 6.4?
And...
What would it take to have multiple chat rooms?
Yes for 6.4, we're using it here. It's pretty much an addon, no real threads files even altered except for the link in the menubar and the online langugae file.

I believe the paid version of raidersoft allows multiple rooms. But I'm not sure. You'd have to visit www.raidersoft.com and check out the various plans to be sure.
I was looking at thier plans and the higher end plans do allow for multiple rooms. So, basically, I would just need to put multiple links in the nav bar(or whereever) pointing to the appropriate place.

Thanks Josh.
No - I don't think you can pass the room value in the parameters. I think I've asked them about that on their support forum.

I *think* the multiple rooms are picked with a "pull down" menu of room names right at the chat interface.
Josh,

I downloaded the mod and got it working with a bit of changes on the java applet. Which version of Radiersoft is this site running ? the free one ? I would like to try a site that has the pro version to see if it looks any better. My folks DONT like it compared to the digichat software I currently run, but I sure do like the intergration that this version has.
I was wondering if there was any way to limit the chatroom to one group. I created a group on my board called "chat" and I want only that group to have access to the chatroom. Can this be done?

Thank you!
Yeah, there are lots of threads around here which cover general group restriction in more detail. but basically below the authenticate() function, add something like this: (substitute the group number you want to allow)

- Add U_Groups into the authenticate() function query.

- Below it add:
Code
<br />if (!strstr($user['U_Groups'],"-5-")) {<br />   $html = new html;<br />   $html -> not_right("you are not allowed to do this.",$Cat);<br />}<br />


The above would all user group 5 access to the chatroom and block everyone else.
Got this added back in with 6.4.1 but for some reason I can not figure out how to make the "There is currently 1 user in the Chat Room. Join them!" center bellow the navigation table. Right now it is stuck under the welcome table.

Please help
In the <td class where the $chatoutput is definated - you'll need to add a 'colspan="2"' as the new menu has 2 columns.

Look for both lines that have this:

<td class="lighttable" align="center">

Change to this:

<td class="lighttable" colspan="2" align="center">
Josh, you can read my mind. Thats frightening. Yesterday I set up the chat for testing and got the table problem with the nav-bar. I put in the colspan and got to bed.

Right now I come back to write it here in this thread and see that this done

But there is something else: in chat.tmpl is the codebase url. After verify the link generator from Raidersoft i notice that I got an other url:
codebase="http://client1.sigmachat.com/current/

You have in your template:
codebase="http://client.sigmachat.com/current/
Yes, good point - I think they have multiple chat servers now - next update I should move that to a variable.
[]JoshPet said:
In the <td class where the $chatoutput is definated - you'll need to add a 'colspan="2"' as the new menu has 2 columns.

Look for both lines that have this:

<td class="lighttable" align="center">

Change to this:

<td class="lighttable" colspan="2" align="center"> [/]
THANK YOU
For some reason chatheader.php is not "refreshing" like it use to when installed with 6.3.2. Could I have not installed it correctly, or is there something that needs to be changed to make it refresh with 6.4.1?
It should function the same way - in fact it's the same file - should just be using a Meta refresh in the file to do this.
[]JoshPet said:
It should function the same way - in fact it's the same file - should just be using a Meta refresh in the file to do this. [/]
Interesting

Maybe it's my browser or something as it is definetly not refreshing. I am using IE 6
I just installed this mod on my server and the applet doesn't run. It reads "Applet Halted. This chat room is closed."

I already made sure that my room number was entered properly. I am also pretty sure that it is not a java problem for me because the chat room works when I link to it directly.

Any ideas how to fix this.
Yeah, follow their java help at the www.raidersoft.com site. Also - an update to this mod. Search the chat.tmpl file - for the name of the actual server - and verify it against your own server. Since this mod was made - they started using different server names as they grew.

So the mod may have something like "client.sigmachat.com" but verify against the links & code they give you and you'll really need to use "client1.sigmachat.com" or "client2.sigmachat.com" or similar. So edit the applet code accordingly in the chat.tmpl file.

Those instructions need to be updated here as I think they now have multiple chat servers.
I discovered this when I installed it a long time ago, I thought I posted it here []http://www.guitars101.com/boards/images/graemlins/headscratch.gif[/] shame on me for not sharing that with the group.
I think it's mentioned several times in this thread.
Bad on me for not checking the thread before asking . Thanks Josh for the help.
It's a cool add-on to threads.
Whos in the chat room not working independent on my whosonline in chat updates again. I have it listed like previously in this thread.

Would this have changed in 6.4

[] // ----------------------------
// Let's see if there are any people in the chat room - by JoshPet
$LastOnChat = $this -> get_date() - 600;
$query = "
SELECT COUNT(*)
FROM {$config['tbprefix']}Online
WHERE O_Last > '$LastOnChat'
AND (O_What = 'chatheader' OR O_What = 'chatroom' OR O_What = 'chat')
";
$sth = $dbh -> do_query($query);
list($chatcount) = $dbh -> fetch_array($sth);
if ($chatcount == "1") {
$chatoutput = "<tr><td class="lighttable" colspan="2" align="center"><b>There is currently $chatcount user in the <a href="{$config['phpurl']}/chat.php" target="_top">Chat Room</a>. Join them!</td></tr>";
}
else if ($chatcount > "1") {
$chatoutput = "<tr><td class="lighttable" colspan="2" align="center"><b>There are currently $chatcount users in the <a href="{$config['phpurl']}/chat.php" target="_top">Chat Room</a>. Join them!</td></tr>";
}
else {
$chatoutput = "";
}
[/]

My most frequent complaint..
trying it with a reduced time -280

since I have it set at 90 minute on regular board should I set it to something -4800 (600 =10 minutes x 8) to correct for delay?
doesn't seem to make any difference at what I set time. it just reads how many are on screen in whosonline and reports that. trying - 10600 and still no twitching of meter..ugh
Changing the time should do it - the only change needed for 6.4 (and I swear there's a 6.4 version of this posted somewhere, I'm using it on alot of sites).

This line:

$LastOnChat = $this -> get_date() - 600;

Should be change to this:

$LastOnChat = $this -> get_date() - ($config['onlinetime'] * 60);

Then it should adjust based on your config time.
Thanks not sure what is not working on this but will leave it be for now. I swapped out the code didn't appear to make a difference. (still reading all screen names that have been in chat)
Will see how it does next couple days.
* I installed this and it works like a charm (although I have no idea how to log in and mod it) but now all of a sudden I'm getting a "?>" at the top of every page that uses the generic header. A view source of the rendered code gives me this:
[]
?>
<!-- START OF header.tmpl TEMPLATE -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr">
<link rel="SHORTCUT ICON" href="http://www.calpernia.com/favicon.ico" />
<head>[/]
* I don't know where that ?> is coming from, or where that line <!-- START of header.tmpl is coming from, I did a sitewide code search and could not find that string in my code anywhere.
* This isn't a chat mod question per se, but the problem came up after installation, and I can't find where I messed anything up. Everything works, just that extra code there...
© UBB.Developers