Identifer: core.grab_profile_fields_data
Location: phpbb/profile_fields/manager.php
Parameters: 'user_ids', 'field_data'
Explanation: This location is useful, because it will allow us to use the raw CPF data, and process it in other scripts. My example is this: a user fills in a gaming-character name in a special CPF. When the data is retrieved from the database (grab), a script will check to see if the data is valid (custom validation), and retrieve the character information from a remote server and store it in a local database table. In addition, it will automatically be cached in the "$this->profile_cache" by phpBB.
Identifer: core.generate_profile_fields_template_data
Location: phpbb/profile_fields/manager.php
Parameters: 'profile_row', 'tpl_fields'
Explanation: This location is useful, because it will allow us to modify the output of the CPF data (show). My example is this: based on the CPF values of a user, a special avatar is generated, or a special icon, or text color.
[PHP] Add Events to phpbb\profilefields\manager (grab & show)
[PHP] Add Events to phpbb\profilefields\manager (grab & show)
Last edited by PayBas on Mon Mar 31, 2014 12:15 pm, edited 1 time in total.
Re: [PHP] Add Events to phpbb\profilefields\manager (grab & show)
Additionally, I would like to request the inclusion of a new template field in phpbb/profile_fields/manager.php:
'PROFILE_' . strtoupper($ident) . '_VALUEID'=> $ident_ary['value']
and
'PROFILE_FIELD_VALUEID' => $ident_ary['value']
Why? Because when you have a CPF that is a dropdown, it can be very handy to be able to simply use the entry ID instead of the corresponding language value.
Like:
apple (1)
pear (2)
orange (3)
If you want to use this in a template you would use <!-- IF PROFILE_FRUIT_VALUE == "apple" --> make something green <!-- ENDIF -->
Being able to simply use the entry ID would be much better in some situations.
'PROFILE_' . strtoupper($ident) . '_VALUEID'=> $ident_ary['value']
and
'PROFILE_FIELD_VALUEID' => $ident_ary['value']
Why? Because when you have a CPF that is a dropdown, it can be very handy to be able to simply use the entry ID instead of the corresponding language value.
Like:
apple (1)
pear (2)
orange (3)
If you want to use this in a template you would use <!-- IF PROFILE_FRUIT_VALUE == "apple" --> make something green <!-- ENDIF -->
Being able to simply use the entry ID would be much better in some situations.
Last edited by PayBas on Mon Mar 31, 2014 12:17 pm, edited 1 time in total.