本文整理匯總了PHP中IPSMember::custom_fields_class方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::custom_fields_class方法的具體用法?PHP IPSMember::custom_fields_class怎麽用?PHP IPSMember::custom_fields_class使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::custom_fields_class方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildDisplayData
//.........這裏部分代碼省略.........
} else {
if ($member['warn_percent'] >= 1) {
$member['warn_img'] = '{parse replacement="warn_1"}';
} else {
$member['warn_img'] = '{parse replacement="warn_0"}';
}
}
}
}
}
}
}
if ($member['warn_percent'] < 1) {
$member['warn_percent'] = 0;
}
/* Bug 14770 - Change so you can't warn yourself */
if ((isset($moderator[$forum_id]['allow_warn']) and $moderator[$forum_id]['allow_warn'] or ipsRegistry::member()->getProperty('g_is_supmod') == 1) and $member['member_id'] != ipsRegistry::member()->getProperty('member_id')) {
$member['can_edit_warn'] = true;
}
}
}
}
//-----------------------------------------
// Profile fields stuff
//-----------------------------------------
$member['custom_fields'] = "";
if ($parseFlags['customFields'] == 1 and $member['member_id']) {
if (isset(self::$_parsedCustomFields[$member['member_id']])) {
$member['custom_fields'] = self::$_parsedCustomFields[$member['member_id']];
if ($parseFlags['cfGetGroupData'] and isset(self::$_parsedCustomGroups[$member['member_id']]) and is_array(self::$_parsedCustomGroups[$member['member_id']])) {
$member['custom_field_groups'] = self::$_parsedCustomGroups[$member['member_id']];
}
} else {
if (!is_object(self::$custom_fields_class)) {
require_once IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php';
self::$custom_fields_class = new customProfileFields();
}
if (self::$custom_fields_class) {
self::$custom_fields_class->member_data = $member;
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);
//-----------------------------------------
// Personal statement 'bbcode'
//-----------------------------------------
if (stripos($member['pp_bio_content'], '[b]') !== false) {
if (stripos($member['pp_bio_content'], '[/b]') > stripos($member['pp_bio_content'], '[b]')) {
$member['pp_bio_content'] = str_ireplace('[b]', '<strong>', $member['pp_bio_content']);
$member['pp_bio_content'] = str_ireplace('[/b]', '</strong>', $member['pp_bio_content']);
}
}
if (stripos($member['pp_bio_content'], '[i]') !== false) {
if (stripos($member['pp_bio_content'], '[/i]') > stripos($member['pp_bio_content'], '[i]')) {
示例2: buildDisplayData
//.........這裏部分代碼省略.........
}
//-----------------------------------------
// Warny porny?
//-----------------------------------------
$member['show_warn'] = FALSE;
if ($parseFlags['warn'] and $member['member_id']) {
if (ipsRegistry::$settings['warn_on'] and !IPSMember::isInGroup($member, explode(',', ipsRegistry::$settings['warn_protected']))) {
/* Warnings */
if (!empty($moderator[$forum_id]['allow_warn']) or ipsRegistry::member()->getProperty('g_is_supmod') or ipsRegistry::$settings['warn_show_own'] and ipsRegistry::member()->getProperty('member_id') == $member['member_id']) {
$member['show_warn'] = TRUE;
} else {
if (is_array($moderator) && count($moderator) && !$forum_id) {
foreach ($moderator as $forum) {
if ($forum['allow_warn']) {
$member['show_warn'] = TRUE;
break;
}
}
}
}
}
}
//-----------------------------------------
// Profile fields stuff
//-----------------------------------------
$member['custom_fields'] = "";
if ($parseFlags['customFields'] == 1 and $member['member_id']) {
if (isset(self::$_parsedCustomFields[$member['member_id']])) {
$member['custom_fields'] = self::$_parsedCustomFields[$member['member_id']];
if ($parseFlags['cfGetGroupData'] and isset(self::$_parsedCustomGroups[$member['member_id']]) and is_array(self::$_parsedCustomGroups[$member['member_id']])) {
$member['custom_field_groups'] = self::$_parsedCustomGroups[$member['member_id']];
} else {
if ($parseFlags['cfGetGroupData']) {
$member['custom_field_groups'] = self::$custom_fields_class->fetchGroupTitles();
self::$_parsedCustomGroups[$member['member_id']] = $member['custom_field_groups'];
}
}
} else {
if (!is_object(self::$custom_fields_class)) {
$classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/customfields/profileFields.php', 'customProfileFields');
self::$custom_fields_class = new $classToLoad();
}
if (self::$custom_fields_class) {
self::$custom_fields_class->member_data = $member;
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);
}
}