View Full Version : phpmychat who's online (works with vB3)
trilOByte
07-18-2003, 10:00 PM
Been done lots before, and is *very simple*, but this will work with pretty much most versions of vB and it definitely works with vB3! It's really not difficult as it's basically a (minor) mod of files included with phpmychat distro.
The following can be used to display "who's in chat" using PhpMyChat, either integrated (with Stasiks integration hack) or out of the box. It can be used with standalone chat dB or chat dB that has been integrated with vB, there are no vB files to hack, and only one template to edit. Again, vBintegration is not required, shared databases are not required for this to work.
It doesnt get much simpler. There are 3 steps....
1 file to upload.
1 addition to phpinclude template.
1 edit of forumhome template.
trilOByte
07-19-2003, 09:12 PM
no users in chat screenie....
trilOByte
07-19-2003, 09:12 PM
who's in chat screenie...
trilOByte
07-19-2003, 09:13 PM
Working version integrated into vBulletin 3 beta 4....
www.britishblades.com/forums/
kaotic
07-20-2003, 12:05 AM
I shall test it out soon. :)
trilOByte
07-20-2003, 10:10 AM
Cool, 2 installs no questions. :)
Dead simple innit?
I should point out that in the screenies, I have the "who's chatting" box in a side panel, but you can put it anywhere - even on a none-vB page (although I havent tested that, I can see no reason why not).
It just gives you "$chatters" which will give you a list of chatters pretty much wherever you put it. You can wrap it up in your own html to make it look however you want.
The refresh time is set by your phpMyChat options. I have mine set to update every 60 seconds - it's not instant, but it's close enough.
David_McPherson
07-20-2003, 03:27 PM
Trilobyte,
I'm curious if you could help me.
I need the IRC chat integration into Vb 2.3, I need it free and I'd like to have a place on my forum where people see who is chatting. Where is this item on Vb. When I do a search on vb.org I get nothing but confused with the pirc, mirc, irc, and so forth that I don't know what to install.
What do you recommend?
trilOByte
07-20-2003, 08:22 PM
Today at 05:27 PM David_McPherson said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=419217#post419217)
Trilobyte,
I'm curious if you could help me.
I need the IRC chat integration into Vb 2.3, I need it free and I'd like to have a place on my forum where people see who is chatting. Where is this item on Vb. When I do a search on vb.org I get nothing but confused with the pirc, mirc, irc, and so forth that I don't know what to install.
What do you recommend?
This hack is for the phpmychat 0.14.5 script. Find it here :http://www.phpheaven.net/en.html
Look here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=21329
For Stasik's integration hack with vBulletin.
Many people prefer IRC, it's faster, less of a resource hog and way more powerful for a skilled user. There are some nice integration scripts too, but I have yet to find one that displays "users in chat now" with any reliability.
I suppose it depends on what your needs are. My forum users (www.britishblades.com) are more familiar with hitting bits of hot steel with hammers, than configuring irc clients & chan's, they just wanted a simple chat program, with an auto login, acessible to all the members and private for members only, they also wanted a method of seeing who was in the chatroom as the surf the forums. PhpMyChat fits this brief better than IRC, or even java front ends for irc.
However, if your forumites are experienced and competent users, they will undoubtedly prefer an IRC chan, preferably one they can access with mIRC, with a java applet for those less skilled. But it comes at a price. I was using jIRC for a while, with mixed results. My site is mainly (but not exclusively) for UK users. I had a real hard time finding a host that would work internationally, with reliability, that was free of trolls.
PhPMyChat - is the best option for me at the moment. It may be good for you also, or it may not.
kristiesks
07-20-2003, 11:41 PM
I have a quick question. I installed everything and it works great [wonderful directions- thank you!] except I HATE the look of how it says "Who's in chat." I checked the code and saw the
<span class="normalfont">
tag which I am unfamiliar with. I deleted that and inserted a normal font tag like:
<font face="verdana" size="1">
and the result was that that entire cell of the table scrunched up into about two pixels and you couldn't see or read anything at all.
Can someone tell me how to change my "normalfont" [which is unlike all the rest of the fonts on my entire forum] so that it matches everything else, or instruct me as how to use the other tag without ruining the table?
Thank you! =)
trilOByte
07-20-2003, 11:58 PM
Thanks for pointing this out Kristie, I overlooked it.
< span class="whatever>yourtext< /span>
...is how vBulletin 3 uses css classes for just about everything. I wrote this up for vB3 and this is a legacy of that. I've updated the install file so it should work with pre-vB3 forums.
you need to replace:
<b /><span class="normalfont">Who's in Chat</span></b />
With:
<b><font size="2">Who's in chat</font></b>
There is another instance further down you'll need to alter as well, take a peek in the updated install file if you need help.
trilOByte
07-21-2003, 12:17 AM
Hmmm, for some reason the txt file wont update, so here is the template with the changes made...
<!-- chatbox-->
<br>
<table cellpadding="4" cellspacing="1" border="0" width="100%" bgcolor="#000000">
<tr>
<td width="100%" bgcolor="#3A4456"><b><font size="2">Who's in chat</font></b>
</td>
</tr>
<tr>
<td valign bordercolor="#333333"" bgcolor="#333333""top><div align="center"><a href="http://www.yourdomain.com/chatdir/chat/index.php3" target="_blank">Chatroom</a></div></td>
</tr>
<tr>
<td width="100%" valign bordercolor="#222222"" bgcolor="#222222""top>
<table width="95%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#000000" bgcolor="#222222">
<tr>
<td bordercolor="#333333" bgcolor="#333333">
<div align="left"> <font size="2">$chatters </font></div></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- /chatbox -->
Sebastian
07-21-2003, 05:25 PM
nice hack. but no thanx to php3 ...
trilOByte
07-21-2003, 07:01 PM
Today at 07:25 PM Sebastian said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=419513#post419513)
nice hack. but no thanx to php3 ...
Then just rename the file to "chatters.php" - it doesnt make any difference. ;)
Sebastian
07-21-2003, 09:25 PM
lol.
I installed this hack and I get an error in the box were the chatters show I can ont figure out what to do to fix it
this is what it tells me :
Warning: Unknown(): stream does not support seeking in /home/asuka/public_html/forum/global.php(313) : eval()'d code on line 35
Can someone please help me fix this besides this small error perhaps in my installing the hack is awsome I have been looking for something like this ^.^
trilOByte
07-23-2003, 11:04 AM
what directory do you have phpmychat in? What directory do you have chatters.php3 in? What version of phpmychat are you running? What paths have you specified for the following: ?
$ChatPath = "../chatdir/chat/";
and
$ChatLaunch = "<b><A HREF=\"http://www.yourdomain.com/chatdir/chat/index.php3\"
and
require("http://www.yourdomain.com/chatdir/chatters.php3");
??
UND3Rburn
07-23-2003, 06:09 PM
like I asked over @ vBt
great stuff, Im going to install this... BUT Im interested in working on a Side Menu like you did.... Mind telling me where to start? I looked at Mashby(I tihnk)'s template mod for vB2 but that got me no where since in running vB3.
trilOByte
07-23-2003, 07:18 PM
Today at 08:09 PM UND3Rburn said this in Post #17 (https://vborg.vbsupport.ru/showthread.php?postid=420001#post420001)
like I asked over @ vBt
great stuff, Im going to install this... BUT Im interested in working on a Side Menu like you did.... Mind telling me where to start? I looked at Mashby(I tihnk)'s template mod for vB2 but that got me no where since in running vB3.
Go here:
side menu template mod (http://www.vbulletintemplates.com/mods/showthread.php?t=2083&highlight=side+menu)
It will work. It's a template mod, just html (or xhtml) and tables, there's no difference between vB2xx and vB3xx in that respect. You might have to tweak it a bit to get it to display just how you want, but the code is good for both versions.
The directory I have the phpmychat in is in the main directory so it would be http://www.ultimaforce.net/chat
I have chatters.php (renamed it) in chat directory in the main secion so it would be http://www.ultimaforce.net/chat/chatters.php
I am unsure as to were to figure out what version of phpmychat I am running it came on my server and has no number or any other item to allow me to figure that out.
$ChatPath = "../chat/chat/
$ChatLaunch = "<b><A HREF=\"http://www.ultimaforce.net/chat/index.php\" TARGET=\"_self\">chatting</A></B>
require("http://www.ultimaforce.net/chat/chatters.php");
Thanks for you help
Today at 05:04 AM trilOByte said this in Post #16 (https://vborg.vbsupport.ru/showthread.php?postid=419931#post419931)
what directory do you have phpmychat in? What directory do you have chatters.php3 in? What version of phpmychat are you running? What paths have you specified for the following: ?
$ChatPath = "../chatdir/chat/";
and
$ChatLaunch = "<b><A HREF=\"http://www.yourdomain.com/chatdir/chat/index.php3\"
and
require("http://www.yourdomain.com/chatdir/chatters.php3");
??
trilOByte
07-24-2003, 10:19 AM
$ChatPath = "../chat/chat/
Elly, in your $ChatPath you have too many "chat" dirs, change that to :
$ChatPath = "../chat/
And see what happens :)
I tried that and this is the error I get
Warning: Unknown(): stream does not support seeking in /home/asuka/public_html/forum/global.php(313) : eval()'d code on line 35
Warning: main(./../chat//lib/connected_users.lib.php3): failed to open stream: No such file or directory in /home/asuka/public_html/chat/chatters.php on line 18
Fatal error: main(): Failed opening required './../chat//lib/connected_users.lib.php3' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/asuka/public_html/chat/chatters.php on line 18
rikmartin
07-26-2003, 12:13 PM
the "require" bit added to the php_includes just causes the browser to hang and the page doesnt load,,, placed the url in the address bar is fine though
? confused
GeoffE
08-11-2003, 01:00 PM
Having problems getting the code to work in the phpinclude template. This bit (adapated for my domain):
// chatters -->
ob_start();
require("http://chat.clubdogma.com/chatters.php3");
$chatters = ob_get_contents();
ob_end_clean();
// end chatters -->
Whenever I add this in, I get the following error when trying to enter phpmychat :
Fatal error: Call to unsupported or undefined function ob_start() in ./global.php on line 314
which looks like I'm not running PHP4, but definitely am (4.2.3).
The chatbox appears fine in the forum (though always with no users as chat doesn't work), chatters.php3 works fine when run directly etc.
The chat and forum are integrated using Stasiks integration hack, which works perfectly as long as the above code isn't in phpinclude..
Anyone got any ideas?
larke
11-12-2003, 04:17 AM
i'm having problems too.... I get:
Warning: Unknown(http://www.larke.com/real_women/forum/chat/chatters.php3): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/httpd/html/www.larke.com/real_women/forum/global.php(301) : eval()'d code on line 8
Fatal error: (null)(): Failed opening required 'http://www.larke.com/real_women/forum/chat/chatters.php3' (include_path='.:/usr/local/lib/php') in /home/httpd/html/www.larke.com/real_women/forum/global.php(301) : eval()'d code on line 8
larke
11-17-2003, 07:52 PM
ok, fixed it, but it still doesn't show up
catocom2
12-23-2003, 04:24 AM
I installed this hack and I get an error in the box were the chatters show I can ont figure out what to do to fix it
this is what it tells me :
Warning: Unknown(): stream does not support seeking in /home/asuka/public_html/forum/global.php(313) : eval()'d code on line 35
Can someone please help me fix this besides this small error perhaps in my installing the hack is awsome I have been looking for something like this ^.^
I figured you you have to put the @ in front of the "require" statement. ;)
// chatters -->
ob_start();
@require("http://yourname.com/chat/chat/chatters.php");
$chatters = ob_get_contents();
ob_end_clean();
// end chatters -->
I'm using this with vB3 Gamma now. Cool!
Sadie Frost
01-15-2004, 02:09 AM
Could anyone help me with how to do the relative path if my chat room is at a different domain than my vb?
Like $ChatPath = "../../http://www.otherdomain.com/chat/";
Any help would be appreciated - thanks! :)
pcalloway
01-27-2004, 08:55 PM
I tried to install this hack, and I get the window, but it gives me an error:
Warning: Unknown(): stream does not support seeking in /home/authent/public_html/forum/global.php(386) : eval()'d code on line 8
It also gives me a link to the chatroom, which seems to work: "Nobody is chatting now. "
EvilLS1
03-21-2004, 11:10 PM
the "require" bit added to the php_includes just causes the browser to hang and the page doesnt load,,, placed the url in the address bar is fine though
? confused
I had that problem aswell.
To fix it I added this bit of code to my vb2 index page (forumhome):
define('THIS_SCRIPT', 'index');
Then used this code in phpinclude:
// chatters -->
ob_start();
if (THIS_SCRIPT == 'index') {
@require('/home/user/public_html/chat/chatters.php3');
$chatters = ob_get_contents();
}
ob_end_clean();
// end chatters -->
Note the full path to the chat directory instead of using http.
Works fine now.
Nice hack btw, thanks!
RichieBoy67
07-08-2004, 01:03 PM
I'm getting better but I still have the hardest time getting the paths correct... can someone please help me for 2 minutes?????
Thanks,
Rich
Here's what I am getting..
Warning: Unknown(): stream does not support seeking in /home/talkandm/talkandmore-www/global.php(395) : eval()'d code on line 12
Warning: main(./chat/chat/index.php3//lib/connected_users.lib.php3): failed to open stream: Not a directory in /home/talkandm/talkandmore-www/chatters.php3 on line 18
Fatal error: main(): Failed opening required './chat/chat/index.php3//lib/connected_users.lib.php3' (include_path='./:/usr/local/lib/php') in /home/talkandm/talkandmore-www/chatters.php3 on line 18
RichieBoy67
07-08-2004, 04:29 PM
I'm all set now thanks to DarkWizard!!!
Thanks for helping me out DarkWizard!! It works great now!!
Rich
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.