Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 07-19-2004, 07:26 AM
samer's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 10-13-03
Posts: 1,962
iTrader: 0 / 0%
[PHPBB] user online ?

Hello, I'm connecting to the PHPBB Forum database from my site's homepage.

what I want to do is, to define if the user is online or not, so I can display different stuff on my homepage depending on the user's status.

but I can't find the table where the user's status is stored (Online/Offline) ..

I Have tried using the user_level thingy, and then to use "if $level !="0", but apparently, it's not accurate.

Thx in Advance, Samer .
 
Reply With Quote
  #2 (permalink)  
Old 07-19-2004, 09:01 AM
fishfreek's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-13-03
Location: Virginia
Posts: 844
iTrader: 0 / 0%
user_level defines if the member is an admin or not.

I belive the online status is defined by their lastvisit hash and if its more or less than the current time - a specific number of seconds.
 
Reply With Quote
  #3 (permalink)  
Old 07-19-2004, 10:42 AM
samer's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 10-13-03
Posts: 1,962
iTrader: 0 / 0%
thx FF, but how can I compare the last visit hash with the current time ?

one other thing .. is "anonymous" = "guest" ?
then, i could do the thing using the user_id (if != "-1")
 
Reply With Quote
  #4 (permalink)  
Old 07-19-2004, 11:57 AM
samer's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 10-13-03
Posts: 1,962
iTrader: 0 / 0%
EDIT: Yay ! i have, Solved, Thanks anyway ! if someone is wondering how i made it:

[inspired by the status mod for PHPBB]
[code:1:e455612973]
if($userdata['user_session_time'] >= (time()-60)){
if($userdata['user_allow_viewonline']){
$status = 'online';
}else{
$status = "offline";
}
}else{
$status = "offline";
}
[/code:1:e455612973]
 
Reply With Quote
  #5 (permalink)  
Old 07-19-2004, 03:55 PM
fishfreek's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-13-03
Location: Virginia
Posts: 844
iTrader: 0 / 0%
Glad you figured it out. Im not a coder enough to actually take the phpbb code and get it to do new stuff. I understand how it works but thats bout it.
 
Reply With Quote
  #6 (permalink)  
Old 07-20-2004, 10:21 AM
samer's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 10-13-03
Posts: 1,962
iTrader: 0 / 0%
new problem, i'll post a topic about it.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
phpBB - Most visitors ever online... Jazzee Coding Forum 6 01-16-2004 05:58 PM
Skin phpbb forum, edit phpbb template raciviusdawn Coding Forum 9 10-19-2003 12:02 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:38 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.