UBB.Dev
Posted By: Dalantech [6.2] Integrated Jpilot chat - 01/11/2003 5:46 PM
What is it?: An add on to add Jpilot chat to your Threads install.

Why would I care?: This mod uses a template, and only allows registered users to chat.

Who gets the props?: Dave_L for the code to convert spaces to underscores. JoshPet for letting me use his popup script and omegatron for allowing me to see his chat script.

How do I install it?:

1) Copy jchat.php and chatpopup.php script to your ubbthreads directory.

2) Edit the jchat.tmpl file and change "dachat" to the name of the chat channel you want to use.

<param name="Channel1" value="dachat" />

3) Copy the jchat.tmpl file to your ubbthreads/templates/default/ directory.

4) Add
Code
 $ubbt_lang['jchat'] = 	"In the Chat Room"; 
to the online.php file in all of your language directories.

5) Download a copy of Jpilot and copy it to a directory named chat under your ubbthreads directory (mine is in ubbthreads/chat).

For more info on configuring Jpilot see their web site.

<Da_Soap_Box>

I could have easily named this add on "How to add something to Threads using a "Threads like" template file". My challenge to all future mods for Threads is that if you create a new php script that you also make that script use a template file. It's a lot easier for most people to edit a template than it is for them to edit a php script. Plus we might just start seeing some of these add ons in the addons folder of a future Threads release.

</Da_Soap_Box>

Enjoy <img src="/threads/php/images/graemlins/smile.gif" alt="" />

Version 1.1 now includes a popup window to update the who's online display.

Attached File
64465-Jchat.zip  (120 downloads)
Posted By: JustDave Re: Integrated Jpilot chat - 01/11/2003 5:56 PM
I know there are a bunch of users that will get a lot of use out of this. Thanks!
Posted By: Dalantech Re: Integrated Jpilot chat - 01/11/2003 5:59 PM


There are a couple variations of this one floating around, but I figured I'd write one that uses a template

It's all your fault JustDave...
Posted By: omegatron Re: Integrated Jpilot chat - 01/11/2003 6:45 PM
Thanks Dalantech I was actuall thinking of this a few weeks ago. Your right there are quite a few chat mods around here. Good to be updated.
Posted By: Dalantech Re: Integrated Jpilot chat - 01/11/2003 6:57 PM
Thank you for letting me see your chat script!
Posted By: omegatron Re: Integrated Jpilot chat - 01/11/2003 7:06 PM
thats why its posted here so everyone can have a chat.

Now if I can ever get instant messaging done again like I had in UBB I will be a happy camper. Shout box is close but not exactly what I want.
Posted By: Ian_W Re: Integrated Jpilot chat - 01/11/2003 7:07 PM
Thanks Dlanatech - keep meaning to re-install the chatroom - maybe this will prompt me to do it LOL

Ian
Posted By: JoshPet Re: Integrated Jpilot chat - 01/11/2003 9:38 PM
Great Job!
Posted By: Dalantech Re: Integrated Jpilot chat - 01/11/2003 10:33 PM
Thanks for your help on it
Posted By: monkeyra Re: Integrated Jpilot chat - 01/15/2003 9:28 PM
Just something i want to run by you guys before I install this.
My site uses Jpilot, and IIRC, it logs you onto irc.webchat.org? (correct me if i'm wrong).
The only problem I forsee myself having is with usernames. Because I have a channel registered on irc.webchat.org, if someone from my site comes into the room and someone else on the server is using that name, and has it protected (aggresively or not) they get renamed as guest in the chatroom. how would this affect threads?
I'm a bit confused as to how this works at the monent tbh!
Posted By: Dalantech Re: Integrated Jpilot chat - 01/15/2003 11:32 PM
No effect at all on Threads. The user name is passed to Jpilot as the user's nickname for the chat session, but that's all. It just makes it easy for the IRC newbies on your site to log into the IRC server.

Look at the comments in my script and you'll understand what it's doing a lot better.
Posted By: AllenAyres Re: Integrated Jpilot chat - 01/16/2003 12:14 AM
nice job
Posted By: monkeyra Re: Integrated Jpilot chat - 01/16/2003 1:00 AM
aha! Thanks, I understand now.
Posted By: Allusivekudos Re: Integrated Jpilot chat - 01/16/2003 3:37 AM
I'm trying to find info on admin commands for the chatroom stuff...I've never really gotten into it, but figured now would be a good time to start. I have it all set up on my board, and it works very well. However, before I let people know about it, I figured I should make the other admins admins of the chat too (is it possible?) I'm looking for administrator commands for the chatroom on jpilot.com but their forums are down and the command section doesn't deal with it...

Any other places to look?

-peter
Posted By: Dalantech Re: Integrated Jpilot chat - 01/16/2003 10:50 AM
Thanks
Posted By: Dalantech Re: Integrated Jpilot chat - 01/16/2003 10:54 AM
IRC Commands
Posted By: Allusivekudos Re: Integrated Jpilot chat - 01/18/2003 6:00 AM
Thanks a bunch! Is there any chance I can have the chatroom info like who's in the chat show in the WOL?

Thanks again for everything!

-peter
Posted By: Dalantech Re: Integrated Jpilot chat - 01/18/2003 9:43 AM
I think people show up as "private" even though the chat script is in the Threads directory, and I'm not realy sure how to make them show up as being in the chat. Can anyone point me in the right direction for making it work?
Posted By: JoshPet Re: Integrated Jpilot chat - 01/18/2003 12:08 PM
If the page is called "chat.php"

In the languages/english/online.php language file, add this:


$ubbt_lang['chat'] = "In the Chat Room";
Posted By: Dalantech Re: Integrated Jpilot chat - 01/18/2003 12:11 PM
Proving, yet again, that you rule!

Thanks!
Posted By: JoshPet Re: Integrated Jpilot chat - 01/18/2003 1:27 PM
You are doing quite nicely here yourself lately... all sorts of cool stuff that you've been posting.
Posted By: Dalantech Re: Integrated Jpilot chat - 01/18/2003 2:00 PM
Thanks

Just trying to give something back...
Posted By: Allusivekudos Re: Integrated Jpilot chat - 01/19/2003 6:29 PM
Perfect! Thank you muchly! Do you know if it's possible or how to now add how many people are in the chatroom? Almost like another WOL completely, for the chat?

Thank you!

-peter
Posted By: Dalantech Re: Integrated Jpilot chat - 01/19/2003 8:04 PM
No idea, unless you are in the chat with them

The way that you are tracked by Threads is when you click on a link (to load a list of posts in a forum, for example). Because the chat page is static, and Who's Online updates every 10 minutes, people have a tendancy to "fall off" of who's online when they are in the chat.

JoshPet solved this problem by creating a java script that updates your online status every 9 minutes, but I don't use it in my hack.

The odd thing that I've noticed is that sometimes I'll show up on a different page in the who's online display, even though the only page I have open is the chat. Unfortunately I don't know enough about how the who's online script works and I haven't had time to sit down and figure it out.
Posted By: Organizer Re: Integrated Jpilot chat - 01/20/2003 1:26 AM
Has anyone done this, so I can view it on action???
Posted By: omegatron Re: Integrated Jpilot chat - 01/20/2003 1:56 AM
You can check it out here

http://www.reeftalk.com/ubbthreads/chat/jchat.php
Posted By: JoshPet Re: Integrated Jpilot chat - 01/20/2003 5:05 AM
[]Has anyone done this, so I can view it on action??? [/]

I've got it at measurection.

Username: testing
password: testing

Then click the chat button at the top.

The little popup will update the Who's online information every 9 minutes. The top of every page in my threads tells how many users are in Chat.

Posted By: Dalantech Re: Integrated Jpilot chat - 01/20/2003 11:43 AM
There is a section of code in the jchat.php script that's unnecessary. After reviewing the main.inc.php file (and the ubbt.inc.php file) the table wrappers are defined when you call the library, so you can remove:

Code
 <br />// --------------------- <br />// Grab the tablewrapper <br />   list($tbopen,$tbclose) = $html -> table_wrapper(); <br />


and the chat script will work just fine. I actually wrote that section incorrectly anyway (I should have put [:"purple"] $html = new html;[/] on the line above the list statement). Live and learn...

I'll update the zip file later

Update: I should either drink more coffee or get more sleep. The script is OK as is. I'll update the original zip file, but you do need to grab the table wrapper otherwisw tbopen and tbclose are empty.
Posted By: Dalantech Re: Integrated Jpilot chat - 01/21/2003 6:58 PM
Zip file updated
Posted By: deltajo Re: Integrated Jpilot chat - 01/24/2003 5:39 PM
[]The little popup will update the Who's online information every 9 minutes...[/]

Josh, I was trying to go for this, but couldn't get it. If you can spare the time, could you review this with me?

I added this code to my jchat.tmpl:

[:"red"] <script language="javascript" type="text/javascript"> window.open
('http://www.mysite.com/threads/chatpopup.php?
Cat=&Username=$Username&Usernumber=$Usernumber',
'chatpopup','width=300,height=250,top=100,left=150,screenX=1,screenY=1,
scrollbars=yes,resizable=yes');</script>[/]

...and just put this in my new "chatpopup.php":

[:"red"] <script language="javascript" type="text/javascript"> window.blur();</script>
<meta http-equiv="refresh" content="500">
<div align="center"><b><font size="2">Please leave this window open while you
are in the Chat Room.</font></b></div>[/]

I also added the language
[:"red"]$ubbt_lang['jchat'] = "In Chat Room"; [/]
to online.php.

The popup opens and refreshes but Who's Online doesn't update my status every 9 minutes.

Thanks in advance for your tips!
Posted By: JoshPet Re: Integrated Jpilot chat - 01/25/2003 6:30 AM
I haven't looked at the way Dalantech set this up... I know some of it was based on what I had created (like the pop up thing).

The only way I could get it to work at the time was by passing the Usernumber variable to the popup in the URL.

Is $Usernumber being defined in the chat php file?

The popup should update the info, if it has the usernumber.
Posted By: Dalantech Re: Integrated Jpilot chat - 01/25/2003 9:15 AM
I didn't set it up to use your java applet Josh, but I think that variable should be available after authentication.
Posted By: JoshPet Re: Integrated Jpilot chat - 01/25/2003 10:48 AM
Yeah, in whatever script you call this:


('http://www.mysite.com/threads/chatpopup.php?
Cat=&Username=$Username&Usernumber=$Usernumber',
'chatpopup','width=300,height=250,top=100,left=150,screenX=1,screenY=1,
scrollbars=yes,resizable=yes');</script>


Make sure $Username & $Usernumber has been defined before it. You may need to do

$Username = $user['U_Username'];
$Usernumber = $user['U_Number'];

or something similar to set that up.

Try adding :

echo "Name = $Username <br />";
echo "Number = $Usernumber <br />";

near the top of chat popup to debug it.... see if it has a name and number... if not, that's the problem.
Posted By: deltajo Re: Integrated Jpilot chat - 01/25/2003 7:24 PM
I don't have a clue what I'm doing but I got it to work! Don't you love it when that happens?

Here's what I did. I borrowed some code from the top of the faq_english.php file, since the "Who's Online" updates when users go to THAT file......

So, my new "chatpopup.php" looks like this:
[:"blue"]
<?
// Require the library
require ("./main.inc.php");

$html = new html;
$html -> send_header("Updater",$Cat,0,0,0,0,"");


echo "
<script language="javascript" type="text/javascript">
window.blur();</script>
<meta http-equiv="refresh" content="550">

<div align="center"><b><font face="ariel" size="2">
Please leave this window open while you
are in the Chat Room.</b>
</font></b></div>";
?>
[/]

My "jchat.tpl" inludes this line, to call-up the "chatpopup.php": [:"blue"]
<script language="javascript" type="text/javascript"> window.open('http://www.mysite.com/threads/chatpopup.php?Cat=&Username=$Username&Usernumber=$Usernumber',
'chatpopup','width=800,height=300,top=000,left=000,
screenX=1,screenY=1,scrollbars=yes,resizable=yes');
</script>
[/]



The one snaglette is my chatpopup.php brings up my header, which is an unecessary bandwidth-user, especially given that it refreshes every (nearly) 10 minutes. And of course it also makes the chatpopup window unecessarily wide. So I'd love to find a way around THAT.
Posted By: JoshPet Re: Integrated Jpilot chat - 01/25/2003 8:07 PM
I wonder if this works for me but not for you because Register Globals might be off?

Hmmmm.... you shouldn't need to send the header.

Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/25/2003 10:04 PM
Attachment corrected and uploaded to the first post
Posted By: Allusivekudos Re: [6.2] Integrated Jpilot chat - 01/26/2003 10:50 PM
Dal, I've finally gotten this working perfectly, and am really enjoying it. It's all ready to be opened on my board, but I have a weird question. I feel super stupid, so forgive me! lol

Is there a way for me to register the channel I make and have me always an admin? I've looked through the info but am having a hard time....

Thanks,
peter
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 01/26/2003 11:01 PM
your on dalnet or xnet?

The command will be on xnet for example this

/msg nickserv register yourname your password

/msg chanserv register roomname password description

then when you log into the room you can type this

/msg nickserv identify password

/msg chanserv identify roomname password

You will be autooped and recognized as founder
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/26/2003 11:04 PM
Excellent post Chuck

We'll turn this place into a tech support site like mine in no time
Posted By: JoshPet Re: Integrated Jpilot chat - 01/26/2003 11:21 PM
Hey - try this.

You shouldnt' need to send the header, but add this near the top of your chat popup file. (After the "require" to main.inc.php).

Code
<br />	$Username = get_input("Username","get");<br />	$Usernumber = get_input("Usernumber","get");<br />


I think this has to do with Register Globals being off (or on)

But this has been fixing alot of issues with variables not getting passed. It's a standard function.

Let me know if that helps.
Posted By: Allusivekudos Re: Integrated Jpilot chat - 01/27/2003 2:54 AM
Omega - no clue if i'm on dalnet or xnet.

When I type in
/msg nickserv register myname mypassword

I'm getting this:
<AllusiveK*nickserv> register AllusiveK mypassword

-> that's all in blue, and basically, the same thing for the room when I try and register....

I know something is wrong...lol. Can you tell me what?

-peter
Posted By: omegatron Re: Integrated Jpilot chat - 01/27/2003 3:23 AM
in your script what server do you have the chat pointed to?
Posted By: deltajo Re: Integrated Jpilot chat - 01/27/2003 3:44 AM
Hi Josh.

Thanks for your efforts but no that didn't work.

Let me just review a bit:
My chatpopup does (as I had it) do the job -- it does keep my Who's Online up-to-date with those who are in the Chat Room, as planned.

The only problem is that it causes my regular Threads header.tmpl to appear in the chatpopup, which looks dumb and causes confusion to users.

If I could just find a way to not have the header.tmpl appear, I'd be laughing.

This line in my chatpopup seems to be needed and seems to work except for the header thang: $html -> send_header("Updater",$Cat,0,0,0,0,"");. Note that I'm clueless and have no clue what I'm doing.

P.S., My "register_globals" are "on"
Posted By: JoshPet Re: Integrated Jpilot chat - 01/27/2003 4:06 AM
This is what my chat popup looks like:

Code
// Require the library <br />   require ("/home/measurection/htdocs/forums/main.inc.php"); <br /> <br />			$currtime = time (); <br />			$currtime = $currtime+($config['adjusttime']*3600); <br />            $What = "chat"; <br /> <br />		   $Username_q = addslashes($Username); <br />           $What_q     = addslashes($What); <br />           $Usernumber_q = addslashes($Usernumber); <br />           $aux = ""; <br />           $readperm = ""; <br />           $query = " <br />             REPLACE INTO {$config['tbprefix']}Online <br />             (O_Username,O_Uid,O_Last,O_What,O_Extra,O_Read,O_Type) <br />             VALUES ('$Username_q','$Usernumber_q','$currtime','$What_q','$aux','$readperm','r') <br />           "; <br />           $dbh -> do_query($query); <br /> <br />// ------ debuggin info <br />// echo "name - $Username_q   and number = $Usernumber_q"; <br /> <br />echo " <br />  <script language=\"javascript\" type=\"text/javascript\"> window.blur();</script> <br /><meta http-equiv=\"refresh\" content=\"500\"> <br /><font size =\"+1\"><div align=\"center\"> <br /><b>Please leave this window open while you are in the Chat Room. <br /></b></font></div> <br />"; <br /> <br />?>
Posted By: JoshPet Re: Integrated Jpilot chat - 01/27/2003 4:09 AM
You can uncomment that debugging info to see if the variables are being passed.

In some cases you need the get_input function (get) to get the variables from one scrip to another via the URL.

If you check the URL of your chat popup? (show your address bar) is the name and number being passed?

Try adding:

echo "Name $Username and Number $Usernumber"; to the bottom of your other chat script to verify that they are defined there.
Posted By: Allusivekudos Re: Integrated Jpilot chat - 01/27/2003 5:45 AM
Omega: irc.webmaster.com

Hope that helps!

Posted By: deltajo Re: Integrated Jpilot chat - 01/27/2003 6:02 AM
Josh: Yes that works! Thanks very much for all your help on this.
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 7:42 AM
Dalantech -

Is the chat popup thing included in your files?

If so, add the get_input functions I posted in this thread to it.... as some servers need that.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 8:10 AM
No, it's not included. I left it out because I know a lot of people block java pop ups (too many irritating adds out there).

When I get time I'll include instructions for adding it. Is there any other way to make the who's online display work without java?

*Dal updates his Threads Dev to do list*

Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 9:12 AM
Not sure. The problem with a traditional "chat" page is that once the java applet loads, it doesn't refresh the page. If the page doesn't refresh, they drop off the list after 10 minutes.

I can't really see any way around this. It'd be great if it were.

I saw something somewhere (I guess it was your DigiChat mod)? Where it opened the chatroom in a frame. Could you have a tiny "iframe" that refreshed - although my browser doesn't support iframes. Many do not. But I guess you could do the page in frames and have one of the frames refresh.

Just thinking out loud. So in theory it works.... but my theorys are sometimes wrong.

Might need to add modifying that on my threads to do list.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 9:27 AM
Unfortunately I didn't do the Digichat mod

I have a tendancy to stay away from iframes as well, they just don't work across all browser platforms. I only recently went back to using DHTML because support for it is strong enough now.

You're right, refreshing the page would cause them to drop off line. I noticed that the who's online page will auto refresh. I wonder if there is a way to make an element on the chat page (say just a one pixel transperant gif) refresh so that the entire page does not reload, but the who's online mechanism "sees" the refresh?
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 9:33 AM
I guess if you did regular frames.... put your header in a frame and let it refresh.. letting the chat window stay put... that would do it.

The digichat mod had like 3 frames. One with instructions, one that refreshed, and one that had a button to open the digichat thing.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 10:01 AM
I have a special kinda hate for frames, but I might try it just to see how it looks.
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 10:44 AM
Yeah, me too... I hate popups too.. but my users wanted to see who was in chat.

On my site... I use the who's online box at the top of every page.... and I made it say below that, in bold: "There are 5 users in chat. Join them!" so that has really helped chat traffic.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 10:55 AM
I'd like to do the same thing eventually.

*sigh* More "to do"
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 11:11 AM
I need to pull that code together and post it.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 11:14 AM
If you do I'll add it into the jchat.php script (unless you want to do it ).
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/27/2003 11:22 AM
I'll get it to you hopefully sometime this week.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 12:27 PM
Thanks
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 01/27/2003 1:10 PM
[]Could you have a tiny "iframe" that refreshed - although my browser doesn't support iframes. Many do not. [/]

My God man what are you talking about? What do you use?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/27/2003 1:14 PM
I'll give you a hint: He thinks different...
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 01/27/2003 1:23 PM
LOL

I don't know of many browsers that don't support iframes. I have IE, Netscape, and Mozilla and they all support it. I had an iframe on my site for a long time. Then again I am always getting latest versions etc.

Could be people don't upgrade as often.
Posted By: deltajo Re: [6.2] Integrated Jpilot chat - 01/27/2003 8:14 PM
[]On my site... I use the who's online box at the top of every page.... and I made it say below that, in bold: "There are 5 users in chat. Join them!" so that has really helped chat traffic. [/]

Josh that would be just brilliant. My users have also been begging for that.

It would make a pretty neat package -- Dalantech's integrated Chat with your mod's -- for those of us who are trying to make chat a serious aspect of our sites.

I really appreciate the work you all are doing. Personally, I just learned that PHP isn't a steak sauce, so I'm a ways off from being able to contribute much!
Posted By: ExcelsiorDDZ Re: [6.2] Integrated Jpilot chat - 01/28/2003 12:59 AM
I will have jump into this bandwagon as well Jossh.
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 01/28/2003 2:49 AM
OK - let me post this mod here until it's ready for "prime time". I pulled the code from my site.... but I've got some other things going on. So I haven't tested it.

It should work fine... but somebody test it and let me know.

For this to work, the chat page must be named "chat.php" as it looks for the entry of "chat" in the online table.

If the chat page is named 'chatroom.php' then you will need to modify my code to search for 'chatroom' instead.

This adds the number of users chatting to the top of each page on your site, and offers a link to the chatroom (chat.php) - again, if your chat file is named something else, you'll need to edit the link in the nav bar templates.

Let me know if you have any questions.

Josh

Attached File
66540-CountInChat1.0.txt  (151 downloads)
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/28/2003 7:49 AM
Thanks!

I'll try to get time to test this one out tonight
Posted By: deltajo Re: [6.2] Integrated Jpilot chat - 01/28/2003 9:37 AM
Thanks a lot, Josh.

I've tried it and got it working as far as I can tell..... haven't tested it much because my eyes are closing on me.

I'll give it more of a go in the morning.

Posted By: ExcelsiorDDZ Re: Integrated Jpilot chat - 01/29/2003 12:35 AM
I have modified this slightly. See changes below..

I changed this part of the ubbt.inc.php (2 places)

$ChatNumber .= "$tbopen<tr><td class="lighttable"><br /><div align="center"><b>There is also $ChatOnline User in the <a href="{$config['phpurl']}/jchat.php">Chat Room</a>. Go and Join Them!</b></div></td></tr>$tbclose<br />";

to this...

$ChatNumber .= "[$ChatOnline]";

and the ubbt_resg and unregistered.tmpl to this...

<a href = "{$config['homeurl']}/forums/jchat.php">Chat</a> $ChatNumber
|

This will SIMPLY toss a number of chatters that are in the chat room via the page next to the chat link for simplicity. And nothing when none. Be aware that if they are using an outside client, this will not count those people.


Example at www.theddz.com, click on chat. But you need to be registered to watch it change.
Posted By: JoshPet Re: Integrated Jpilot chat - 01/29/2003 12:39 AM
Good idea!

Thanks.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 01/30/2003 7:46 PM
Josh, this one is just too !

Now all I need is a side bar with this mod in it
Posted By: Allusivekudos Re: [6.2] Integrated Jpilot chat - 02/02/2003 8:16 PM
[scratch original question]

Omega, or Dal, can either of you suggest a server where I can register a channel/nicks?

-peter
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 4:47 AM
Whatever I try the chat is trying to reach irc.blackened.com and not the server I set in the template file.

I replaced this server whereever I found it in the /chat dir but the $%&"§*_ is still trying it.
I don't have clue whats wrong.

Can someone please assist?
http://www.clanforums.com/ubbthreads/chat.php
Posted By: Allusivekudos Re: [6.2] Integrated Jpilot chat - 02/16/2003 8:14 AM
That's exactly what happened to me and I could never find what was wrong!

-peter
Posted By: ExcelsiorDDZ Re: [6.2] Integrated Jpilot chat - 02/16/2003 9:17 AM
Ahh, I also ran into this.. You have to change it in the config file AND the html I think. Email me and I can arrange a time to go over this with you in person individually.

[][email protected][/]
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 2:48 PM
I've changed it now in EVERY file where irc.black... is included. I deleted also ALL other server information so that only my wanted is in.

Within the archives in p.class the serverinfo was also in. I changed it also but same effect.

The applet is still trying to reach this %§"&$#§" server and not the one I want...

Then I found out that there is a small failure in the attachment here.

OPEN JCHAT.TMPL and you will see this
<param name="ServerName1" value="irc.dal.net">
<param name="ServerName2" value="liberty.nj.us.dal.net">
<param name="ServerName3" value="typhoon.va.us.dal.net">

Remove the \ in front of the " and it wil work
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 3:37 PM
[]JoshPet said:
Yeah, me too... I hate popups too.. but my users wanted to see who was in chat.

On my site... I use the who's online box at the top of every page.... and I made it say below that, in bold: "There are 5 users in chat. Join them!" so that has really helped chat traffic. [/]

Hey Josh, I would also like to have it. Can you send to me how you made this cause I finally managed to include the chat into my forum. (50$ )
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 3:43 PM
Another question:

I opened the chat window in one of my registered channels on irc.quakenet.org and now all the people who have a registered nick there can't connect if the nick is the same the use in the forum. Can I add a suffix to the Forumnames that this is working?

You get the same error when the nick used in the forum is too long for the irc. Any way to cut things?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 7:19 PM
I've updated the zip file in the first post to include the chatpopup.php file and a new jchat.php file that includes the script to call the popup window.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 7:22 PM
They should be able to connect, provided they are not already logged into the channel from another IRC application and they login to the channel once they connect.
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 7:36 PM
[]Dalantech said:
I've updated the zip file in the first post to include the chatpopup.php file and a new jchat.php file that includes the script to call the popup window. [/]

You've forgotten to delete the failure with the template file and the server names. See my above posting!!!
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 8:00 PM
I have no idea what you are talking about. The template only attempts to connect to three IRC servers:

irc.dal.net
liberty.nj.us.dal.net
typhoon.va.us.dal.net

If it is trying to connect to any other IRC server it's because you've added it to the script. If it's only attempting to connect to one server then you've modified the script incorrectly. Go to the Jpilot home page and follow the instructions for adding additional IRC servers closely...
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 9:13 PM
There is a failure in your template

<param name="ServerName1" value="irc.dal.net">
<param name="ServerName2" value="liberty.nj.us.dal.net">
<param name="ServerName3" value="typhoon.va.us.dal.net">

must be
<param name="ServerName1" value="irc.dal.net">
<param name="ServerName2" value="liberty.nj.us.dal.net">
<param name="ServerName3" value="typhoon.va.us.dal.net">
Posted By: ExcelsiorDDZ Re: [6.2] Integrated Jpilot chat - 02/16/2003 9:32 PM
Some servers do not allow [ type characters and some do not allow multiple connects. JPilot might see them as from the same source, I forgot if it really does.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 9:56 PM
I've fixed the template, but what did the error have to do with you connecting to irc.blackened.com?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 10:01 PM
Jpilot is just a client side IRC program (like Mirc) and it does not control what options you have available once you connect to an IRC server. Most IRC servers will not allow multiple logins by the same nickname.

IRC servers will also not allow spaces in a nickname, but the jchat.php script converts spaces to underscores in user names automaticly.
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 10:24 PM
[]Dalantech said:
I've fixed the template, but what did the error have to do with you connecting to irc.blackened.com? [/]

The parameters from the template are not send to the jchat and then it is using a default server (irc.black.....)
After removing the " and making a " out of it the template worked correct for me. I am sure that this will also solve it for the others which had the same problem.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 10:29 PM
OK, cool
Posted By: jluerken Re: [6.2] Integrated Jpilot chat - 02/16/2003 10:55 PM
Wow, that was a hard way *hehe*
Was it my english that you did not understand what I tried to say?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/16/2003 11:14 PM
It's the way you explained it. I had know idea what you meant.

The escaped quotes in the template were there from me cutting and pasting from another chat.php script that didn't use a template (that's why the quotes were escaped). I don't use the default IRC server, so I had to have something to put in the chat template for the mod here. The only problem was that I forgot to remove the back slashes -doh!
Posted By: coloradok5 Re: [6.2] Integrated Jpilot chat - 02/20/2003 8:48 AM
[]This mod uses a template, and only allows registered users to chat[/]
Would this also work by user group?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 02/20/2003 8:57 AM
It could, with a few modifications. Currently it only checks to see if someone is registered.
Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 04/30/2003 2:51 AM
Back to the top

I have purchased the User License and have it all installed, Click Here to check it out.

I keep getting an error "***dachat Cannot join channel (This channel has been closed by DALnet)"

What did I do wrong, how can I fix it?

Thanks,

Bobby
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 04/30/2003 3:28 AM
Okay seems you have dachat somewhere in the template. Save the following code as jchat.tmpl and place in the template directory. Remember to change the name of the chat room you want to where it says so in the room name variable. I have it listed in CAPITALS.

<?
echo <<<template

$tbopen
<tr>
<td class="cleartable">
<br />
<center>
<applet name="jchat" archive="jirc_nss.zip" code="Chat.class" width="600" height="350" vspace="0">
<param name="CABBASE" value="jirc_mss.cab" />
<param name="ServerPort" value="6667" />
<param name="ListTextColor" value="blue" />
<param name="ServerCmdColor" value="127,127,127" />
<param name="BorderVsp" value="5" />
<param name="NoConfig" value="true" />
<param name="AcceptCommands" value="true" />
<param name="TotalChannelsAllow" value="1" />
<param name="TextColor" value="black" />
<param name="AllowIdentd" value="true" />
<param name="AllowPrivateChatWindow" value="true" />
<param name="DirectStart" value="true" />
<param name="nickname" value="$irc_nick" />
<param name="LogoBgColor" value="white" />
<param name="BorderHsp" value="5" />
<param name="IgnoreServerMsg" value="false" />
<param name="BackgroundColor" value="99,132,181" />
<param name="ListScreenColor" value="234,233,209" />
<param name="NickNameColor" value="-1" />
<param name="ServerName1" value="irc.dal.net" />
<param name="ServerName2" value="irc.dal.net" />
<param name="ServerName3" value="irc.dal.net" />
<param name="ServerName4" value="jade.va.dal.net" />
<param name="ServerName5" value="jade.va.dal.net" />
<param name="ActionColor" value="red" />
<param name="IgnoreChannelChangeMsg" value="false" />
<param name="isLimitedChannel" value="true" />
<param name="isLimitedServers" value="false" />
<param name="FGColor" value="black" />
<param name="DisplaySoundControl" value="true" />
<param name="DisplayAbout" value="true" />
<param name="TotalServersAllow" value="3" />
<param name="InputScreenColor" value="white" />
<param name="AllowURL" value="true" />
<param name="DisplayColorControl" value="true" />
<param name="DisplayConfigChannel" value="false" />
<param name="DisplayConfigChannelPass" value="false" />
<param name="DisplayConfigMisc" value="false" />
<param name="DisplayConfigNick" value="false" />
<param name="DisplayConfigPort" value="false" />
<param name="DisplayConfigRealName" value="false" />
<param name="DisplayConfigServer" value="false" />
<param name="DisplayConfigServerPass" value="false" />
<param name="LogoHeight" value="90" />
<param name="Channel1" value="SCP_Chat" />
<param name="ServerErrorColor" value="red" />
<param name="TextScreenColor" value="white" />
<param name="TitleForegroundColor" value="white" />
<param name="BorderSpacing" value="0" />
<param name="RefreshColorCode" value="true" />
<param name="InputTextColor" value="black" />
<param name="TitleBackgroundColor" value="black" />
<param name="AllowSound" value="true" />
<param name="IgnoreModeChange" value="false" />
<param name="IgnoreMOTD" value="false" />
<param name="TextFontName" value="Helvetica" />
<param name="TextFontSize" value="12" />
<param name="WelcomeMessage" value="Welcome to South California Powerstrokes Chat!" />
<param name="UserCmdColor" value="blue" />
<param name="LogoWidth" value="52" />
</applet>
</center>
</td>
</tr>
$tbclose


template;
?>

Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 04/30/2003 4:00 AM
Thank you VERY much for you help, but I am now getting this error:

Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /home/socapsn/public_html/ubbthreads/templates/default/jchat.tmpl on line 2

Once again, I am very new to this. Have I skipped a step?
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 04/30/2003 4:04 AM
I attached it as a file on the post here. Download it and rename it to jchat.tmpl and upload it.

Attached File
78205-jchat.txt  (71 downloads)
Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 04/30/2003 5:04 AM
OK, I am so sorry that I am making this difficult! I am sure that you wish you had never replied to my post

I have done what you have stated to do, atleast I think I have and now I have a greyed out box where the chat window should be. To me, it seems like it's not connecting to the chat server

Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 04/30/2003 5:20 AM
Ah ha, I figured it out. In the file you sent I had to have it point to the chat/ folder to find the files

Thanks again,

Bobby
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 04/30/2003 7:48 AM
That's an odd error. I just checked the zip file and there are no references to my chat page in any of the files. Where did you get the files that you used for this mod?
Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 04/30/2003 8:52 AM
[]Dalantech said:
That's an odd error. I just checked the zip file and there are no references to my chat page in any of the files. Where did you get the files that you used for this mod? [/]
Great job putting this together !!!

The error was caused by this:

Was:

<applet name="jchat" archive="jirc_nss.zip" code="Chat.class" width="600" height="350" vspace="0">

Should have been:

<applet name="jchat" archive="chat/jirc_nss.zip" code="chat/Chat.class" width="600" height="350" vspace="0">

It was my fault. I think I got into a big hurry and jumped the gun.


I do have another question

I changed the online.php file to include the "In Chat Room" status, but it is still showing "Private". Any ideas?
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 04/30/2003 9:03 AM
I think that's because you have the chat in a "chat" directory. It shows "private" for any script outside of the threads directory.

if the chat scripts were in the threads directory, then the online language file would work.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 04/30/2003 10:02 AM
This is the part that caught my attention:

[] dachat Cannot join channel (This channel has been closed by DALnet)" [/]


dachat is the name of the chat channel that I use on a private IRC server, so it looks like you used wget (or some other program) to pull the chat files from my web server instead of using the files included in the attachment on the first post of this thread...
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 04/30/2003 12:08 PM
BWillams,

Yes Josh is right if you have the chat directory under Threads you would not have needed to edit the template to do chat/jirc.php either. That Template I posted for you I modified for a MOCK room name for you and a MOCK title. It works fine under the scheme it is suppose to be. All chat files go in the chat subdirectory and then the template file in the template/default directory.

threads/chat
Posted By: BWilliams_dup1 Re: [6.2] Integrated Jpilot chat - 05/02/2003 2:45 AM
[]Dalantech said:
This is the part that caught my attention:

[] dachat Cannot join channel (This channel has been closed by DALnet)" [/]


dachat is the name of the chat channel that I use on a private IRC server, so it looks like you used wget (or some other program) to pull the chat files from my web server instead of using the files included in the attachment on the first post of this thread...
[/]
Here is the code:

<param name="ServerName1" value="irc.dal.net">
<param name="ServerName2" value="liberty.nj.us.dal.net">
<param name="ServerName3" value="typhoon.va.us.dal.net">

I removed the "irc.dal.net" and used another that was given to me and I do not get that error anymore.

Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/02/2003 7:24 AM
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 05/02/2003 12:14 PM
How bout trying dachat.net

JUST KIDDING. Glad you got it working. Although I do not see personally why irc.dal.net does not work that is their base server which will load any one of those other channels that are open at the time.

if you type irc.dal.net in a chat program you may end up somewhere like munich.de.dal.net
Posted By: AKD96 Re: [6.2] Integrated Jpilot chat - 05/02/2003 11:05 PM
Is there any software that can be integrated with this hack (in lieu of JPilot) that is able to connect through a firewall?
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/03/2003 8:24 PM
It would have to use a port that your firewall can proxy. Since port 80 is used for HTTP (web surfing) you might try searching for chat scripts that use it (all firewalls proxy port 80).
Posted By: p74vic Re: [6.2] Integrated Jpilot chat - 05/19/2003 2:26 AM
Thought I would post this: I modified my jchat.php to change special characters in usernames.. I might not have gotten them, all, but did get the common ones my users have..

paste this into jchat.php

Code
<br />//Replace certain characters<br />  $irc_nick = str_replace('©', '(c)', $Username);<br />  $irc_nick = str_replace('@', '(a)', $Username);<br />  $irc_nick = str_replace('®', '(r)', $Username);<br />  $irc_nick = str_replace('™', '(TM)', $Username);<br />
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 05/19/2003 4:36 AM
Oh very good idea. Had that problem with spaces as well.

I think I'll use this but add =

$irc_nick = str_replace(' ', '_', $Username);


Thanks!
Posted By: p74vic Re: [6.2] Integrated Jpilot chat - 05/19/2003 5:45 AM
Yep, the space correction is right above the special characters one

Jason
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/19/2003 6:54 AM
I've already got space conversion in the script
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/19/2003 6:54 AM
!
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 05/19/2003 6:57 AM
Ah - I think I was using mine and never switched to yours - had the space issue very recently.

Good work.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/19/2003 8:04 AM
I think Dave_L gave me the script line to convert spaces to underscores. I wrote the jpilot chat script when I was first learning php. Now the more books I have the fewer questions I ask...
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/19/2003 8:10 AM
There is one problem with the way you wrote it: The value of $irc_nick will be the last line ( $irc_nick = str_replace('™', '(TM)', $Username); ), all the others will be over written. Try changing it to this:

Code
 <br />$irc_nick = str_replace('©', '(c)', $irc_nick); <br />$irc_nick = str_replace('@', '(a)', $irc_nick); <br />$irc_nick = str_replace('®', '(r)', $irc_nick); <br />$irc_nick = str_replace('™', '(TM)', $irc_nick); <br />


That should work

Edit: Remember to keep the first string replace line!

$irc_nick = str_replace(' ', '_', $Username);

Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 05/19/2003 8:12 AM
OOh - a new Eagle Eye.
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/19/2003 11:57 AM
LOL!

I'm trying to get there, but I have a lot of catching up to do when compaired to the rest of the mods here!
Posted By: xeney Re: [6.2] Integrated Jpilot chat - 05/24/2003 8:41 PM
Hmm. Okay, this didn't do what I thought it would do. It logs users on with their board username, etc., but then they get renamed to guest because those nicks are already in use on dalnet or whatever. Is that what's supposed to happen or did I do something wrong? I'm not sure I get the point of using the board nicknames in that case, since virtually all of them are in use.
Posted By: JustDave Re: [6.2] Integrated Jpilot chat - 05/24/2003 8:52 PM
Yes that's supposed to happen. Otherwise they wouldn't be able to log onto the chat server. You'll need to install and run your own IRCd and services (if you want to offer control of the nicknames on the chat server) and have your jpilot applet connect to it so that this will not happen.
Posted By: xeney Re: [6.2] Integrated Jpilot chat - 05/24/2003 9:31 PM
Ah, okay. So this hack is really not going to work if you aren't doing that. That might be worth mentioning in the documentation.
Posted By: JoshPet Re: [6.2] Integrated Jpilot chat - 05/25/2003 3:39 AM
I think it's really best if you have at least your own channel.... but there are infinate number of channels and chat servers to choose from.

You might also try the Raidersoft chat mod.... for free, they allow you to setup your own room (www.raidersoft.com) and then you won't have to worry about other people's nicknames.
Posted By: xeney Re: [6.2] Integrated Jpilot chat - 05/25/2003 7:11 AM
Yeah, that was our second choice.

But I think we made this work. We registered a channel, but then to make our username/nicknames more unique, we had the chat login append a unique designator at the end of each username. Like this, in jchat.php:

// Append TUS designator to username
$irc_nick_suffix = "TUS";
$irc_nick = "$irc_nick$irc_nick_suffix";

("TUS" is the initials of our board and it's what everyone calls it for short.)

And I'm encouraging users to register that nickname so they don't have to worry about getting changed to "guest."
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 05/25/2003 9:31 AM
I've updated the first post in this thread with instructions on how to change the chat channel that you use. Odd that I missed it the last time I went looking through the file

As for the user names already existing on Dalnet or some other IRC service: That's normal behavior for IRC chat, so I didn't include it in the instructions.
Posted By: xtc Re: [6.2] Integrated Jpilot chat - 06/09/2003 9:43 PM
pjirc (www.pjirc.com) might be a better solution.

I used to run jpilot's applet...

PJirc's interface is MUCH nicer, it's FREE and it comes with source code so it could be modified to update "who's online".

It also solves the problem of duplicate nicknames. If a nickname is already in use you can have it automatically append a random number to the end of the nickname to make it unique.

The primary reason I first looked at it is it can be called from anywhere, the license doesn't lock it down to one domain, so you could set up a chat portal for other sites.

Duane
Posted By: Dalantech Re: [6.2] Integrated Jpilot chat - 06/10/2003 8:02 AM
Sounds cool
Posted By: Dave_L_dup1 Re: [6.2] Integrated Jpilot chat - 06/10/2003 11:03 AM
Thanks. I took a look at PJIRC, and tried to install it (version 1.84) on my server. It looks like it has a couple of limitations:

1) The web server on which it's installed also has to be the IRC server to which it connects.
2) It doesn't include a security certificate, which might disturb users.

I may be wrong about these two issues. I spent some time reading the FAQ, looking through posts on their forum, and using trial and error, but was unable to get it to work on my server.
Posted By: omegatron Re: [6.2] Integrated Jpilot chat - 06/10/2003 12:16 PM
I will give it a try myself. However looking at the screenshots and trying their demo on their server I higly doubt I would be able to say that it is more feature rich. JPilot is a stable reliable cheap as well as proven application.
Posted By: xtc Re: [6.2] Integrated Jpilot chat - 06/10/2003 4:17 PM
I've been running it for several weeks (switched from Jpilot because I moved to a different domain name and couldn't transfer the license to the new domain) and have had a lot of users tell me they think it's better than Jpilot.

You can always get your own certificate to sign it. freessl.com has certificates as low as $35/year. I just run my own irc server.

It also supports being on multiple channels simultaniously, dcc, ctcp and more. There's better control over what channels a user can, or can't, access and even if they can leave specific channels.

I modified the scripts to work with it on my site. You can check it out at www.moparpages.com.

login: guest
pass: threadsdev

Duane
Posted By: fishtails Re: [6.2] Integrated Jpilot chat - 06/13/2003 4:45 PM
I was in the chat room here, but when I tried to go back to the main index, it left me in the chat room. To get out of it I had to go to another site and come back.
Posted By: Dave_L_dup1 Re: [6.2] Integrated Jpilot chat - 06/13/2003 5:12 PM
This site isn't using this mod, is it?
Posted By: Pappy Re: [6.2] Integrated Jpilot chat - 06/13/2003 6:11 PM
Yes I had the same problem the chat room does look cool though
Posted By: Dave_L_dup1 Re: [6.2] Integrated Jpilot chat - 07/15/2003 6:29 AM
PJIRC version 1.90 was recently released, and it now works on any server - you don't need to have your own IRC server.
Posted By: ScriptZ Man Re: [6.2] Integrated Jpilot chat - 04/04/2005 3:52 AM
I thought I did everything right, but all I get is a blank gray applet when I start the progie. What am I missing? I'm running jIRC v2.8.4 (Registered) on UBB.Threads v6.4 ....


© UBB.Developers