本文整理匯總了PHP中IPSMember::_sigParser方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::_sigParser方法的具體用法?PHP IPSMember::_sigParser怎麽用?PHP IPSMember::_sigParser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::_sigParser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildDisplayData
//.........這裏部分代碼省略.........
self::$custom_fields_class->skinGroup = $parseFlags['cfSkinGroup'];
self::$custom_fields_class->initData();
self::$custom_fields_class->parseToView($parseFlags['checkFormat'], $parseFlags['cfLocation']);
$member['custom_fields'] = self::$custom_fields_class->out_fields;
self::$_parsedCustomFields[$member['member_id']] = $member['custom_fields'];
if ($parseFlags['cfGetGroupData']) {
$member['custom_field_groups'] = self::$custom_fields_class->fetchGroupTitles();
self::$_parsedCustomGroups[$member['member_id']] = $member['custom_field_groups'];
}
}
}
}
//-----------------------------------------
// Profile photo
//-----------------------------------------
$member = self::buildProfilePhoto($member);
if (!empty($parseFlags['photoTagSize'])) {
$parseFlags['photoTagSize'] = is_array($parseFlags['photoTagSize']) ? $parseFlags['photoTagSize'] : array($parseFlags['photoTagSize']);
foreach ($parseFlags['photoTagSize'] as $size) {
$member['photoTag' . ucfirst($size)] = self::buildPhotoTag($member, $size);
}
}
//-----------------------------------------
// Signature bbcode
//-----------------------------------------
if (!empty($member['signature']) and $parseFlags['signature']) {
if (isset(self::$_parsedSignatures[$member['member_id']])) {
$member['signature'] = self::$_parsedSignatures[$member['member_id']];
} else {
if ($member['cache_content']) {
$member['signature'] = '<!--signature-cached-' . gmdate('r', $member['cache_updated']) . '-->' . $member['cache_content'];
} else {
/* Grab the parser file */
if (self::$_sigParser === null) {
/* Load parser */
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser');
self::$_sigParser = new $classToLoad();
}
/* set up parser */
self::$_sigParser->set(array('memberData' => $member, 'parseBBCode' => 1, 'parseHtml' => $group_cache[$member['member_group_id']]['g_dohtml'] && $member['bw_html_sig'], 'parseEmoticons' => 1, 'parseArea' => 'signatures'));
$member['signature'] = self::$_sigParser->display($member['signature']);
IPSContentCache::update($member['member_id'], 'sig', $member['signature']);
}
self::$_parsedSignatures[$member['member_id']] = $member['signature'];
}
}
//-----------------------------------------
// If current session, reset last_activity
//-----------------------------------------
if (!empty($member['running_time'])) {
$member['last_activity'] = $member['running_time'] > $member['last_activity'] ? $member['running_time'] : $member['last_activity'];
}
//-----------------------------------------
// Online?
//-----------------------------------------
$time_limit = time() - ipsRegistry::$settings['au_cutoff'] * 60;
$member['_online'] = 0;
$bypass_anon = ipsRegistry::member()->getProperty('g_access_cp') ? 1 : 0;
list($be_anon, $loggedin) = explode('&', empty($member['login_anonymous']) ? '0&0' : $member['login_anonymous']);
/* Is not anon but the group might be forced to? */
if (empty($be_anon) && self::isLoggedInAnon($member)) {
$be_anon = 1;
}
/* Finally set the online flag */
if (($member['last_visit'] > $time_limit or $member['last_activity'] > $time_limit) and ($be_anon != 1 or $bypass_anon == 1) and $loggedin == 1) {
$member['_online'] = 1;