View Full Version : [RELEASE] - Chat hack
Here is the hack to integrate phpMyChat with vB. This is just a rudimentary integration that I plan on improving. Place the following under the line set_magic_quotes_runtime(0); in the index.php file of phpMyChat. If you would like to see a demo visit http://www.linuxquestions.org/questions and click on chat.
// start vB hack version .01
// Please send bug reports, questions and suggestions to:
// jeremy@linuxquestions.org
require("/path/to/global.php");
if ($userinfo[cookieuser]==1) {
$U=$userinfo[username];
$N=20;
$password = "1";
$E=10;
}
else {
print "Please register at <A HREF=\"Url to site\">Site Name</A>";
$U = "";
exit;
}
// end vB hack
A few people have emailed me questions so I will clarify. You DO need to be a registered vB user to enter the chat room. Why? To enter the chat room you need the vB cookie (and to get the vB cookie you need to be a vB member ;) ).
WOW, this is a VERY coo! hack. I've always wanted to use this. Really though this is sweeet :)
Thanks. I just made a few improvements (you can now logout :) ). I have a few more things I want to do and I'll release a .02 version. Are there any specific features that anyone is looking for?
Nice hack!
Can it be possible to have a pop-up or seperated window instant message function included in the chat room?
Private chat room is possible?
PaulLin,
Not sure why you would want an instant message feature? Is the chat not instant enough? I was trying to keep the interface simple and clean which is why I have it setup so everyone enters the same default room. If enough people want it I may add a private chat room option.
A new version of phpMyChat was released today. The vB integration hack still works great. The link on my site now points to the new version. Here is version .02 of the hack.
// start vB hack version .02
// Please send bug reports, questions and suggestions to:
// jeremy@linuxquestions.org
require("/path/to/global.php");
if ($userinfo[cookieuser]==1) {
$U=$userinfo[username];
$N=20;
$password = "1";
$D=10;
}
else {
print "To use the chat room you must be a registered user. <BR>";
print "Please register at <A HREF=\"../index.php\">YourSiteName</A>";
$U = "";
exit;
}
// end vB hack
Does the chat script put very much of a strain on the server?
So far the load on the machine has been VERY minimal. To be honest though I have never had more than 6 simultaneous chat room users. As more people start to use it I will keep you posted.
A few people have asked me where to get phpMyChat. Here is a link: http://www.phpheaven.net/download.php3?a=phpMyChat
I tried to log into your chat page after registering, but my user name was too long and had a space between the names and was rejected.
On my board, many of the members use their full names, so does that mean that this chat software will not work for such people?
I have corrected the error. You should now be able to log in. Thanks for the feedback.
Iliana
07-04-2001, 03:13 PM
I am getting the following message when I integrate the hack.
Fatal error: Failed opening required './admin/config.php' (include_path='') in /home/www/theparentclub/forums/global.php on line 66
The weird thing is the link below is as follows in the index.lib.php3 file:require("/home/theparentclub/www/forums/global.php");
I am assuming that the global.php file is the one associated with the vbulletin forum.
The fatal message above has theparentclub/www reversed and I cannot find where to fix this problem. I entered the code exactly as described above and I only updated the required link.
What am I doing wrong?
For test go to http://www.theparentclub.com/chat/
Thanks
Iliana
07-04-2001, 03:45 PM
Also,
Which global.php file are you talking about. The one in forums dir or forums/admin dir?
I assume is the first one...
Iliana
07-05-2001, 05:26 PM
Can anyone help us?
cause he made the hack for version 1.1.x... not 2.x
Iliana
07-05-2001, 07:03 PM
Originally posted by customcpu
A new version of phpMyChat was released today. The vB integration hack still works great. The link on my site now points to the new version. Here is version .02 of the hack.
// start vB hack version .02
// Please send bug reports, questions and suggestions to:
// jeremy@linuxquestions.org
require("/path/to/global.php");
if ($userinfo[cookieuser]==1) {
$U=$userinfo[username];
$N=20;
$password = "1";
$D=10;
}
else {
print "To use the chat room you must be a registered user. <BR>";
print "Please register at <A HREF=\"../index.php\">YourSiteName</A>";
$U = "";
exit;
}
// end vB hack
Fred,
He did make the hack for the latest version as you can see above.
:)
Nope, he made it for version 1.0.2 if I'm correct. Because he made the hack on 07-16-2000 and vBulletin 2.0.0 was NOT released back then.. lol
customcpu
07-05-2001, 11:43 PM
I *think* I released the hack for phpMyChat .13 and vB 1.x. It probably doesn't work with newer versions of phpMyChat and I don't currently use it on my site, so I will probably not be updating it (altough you never know). Sorry.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.