PDA

View Full Version : A phpMyChat integration Hack


Pages : [1] 2

Stasik
06-25-2001, 10:00 PM
Hi.... it is my first hack - phpProbe ;)
here is it... it was tested under vbb2x RC2 and phpMyChat 0.14.4

News:
Updated on 19.07.01
- FAQ has been add

Updated on 18.07.01
The hack is compatible with version 0.14.5 of phpMyChat
- there is some javaScript code there, so the hack will not work with browsers without JS support (phpMyChat will not work with these browsers too ;) )
- the Exit link in chat works ok now

Hack:
Step 1:
open /lib/index.lib.php3 in yours phpMyChat Derictory
find:
// Fix some security holes

replace it with

//a VBB integration hack by Stasik (stasik@t-online.de)
//v0.1
//(C)2001

$exiturl = "http://www.blabla.com"; // the url the user will be redirected exiting the chat

if($Ver == ""){print "
<HTML>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
<!--
var NS4 = (document.layers) ? 1 : 0;
var IE4 = ((document.all) && (parseInt(navigator.appVersion)>=4)) ? 1 : 0;
var ver4 = (NS4 || IE4) ? \"H\" : \"L\";
function defineVerField()
{
if (document.images && ver4 == 'L')
document.forms['Params'].elements['Ver'].value = 'M'; // js1.1 enabled browser
else document.forms['Params'].elements['Ver'].value = ver4;
}
-->
</SCRIPT>
<FORM ACTION=\"index.php3\" METHOD=\"POST\" AUTOCOMPLETE=\"OFF\" NAME=\"Params\">
<INPUT TYPE=\"hidden\" NAME=\"Ver\" VALUE=\"L\">
</FORM>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
defineVerField();
document.forms.Params.submit();
</SCRIPT>
</HTML>
"; exit;}

chdir("/path/to/board/");
require("./global.php");
chdir("/path/to/chat/");

if ($bbuserid == 0)
{
print "no"; //Message if the user has no cookie
exit;
}
else
{
if ($bbusername == "" || (isset($bbusername))==0)
{
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$bbusername = $username;
}
else
{
$username = $bbusername;
} }

$U = $username;

$pat = "[[:space:]]";
$repl = "";
$U = ereg_replace($pat,$repl,$U);
$pat = ',';
$U = ereg_replace($pat,$repl,$U);
stripslashes($U);

$N = 20;
$D = 10;
$Form_Send = 1;

//Replace admin with your administration nick
if($U != "Admin")
{
$PASSWORD="1";
}

// Fix some security holes

Step 2:
open /lib/index.lib.php3 in yours phpMyChat Derictory
find:

$DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
}
}


replace it with:

$DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
}
}
if($exit == "1"){header ("Location: $exiturl"); exit;}


Step 3:
open /exit.php3 in yours phpMyChat Derictory
find:

<A HREF="<?php echo("$From?Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>

replace it with:
<A HREF="<?php echo("$From?exit=1&Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>

ENJOY

FAQ:
Q: I`m getting "no" every time.
A: You need to upgrade a cookie option in your VB control panel. Write under: Options->Change Options->[HTTP Headers and output]->Cookie Domain your domainname ONLY (blabla.com).

Q: I`m getting "you need to register" error.
A: Enable chat using for not registered users in your phpMyChat config (/config/config.lib.php3).

Q: I`m getting "wrong password" error.
A: Make shure you have deleted all user accounts in your chat and have only administrative one. If you are logging is as administrator note that you have to enter your password EVERY time you are logging in.

Questions or Bug reports?
Post it here I`ll answer ASAP.

Dakota
06-26-2001, 07:10 PM
Is there a demo of it? I would like to see it in action before installing it.

Stasik
06-27-2001, 07:47 AM
there was a local demo of it, i`m searching a demo forum... IT WORKS REALLY :)

polizist
07-12-2001, 09:08 AM
Your hack works fine for me, but i have a quastion:

Ho are users able to open a private room? They are not listed in the phpmychat user database i guess, so they can "only" chat, right?

Is there a chance to use the vbulletin database for all other actions (like open a private room)?

Best wishes, polizist

MarkB
07-12-2001, 09:56 AM
Is phpMyChat hard on a server? I'm running on a virtual account, and would love to have this hack, but I'd like to know whether the chat script would have my host howling for my blood (or shutting down my account;)) first :)

polizist
07-12-2001, 10:03 AM
well, we have it on our own server with a gig of memory. just try what happens ;)

rmusic
07-12-2001, 12:00 PM
is there a php4 version of phpmychat because i cant use php3 on my site :(

Stasik
07-12-2001, 02:12 PM
I think there is no php4 version

Stasik
07-12-2001, 02:14 PM
Originally posted by polizist
Your hack works fine for me, but i have a quastion:

Ho are users able to open a private room? They are not listed in the phpmychat user database i guess, so they can "only" chat, right?

Is there a chance to use the vbulletin database for all other actions (like open a private room)?

Best wishes, polizist

Hi....

this things with other actions are not so easy to do...... i know theoretically how to do it, but i have no time and lust to do it :(

bye...

P.S. Nickname "Polizist" ist geil :)

snyx
07-12-2001, 11:56 PM
I installed this hack, but it dont work? It just keeps saying "invalid password" no matter who trys?

Stasik
07-13-2001, 12:59 PM
Hi

you have to allow the chat-use to unregistered useres (using setup.php3 or manually in config file)

--OR/AND--

you have to delete all users from chat and leave only Admin-nick

bye

webhost
07-15-2001, 02:51 AM
Will it work with version 2.0.1 and phpmychat version 14.2 if so where do I place it because fix security holes is not found in version 14.2

Thanks

Stasik
07-15-2001, 04:25 PM
hi

try to enter this text BEFORE
"require("./${ChatPath}config/config.lib.php3");"

if not then

try to upgrade your chat or post index.lib.php3 here

BYE

webhost
07-15-2001, 04:53 PM
I am waiting to upgrade my chat until 15.0 comes up.

Here is the url http://chat.realwebhost.net

Here is the link to my forums http://forums.realwebhost.net

I have attached the zip file. I did try to place code where you stated and I tried this for the paths
board path I tried http://forums.realwebhost.net and also tried http://www.realwebhost.net/forums I think it should be the first one because that is how I get to my forums.

Niether worked gave a error saying bad path.

Then I tried chat path the same way switching the word forums with chat and I got the samew errors.
I have attached the file

Joey

Stasik
07-15-2001, 05:06 PM
enter a hack code before:

"require("./${ChatPath}config/config.lib.php3");"

for the both path i will need a tree of your server.

webhost
07-15-2001, 05:17 PM
this is the error I get with the attached file. I have attached the file to this thread with the script change in it
Warning: ChDir: No such file or directory (errno 2) in /home/realweb/public_html/chat/chat/lib/index.lib.php3 on line 60

Warning: ChDir: No such file or directory (errno 2) in /home/realweb/public_html/chat/chat/lib/index.lib.php3 on line 62
no

When I ftp in I have files and directories including public)html underneath this I have the forums directory which has forums/gobal.php and also the chat directory which is chat/chat/lib/index.lib.php

Stasik
07-15-2001, 06:01 PM
your both path are not ok

try smth like this

fist
/home/realweb/public_html/forums/

second
/home/realweb/public_html/chat/chat/

webhost
07-15-2001, 06:02 PM
Here is the script I put in and below that is the error I get.

chdir("public_html/forums");
require("http://www.realwebhost.net/forums/global.php");
chdir("./${ChatPath}");

Warning: ChDir: No such file or directory (errno 2) in /home/realweb/public_html/chat/chat/lib/index.lib.php3 on line 60
no

webhost
07-15-2001, 06:07 PM
OK HERE is the script change you recommended and below that is the error I get

chdir("/home/realweb/public_html/forums/ ");
require("/global.php");
chdir("/home/realweb/public_html/chat/chat/");

==========================================

Warning: ChDir: No such file or directory (errno 2) in /home/realweb/public_html/chat/chat/lib/index.lib.php3 on line 60

Fatal error: Failed opening required '/global.php' (include_path='') in /home/realweb/public_html/chat/chat/lib/index.lib.php3 on line 61

Stasik
07-15-2001, 06:07 PM
NOOOOOOO

here are the parts... i think they are ok

look and replace

//a VBB integration hack by Stasik - source parts were taken from other authors ;)
chdir("/home/realweb/public_html/forums/");
require("./global.php");
chdir("/home/realweb/public_html/chat/chat/");

Stasik
07-15-2001, 06:08 PM
ok... write me a FULL PATH to your forum

webhost
07-15-2001, 06:12 PM
I put this in

chdir("/home/realweb/public_html/forums/");
require("./global.php");
chdir("/home/realwhttp://www.vbulletin.com/forum/newreply.php?action=newreply&threadid=21329eb/public_html/chat/chat/");

Now go here and see what we get
http://chat.realwebhost.net

Stasik
07-15-2001, 06:18 PM
u has a small tipp mistake there

but as i have seen in link it works... replace "no" wiht page that means "chat is only for forum registered members... please login yourself or register" or so that ;)

webhost
07-15-2001, 06:25 PM
this is what I put in go to link and see result

print "/index.php3"; //Message if the user has no cookie
exit;

Stasik
07-15-2001, 06:28 PM
you should write
require("./index.php3");


BUT IT WOULD NOT WORK!

you can foget the standart login page with this hack... :(

users without forum-accout can not use it :(

webhost
07-15-2001, 06:30 PM
ok I changed go to link and see result

webhost
07-15-2001, 06:38 PM
here is line 9 and 10 of my global.php file

// get rid of slashes in get / post / cookie data
function stripslashesarray (&$arr) {

Stasik
07-15-2001, 06:38 PM
ups ;)

i dont know php very good.. delete the line ;)

replace "no" with HTML code

webhost
07-15-2001, 07:05 PM
we tired I think the way you put require ./index.php3 in is correct problem somewhere else. I f you have it working could you direct to the url where I could see it in action?

Stasik
07-15-2001, 07:16 PM
i`ll show you original php-code

~~
if ($bbuserid == 0)
{
print "<html>
Please register you or login you by our forum.
</html>
";
exit;
}
else
{
if ($bbusername == "" || (isset($bbusername))==0)
~~

somthing like this

Stasik
07-15-2001, 07:29 PM
it had workt I had seen it.... it worked when there was "no"

polizist
07-17-2001, 12:06 PM
Originally posted by webhost
we tired I think the way you put require ./index.php3 in is correct problem somewhere else. I f you have it working could you direct to the url where I could see it in action?

http://www.windelwinni.de/docs/forum/index.php

Click on a forum and read the red marked announcement. Into the annoucement click on "hier aufrufen" and enter the chat (or not, if you?re not registered)

but it?s german ;)

webhost
07-17-2001, 12:50 PM
Thanks
It was a struggle, no good at German but I did manage to register on your board and go to the chat room. What version of vb and phpmycaht ar you using. Can you help me get mind working. I am using vb 2.0.1 and phpmychat version 14.2

Joey

Great looking board which I could understand the German though.

polizist
07-17-2001, 01:09 PM
Well, i should be able to help you. What?s your problem?

We are using 2.0.0 with phpMyChat *14..5

What is the exact problem? Maybe you can post a link to your forum or chat and i?ll see what i can do. But i`m very busy, so please bepatience ;)

polizist

webhost
07-17-2001, 01:34 PM
forum is here http://forums.realwebhost.net
chat is here http://chat.realwebhost.net

I have a chat button on the top of the opening page in my forum

Thanks you can read the previous posts and see what peoblems we were having.

Stasik
07-17-2001, 04:54 PM
Hey webhost, it has worked by you, when there was written "no".

webhost
07-17-2001, 04:57 PM
I never got it working.

Stasik
07-17-2001, 05:01 PM
ok... lets start it new

edit ur /usr/lib/index.lib.php3
plaste bbefore "require("./${ChatPath}config/config.lib.php3");"

//a VBB integration hack by Stasik - source parts were taken from other authors ;)
chdir("/home/realweb/public_html/forums/");
require("./global.php");
chdir("/home/realweb/public_html/chat/chat/");

if ($bbuserid == 0)
{
print "no"; //Message if the user has no cookie
exit;
}
else
{
if ($bbusername == "" || (isset($bbusername))==0)
{
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$bbusername = $username;
}
else
{
$username = $bbusername;
} }

$U = $username;

$pat = "[[:space:]]";
$repl = "";
$U = ereg_replace($pat,$repl,$U);
$pat = ',';
$U = ereg_replace($pat,$repl,$U);
stripslashes($U);

$N = 20;
$D = 10;
$Form_Send = 1;

//Replace admin with your administration nick
if($U != "Admin")
{
$PASSWORD="1";
}


If you had a login problems (bad password), I have forgotten to say, that you have to DELETE all exisind accounts and leave only admin-account

webhost
07-17-2001, 09:20 PM
Sorry for the delay, got busy. Do you mean delete all users in my chat and just leave admin?

Joey

Stasik
07-17-2001, 09:45 PM
yes, I mean it

P.S. The name must not be "Admin", but if you want it - you can do it ;)

webhost
07-17-2001, 10:12 PM
ok I deleted all my users except admin which I go my bbman. Changed that in your script put in for the nick.I try to go to http://chat.realwebhost.net All I get is a blank screen with the word no. I went to my forums and signed in and clicked on my link in the forums http://chat.realwebhost.net and the same no. Now I have no users and it still doesn't work. Hope you will help me get this working.

Joey

Stasik
07-17-2001, 10:19 PM
i know the answer!

go into you vbb adminpanel

go Options->Change Options->[HTTP Headers and output]->Cookie Domain

and write just "realwebhost.net" there

webhost
07-17-2001, 10:32 PM
ok went to cookie domain and put in this .realwebhost.net
noticed the 2 dots, I also tried realwebhost.net with 1 dot

In your script under admin nick there is something like password=
"1" do I need to change 1 and put in my admin password for the chat room?

I am still getting no

I am using this link to board http://chat.realwebhost.net/index.php3

Stasik
07-17-2001, 10:38 PM
u have not to change 1 to anyting.

i have tryed to login in at realwebhost.net/forums annd use the chat at realwebhost/chat/chat and it has worked.... :eek: try to change the cookie doman to "realwebhost.net", clear all cookies on your computer and try to login again

webhost
07-17-2001, 10:40 PM
1 dot or 2 dots

Stasik
07-17-2001, 10:58 PM
STOP STOP STOP

visit here http://chat.realwebhost.net/chat/

it works.. you have to change your chat derictory...

Stasik
07-17-2001, 10:59 PM
plz read my previous post

you have to copy your chat from

realwebhost.net/chat/chat/ to realwebhost.net/chat/

and change then a path to chat in my hack

webhost
07-17-2001, 11:05 PM
Changed the link to http://chat/realwebhost.net/chat/
Now it takes me to opening page and wants me to register is that correct?

Stasik
07-17-2001, 11:08 PM
Hm... also... you as admin will have to enter your password each time you wants to login..... :( but other users have not to do it.... just edit the phpmychat config file and allow the UNREGISTERED users to use the chat

Stasik
07-17-2001, 11:10 PM
the links chat.realwebhost.net/chat looks not very comfortable ;) i`ll advice you to copy your chat from /chat/chat to/ /chat/, but it`s only a advice ;)

webhost
07-17-2001, 11:13 PM
don't run off one second

Stasik
07-17-2001, 11:14 PM
ok.. i`m waiting

webhost
07-17-2001, 11:28 PM
ok chat/chat is no more it is now realwebhost.net/chat

I have changed the path in your script from chat/chat to chat/

I have changed the link on the board to http://www.realwebhost.net/chat/

I logged out of my forum as admin and loggen as theone selected chat it took me to the main screen of the chat and put my name in the users slot but not ME i HAD TO REGISTER FIRST.

Ok its up to you now

Some time I believe I changed something in the chat that made someone register before they chatted could that be the problem?

I in picture that when someone signs in on my forum and selects chat it takes them to the chat room not to the opening chat page to register am I thinking right

webhost
07-17-2001, 11:29 PM
do I still need to upload that index.html file to chat/

Stasik
07-17-2001, 11:32 PM
yes you are thinking right...

no, u had`nt upload it any longer...

listen here..

the link chat.realwebhost.net ist working too

Some time I believe I changed something in the chat that made someone register before they chatted could that be the problem?

THIS IS A PROBLEM


correct it... and it will be work...

p.s. and change the images paths ;)

webhost
07-17-2001, 11:40 PM
trying to remember, been along time since I done that, hold for a couple of minutes and let me look

Stasik
07-17-2001, 11:42 PM
it will be a bit difficultly

it`s 2:33 nights here.. :)


but i`m wating just a 24/7 support :D

webhost
07-17-2001, 11:48 PM
ok got it log in and go to chat, 2 problems once you get there.
1) try to exit you stay in chat room it will not exit.
2) under exit my stuff is gone or not showing up and it doesn't show any chat rooms all zero's

I'll meet you in the chat room

Stasik
07-18-2001, 12:22 AM
yo good night... se ya tomorow, here ;)

webhost
07-18-2001, 12:25 AM
Great Hack Its working Thanks for all your help.

Man this is great thing you do today. Been wanting this for about 4 months.

Joey

webhost
07-18-2001, 02:58 AM
problems

Stasik
07-18-2001, 12:19 PM
so.. i`ve tested it for 40mins... and i think i have found the bag

please upgrade your hack... i`m waiting for results ;)

webhost
07-18-2001, 12:30 PM
upgrade with what. I installed version 14.5 last night. What do you want me to upgrade

webhost
07-18-2001, 12:42 PM
ok I installed what you had put in the first post, still have the same problem.

webhost
07-18-2001, 01:10 PM
ok I have uploaded your new hack. I tried to select the other rooms and it takes me back to the main chat signin page and tells me that my password doesn't match. Also look at this image I don't have any scroll bar, font, table or send message field box at the bottom or the ? mark in the left bottom. here is the image

webhost
07-18-2001, 01:50 PM
yes I deleted all of version 14.2 and then installed 14.5 then I looked at chat room. It was fine.

then I installed your hack and you see what we are getting.

index.lib.php3 attached in a zip

how are you writing in the chat room, I don't have a place to write or I would respond

Stasik
07-18-2001, 02:33 PM
check updrade with new version of hack

webhost
07-18-2001, 04:07 PM
upgrade done problems

Parse error: parse error in /home/realweb/public_html/chat/lib/index.lib.php3 on line 1246

Fatal error: Call to undefined function: send_headers() in /home/realweb/public_html/chat/index.php3 on line 20

Stasik
07-18-2001, 04:09 PM
i see :( stand by

Stasik
07-18-2001, 04:11 PM
look at step2

compare it with your file

webhost
07-18-2001, 04:23 PM
back online I think it is correct when you sign in see if you get welcome message. It was in step 2 when I copied it gave me one of these ' instead of this "

Stasik
07-18-2001, 04:39 PM
i`m waiting for you... :D

webhost
07-18-2001, 05:39 PM
trying the chat activity file I get this error.

Fatal error: Failed opening required './http://www.realwebhost.net/chat//lib/connected_users.lib.php3' (include_path='') in /home/realweb/public_html/chat/chat_activity.php3 on line 24

I tried putting it in http://www.realwebhost.net http://www.realwebhost.net/chat directory no luck. here is the file and the path I have placed in it.

Stasik
07-18-2001, 05:44 PM
replace line 24

require("./${home/realweb/public_html/chat}/lib/connected_users.lib.php3");

with

require("./${ChatPath}/lib/connected_users.lib.php3");

webhost
07-20-2001, 01:22 AM
Stasik you are the man. Working great will write up better response tomorrow.

Thanks Again

ThePenguin
07-20-2001, 08:06 PM
I don't see the part where this is actually integrated into the index.php page. How do you do that?

Penguin

Stasik
07-20-2001, 08:10 PM
hm.... its my secret ;)

ThePenguin
07-20-2001, 08:15 PM
Um, please explain? I do appear to have the rest of it working now but obviously that is a key element.

Stasik
07-20-2001, 08:17 PM
do you have paypal? :D

ThePenguin
07-20-2001, 08:21 PM
No I don't. Never mind; I didn't see anywhere listed in this hack that you are charging for its use. Perhaps you should list that in the installation instructions.

Stasik
07-20-2001, 08:25 PM
what are you speaking about? i`m dont charging for it its FREE!

ThePenguin
07-20-2001, 08:28 PM
Then you really did lose me. Could you direct me to how to integrate it into Vbulletin? I've looked through this thread but don't see it. I also don't see it or any downloadable files or links in your initial thread on it.

I'm still not even sure that I can use this-- I don't know how rough phpMyChat is on a shared server.

PS-- Perhaps my question is not clear. I set up phpMyChat with the modifications listed in your instructions and it does appear to be running. On my Vbulletin, how do you get the box that says who is in the chat with the links? That's my question...

Stasik
07-21-2001, 11:30 AM
ahm..... THIS isn`t in the hack.... it is just my private test :D

a small advice: look in "chat_activity.php3" :D

amsch
07-23-2001, 03:28 PM
Anyone else having problems with this hack in netscape? I have it working correct in IE but I still get NO in netscape.
Amy

Stasik
07-23-2001, 04:05 PM
hm....

Netscape suxx, it must die...

try to change the cookies options in netscape or "cookie domain" option in VBB control panel

amsch
07-24-2001, 01:36 AM
What I have come up with is, it works in Netscape 4.75+ and fine in IE.

Just in case anyone else asks.
Amy

Sukij
07-26-2001, 09:14 AM
HI..

I have problem on EXIT from Chat. After pressing EXIT in chat windows, it's not return to the vBulletin Forum. It's still in the Chat Windows.

Can you please help ? I have already modified the exit.php as mentioned in your instruction.

Thanks

Sukij
07-26-2001, 09:25 AM
HI..

More info. in the index.php3 I also put

$exiturl = "http://203.154.80.13:90"; // the url the user will be redirected exiting the chat

So, it should be redirected back to the forum.

Thanks

Sukij
07-26-2001, 10:00 AM
HI..

After install the hack, how can I choose the language.

Thanks

Sukij
07-26-2001, 10:07 AM
HI..

After install the hack. How can I create new room ?

I try to use command /join

but the windows pop-up show that I need to register before I can create new room.

Thanks

Stasik
07-26-2001, 11:10 AM
1) can u post yuur index.lib.php3 here?

2) where do u want to change language?

3) i fear its impossible :( (try to allow private rooms to unregistered users)

Sukij
07-27-2001, 12:14 AM
HI..

1. I attached the index.lib.php3 in this post. The problem is still there, after press EXIT, usres are not redirected back to forum. Please help checking my attached file.
2. Language : After testing, I found that if the registerd users has been redirect from forum to Chat, they will be stop at the LOGON screen since password need to be enter where Language can be selected. But for the unregistered user, the system bring them directly to the chat windows without stoping at the LOGON screen, so these people can't choose language. Is it possible to move the language selection into chat windows instead of LOGON screen and allow users to select or change their language at any time.
3. Is ok, I understand now.

Thanks

Sukij
07-27-2001, 12:17 AM
HI..

Let me confirm with you what is the correct way of the step..

1. In case of Registered Users. What happen after they press EXIT. Go back to the LOGON screen or Forum ?
2. In case of Unregistered Users. I think these people will be redirected back to forum. Am I correct ?

Thanks

Sukij
07-27-2001, 01:47 AM
HI..

I solve the problem of Cannot EXIT already. It's my mistake to miss the STEP 2.

Thanks

Sukij
07-27-2001, 06:43 AM
HI..

I don't care the Language Selection now since unregistered users can't go to the Chat page anyway. So, just fotgot it..

P.S. This question is not concern to Hack Integration. It's conern to the phpMyChat, which I think may be you have answer to my question. Who can you /save command in phpMyChat ? I'm admin, can use it without problem. How about other registered users, can they use /save command ? I ask this because when they issue the /save command, the chat just show another windows of the same chat screen.

Thanks

Stasik
07-27-2001, 09:40 AM
i dont know about save command, ask one of your members

Sukij
08-01-2001, 01:43 AM
HI..

Come back agin for one question.

If users have already registered with the vBulletin, and if they go to the Chat, can they create/join the private room with the /JOIN command ?

My current situation now is the vBulletin Registered Users cannot crate their own private room, only Admin now can create the private room. If they try to create the private room, the pop up windows will show that they are not registered. Since this integration hack is integrate with VB database, so it should recognize the the Registered User and allow to create the private room. Am I understand correctly ?

Thanks

Stasik
08-01-2001, 09:36 AM
i fear you have right.. :(

Sukij
08-01-2001, 09:41 AM
HI.

Do you mean users will not be able to create the private room even they are registered users of VB ?

Stasik
08-01-2001, 09:44 AM
yes, if u cant allow the unregistered users to create own rooms it is impossible

ethank
08-05-2001, 08:25 PM
Hack seems to work, but I can't login with the admin user. I made sure the password was set the same as it was in VBulletin, but it won't take it.

EThan

Sukij
08-05-2001, 09:07 PM
HI..

Is it possible for you for the next future release, that the program can handle the private room feature for VB registered users. Thanks

Stasik
08-06-2001, 07:03 AM
Originally posted by ethank
Hack seems to work, but I can't login with the admin user. I made sure the password was set the same as it was in VBulletin, but it won't take it.

EThan

Have you replaced the administartion nick in index.lib.php3?

ethank
08-07-2001, 01:52 PM
Originally posted by Stasik


Have you replaced the administartion nick in index.lib.php3?

Works like a charm! Thanks. I'll be implementing this soon.

Ethan

Stasik
08-07-2001, 02:12 PM
ok ;)

AJR
08-08-2001, 04:13 AM
Hi everyone. I was as frustrated as many people about this phpMyChat hack. It works well, but I had to dig for 2 days to figure out how to integrate both vBulletin and phpMyChat together and not having all the code to add for both programs! Well, I have compiled 2 hacks...this one and Tom's forum index hack for phpMyChat. Plus I added a section of a couple of changes I made to make it more "user friendly". Read it once, read it twice, make sure you know what you want to add/change, then go do it!

ethank
08-08-2001, 12:11 PM
Originally posted by AJR
Hi everyone. I was as frustrated as many people about this phpMyChat hack. It works well, but I had to dig for 2 days to figure out how to integrate both vBulletin and phpMyChat together and not having all the code to add for both programs! Well, I have compiled 2 hacks...this one and Tom's forum index hack for phpMyChat. Plus I added a section of a couple of changes I made to make it more "user friendly". Read it once, read it twice, make sure you know what you want to add/change, then go do it!

Cool, I'll try it out tommorow and tell you how it goes.

Ethan

daroz
08-08-2001, 02:46 PM
[QUOTE]Originally posted by AJR
Hi everyone. I was as frustrated as many people about this phpMyChat hack. It works well, but I had to dig for 2 days to figure out how to integrate both vBulletin and phpMyChat together and not having all the code to add for both programs! Well, I have compiled 2 hacks...this one and Tom's forum index hack for phpMyChat. Plus I added a section of a couple of changes I made to make it more "user friendly". Read it once, read it twice, make sure you know what you want to add/change, then go do it!

Stasik
08-08-2001, 04:55 PM
AJR, hehe, nice....

I`m gonna to make a upgrade, do u have ICQ?

macom
08-09-2001, 08:43 AM
Hi, i need two admins... how can i do this ??

Stasik
08-09-2001, 09:12 AM
Originally posted by macom
Hi, i need two admins... how can i do this ??

hi,
find the text


if($U != "Admin")
{
$PASSWORD="1";
}


replace it with


if($U != "Admin" or $U != "Admin2")
{
$PASSWORD="1";
}



and change "Admin" and "Admin2" to registered user names

macom
08-09-2001, 09:41 AM
TXH for the fast request...

I have replace the text in the "index.lib.php3"... but it dont works ? Sorry for my bad english...

What can i do now ??

Stasik
08-09-2001, 11:10 AM
Da bracuchst du dich nicht zu entschuldigen *g*...

was hast du genau gemacht? beschreib ma?

macom
08-09-2001, 11:30 AM
also ich habe den text in der index.lib.php3 so wie beschrieben angepasst... im forum bin ich selber als "macom" registiert... der admin account in phpMyChat heist auch "macom" ich denke soweit ist auch richtig... den für mich alleine funktioniert das auch ganz gut... so jetzt soll aber der forums co admin auch bei eintritt in den chat den status admin haben... und hier fangen die probleme an...

Ich habe auch schon via phpadmin auf der mysql datenbank im table "c_reg_users" einen zweiten account "Steven" mit gleichem passwort wie bei "macom" angelegt... dann komme ich aber selber nicht mehr rein?? Jetzt weis ich nicht mehr weiter...

Stasik
08-09-2001, 02:35 PM
dis acoouns auf vb muessen lauten: macom und Steven


versuch ma


if($U != "macom" or $U != "Steven")
{
$PASSWORD="1";
}


wenn es nicht klappt


if($U == "macom" or $U == "Steven")
{
}
else
{
$PASSWORD="1";
}


aber das erste code mus gehen

macom
08-09-2001, 04:31 PM
Ok, werd ich gleich mal testen...
Was ich jetzt aber immer noch nicht weis... brauche ich in der table "c_reg_users" einem zweiten Admin account für Steven? Wen ja, wie generiere ich dann ein passwort (wegen verschüsselung)?

Danke schon mal im voraus...

Stasik
08-09-2001, 05:51 PM
du muss einfach maeinen user hinfuegen und in tabelle unter "right" oder so was "admin" schreiben

Originally posted by macom
Ok, werd ich gleich mal testen...
Was ich jetzt aber immer noch nicht weis... brauche ich in der table "c_reg_users" einem zweiten Admin account f?r Steven? Wen ja, wie generiere ich dann ein passwort (wegen versch?sselung)?

Danke schon mal im voraus...

macom
08-09-2001, 06:41 PM
Hab noch mal nachgesehen?

Laut Setuproutine von myphpchat darf nur ein Admin vorhanden sein? der steht dann in dem Table ?c_reg_users? also bleibt nur der Table ?c_users?? hier darf ich aber keinen eintragen weil sonst der login in den Chat nicht mehr funktioniert (Username schon vergeben) ist mir auch klar, weil der Chat holt sich ja den User vom Board und tr?gt in dann in ?c_users? ein.

Wenn Steven eingeloggt ist kann ich mittels phpmyadmin im Table ?c_users? den Status auf admin oder mod setzen? diese Routine ist aber sehr unpraktisch und ich bin ja nicht immer zur selben zeit online. Ich hoffe du verstehst mich jetzt besser.
Oder mache ich doch noch etwas falsch :confused:

Ist es eventuell m?glich einen Table vom Board so anzupassen das dass Board beim Login in den Chat gleich die richtigen Parameter (admin, mod) an den Table ?c_users? ?bergeben kann?

Von der logischen Seite k?nnte ich mir das schon vorstellen, aber ob dies umsetzbar ist bleibt die Frage?? Ich kenne mich mit mysql und PHP noch nicht so gut aus? Es w?re aber echt super, dann h?tte gleich jeder Mod. vom Board auch den richtigen Status im Chat.

macom
08-09-2001, 07:00 PM
Hab jetzt noch im Table "user" vom Board nachgesehen... dort gibt einen Eintrag "usergroupid" und nat?rlich auch den passenden Status dazu, leider nur als Nummer... 6 = Admin usw... kann man da net was machen?? Ich hoffe mal das Dir was Gutes dazu einf?llt. ;)

Stasik
08-09-2001, 07:44 PM
ahm.... ich bin kein php+mysql genie... :(((

also ich garantiere nix

nach
$username=$getusername[username];
einfuegen

$getusername=$DB_site->query_first("SELECT usergroupid FROM user WHERE userid=$bbuserid");
$group=$getusername[usergroupid];


nach
$U = $username;

einfuegen

$PREMS = "admin";
if($group == "6"){
$U = $AUTH_USERNAME;
$DbLink->query("SELECT perms FROM ".C_REG_TBL." WHERE username='$U' LIMIT 1");

if ($DbLink->num_rows() != 0)

{

list($PREMS) = $DbLink->next_record();

}

$DbLink->clean_results();
};

macom
08-10-2001, 03:45 AM
Danke erst mal... ich werde es heute nacht mal testen. Wäre echt cool wenn's funktionieren würde. Melde mich wieder...

VirtueTech
08-10-2001, 12:35 PM
One thing I've noticed with this hack is that it does not integrate the phpMyChat profile with the forums profile. Any future for that?

Stasik
08-10-2001, 01:33 PM
Yes, u can link the vbb profile on chat pages.... I think it will be in upgrade... :)

macom
08-10-2001, 06:06 PM
Hallo nochmal,

habs jetzt probiert... jetzt kommt folgender Fehler:

Fatal error: Call to a member function on a non-object in index.lib.php3 on line 161


$PREMS = "admin";
if($group == "6"){
$U = $AUTH_USERNAME;
$DbLink->query("SELECT perms FROM ".C_REG_TBL." WHERE username='$U' LIMIT 1");

if ($DbLink->num_rows() != 0)

{

list($PREMS) = $DbLink->next_record();

}

$DbLink->clean_results();
};



Hilfe....

Stasik
08-10-2001, 06:51 PM
du mus alles mit require oder include vorher schieben

macom
08-10-2001, 06:53 PM
?? Sorry aber das verstehe ich jetzt nicht ??

Stasik
08-10-2001, 07:03 PM
try to replace

$PREMS = "admin";
mit

$DbLink->clean_results();
$PREMS = "admin";

macom
08-10-2001, 07:14 PM
Hm, jetzt kommt folgender fehler...

Fatal error: Call to a member function on a non-object in index.lib.php3 on line 158


$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$getusername=$DB_site->query_first("SELECT usergroupid FROM user WHERE userid=$bbuserid");
$group=$getusername[usergroupid];
$bbusername = $username;
}
else
{
$username = $bbusername;
} }

$U = $username;

$DbLink->clean_results();
$PREMS = "admin";
if($group == "6"){
$U = $AUTH_USERNAME;
$DbLink->query("SELECT perms FROM ".C_REG_TBL." WHERE username='$U' LIMIT 1");

if ($DbLink->num_rows() != 0)

{

list($PREMS) = $DbLink->next_record();

}

$DbLink->clean_results();
};

$pat = "[[:space:]]";
$repl = "";
$U = ereg_replace($pat,$repl,$U);
$pat = ',';
$U = ereg_replace($pat,$repl,$U);
stripslashes($U);

$N = 20;
$D = 10;
$Form_Send = 1;

//Replace admin with your administration nick
//if($U == "xxx")
//{
//$PASSWORD="1";
//}


?? Sorry das ich dich eventuell schon nerve, aber ich habe wirklich fast keine ahnung vom PHP.

Stasik
08-10-2001, 07:16 PM
aslo

move

require("./${ChatPath}config/config.lib.php3");
require("./${ChatPath}lib/release.lib.php3");
require("./${ChatPath}localization/languages.lib.php3");
require("./${ChatPath}localization/".$L."/localized.chat.php3");
require("./${ChatPath}lib/database/".C_DB_TYPE.".lib.php3");
require("./${ChatPath}lib/clean.lib.php3");
include("./${ChatPath}lib/get_IP.lib.php3");

das alles bevor das hack anfaengt

mADmAX`
08-12-2001, 02:24 PM
I upgraded from 2.02 to 2.03 and now I get this when going to index.php3. Any clue? Database error: Invalid SQL: DELETE FROM c_messages WHERE m_time < 997295258
MySQL error: 1146 (Table 'dssmafif_+++++f.c_messages' doesn't exist)
Session halted.

Stasik
08-12-2001, 08:10 PM
try to reinstal index.lib.php3 form archive and reenter the hack

mADmAX`
08-12-2001, 08:12 PM
I figured it out, it seems that after I updated it, the tables that your hack creates was deleted. Works now... Thanks!

Stasik
08-12-2001, 08:35 PM
np

bitbender
08-12-2001, 09:33 PM
I've done the steps specified. I cannot seem to figure out what goes in the chat.php element (or is it a template?)

It seems that I cannot get anything other than a blank page when I select my chat button from the VB index.php....

the base install of chat was functional, and my problems came when I tried to integrate it, which I KNOW is a user error!!

I followed a thread http://vbulletin.com/forum/showthread.php?s=&threadid=21329&highlight=phpmychat which talks about a chat.php, but i'll be dogone'ed if I can find an example!

HELP!!! I see too many people who say "They got it", so I know I've done something stupid, or I'm just being dense!!!

Alert ---> Old Mainframer doesn't get this one!!!

Stasik
08-12-2001, 09:36 PM
no... the thread is talking about the file index.lib.php3 in the /chat/lib/ derictory...

bitbender
08-12-2001, 10:21 PM
ok, so is that where the link on the chat button points to ??

Stasik
08-13-2001, 07:24 AM
no, the link poins to index.php3, but this file uses /lib/index.lib.php3

bitbender
08-13-2001, 10:53 AM
Yes. The reason I asked was that I had tried that b4. When I point it(chat button) at /chat/index.php, I'm redirected back to the forum home page, as if the user had joined, and then left chat. I then tried index.lb.php3, but get a blank screen.

This is because of the hack that was added to index.php3 via the thread I mentioned before. It dicussed your hack and two other parts, which affected index.php in the VB forum directory, and
index.php3, and index.lib.php3, and exit.php3 for myphpchat.

thank you for your time. I will continue to analyze my setup. I am still thinking that I have the hack in VB INDEX.PHP misplaced. I tried to represent the variable ($numchatusers) on the home page via the forum_loggedinusers template, and got a blank field display for my efforts. That would indicate to me the code isn't being executed where it needs to.

I placed the hack at the very end of index.php in the VB forum directory. One of the other reasons I know I've something out or ordung is that the chat doesn't open in a seperate window, as the hack documentation indicated it should.

Help This old fool, please :confused:

bitbender
08-13-2001, 10:57 AM
Forgot the link to the thread in question:

http://www.vbulletin.com/forum/showthread.php?s=&threadid=1344&highlight=Chat+Hack

Down the thread about 4 or 5 replies is a response by Tom. Thats the one I used. It incorporates your process, and some additional parts to get it all working.

Stasik
08-15-2001, 03:37 PM
yes, byt it works fine without other parts, too

http://www.realwebhost.net/chat/

bitbender
08-15-2001, 04:12 PM
"Dunka" for the reply stasik! :)

Update:

Ok, so I go back and study the whole thing again. I found that I had made some errors, so I restored all the files modified as a result of the hack (backups are great!!), and started again, 1 step at a time.

What my problem is now, is that I cannot figure out (I got PHP manual, 2) if the path specified in index.lib.php3 of phpmychat is absoulte or relative.

In reading thru all the pages in this post and other related threads(mentioned above) I saw where you assisted *skull* using what appeared to be absolute path names. Was this because his chat directory was at the same level as his forum directory ? I noticed you had him change some other options, as well...

Why is this a question? Because it is failing trying to retrieve global.php on the require("./global.php") statement after the chdir("\usr\prod\") statement in my version of index.lib.php3.

Can you advise?

bitbender
08-15-2001, 04:19 PM
In my zeal to post a reply, I forgot the error response !

Fatal error: Failed opening required './global.php' (include_path='') in D:\????\????\phpchat\chat\lib\index.lib.php3 on line 91

I put the ???? in, as I don't publicize my directory structures.

The chat button on the home page links to \phpchat\chat\index.php3 as you had indicated in an earler post, and looking at chat_activity.php, also from an earlier reference in this thread.

Stasik
08-15-2001, 04:31 PM
you have to write ADSOLUTE path.... un your case with NT system it should be something like this d:\wwwroot\bitbender\forum\ just try to ask your hoster

bitbender
08-15-2001, 04:38 PM
Sir, I am the Web Hoster :) :) I build PC's, small networks, and work full time installing OS'es on mainframes througout US. The only help desk I have is me!!

Even at home, there is Domestic management to contend with !

thanks again for the reply! I'll keep at it!

I tried it w/o the D: designation, so let me go try wit it !!

Stasik
08-15-2001, 04:41 PM
i`ve done it all to ;)

bitbender
08-15-2001, 04:49 PM
I guess 15th time did the trick!!

Now functional. Sehr Gut!! <---- I hope I spelled this right!

Thanks again for your time, and patience!

You have to contend with domestic management, too ?? :p

Stasik
08-15-2001, 04:52 PM
lol
good that it works (sehr gut was spelled rught)

hm.... ISS server has mahy bugs.... :(

bitbender
08-15-2001, 05:53 PM
Ach so, but W2k Better than W98Se, or Linux, from my experience here.

I think I need to edit the config.php file. Insisting that user's register b4 entering chat room....arrr...not what I intended!!

Something else is still incorrect....Like a FIAT automobile,
FIAT = "Fix It Again, Tony!"

Stasik
08-15-2001, 08:38 PM
u have forgotten freeBSD.... it is much stabiler then win2k or XP....

have u used setup.php3?

muscles
08-16-2001, 04:21 AM
I tried the hack and it worked great.

Now do you have a clue as to how to get the privae rooms working again?


;)

Stasik
08-16-2001, 10:05 AM
i`ve got it, will post with another stuff few dats later, i`m working on another thing now

jarvis
08-16-2001, 05:17 PM
Okay, has anyone got this working with a non-php3 board? My provider does not host this version, and I would hate to have to reset up my vB?

Thanks!

Stasik
08-16-2001, 06:06 PM
the hack can`t harm your vb system

mister
08-23-2001, 04:28 PM
nice hack.

Stasik
08-23-2001, 04:57 PM
thanx

mister
08-23-2001, 05:46 PM
i have a question

when i do /exit or /quit, it takes me back to /chat/index.php3

is there a way to make it follow the $exiturl that i set in /chat/lib/index.lib.php3 ?

Thanks

Stasik
08-23-2001, 07:11 PM
open
lib\commands\quit.cmd.php3
find :
window.parent.window.location = 'blabla';

replace:
window.parent.window.location = '<?php echo("$exiturl"); ?>';

it has to work

PuntoZ3r0
08-29-2001, 11:07 AM
I've tried this hack...
and it doesn't work for me.. :(

phpMyChat (ver 14.5) is full functional..
but when I update the index.lib.php3..
it simply does.. NOTHING..
no error messages.. just NOTHING.. :( :(
I've already checked all that I've found...

so.. the problem is on index.lib.php3 (I suppose)

That's mine..
Is there anybody that can help me??

Thx

Stasik
08-29-2001, 01:50 PM
also u are starting index.php3 and nothing?

PuntoZ3r0
08-29-2001, 02:07 PM
I tried ev'rything!!
startin' with index.php3..
with phpMyChat.php3..
the result.. is.. NOTHING..
but if I use the original file.. (index.lib.php3).. it's all ok.. ..

I really don't know how to do that! :(

Stasik
08-29-2001, 06:08 PM
show url plz ;)

PuntoZ3r0
08-29-2001, 11:46 PM
url
http://www.pourquoipas.it
the forum is here..
http://www.pourquoipas.it/forum
Now I'm using a MultyChat.
(Just to have a chat..)
Oh..
It's in Italian.. (yeah.. translated..)

phpMyChat is HERE (http://www.pourquoipas.it/forum/chat)

thx

Sarge
08-30-2001, 12:21 AM
// Registration of users
define("C_REQUIRE_REGISTER", '0');
define("C_EMAIL_PASWD", '0');

I changed my setting to that

phpMyChat 0.14.5
And vb 2.0 but I cannot login. I can login and change my profile but if I try to login under
http://www.dlrarmy.com/forums/chat/index.php3 it tells me wrong password

It alos wont allow new registrations

Anyone know?

Sarge
08-30-2001, 12:56 AM
oh yeah this is from a fresh install

(never had it before)
and it was working fine till I added the changes

Stasik
08-30-2001, 04:32 AM
Originally posted by Sarge
oh yeah this is from a fresh install

(never had it before)
and it was working fine till I added the changes

why have u changed it?

Stasik
08-30-2001, 04:33 AM
Originally posted by PuntoZ3r0
url
http://www.pourquoipas.it
the forum is here..
http://www.pourquoipas.it/forum
Now I'm using a MultyChat.
(Just to have a chat..)
Oh..
It's in Italian.. (yeah.. translated..)

phpMyChat is HERE (http://www.pourquoipas.it/forum/chat)

thx

i can only suppost to try the english version, mayne there is a problem with language.... reallly dont know why

Sarge
08-30-2001, 01:07 PM
Originally posted by Stasik


why have u changed it?

It worked fine earlier in the day until I added this hack

Stasik
08-31-2001, 03:33 AM
i dont understand why it works fine for me and many other users

gokeeper
09-04-2001, 12:45 PM
i am using phpmychat 14.5
after i edit the index.lib.php3 file
chat/index.php3 show 2 errors

Parse error: parse error in /usr/local/gokeeper/htdocs/chat/lib/index.lib.php3 on line 275

Fatal error: Call to undefined function: send_headers() in /usr/local/gokeeper/htdocs/chat/index.php3 on line 20

Stasik
09-04-2001, 01:11 PM
can u post your line 275 here?

gokeeper
09-04-2001, 01:50 PM
273 if($exit == "1"){header ("Location: $exiturl"); exit;}
274 }
275 }
276 }

Stasik
09-04-2001, 02:08 PM
are u sure u have installed the hack correctly?

gokeeper
09-04-2001, 03:42 PM
i think so...
just find and replace in 2 files
and modi the vb &chat location
without doing anything else...:(
ft..

can u give me a index.lib.php file include the hack?
thx

Stasik
09-04-2001, 05:05 PM
u had to repace paths and $exitur there and rename it from txt

jhkvi
09-09-2001, 04:12 PM
Have you figured out how to enable users to use the /join command? Or is this an impossible dream?:rolleyes:

Stasik
09-09-2001, 05:55 PM
yes.... i have done it.... searching now for changes i have done :(

jhkvi
09-10-2001, 12:33 AM
Great:cool:

I am awaitng your next reply.

VirtueTech
09-26-2001, 04:47 AM
any updates? :)

Stasik
09-26-2001, 11:27 AM
no time.. :( AND its hard to find changes now.... :( stay turned

diavolo11
09-28-2001, 11:15 AM
I am so close--

Fatal error: Call to undefined function: layout() in /usr/local/www/htdocs/texasflashers/chat/index.php3 on line 43
-
What's that mean?

Stasik
09-28-2001, 11:27 AM
no idea.... has u installed it ok_

diavolo11
09-28-2001, 11:46 AM
i think so --I am getting this now
Fatal error: Cannot instantiate non-existent class: db in /usr/local/www/htdocs/texasflashers/chat/lib/index.lib.php3 on line 186

Stasik
09-28-2001, 12:03 PM
post this line here....

make sure all mySQL-workings files are included

diavolo11
09-28-2001, 12:24 PM
thanks for the quick replys, I will try this later on today, but befor you go..can you tell me a quick way to find this line? I don't wanna count to 200.

Stasik
09-28-2001, 04:25 PM
search inet for editr with line names

diavolo11
09-28-2001, 07:35 PM
here is the line:
$DbLink = new DB;

Stasik
09-28-2001, 11:15 PM
are the mysql.php and another things connected correctly? had it worked before installing the hack?

diavolo11
09-28-2001, 11:32 PM
yup here check it:
http://www.texasflashers.org/chat/index.php3

H3NrY
10-01-2001, 09:11 AM
Where in index.php do I add the code??? I cant seem to get it working :(

Stasik
10-01-2001, 01:44 PM
You should add code to /lib/index.lib.php3

H3NrY
10-01-2001, 01:48 PM
I dont get it ... I want a new section under "Currently Active Users" ... How do I add it in Vbulletin's index.php??

H3NrY
10-01-2001, 02:42 PM
I just want this integrated with "Currently Active Users" Its working but how to get it integrated?


<?php
// This script is an example of display, in another page of your website,
// the list or number of users connected to the chat

// Lines below must be at the top of your file and completed according
// to your settings

// relative path from this page to your chat directory
$ChatPath = "../../chat/web/";

// HTML link to launch the chat (used by constants below)
$ChatLaunch = "<A HREF=\"http://my.url.nl\~chat\" TARGET=\"_self\">chatting</A>";

$ShowPrivate = "1"; // 1 to display users even if they are in a private room,
// 0 else

$DisplayUsers = "1"; // 0 to display only the number of connected users
// 1 to display a list of users

define("NB_USERS_IN","users are ".$ChatLaunch." at this time."); // used if $DisplayUsers = 0
define("USERS_LOGIN","User ".$ChatLaunch." at this time:"); // used if $DisplayUsers = 1
define("NO_USER","Nobody is ".$ChatLaunch." at this time.");

require("./${ChatPath}/lib/connected_users.lib.php3");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>

<HEAD>
<?php
display_connected($ShowPrivate,$DisplayUsers,($Dis playUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);
?>


</HTML>

diavolo11
10-03-2001, 02:35 AM
ok ok! I am closer--it seems to work fine except I still can't exit. I read and re-read everything, but I must be doing something wrong. It keeps redirecting me to the chat. and i set the
$exiturl = "http://www.texasflashers.org/forums/";
going nuts here.
Could you toss me a working exit.lib.php3?

thanks

diavolo11
10-03-2001, 02:45 AM
nevermind, got it--
thanks and nice hack.

Sukij
10-17-2001, 05:56 AM
Hi..

May be you can help.. I want to add the Current Chat Active User to the Forum Main Page, same as Who's Online. Is it possible to do that ? Can you help ?

Thanks

Stasik
10-17-2001, 10:53 AM
there is a file smth like, "current _user.lib.php3"

Sukij
10-17-2001, 11:50 AM
NO.. cannot find the file you mentioned.

Stasik
10-17-2001, 01:22 PM
chat_activity.php3

Sukij
10-18-2001, 03:02 AM
Thank, I found that file and I modify it to my need. Then I insert this line into forumhome_loggedinusers, but I don't know how to add that file into this statement. Can you please help.. Thanks

<normalfont color="{categoryfontcolor}"><b> [ Currently Chat Active Users</b></normalfont>
</a><normalfont color="{categoryfontcolor}"><b>: ] </b>

Stasik
10-18-2001, 08:33 AM
u need to edit index.php

Sukij
10-18-2001, 08:36 AM
How ? Can you help ?

Stasik
10-18-2001, 08:37 AM
have no time, just put all from that file into index.php and use variables in templates

Sukij
10-18-2001, 08:38 AM
Thanks i will try

Sukij
10-19-2001, 09:16 AM
Uh.. beyond my ability.. finally give up.

If you have some free time, please consider this modification.

Thanks

dbdbdbdb
11-08-2001, 06:20 PM
Hi Stasik,

first, thanks for this hack! :) I hope I'll be able to give something back to the community of vbhackers.

And here is my question:

I don't get it working. I can't get rid of the "no".

What I did:

First I installed the chat in a second database, so now i use the same as vbulletin.

I've set "Registration of users" to:
define("C_REQUIRE_REGISTER", '0');
define("C_EMAIL_PASWD", '0');

I've got clean tables. Just myself in "c_reg_users" with the same password and the same username as in my forum.

In index.lib.php3 I configured:

chdir("/homepages/htdocs/forum/");
require("./global.php4");
chdir("/homepages/htdocs/chat/");

I cleaned all my cookies, reloged in again and again, but I can't get rid of the "no". Why?

Please help. I've been searching for ages... ;)

dbdb

Ps: I am able to login admin.php3, but there are no rooms listed (to clean up).

PS: I had phpmychat working before, but did a clean install.

dbdbdbdb
11-11-2001, 09:33 AM
Good Morning!

Does anybody have a clue? Some of you got it up and running, but you do not read this thread i guess... : domage.

dbdbdbdb

Crinos
11-12-2001, 07:10 PM
Have you tried doing this?
Q: I`m getting "no" every time.
A: You need to upgrade a cookie option in your VB control panel. Write under: Options->Change Options->[HTTP Headers and output]->Cookie Domain your domainname ONLY (blabla.com).

Crinos
11-12-2001, 07:11 PM
Btw, to anyone who is using phpyMyChat, is there any way to change the default chat color from black? which CSS or php file should I change?

I wanna use it with the main frame on a black background, which unfortunately makes the text invisible coz it defaults to black... Thanks in advance...

dbdbdbdb
11-12-2001, 07:27 PM
Originally posted by Crinos
Have you tried doing this?


Thanks for your reply!
I did cookie the server and not the forum.

Does anybody got another idea? Thanks.

dbdbdbdb

pgowder
11-14-2001, 12:39 AM
I'm very interested in this hack. However, I've heard that it is very server intensive.

How is everyone's experience with it?

thanks

pgowder
11-15-2001, 01:46 AM
Well I'm trying to get it to work now.

Here is the error I'm getting:



Parse error: parse error in /home/sites/home/web/chat/phpchat/lib/index.lib.php3 on line 66

Fatal error: Call to undefined function: send_headers() in /home/sites/home/web/chat/phpchat/index.php3 on line 20



Any ideas?

thanks

webhost
11-15-2001, 01:52 AM
look at those files and post those lines here for us to see.

pgowder
11-15-2001, 01:54 AM
Here is line 66:

if($Ver == ""){print "

pgowder
11-15-2001, 01:56 AM
Here is the other section:

// Both values are boolean. See explanations in 'index.lib.php3' file.
send_headers(1,1);

dbdbdbdb
11-15-2001, 08:18 AM
Hi Webhost!

Do have an idea concerning my "no-problem"? Please have look at my post one page back...

Thank you...

humble
11-17-2001, 01:09 AM
I've done ALOT of custom work on this hack so far, and if anyone is willing to help me @

https://vborg.vbsupport.ru/showthread.php?s=&threadid=32450

I'd be much appreciative.

pgowder
11-18-2001, 12:39 PM
Webhost, any ideas on my problems?

thanks

webhost
11-18-2001, 04:08 PM
I never recieved your files pgowder

pgowder
11-18-2001, 04:10 PM
Just sent them. Let me know if you don't get them!

Stasik
11-18-2001, 04:13 PM
Originally posted by Crinos
Btw, to anyone who is using phpyMyChat, is there any way to change the default chat color from black? which CSS or php file should I change?

I wanna use it with the main frame on a black background, which unfortunately makes the text invisible coz it defaults to black... Thanks in advance...

there is a file: config/style.css.php3

search for:
BODY.mainframe
{
font-family: arial;
background-color: #8D8D8D;
color: #000000;
font-size: <?php echo($medium); ?>pt;
font-weight: 400;
margin: 5px;
}
you can replace color in color: #000000;

Stasik
11-18-2001, 04:22 PM
Originally posted by dbdbdbdb
Hi Stasik,

first, thanks for this hack! :) I hope I'll be able to give something back to the community of vbhackers.

And here is my question:

I don't get it working. I can't get rid of the "no".

What I did:

First I installed the chat in a second database, so now i use the same as vbulletin.

I've set "Registration of users" to:
define("C_REQUIRE_REGISTER", '0');
define("C_EMAIL_PASWD", '0');

I've got clean tables. Just myself in "c_reg_users" with the same password and the same username as in my forum.

In index.lib.php3 I configured:

chdir("/homepages/htdocs/forum/");
require("./global.php4");
chdir("/homepages/htdocs/chat/");

I cleaned all my cookies, reloged in again and again, but I can't get rid of the "no". Why?

Please help. I've been searching for ages... ;)

dbdb

Ps: I am able to login admin.php3, but there are no rooms listed (to clean up).

PS: I had phpmychat working before, but did a clean install.

First.. make sure, cookies can work on your chat domain (better you use same domain name as forum)
Second: make sure vb saves cookies....

pgowder
11-18-2001, 05:16 PM
What type of admin functions can be done in this chat room?

Can moderators ban users? Edit things?

When I go into admin.php3, should all my users show up there as registered users? It is empty?

thanksa

webhost
11-18-2001, 05:19 PM
click the "?' in chat

pgowder
11-18-2001, 05:21 PM
Thanks, I see all the commands now.

What about the users, should they show up?

webhost
11-18-2001, 05:26 PM
As far as users that have logged into your forum then when they go into the chat room then yes there name should should show up in chat like ours did when we were there. I don't believe however that the user names will showup in the chat admin panel, Don't see how they can because they do not show up in the chat user table anymore because you are now using the forum user table.

pgowder
11-18-2001, 05:28 PM
Ok, that makes sense!

Thanks!

pgowder
11-18-2001, 06:57 PM
I'm testing out the chat room now. I just tried to kick someone out.

But it said I wan't a moderator. Does it not pick up the moderators from vb?

Stasik
11-18-2001, 07:27 PM
You have to put you nickt to the hack part

pgowder
11-18-2001, 07:28 PM
Can you explain that? I don't understand?

pgowder
11-19-2001, 02:00 AM
Ok, I replaced nickname with my username on vb. But I still can't make announcements etc.

???

Stasik
11-19-2001, 12:29 PM
Sure.....

pgowder
11-19-2001, 06:31 PM
???

pgowder
11-19-2001, 11:21 PM
Does anyone have any ideas about the moderator functions not working?

Does it work for everyone else?

obs
11-23-2001, 05:08 AM
i had this exact same problem too. how did you fix it?

Originally posted by pgowder
Well I'm trying to get it to work now.

Here is the error I'm getting:



Parse error: parse error in /home/sites/home/web/chat/phpchat/lib/index.lib.php3 on line 66

Fatal error: Call to undefined function: send_headers() in /home/sites/home/web/chat/phpchat/index.php3 on line 20



Any ideas?

thanks

grb123
11-26-2001, 07:07 PM
My chat index.php3 page comes up blank when I add the first bit of the hack to index.lib.php3. If I remove the hack I get the login screen.

Ive attached the index.lib.php3 bit that's the problem (although I've renamed them to php it doesn't really matter as the error was the same when it was php3)

//a VBB integration hack by Stasik (stasik@t-online.de)
//v0.1
//(C)2001

$exiturl = "http://www.blabla.com"; // the url the user will be redirected exiting the chat

if($Ver == ""){print "
<HTML>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
<!--
var NS4 = (document.layers) ? 1 : 0;
var IE4 = ((document.all) && (parseInt(navigator.appVersion)>=4)) ? 1 : 0;
var ver4 = (NS4 || IE4) ? \"H\" : \"L\";
function defineVerField()
{
if (document.images && ver4 == 'L')
document.forms['Params'].elements['Ver'].value = 'M'; // js1.1 enabled browser
else document.forms['Params'].elements['Ver'].value = ver4;
}
-->
</SCRIPT>
<FORM ACTION=\"index.php\" METHOD=\"POST\" AUTOCOMPLETE=\"OFF\" NAME=\"Params\">
<INPUT TYPE=\"hidden\" NAME=\"Ver\" VALUE=\"L\">
</FORM>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
defineVerField();
document.forms.Params.submit();
</SCRIPT>
</HTML>
"; exit;}

chdir("/home/sites/site2/web/chat");
require("./global.php");
chdir("/home/sites/site2/web/chat/livechat");

if ($bbuserid == 0)
{
print "no"; //Message if the user has no cookie
exit;
}
else
{
if ($bbusername == "" || (isset($bbusername))==0)
{
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$bbusername = $username;
}
else
{
$username = $bbusername;
} }

$U = $username;

$pat = "[[:space:]]";
$repl = "";
$U = ereg_replace($pat,$repl,$U);
$pat = ',';
$U = ereg_replace($pat,$repl,$U);
stripslashes($U);

$N = 20;
$D = 10;
$Form_Send = 1;

//Replace admin with your administration nick
if($U != "chatadmin")
{
$PASSWORD="1";
}

Stasik
11-26-2001, 07:09 PM
can`t see it :(

grb123
11-26-2001, 07:10 PM
Wow, you're fast!!

It didn't attach for some reason so I pasted it in now.

Thanks.

pgowder
11-28-2001, 12:53 AM
Hello, can someone help.

Guest0321
11-29-2001, 05:11 AM
OK, here is what I've done. I've created a separate script for phpMyChat and vBulletin integration. It includes the hacks discussed here, and should work well for more people. I've made a few small enhancements, and added a few installation notes.

Some points of interest.
1) These files are all .php extensions.
2) No chat registration exists, including administration. You can create rooms in the setup, but that's it. No private rooms, no banning, etc. That's because the setup that works for me has the "no registration" option on. So if you can handle that, this should work.
3) I can answer the questions I can, but not detailed specifics on phpMyChat or vBulletin.
4) I don't have CVS available for any fixes or changes, if I update anything, I'll post it here.
5) This is of course, an unofficial release of the phpMyChat script, but I've left all documentation intact.

Thanks to phpProbe, Tom, phpMyChat, and vBulletin for great hacks and products.

You can download the zip file here:
http://www.auctioncrotch.com/download.php?op=viewdownload&cid=1

Bally
12-02-2001, 04:09 PM
works perfect for me!
THX!
:)

Gholsie
02-05-2002, 03:00 AM
One of my users keeps getting this error. It's kind of odd because only one person has this issue. Can someone help me figure this out? Here's his error: (2ManyZ's is his username)

Database error: Invalid SQL: SELECT room FROM c_users WHERE username='2ManyZ's' LIMIT1

MY SQL error: 1064 ( You have an error in your SQL suntax near "s" LIMIT 1' at line 1) Session halted.

UPDATE: I was just thinking about this, could this be a result of an apostrophe (') in his username?

Bally
02-05-2002, 12:32 PM
Look at the USer name!

It´s: 2ManyZ's

rename the user to 2ManyZs and it will work fine!

Best regards!

Gholsie
02-05-2002, 03:57 PM
Thanks....

saab340
02-07-2002, 11:14 PM
I got the chat running, but now I need to know how to integrate the Who's chatting to show next to my who's online...

How do I do that?

Gholsie
02-08-2002, 01:58 AM
I'd even like to add a block to my phpportals front page that shows who is in the chat room. Anyone know how to do this?

Stasik
02-08-2002, 06:09 AM
there is a script coming with phpmychat...

KevinG
02-08-2002, 02:43 PM
Originally posted by Stasik
there is a script coming with phpmychat...

What do you mean by that?
Are you saying a new phpmychat is coming out now?

Stasik
02-09-2002, 09:58 AM
there is a script in phpmychat zip which allows you to see users chatting at the moment

Gholsie
02-09-2002, 04:34 PM
Yep, you're right. The file is called chat_activity.php3. It's included with the distribution of phpMyChat. The file is NOT inside your chat directory, but, one back.

It's a cool little program. But, I want to make it work with my phpportals mod in a block. Maybe I'll try to take the code and copy it to a block.

-- Mike
:stoned:

MomofThree
02-14-2002, 11:44 AM
I hope someone can help me and hope you have some patience too, because I have only tried to do simple hacks and having problems with this one.

I did exactly what the instructions said and I am getting this error:

Parse error: parse error in /lib/index.lib.php3 on line 741

Fatal error: Call to undefined function: send_headers() in /home/www/theparentclub/tpcchat/index.php3 on line 20


http://www.theparentclub.com/tpcchat/index.php3

Now here's my other question. How do I exactly make the chat show up within my boards? How do I integreate it seemlessly?

Hope someone can help guide me on how to do this.

Thank you so much.