|
-
Aug 13th, 2006, 04:00 PM
#1
Thread Starter
Addicted Member
Chatting in php
Hello, i am currently working on a project. I have a website all in php and in order to view any part of the website the user must login. Now what i want to do is have a section for chatting, where they can click on the link and it will take them to a new page and they can start chatting. But i dont want them to re-login, i want to use the current name that they have logged in as, wen the entered the site. and i also dont want the chat room to be in a separate window, but for it to be integrated on my webpage, with my template. i have looked for days for at least sumthing that i could try to modify, but nothing worked. so, it would be great if sumone can point me into the right direction of getting this done.
Last edited by Ch4s3t0ph3r; Dec 10th, 2006 at 01:09 PM.
-
Aug 13th, 2006, 04:10 PM
#2
Lively Member
Re: Chatting in php
try modifying FlashChat. Its only $5, so its not too spensive, and pretty cool too.
-
Aug 13th, 2006, 04:38 PM
#3
Thread Starter
Addicted Member
Re: Chatting in php
ive tried, and couldnt get it to work with useing the current user name that was already logged in. i can probably figure it out if i had the basic code to send messages back and forth, but ive tried searching and all i found was FULL programs that i dont want.
-
Aug 13th, 2006, 05:49 PM
#4
<?="Moderator"?>
Re: Chatting in php
How is the username and password stored for the chat room, you might need to create a mod so that the chat software uses your user lists to authenticate against rather than its own. Are you using FlashChat or another script?
-
Aug 13th, 2006, 07:16 PM
#5
Thread Starter
Addicted Member
Re: Chatting in php
Users names are in MySQL and i can use the names anywhere with the $_SESSION['login'] i believe seens how they are logged in, so i wanna use that as thier username for the chat room.
and currently i dont have any scripts because all of them werent really able to work with the login like i wanted
Last edited by Ch4s3t0ph3r; Dec 10th, 2006 at 01:09 PM.
-
Aug 15th, 2006, 06:56 AM
#6
Re: Chatting in php
Are you looking for a shoutbox kind of thing?
They are really easy to make, just have a database table for shoutbox posts and insert as required. Just surround the shoutbox HTML in the template with the check for whether the user is logged in or not, so that it doesn't show if they are not authenticated.
-
Aug 25th, 2006, 07:52 PM
#7
Thread Starter
Addicted Member
Re: Chatting in php
well i would like a whole instant messaging right on my site, and thier username is the one they logged into the main site with
Last edited by Ch4s3t0ph3r; Dec 10th, 2006 at 01:10 PM.
-
Aug 27th, 2006, 12:19 AM
#8
Member
Re: Chatting in php
All you need to do is start the session with
PHP Code:
session_start();
and then get the username out of the session. And if you are trying to work out how you can make a flicker-free chatroom environment without needing to buy anything then check out AJAX. You can easily create a simple chatroom, which has a html front-page, php core page, AJAX interface, and it can be hooked into any database you want.
Knightcon
Mess With The Best,
Die Like The Rest.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|