phpBB API Documentation
Class

custom_profile

class custom_profile

Custom Profile Fields

Properties

$profile_types
$profile_cache
$options_lang

Methods

generate_profile_fields($mode, $lang_id)

Assign editable fields to template, mode can be profile (for profile change) or register (for registration) Called by ucpprofile and ucpregister

validate_profile_field($field_type, $field_value, $field_data)

Validate entered profile field data

build_cache()

Build profile cache, used for display

get_option_lang($field_id, $lang_id, $field_type, $preview)

Get language entries for options and store them here for later use

submit_cp_field($mode, $lang_id, $cp_data, $cp_error)

Submit profile field for validation

update_profile_field_data($user_id, $cp_data)

Update profile field data directly

generate_profile_fields_template($mode, $user_id, $profile_row = false)

Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled) This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template

get_profile_value($ident_ary)

Get Profile Value for display

get_var($field_validation, $profile_row, $default_value, $preview)

Get field value for registration/profile

generate_int($profile_row, $preview = false)

Process int-type

generate_date($profile_row, $preview = false)

Process date-type

generate_bool($profile_row, $preview = false)

Process bool-type

generate_string($profile_row, $preview = false)

Process string-type

generate_text($profile_row, $preview = false)

Process text-type

generate_dropdown($profile_row, $preview = false)

Process dropdown-type

process_field_row($mode, $profile_row)

Return Templated value/field.

build_insert_sql_array($cp_data)

Build Array for user insertion into custom profile fields table

get_profile_field($profile_row)

Get profile field value on submit

Details

at line 34
public generate_profile_fields($mode, $lang_id)

Assign editable fields to template, mode can be profile (for profile change) or register (for registration) Called by ucpprofile and ucpregister

Parameters

$mode
$lang_id

at line 91
public validate_profile_field($field_type, $field_value, $field_data)

Validate entered profile field data

Parameters

$field_type
$field_value
$field_data

at line 208
public build_cache()

Build profile cache, used for display

at line 235
public get_option_lang($field_id, $lang_id, $field_type, $preview)

Get language entries for options and store them here for later use

Parameters

$field_id
$lang_id
$field_type
$preview

at line 270
public submit_cp_field($mode, $lang_id, $cp_data, $cp_error)

Submit profile field for validation

Parameters

$mode
$lang_id
$cp_data
$cp_error

at line 361
public update_profile_field_data($user_id, $cp_data)

Update profile field data directly

Parameters

$user_id
$cp_data

at line 424
public generate_profile_fields_template($mode, $user_id, $profile_row = false)

Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled) This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template

Parameters

$mode
$user_id
$profile_row

at line 527
public get_profile_value($ident_ary)

Get Profile Value for display

Parameters

$ident_ary

at line 645
public get_var($field_validation, $profile_row, $default_value, $preview)

Get field value for registration/profile

Parameters

$field_validation
$profile_row
$default_value
$preview

at line 704
public generate_int($profile_row, $preview = false)

Process int-type

Parameters

$profile_row
$preview

at line 716
public generate_date($profile_row, $preview = false)

Process date-type

Parameters

$profile_row
$preview

at line 775
public generate_bool($profile_row, $preview = false)

Process bool-type

Parameters

$profile_row
$preview

at line 806
public generate_string($profile_row, $preview = false)

Process string-type

Parameters

$profile_row
$preview

at line 818
public generate_text($profile_row, $preview = false)

Process text-type

Parameters

$profile_row
$preview

at line 835
public generate_dropdown($profile_row, $preview = false)

Process dropdown-type

Parameters

$profile_row
$preview

at line 864
public process_field_row($mode, $profile_row)

Return Templated value/field.

Possible values for $mode are: change == user is able to set/enter profile values; preview == just show the value

Parameters

$mode
$profile_row

at line 892
public build_insert_sql_array($cp_data)

Build Array for user insertion into custom profile fields table

Parameters

$cp_data

at line 933
public get_profile_field($profile_row)

Get profile field value on submit

Parameters

$profile_row