phpDocumentor plugins
WhosOnline
[ class tree: plugins ] [ index: plugins ] [ all elements ]

Class: OnlineSessions

Source Location: /qp_plugins/whosonline_plugin/_whosonline.plugin.php

Class OnlineSessions

Class Overview

This tracks who is online

Located in /qp_plugins/whosonline_plugin/_whosonline.plugin.php [line 127]



		
				Author(s):
		
Information Tags:
Todo:  dh> I wanted to add a MySQL INDEX on the sess_lastseen field, but this "plugin" is the only real user of this. So, when making this a plugin, this should add the index perhaps.

Properties

Methods

[ Top ]
Property Summary
mixed   $Plugin   A reference to the whosonline_plugin.
mixed   $_count_guests   Number of guests (and users that want to be anonymous)
mixed   $_initialized  
mixed   $_registered_Users   List of registered users.
mixed   $_timeout_online_user   Online session timeout in seconds.

[ Top ]
Method Summary
OnlineSessions   OnlineSessions()   Constructor.
void   display_onliners()   Template function: Display onliners, both registered users and guests.
void   display_online_guests()   Template function: Display number of online guests.
void   display_online_users()   Template function: Display the registered users who are online
array   init()   Get an array of registered users and guests.
void   number_of_guests()   Get the number of guests.

[ Top ]
Properties
mixed   $Plugin [line 162]

A reference to the whosonline_plugin.


[ Top ]
mixed   $_count_guests [line 136]

Number of guests (and users that want to be anonymous)

Gets lazy-filled when needed, through init().

API Tags:
Access:  protected


[ Top ]
mixed   $_initialized = false [line 157]

[ Top ]
mixed   $_registered_Users [line 146]

List of registered users.

Gets lazy-filled when needed, through init().

API Tags:
Access:  protected


[ Top ]
mixed   $_timeout_online_user [line 155]

Online session timeout in seconds.

Default value: 300 (5 minutes). Set by OnlineSessions::OnlineSessions().

API Tags:
Access:  protected


[ Top ]
Methods
Constructor OnlineSessions  [line 169]

  OnlineSessions OnlineSessions( [integer $timeout_online_user = 300]  )

Constructor.

Parameters:
integer   $timeout_online_user:  Online session timeout in seconds.


[ Top ]
display_onliners  [line 252]

  void display_onliners( $params  )

Template function: Display onliners, both registered users and guests.

Parameters:
   $params: 

Information Tags:
Todo:  get class="" out of here (put it into templates)

[ Top ]
display_online_guests  [line 307]

  void display_online_guests( $params  )

Template function: Display number of online guests.

Parameters:
   $params: 


[ Top ]
display_online_users  [line 265]

  void display_online_users( array $params  )

Template function: Display the registered users who are online

Parameters:
array   $params: 

Information Tags:
Todo:  get class="" out of here (put it into templates)

[ Top ]
init  [line 183]

  array init( )

Get an array of registered users and guests.


API Tags:
Return:  containing number of registered users and guests ('registered' and 'guests')


[ Top ]
number_of_guests  [line 232]

  void number_of_guests( [boolean $display = true]  )

Get the number of guests.

Parameters:
boolean   $display:  display?


[ Top ]