list_online_members
Usage: array list_online_members ([bool detailed [,array options]])
Purpose: Returns an array of online members.
Availability: IPB SDK 1.0
Purpose: Returns an array of online members.
Availability: IPB SDK 1.0
Returns an array of user ids which are online if detailed is set to FALSE. If detailed is set to TRUE, full detailed information for each member will be returned - equivilent to using get_advinfo on each member.
The options array takes the following arguments:
- orderby - What to order records by ("member_id", "member_name", "running_time", or "location")
- order - asc or desc for ascending and descending.
/* Show an online list */
$online = $SDK->list_online_members("1");
$list = ""; // Initalize Variable
foreach ($online as $i) {
// Add a comma?
if ($list) {
$list .= ", ";
}
$list .= '<a href="'.$boardurl.'?showuser='.$i['member_id'].'">'.$i['prefix'].$i['member_name'].$i['suffix'].'</a>';
}
/* Check if member 666 is online */
if (in_array("666", $SDK->list_online_members())) {
echo 'member 666 is online!';
}
$online = $SDK->list_online_members("1");
$list = ""; // Initalize Variable
foreach ($online as $i) {
// Add a comma?
if ($list) {
$list .= ", ";
}
$list .= '<a href="'.$boardurl.'?showuser='.$i['member_id'].'">'.$i['prefix'].$i['member_name'].$i['suffix'].'</a>';
}
/* Check if member 666 is online */
if (in_array("666", $SDK->list_online_members())) {
echo 'member 666 is online!';
}
User Contributed Notes
Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net
There are currently no user contributed notes for this page.