[ticket/15891] Add core.memberlist_modify_view_profile_template_vars

PHPBB3-15891
This commit is contained in:
3D-I 2018-12-02 03:53:39 +01:00
parent db7f4d4c95
commit e6ac4daf64

View file

@ -702,7 +702,8 @@ switch ($mode)
$member['posts_in_queue'] = 0;
}
$template->assign_vars(array(
// Define the main array of vars to assign to memberlist_view.html
$template_ary = array(
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
@ -737,7 +738,22 @@ switch ($mode)
'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
'U_CANONICAL' => generate_board_url() . '/' . append_sid("memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id, true, ''),
));
);
/**
* Modify user's template vars before we display the profile
*
* @event core.memberlist_modify_view_profile_template_vars
* @var array template_ary Array with user's template vars
* @since 3.2.6-RC1
*/
$vars = array(
'template_ary',
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_view_profile_template_vars', compact($vars)));
// Assign vars to memberlist_view.html
$template->assign_vars($template_ary);
if (!empty($profile_fields['row']))
{