本文整理匯總了PHP中custom_profile::process_field_row方法的典型用法代碼示例。如果您正苦於以下問題:PHP custom_profile::process_field_row方法的具體用法?PHP custom_profile::process_field_row怎麽用?PHP custom_profile::process_field_row使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類custom_profile
的用法示例。
在下文中一共展示了custom_profile::process_field_row方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ucp_preregister
/**
* UCP Pre-Register Operations (Pre-Registration Captcha)
*/
public static function ucp_preregister()
{
global $config, $db, $phpbb_root_path, $phpEx, $template, $user;
if (!$config['asacp_enable']) {
return array();
}
$user->add_lang('mods/asacp');
// Profile fields stuff
$cp = new custom_profile();
foreach (self::$profile_fields as $field => $data) {
if ($data['field_type'] == 'disabled') {
continue;
}
// Special stuff for $cp->process_field_row
$data['var_name'] = $data['field_ident'] = $field;
$data['lang_default_value'] = '';
switch ($config['asacp_profile_' . $field]) {
case 1:
// Required Field
$template->assign_block_vars('profile_fields', array('FIELD_ID' => $field, 'LANG_NAME' => isset($user->lang[$data['lang']]) ? $user->lang[$data['lang']] : $data['lang'], 'S_REQUIRED' => true, 'LANG_EXPLAIN' => isset($user->lang[$data['lang'] . '_EXPLAIN']) ? $user->lang[$data['lang'] . '_EXPLAIN'] : '', 'FIELD' => $cp->process_field_row('change', $data)));
break;
case 2:
if ($config['asacp_profile_during_reg']) {
// Normal Field
$template->assign_block_vars('profile_fields', array('FIELD_ID' => $field, 'LANG_NAME' => isset($user->lang[$data['lang']]) ? $user->lang[$data['lang']] : $data['lang'], 'LANG_EXPLAIN' => isset($user->lang[$data['lang'] . '_EXPLAIN']) ? $user->lang[$data['lang'] . '_EXPLAIN'] : '', 'FIELD' => $cp->process_field_row('change', $data)));
}
break;
}
}
if (!$config['asacp_reg_captcha']) {
return array();
}
}