mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15891] Add core.memberlist_modify_view_profile_template_vars
PHPBB3-15891
This commit is contained in:
parent
db7f4d4c95
commit
e6ac4daf64
1 changed files with 44 additions and 28 deletions
|
@ -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']))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue