本文整理匯總了PHP中IPSMember::buildBitWiseOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::buildBitWiseOptions方法的具體用法?PHP IPSMember::buildBitWiseOptions怎麽用?PHP IPSMember::buildBitWiseOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::buildBitWiseOptions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parseOnlineEntries
/**
* Parse/format the online list data for the records
*
* @author Brandon Farber
* @param array Online list rows to check against
* @return array Online list rows parsed
*/
public function parseOnlineEntries($rows)
{
if (!is_array($rows) or !count($rows)) {
return $rows;
}
$final = array();
$profiles = array();
$members = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach ($rows as $row) {
if ($row['current_appcomponent'] != 'members' or !$row['current_module']) {
continue;
}
if ($row['current_module'] == 'profile') {
$profiles[] = $row['location_1_id'];
}
}
if (count($profiles)) {
ipsRegistry::DB()->build(array('select' => 'member_id, members_display_name, members_seo_name, member_banned, members_bitoptions', 'from' => 'members', 'where' => 'member_id IN(' . implode(',', $profiles) . ')'));
$pr = ipsRegistry::DB()->execute();
while ($r = ipsRegistry::DB()->fetch($pr)) {
/* Setup bitwise option to check for banned/spammer members */
$r = IPSMember::buildBitWiseOptions($r);
if (!IPSMember::isInactive($r) || ipsRegistry::member()->getProperty('g_is_supmod')) {
$members[$r['member_id']] = array('members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name']);
}
}
}
foreach ($rows as $row) {
if ($row['current_appcomponent'] == 'members') {
if ($row['current_module'] == 'online') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_online'];
}
if ($row['current_module'] == 'list') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_members'];
}
if ($row['current_module'] == 'messaging') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_msg'];
}
if ($row['current_module'] == 'profile') {
if (isset($members[$row['location_1_id']])) {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_profile'];
$row['where_line_more'] = $members[$row['location_1_id']]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl($row['where_link'], 'public', $members[$row['location_1_id']]['members_seo_name'], 'showuser');
}
}
}
$final[$row['id']] = $row;
}
return $final;
}