diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/config/profilefields.yml | 1 | ||||
-rw-r--r-- | phpBB/language/en/app.php | 3 | ||||
-rw-r--r-- | phpBB/language/en/common.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/manager.php | 45 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/common.css | 1 |
5 files changed, 45 insertions, 7 deletions
diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml index d12a1f8a37..00f025e141 100644 --- a/phpBB/config/profilefields.yml +++ b/phpBB/config/profilefields.yml @@ -4,6 +4,7 @@ services: arguments: - @auth - @dbal.conn + - @dispatcher - @request - @template - @profilefields.type_collection diff --git a/phpBB/language/en/app.php b/phpBB/language/en/app.php index cb56015c30..6697532150 100644 --- a/phpBB/language/en/app.php +++ b/phpBB/language/en/app.php @@ -41,9 +41,6 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'CONTROLLER_ARGUMENT_VALUE_MISSING' => 'Missing value for argument #%1$s: <strong>%3$s</strong> in class <strong>%2$s</strong>', 'CONTROLLER_NOT_SPECIFIED' => 'No controller has been specified.', - 'CONTROLLER_NOT_FOUND' => 'The requested page could not be found.', 'CONTROLLER_METHOD_NOT_SPECIFIED' => 'No method was specified for the controller.', - 'CONTROLLER_SERVICE_NOT_GIVEN' => 'The controller "<strong>%s</strong>" must have a service specified in ./config/routing.yml.', 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller "<strong>%s</strong>" is not defined in ./config/services.yml.', - 'CONTROLLER_RETURN_TYPE_INVALID' => 'The controller object <strong>%s</strong> must return a Symfony\Component\HttpFoundation\Response object.', )); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index e31164dfc8..aac4f2516e 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -218,8 +218,6 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', 'EXPAND_VIEW' => 'Expand view', 'EXTENSION' => 'Extension', - 'EXTENSION_CONTROLLER_MISSING' => 'The extension <strong>%s</strong> is missing a controller class and cannot be accessed through the front-end.', - 'EXTENSION_CLASS_WRONG_TYPE' => 'The extension controller class <strong>%s</strong> is not an instance of the phpbb_extension_controller_interface.', 'EXTENSION_DISABLED' => 'The extension <strong>%s</strong> is not enabled.', 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.', 'EXTENSION_DOES_NOT_EXIST' => 'The extension <strong>%s</strong> does not exist.', diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 37449c67c4..7d545a5f72 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -28,6 +28,12 @@ class manager protected $db; /** + * Event dispatcher object + * @var \phpbb\event\dispatcher + */ + protected $dispatcher; + + /** * Request object * @var \phpbb\request\request */ @@ -64,6 +70,7 @@ class manager * * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\db\driver\driver_interface $db Database object + * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object * @param \phpbb\request\request $request Request object * @param \phpbb\template\template $template Template object * @param \phpbb\di\service_collection $type_collection @@ -72,10 +79,11 @@ class manager * @param string $fields_language_table * @param string $fields_data_table */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) { $this->auth = $auth; $this->db = $db; + $this->dispatcher = $dispatcher; $this->request = $request; $this->template = $template; $this->type_collection = $type_collection; @@ -313,6 +321,17 @@ class manager } $this->db->sql_freeresult($result); + /** + * Event to modify profile fields data retrieved from the database + * + * @event core.grab_profile_fields_data + * @var array user_ids Single user id or an array of ids + * @var array field_data Array with profile fields data + * @since 3.1.0-b3 + */ + $vars = array('user_ids', 'field_data'); + extract($this->dispatcher->trigger_event('core.grab_profile_fields_data', compact($vars))); + $user_fields = array(); // Go through the fields in correct order @@ -351,6 +370,18 @@ class manager $tpl_fields = array(); $tpl_fields['row'] = $tpl_fields['blockrow'] = array(); + /** + * Event to modify data of the generated profile fields, before the template assignment loop + * + * @event core.generate_profile_fields_template_data_before + * @var array profile_row Array with users profile field data + * @var array tpl_fields Array with template data fields + * @var bool use_contact_fields Should we display contact fields as such? + * @since 3.1.0-b3 + */ + $vars = array('profile_row', 'tpl_fields', 'use_contact_fields'); + extract($this->dispatcher->trigger_event('core.generate_profile_fields_template_data_before', compact($vars))); + foreach ($profile_row as $ident => $ident_ary) { $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; @@ -404,6 +435,18 @@ class manager ); } + /** + * Event to modify template data of the generated profile fields + * + * @event core.generate_profile_fields_template_data + * @var array profile_row Array with users profile field data + * @var array tpl_fields Array with template data fields + * @var bool use_contact_fields Should we display contact fields as such? + * @since 3.1.0-b3 + */ + $vars = array('profile_row', 'tpl_fields', 'use_contact_fields'); + extract($this->dispatcher->trigger_event('core.generate_profile_fields_template_data', compact($vars))); + return $tpl_fields; } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index a54b84757c..94fad55ae9 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -261,7 +261,6 @@ a#logo:hover { } .navbar { - padding: 0 10px; padding: 5px 10px 5px 10px; border-radius: 7px; } |