Results 1 to 8 of 8

Thread: Chatting in php

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2005
    Posts
    158

    Unhappy 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.

  2. #2
    Lively Member d00by's Avatar
    Join Date
    Jul 2006
    Posts
    102

    Re: Chatting in php

    try modifying FlashChat. Its only $5, so its not too spensive, and pretty cool too.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2005
    Posts
    158

    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.

  4. #4
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    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?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2005
    Posts
    158

    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.

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2005
    Posts
    158

    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.

  8. #8
    Member
    Join Date
    Aug 2006
    Location
    Earth
    Posts
    44

    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
  •  



Click Here to Expand Forum to Full Width