本文整理匯總了PHP中IPSMember::isInactive方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::isInactive方法的具體用法?PHP IPSMember::isInactive怎麽用?PHP IPSMember::isInactive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::isInactive方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
}
示例2: userSmallPhoto
function userSmallPhoto($member = array())
{
$IPBHTML = "";
if (IPSLib::locationHasHooks('skin_global', $this->_funcHooks['userSmallPhoto'])) {
$count_82ad645103bd9793e710479e9fd6131b = is_array($this->functionData['userSmallPhoto']) ? count($this->functionData['userSmallPhoto']) : 0;
$this->functionData['userSmallPhoto'][$count_82ad645103bd9793e710479e9fd6131b]['member'] = $member;
}
$IPBHTML .= "" . ($member['member_id'] && ($this->memberData['g_is_supmod'] || $this->memberData['g_mem_info'] && !IPSMember::isInactive($member)) ? "\n\t<a href='" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$member['member_id']}", "public", ''), "{$member['members_seo_name']}", "showuser") . "' class='ipsUserPhotoLink left'>\n" : "\n\t<div class='left'>\n") . "\n" . ($member['member_id'] ? "<img src='{$member['pp_small_photo']}' alt='" . ($member['alt'] ? "{$member['alt']}" : "{$this->lang->words['photo']}") . "' class='ipsUserPhoto " . (empty($member['_customClass']) ? "ipsUserPhoto_mini" : "{$member['_customClass']}") . "' />" : "\n\t" . IPSMember::buildNoPhoto(0, 'mini') . "\n") . "\n" . ($member['member_id'] && ($this->memberData['g_is_supmod'] || $this->memberData['g_mem_info'] && !IPSMember::isInactive($member)) ? "\n\t</a>\n" : "\n\t</div>\n") . "";
return $IPBHTML;
}
示例3: _viewModern
/**
* Modern profile
*
* @return @e void [Outputs to screen]
*/
protected function _viewModern()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval($this->request['id']) ? intval($this->request['id']) : intval($this->request['MID']);
if (!$member_id) {
$this->registry->output->showError('profiles_no_member', 10246.0, null, null, 404);
}
//-----------------------------------------
// Grab all data...
//-----------------------------------------
$member = IPSMember::load($member_id, 'profile_portal,pfields_content,sessions,groups', 'id');
//-----------------------------------------
// Can we access?
//-----------------------------------------
if (!$this->memberData['g_mem_info'] && $this->memberData['member_id'] != $member['member_id']) {
$this->registry->output->showError('profiles_off', 10245, null, null, 403);
}
$tab = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($this->request['tab']))), 0, 20);
$firsttab = '';
$friends = array();
$visitors = array();
$comment_perpage = 5;
$pips = 0;
$default_tab = '';
$tabs = array();
$_tabs = array();
$_positions = array(0 => 0);
$_member_ids = array();
$sql_extra = '';
$pass = 0;
$mod = 0;
$_todays_date = getdate();
$_rCustom = intval($this->request['removeCustomization']);
$_dCustom = intval($this->request['disableCustomization']);
$time_adjust = $this->settings['time_adjust'] == "" ? 0 : $this->settings['time_adjust'];
$board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies'];
$seenFiles = array();
/* Removing customization? */
if ($_rCustom and ($member_id == $this->memberData['member_id'] or $this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) {
IPSMember::save($member_id, array('extendedProfile' => array('pp_customization' => serialize(array()))));
} else {
if ($_rCustom) {
$this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403);
}
}
/* Disable? */
if ($_dCustom and ($this->memberData['g_access_cp'] or $this->memberData['g_is_supmod'] and !$member['g_access_cp']) and $this->request['secure_key'] == $this->member->form_hash) {
IPSMember::save($member_id, array('core' => array('bw_disable_customization' => 1)));
} else {
if ($_dCustom) {
$this->registry->output->showError('profile_no_remove_perm', '10246.-1', null, null, 403);
}
}
if (!$member['member_id']) {
$this->registry->output->showError('profiles_no_member', 10246, null, null, 404);
}
/* Member banned or is spammer? */
if (IPSMember::isInactive($member) && !$this->memberData['g_is_supmod']) {
$this->registry->output->showError('profiles_not_active', '10246.1', null, null, 403);
}
//-----------------------------------------
// Configure tabs
//-----------------------------------------
foreach (IPSLib::getEnabledApplications() as $appDir => $app) {
/* Path to tabs */
$custom_path = IPSLib::getAppDir($appDir) . '/extensions/profileTabs';
if (is_dir($custom_path)) {
foreach (new DirectoryIterator($custom_path) as $f) {
if (!$f->isDot() && !$f->isDir()) {
$file = $f->getFileName();
if ($file[0] == '.') {
continue;
}
if (preg_match('#\\.conf\\.php$#i', $file)) {
$classname = str_replace(".conf.php", "", $file);
/* Block the old about me file */
if ($classname == 'aboutme') {
continue;
}
$CONFIG = array();
require $custom_path . '/' . $file;
/*noLibHook*/
//-------------------------------
// Allowed to use?
//-------------------------------
if ($CONFIG['plugin_enabled']) {
/* Block friends tab if we have disabled friends or friends feature is shut off */
if ($CONFIG['plugin_key'] == 'friends' and (!$member['pp_setting_count_friends'] or !$this->settings['friends_enabled'])) {
continue;
}
$CONFIG['app'] = $appDir;
$_position = $this->_getTabPosition($_positions, $CONFIG['plugin_order']);
$_tabs[$_position] = $CONFIG;
//.........這裏部分代碼省略.........
示例4: member_view
//.........這裏部分代碼省略.........
// Comments and friends..
//-----------------------------------------
$pp_visitors = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_visitors", $member['pp_setting_count_visitors']);
$pp_enable_comments = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_comments", $member['pp_setting_count_comments']);
$pp_enable_friends = ipsRegistry::getClass('output')->formYesNo("pp_setting_count_friends", $member['pp_setting_count_friends']);
$_commentsApprove = array(array('0', $this->lang->words['sm_comments_app_none']), array('1', $this->lang->words['sm_comments_app_on']));
$_friendsApprove = array(array('0', $this->lang->words['sm_friends_app_none']), array('1', $this->lang->words['sm_friends_app_on']));
$pp_comments_approve = ipsRegistry::getClass('output')->formDropdown("pp_setting_moderate_comments", $_commentsApprove, $member['pp_setting_moderate_comments']);
$pp_friends_approve = ipsRegistry::getClass('output')->formDropdown("pp_setting_moderate_friends", $_friendsApprove, $member['pp_setting_moderate_friends']);
$suspend_date = '';
if ($member['temp_ban']) {
$s_ban = IPSMember::processBanEntry($member['temp_ban']);
$suspend_date = "<div class='warning'>" . $this->lang->words['member_supsended_til'] . ' ' . ipsRegistry::getClass('class_localization')->getDate($s_ban['date_end'], 'LONG', 1) . "</div>";
}
$IPBHTML = "";
$IPBHTML .= <<<HTML
<script type="text/javascript" src="{$this->settings['js_main_url']}acp.members.js"></script>
<div class='section_title'>
\t<h2>{$this->lang->words['editing_member']} {$member['members_display_name']}</h2>
\t<ul class='context_menu'>
HTML;
if (IPSLib::appIsInstalled('nexus')) {
$IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href="{$this->settings['base_url']}app=nexus&module=customers&section=view&member_id={$member['member_id']}">
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icon_components/nexus.png' alt='{$this->lang->words['view_customer_data']}' />
\t\t\t\t{$this->lang->words['form_viewcustomer']}
\t\t\t</a>
\t\t</li>
HTML;
}
if ($this->registry->getClass('class_permissions')->checkPermission('member_login', 'members', 'members')) {
if (IPSMember::isInactive($member)) {
$IPBHTML .= <<<HTML
\t\t<li class='disabled'>
\t\t\t<a href="#" onclick='alert("{$this->lang->words['member_login_ban_or_spam']}")'>
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/key.png' alt='{$this->lang->words['member_login']}' />
\t\t\t\t{$this->lang->words['member_login']}
\t\t\t</a>
\t\t</li>
HTML;
} else {
$IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href="{$this->settings['base_url']}app=members&module=members&section=members&do=member_login&member_id={$member['member_id']}" target="_blank">
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/key.png' alt='{$this->lang->words['member_login']}' />
\t\t\t\t{$this->lang->words['member_login']}
\t\t\t</a>
\t\t</li>
HTML;
}
}
if ($member['member_id'] != $this->memberData['member_id']) {
$IPBHTML .= <<<HTML
\t\t<li>
\t\t\t<a href='#' id='MF__ban2' title='{$this->lang->words['title_ban']}'>
\t\t\t\t<img src='{$this->settings['skin_acp_url']}/images/icons/user_warn.png' alt='{$this->lang->words['title_ban']}' />
\t\t\t\t{$ban_member_text}
\t\t\t</a>
\t\t\t
\t\t\t<script type='text/javascript'>
\t\t\t\t\$('MF__ban2').observe('click', acp.members.banManager.bindAsEventListener( this, "app=members&module=ajax&section=editform&do=show&name=inline_ban_member&member_id={$member['member_id']}" ) );
\t\t\t</script>
\t\t</li>
HTML;