PDA

View Full Version : A phpMyChat integration Hack


Pages : [1] 2

Stasik
26 Jun 2001, 18:16
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
26 Jun 2001, 21:10
Is there a demo of it? I would like to see it in action before installing it.

Stasik
27 Jun 2001, 09:47
there was a local demo of it, i`m searching a demo forum... IT WORKS REALLY :)

polizist
12 Jul 2001, 11:08
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
12 Jul 2001, 11:56
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
12 Jul 2001, 12:03
well, we have it on our own server with a gig of memory. just try what happens ;)

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

Stasik
12 Jul 2001, 16:12
I think there is no php4 version

Stasik
12 Jul 2001, 16:14
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
13 Jul 2001, 01:56
I installed this hack, but it dont work? It just keeps saying "invalid password" no matter who trys?

Stasik
13 Jul 2001, 14:59
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
15 Jul 2001, 04:51
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
15 Jul 2001, 18:25
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
15 Jul 2001, 18:53
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
15 Jul 2001, 19:06
enter a hack code before:

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

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

webhost
15 Jul 2001, 19:17
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
15 Jul 2001, 20:01
your both path are not ok

try smth like this

fist
/home/realweb/public_html/forums/

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

webhost
15 Jul 2001, 20:02
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
15 Jul 2001, 20:07
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
15 Jul 2001, 20:07
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
15 Jul 2001, 20:08
ok... write me a FULL PATH to your forum

webhost
15 Jul 2001, 20:12
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
15 Jul 2001, 20:18
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
15 Jul 2001, 20:25
this is what I put in go to link and see result

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

Stasik
15 Jul 2001, 20:28
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
15 Jul 2001, 20:30
ok I changed go to link and see result

webhost
15 Jul 2001, 20:38
here is line 9 and 10 of my global.php file

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

Stasik
15 Jul 2001, 20:38
ups ;)

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

replace "no" with HTML code

webhost
15 Jul 2001, 21:05
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
15 Jul 2001, 21:16
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
15 Jul 2001, 21:29
it had workt I had seen it.... it worked when there was "no"

polizist
17 Jul 2001, 14:06
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
17 Jul 2001, 14:50
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
17 Jul 2001, 15:09
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
17 Jul 2001, 15:34
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
17 Jul 2001, 18:54
Hey webhost, it has worked by you, when there was written "no".

webhost
17 Jul 2001, 18:57
I never got it working.

Stasik
17 Jul 2001, 19:01
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
17 Jul 2001, 23:20
Sorry for the delay, got busy. Do you mean delete all users in my chat and just leave admin?

Joey

Stasik
17 Jul 2001, 23:45
yes, I mean it

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

webhost
18 Jul 2001, 00:12
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
18 Jul 2001, 00:19
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
18 Jul 2001, 00:32
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
18 Jul 2001, 00:38
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
18 Jul 2001, 00:40
1 dot or 2 dots

Stasik
18 Jul 2001, 00:58
STOP STOP STOP

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

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

Stasik
18 Jul 2001, 00:59
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
18 Jul 2001, 01:05
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
18 Jul 2001, 01:08
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
18 Jul 2001, 01:10
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
18 Jul 2001, 01:13
don't run off one second

Stasik
18 Jul 2001, 01:14
ok.. i`m waiting

webhost
18 Jul 2001, 01:28
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
18 Jul 2001, 01:29
do I still need to upload that index.html file to chat/

Stasik
18 Jul 2001, 01:32
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
18 Jul 2001, 01:40
trying to remember, been along time since I done that, hold for a couple of minutes and let me look

Stasik
18 Jul 2001, 01:42
it will be a bit difficultly

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


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

webhost
18 Jul 2001, 01:48
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
18 Jul 2001, 02:22
yo good night... se ya tomorow, here ;)

webhost
18 Jul 2001, 02:25
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
18 Jul 2001, 04:58
problems

Stasik
18 Jul 2001, 14:19
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
18 Jul 2001, 14:30
upgrade with what. I installed version 14.5 last night. What do you want me to upgrade

webhost
18 Jul 2001, 14:42
ok I installed what you had put in the first post, still have the same problem.

webhost
18 Jul 2001, 15:10
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
18 Jul 2001, 15:50
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
18 Jul 2001, 16:33
check updrade with new version of hack

webhost
18 Jul 2001, 18:07
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
18 Jul 2001, 18:09
i see :( stand by

Stasik
18 Jul 2001, 18:11
look at step2

compare it with your file

webhost
18 Jul 2001, 18:23
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
18 Jul 2001, 18:39
i`m waiting for you... :D

webhost
18 Jul 2001, 19:39
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
18 Jul 2001, 19:44
replace line 24

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

with

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

webhost
20 Jul 2001, 03:22
Stasik you are the man. Working great will write up better response tomorrow.

Thanks Again

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

Penguin

Stasik
20 Jul 2001, 22:10
hm.... its my secret ;)

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

Stasik
20 Jul 2001, 22:17
do you have paypal? :D

ThePenguin
20 Jul 2001, 22:21
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
20 Jul 2001, 22:25
what are you speaking about? i`m dont charging for it its FREE!

ThePenguin
20 Jul 2001, 22:28
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
21 Jul 2001, 13:30
ahm..... THIS isn`t in the hack.... it is just my private test :D

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

amsch
23 Jul 2001, 17:28
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
23 Jul 2001, 18:05
hm....

Netscape suxx, it must die...

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

amsch
24 Jul 2001, 03:36
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
26 Jul 2001, 11:14
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
26 Jul 2001, 11:25
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
26 Jul 2001, 12:00
HI..

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

Thanks

Sukij
26 Jul 2001, 12:07
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
26 Jul 2001, 13:10
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
27 Jul 2001, 02:14
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
27 Jul 2001, 02:17
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
27 Jul 2001, 03:47
HI..

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

Thanks

Sukij
27 Jul 2001, 08:43
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
27 Jul 2001, 11:40
i dont know about save command, ask one of your members

Sukij
01 Aug 2001, 03:43
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
01 Aug 2001, 11:36
i fear you have right.. :(

Sukij
01 Aug 2001, 11:41
HI.

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

Stasik
01 Aug 2001, 11:44
yes, if u cant allow the unregistered users to create own rooms it is impossible

ethank
05 Aug 2001, 22:25
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
05 Aug 2001, 23:07
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
06 Aug 2001, 09:03
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
07 Aug 2001, 15:52
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
07 Aug 2001, 16:12
ok ;)

AJR
08 Aug 2001, 06:13
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 Aug 2001, 14:11
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 Aug 2001, 16:46
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!

I do have one strongly recommended change...

To determine if a user is logged in, use this conditional instead of the one in your file. I had problems where it would always say you were logged in even if you were not.

if ($bbuserinfo['userid']!=0) {

So far so good... Though have some strange 'refresh' problems with phpMyChat I'm still looking in to.

-- Brian

Stasik
08 Aug 2001, 18:55
AJR, hehe, nice....

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

macom
09 Aug 2001, 10:43
Hi, i need two admins... how can i do this ??

Stasik
09 Aug 2001, 11:12
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
09 Aug 2001, 11:41
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
09 Aug 2001, 13:10
Da bracuchst du dich nicht zu entschuldigen *g*...

was hast du genau gemacht? beschreib ma?

macom
09 Aug 2001, 13:30
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
09 Aug 2001, 16:35
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
09 Aug 2001, 18:31
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
09 Aug 2001, 19:51
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
09 Aug 2001, 20:41
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
09 Aug 2001, 21:00
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
09 Aug 2001, 21:44
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
10 Aug 2001, 05:45
Danke erst mal... ich werde es heute nacht mal testen. Wäre echt cool wenn's funktionieren würde. Melde mich wieder...

VirtueTech
10 Aug 2001, 14:35
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
10 Aug 2001, 15:33
Yes, u can link the vbb profile on chat pages.... I think it will be in upgrade... :)

macom
10 Aug 2001, 20:06
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
10 Aug 2001, 20:51
du mus alles mit require oder include vorher schieben

macom
10 Aug 2001, 20:53
?? Sorry aber das verstehe ich jetzt nicht ??

Stasik
10 Aug 2001, 21:03
try to replace

$PREMS = "admin";
mit

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

macom
10 Aug 2001, 21:14
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
10 Aug 2001, 21:16
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`
12 Aug 2001, 16:24
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
12 Aug 2001, 22:10
try to reinstal index.lib.php3 form archive and reenter the hack

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

Stasik
12 Aug 2001, 22:35
np

bitbender
12 Aug 2001, 23:33
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
12 Aug 2001, 23:36
no... the thread is talking about the file index.lib.php3 in the /chat/lib/ derictory...

bitbender
13 Aug 2001, 00:21
ok, so is that where the link on the chat button points to ??

Stasik
13 Aug 2001, 09:24
no, the link poins to index.php3, but this file uses /lib/index.lib.php3

bitbender
13 Aug 2001, 12:53
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
13 Aug 2001, 12:57
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
15 Aug 2001, 17:37
yes, byt it works fine without other parts, too

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

bitbender
15 Aug 2001, 18:12
"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
15 Aug 2001, 18:19
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
15 Aug 2001, 18:31
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
15 Aug 2001, 18:38
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
15 Aug 2001, 18:41
i`ve done it all to ;)

bitbender
15 Aug 2001, 18:49
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
15 Aug 2001, 18:52
lol
good that it works (sehr gut was spelled rught)

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

bitbender
15 Aug 2001, 19:53
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
15 Aug 2001, 22:38
u have forgotten freeBSD.... it is much stabiler then win2k or XP....

have u used setup.php3?

muscles
16 Aug 2001, 06:21
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
16 Aug 2001, 12:05
i`ve got it, will post with another stuff few dats later, i`m working on another thing now

jarvis
16 Aug 2001, 19:17
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
16 Aug 2001, 20:06
the hack can`t harm your vb system

mister
23 Aug 2001, 18:28
nice hack.

Stasik
23 Aug 2001, 18:57
thanx

mister
23 Aug 2001, 19:46
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
23 Aug 2001, 21:11
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
29 Aug 2001, 13:07
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
29 Aug 2001, 15:50
also u are starting index.php3 and nothing?

PuntoZ3r0
29 Aug 2001, 16:07
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
29 Aug 2001, 20:08
show url plz ;)

PuntoZ3r0
30 Aug 2001, 01:46
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
30 Aug 2001, 02:21
// 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
30 Aug 2001, 02:56
oh yeah this is from a fresh install

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

Stasik
30 Aug 2001, 06:32
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
30 Aug 2001, 06:33
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
30 Aug 2001, 15:07
Originally posted by Stasik


why have u changed it?

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

Stasik
31 Aug 2001, 05:33
i dont understand why it works fine for me and many other users

gokeeper
04 Sep 2001, 14:45
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
04 Sep 2001, 15:11
can u post your line 275 here?

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

Stasik
04 Sep 2001, 16:08
are u sure u have installed the hack correctly?

gokeeper
04 Sep 2001, 17:42
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
04 Sep 2001, 19:05
u had to repace paths and $exitur there and rename it from txt

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

Stasik
09 Sep 2001, 19:55
yes.... i have done it.... searching now for changes i have done :(

jhkvi
10 Sep 2001, 02:33
Great:cool:

I am awaitng your next reply.

VirtueTech
26 Sep 2001, 06:47
any updates? :)

Stasik
26 Sep 2001, 13:27
no time.. :( AND its hard to find changes now.... :( stay turned

diavolo11
28 Sep 2001, 13:15
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
28 Sep 2001, 13:27
no idea.... has u installed it ok_

diavolo11
28 Sep 2001, 13:46
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
28 Sep 2001, 14:03
post this line here....

make sure all mySQL-workings files are included

diavolo11
28 Sep 2001, 14:24
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
28 Sep 2001, 18:25
search inet for editr with line names

diavolo11
28 Sep 2001, 21:35
here is the line:
$DbLink = new DB;

Stasik
29 Sep 2001, 01:15
are the mysql.php and another things connected correctly? had it worked before installing the hack?

diavolo11
29 Sep 2001, 01:32
yup here check it:
http://www.texasflashers.org/chat/index.php3

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

Stasik
01 Oct 2001, 15:44
You should add code to /lib/index.lib.php3

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

H3NrY
01 Oct 2001, 16:42
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,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);
?>


</HTML>

diavolo11
03 Oct 2001, 04:35
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
03 Oct 2001, 04:45
nevermind, got it--
thanks and nice hack.

Sukij
17 Oct 2001, 07:56
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
17 Oct 2001, 12:53
there is a file smth like, "current _user.lib.php3"

Sukij
17 Oct 2001, 13:50
NO.. cannot find the file you mentioned.

Stasik
17 Oct 2001, 15:22
chat_activity.php3

Sukij
18 Oct 2001, 05:02
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
18 Oct 2001, 10:33
u need to edit index.php

Sukij
18 Oct 2001, 10:36
How ? Can you help ?

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

Sukij
18 Oct 2001, 10:38
Thanks i will try

Sukij
19 Oct 2001, 11:16
Uh.. beyond my ability.. finally give up.

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

Thanks

dbdbdbdb
08 Nov 2001, 20:20
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 Nov 2001, 11:33
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
12 Nov 2001, 21:10
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
12 Nov 2001, 21:11
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
12 Nov 2001, 21:27
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
14 Nov 2001, 02:39
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
15 Nov 2001, 03:46
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
15 Nov 2001, 03:52
look at those files and post those lines here for us to see.

pgowder
15 Nov 2001, 03:54
Here is line 66:

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

pgowder
15 Nov 2001, 03:56
Here is the other section:

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

dbdbdbdb
15 Nov 2001, 10:18
Hi Webhost!

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

Thank you...

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

http://www.vbulletin.org/forum/showthread.php?s=&threadid=32450

I'd be much appreciative.

pgowder
18 Nov 2001, 14:39
Webhost, any ideas on my problems?

thanks

webhost
18 Nov 2001, 18:08
I never recieved your files pgowder

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

Stasik
18 Nov 2001, 18:13
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
18 Nov 2001, 18:22
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
18 Nov 2001, 19:16
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
18 Nov 2001, 19:19
click the "?' in chat

pgowder
18 Nov 2001, 19:21
Thanks, I see all the commands now.

What about the users, should they show up?

webhost
18 Nov 2001, 19:26
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
18 Nov 2001, 19:28
Ok, that makes sense!

Thanks!

pgowder
18 Nov 2001, 20:57
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
18 Nov 2001, 21:27
You have to put you nickt to the hack part

pgowder
18 Nov 2001, 21:28
Can you explain that? I don't understand?

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

???

Stasik
19 Nov 2001, 14:29
Sure.....

pgowder
19 Nov 2001, 20:31
???

pgowder
20 Nov 2001, 01:21
Does anyone have any ideas about the moderator functions not working?

Does it work for everyone else?

obs
23 Nov 2001, 07:08
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
26 Nov 2001, 21:07
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
26 Nov 2001, 21:09
can`t see it :(

grb123
26 Nov 2001, 21:10
Wow, you're fast!!

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

Thanks.

pgowder
28 Nov 2001, 02:53
Hello, can someone help.

SneakyDave
29 Nov 2001, 07:11
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
02 Dec 2001, 18:09
works perfect for me!
THX!
:)

Gholsie
05 Feb 2002, 05:00
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
05 Feb 2002, 14:32
Look at the USer name!

It´s: 2ManyZ's

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

Best regards!

Gholsie
05 Feb 2002, 17:57
Thanks....

saab340
08 Feb 2002, 01:14
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
08 Feb 2002, 03:58
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
08 Feb 2002, 08:09
there is a script coming with phpmychat...

KevinG
08 Feb 2002, 16:43
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
09 Feb 2002, 11:58
there is a script in phpmychat zip which allows you to see users chatting at the moment

Gholsie
09 Feb 2002, 18:34
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
14 Feb 2002, 13:44
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.