PDA

View Full Version : phpMyChat Integration


Buczilla
01-02-2004, 10:00 PM
This hack will add integrate vBulletin with phpMyChat. It uses some small (but effective) security measures to prevent users from using any username but their own.

++ To Do:
vBulletin files to edit: 0
phpMyChat files to edit: 1 (you must also install phpMyChat)
Queries to Run: 0
Templates to add: 0
Templates to modify: 2
Time to install: 10 Minutes

++ Known Issues
Users with a space in their name can not chat
Username can be bypassed



Enjoy! :squareeyed:

Alan Ang
01-04-2004, 05:18 AM
most of my users has usernames that has a <space> in them... can anyone resolve this problem? or are there free chat programmes that can allow the <spaces>?

Ryan Ashbrook
01-18-2004, 08:57 PM
I need this as well, but nonetheless, nice job.

Oxygen
01-22-2004, 05:23 PM
I installed phpMyChat..the latest version.
Modified the portion that goes into the header to look like:

function my_chatwin()
{
var tmpName = replace('$bbuserinfo[username]',' ','_');
tmpName = replace(tmpName,',','');
window.open('/chat/index.php3?L=english&Ver=H&U='+tmpName+'&R=Home&T=1&D=10&N=20&ST=1&NT=1&First=1','mychatwindow','width=700,height=600,tool bar=no,location=no,directories=no,status=no,menuba r=no,scrollbars=no,copyhistory=no,resizable=yes');
}
function replace(string,text,by) {
var strLength = string.length, txtLength = text.length;
if ((strLength == 0) || (txtLength == 0)) return string;
var i = string.indexOf(text);
if ((!i) && (text != string.substring(0,txtLength))) return string;
if (i == -1) return string;
var newstr = string.substring(0,i) + by;
if (i+txtLength < strLength)
newstr += replace(string.substring(i+txtLength,strLength),te xt,by);
return newstr;
}
//-->
</SCRIPT>


works great...
resolves the space issue...
just need to modify the exit button to close the window instead of going to chat index.

Smitty
01-23-2004, 10:21 AM
Hey Oxygen, do you have this running on RC3?

Oxygen
01-23-2004, 11:45 AM
No, just RC2 - I did not even see that 3 was out yet.
Man they are fast.
although there is no reason for it not to work in RC3.
Hey Oxygen, do you have this running on RC3?

dutchbb
01-24-2004, 06:12 PM
why no demo or screenshot???

Khoder
01-27-2004, 08:31 AM
Hi Guys,

I keep getting the error message "This username is registered. Please type your password or chose another username"

Any ideas?

Thanx

Khoder
01-29-2004, 09:10 AM
I guess no one has any ideas.. Ill just keep trying till it eventually works.

Smitty
01-29-2004, 07:25 PM
I guess no one has any ideas.. Ill just keep trying till it eventually works.
I'd like to know what you find out. I want to install this hack in the near future.

Lady Ginasue
01-29-2004, 09:00 PM
I installed this hack today and was having trouble with it the way that it was, once I put in the codes that Oxygen had also posted, it worked just fine.

Smitty
01-29-2004, 09:53 PM
Thanks! I might even take a look at trying it on my test board tonight or tomorrow.

Smitty
01-29-2004, 11:46 PM
I installed this hack today and was having trouble with it the way that it was, once I put in the codes that Oxygen had also posted, it worked just fine.
Where did you put the chat directory? In the forum directory? It says 1 level below the vB directory...

On my test board I'm getting a 404 when I hit the 'chat' link in the navbar.

EDIT: Ok - I put it outside the vB directory in the main htdocs directory and it finds the index.php3 file OK and opens the window. But - once it said: "You must enter a user name" and then when I tried it again it said: "You must be registered before chatting.".

Hmmmm, any ideas anyone?

EDIT #2: Solved. I had phpMyChat configured to require a password...

In config.lib.php3:define("C_REQUIRE_REGISTER", '1');

should have been

define("C_REQUIRE_REGISTER", '0');

Smitty
01-30-2004, 01:38 AM
Just need to modify the exit button to close the window instead of going to chat index.
Did you by chance figure out how to do this?

Osterling
02-10-2004, 11:42 AM
any demo pics?

Weasel
02-18-2004, 09:46 AM
I can't get this to work. The first time the chat window comes up everything is fine, after that I get the message "This username is already in use. Please chose another." until I clear out the chat_user table.

gmarik
02-23-2004, 10:22 AM
has phpMyChat ever been upgraded or is it still the old one? every one could hack it, don't use it, it's dangerous ... really on Apache

trulylowcarb
04-09-2004, 06:41 AM
I am having the same trouble, keeps telling me You must choose a user name. Does this work with v.3? I tried it with the registration variable at 0 first (no reg needed) and then put it back to the original (1) setting... no luck at all either way... I was really hoping this would work, anyone have more hints, please?

Bounce
04-09-2004, 08:15 PM
What file do i need to edit for myself to become an admin? :rolleyes:

I have it intregrated :surprised: with VB RC4

Bounce
04-12-2004, 05:02 PM
Is it also possible to have the users that are in chat listed on the VB 3 RC4 forum :ermm: ??

ashley53680
05-03-2004, 02:14 AM
Looking to install... still wondering if things are worked out yet?

pjdaley
05-04-2004, 07:54 AM
Hi Guys,

I keep getting the error message "This username is registered. Please type your password or chose another username"

Any ideas?

Thanx
you might want to change the erasing of Users in the config.lib.php3

Before:

// Cleaning settings for messages and usernames
define("C_MSG_DEL", '96');
define("C_USR_DEL", '4');
define("C_REG_DEL", '0');

change it to this

// Cleaning settings for messages and usernames
define("C_MSG_DEL", '96');
define("C_USR_DEL", '1');
define("C_REG_DEL", '0');

this would automatically delete users names after 1 minute.

pjdaley
05-04-2004, 07:56 AM
I am having the same trouble, keeps telling me You must choose a user name. Does this work with v.3? I tried it with the registration variable at 0 first (no reg needed) and then put it back to the original (1) setting... no luck at all either way... I was really hoping this would work, anyone have more hints, please?reason why this may be happening is because you have a room name... chosen

in the config.lib.php3

look for this:


// Proposed rooms
$DefaultChatRooms = ('ROOM NAME');
$DefaultPrivateRooms = array('Priv1', 'Priv2');


change the $DefaultChatRooms = ('ROOM NAME');

to


// Proposed rooms
$DefaultChatRooms = ('');
$DefaultPrivateRooms = array('Priv1', 'Priv2');


that would make no room show up in the room name line... that would just make the user press Chat to go in and wallah

pjdaley
05-04-2004, 07:57 AM
I can't get this to work. The first time the chat window comes up everything is fine, after that I get the message "This username is already in use. Please chose another." until I clear out the chat_user table.you might want to try what i posted... its those 2 things... change the time to erase the names and leaving it in the default room name

pjdaley
05-04-2004, 08:14 AM
jezuz, its inconsistent... it works 1 time... then it doesn't work... then it does :devious:

floridaideal
06-09-2004, 12:00 PM
Wish I could get this working, it installed fine but all I get is the message "To create your own room you must be registered" when I try and login, made all the changes you suggested in the above thread!

Any ideas please?