7 Replies - 1910 Views - Last Post: 02 June 2008 - 02:48 PM Rate Topic: -----

#1 kavikavi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-June 08

live support online chat

Posted 02 June 2008 - 06:41 AM

how to setup in php Online/Offline Indicator image for site for live support Chat
Is This A Good Question/Topic? 0
  • +

Replies To: live support online chat

#2 quim  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 18
  • View blog
  • Posts: 182
  • Joined: 11-December 05

Re: live support online chat

Posted 02 June 2008 - 07:15 AM

View Postkavikavi, on 2 Jun, 2008 - 09:41 AM, said:

how to setup in php Online/Offline Indicator image for site for live support Chat


An if statement to whatever indicated that you are online or offline: example

if( session == 'online' )
{
	$statusImg = 'onlineImage.png';
}
else
{
   $statusImg = 'offlineImage.png';
}

Was This Post Helpful? 0
  • +
  • -

#3 akozlik  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 797
  • Joined: 25-February 08

Re: live support online chat

Posted 02 June 2008 - 11:06 AM

View Postkavikavi, on 2 Jun, 2008 - 06:41 AM, said:

how to setup in php Online/Offline Indicator image for site for live support Chat


Keep a table that holds all the users that are current logged in, and delete them from the table as they're logged out. Basically, when they log in, you insert their information into the database. When they log out, you delete them from the database.

Then, wherever you want to check for online/offline status, check if they're in that database. If they are, they're online. If they're not, they're offline. It's a pretty easy way to keep track of people's status on the site.

Hope that helps. Let us know if you have anymore questions.
Was This Post Helpful? 1
  • +
  • -

#4 JBrace1990  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 110
  • View blog
  • Posts: 760
  • Joined: 09-March 08

Re: live support online chat

Posted 02 June 2008 - 12:36 PM

akozlik, as nice as a suggestion as that is, there's a slightly better one... see, with yours, someone has to logout to be marked offline.... well, what if they never logout, but close the browser instead?

my suggestion is to add in a column in the user database that has "last_active." all you need to do is set up the time from now to the time from the column, and if it';s a certain amount, mark them online.
Was This Post Helpful? 0
  • +
  • -

#5 akozlik  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 797
  • Joined: 25-February 08

Re: live support online chat

Posted 02 June 2008 - 12:47 PM

View PostJBrace1990, on 2 Jun, 2008 - 12:36 PM, said:

akozlik, as nice as a suggestion as that is, there's a slightly better one... see, with yours, someone has to logout to be marked offline.... well, what if they never logout, but close the browser instead?

my suggestion is to add in a column in the user database that has "last_active." all you need to do is set up the time from now to the time from the column, and if it';s a certain amount, mark them online.


I definitely see what you mean. You could do something like that for sure. I actually believe MySpace runs similar to what I suggested, because you are always logged in unless you log out manually. That's why you can log into Myspace, not visit for a few days, but still receive all the spam. I think it all depends on how he wants to be set up. I figured that since it was a live chat, my suggestions should work. Either way should be alright though.
Was This Post Helpful? 0
  • +
  • -

#6 JBrace1990  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 110
  • View blog
  • Posts: 760
  • Joined: 09-March 08

Re: live support online chat

Posted 02 June 2008 - 02:17 PM

on myspace though, you're marked offline if you're not on for (i believe) 15 minutes...
Was This Post Helpful? 0
  • +
  • -

#7 akozlik  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 797
  • Joined: 25-February 08

Re: live support online chat

Posted 02 June 2008 - 02:18 PM

View PostJBrace1990, on 2 Jun, 2008 - 02:17 PM, said:

on myspace though, you're marked offline if you're not on for (i believe) 15 minutes...


Yeah I think they fixed that. You used to stay in indefinitely. A lot of the spammers would go through and look for males between 18-30 and spam them with those fake girl profiles. If you were online you would get one because you were more likely to check it out. Lame.
Was This Post Helpful? 0
  • +
  • -

#8 quim  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 18
  • View blog
  • Posts: 182
  • Joined: 11-December 05

Re: live support online chat

Posted 02 June 2008 - 02:48 PM

Quote

site for live support Chat

I thought that he was asking about the admin stand of point like, if you have a web service and you want your costumers to see when your are online/offline.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1