aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php73
1 files changed, 69 insertions, 4 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 1343bd7c60..e933b54c17 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -364,6 +364,11 @@ switch ($mode)
}
}
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $page_title,
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=team"),
+ ));
+
$template->assign_vars(array(
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']))
);
@@ -461,6 +466,11 @@ switch ($mode)
break;
}
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $page_title,
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=$action&u=$user_id"),
+ ));
+
// Send vars to the template
$template->assign_vars(array(
'IM_CONTACT' => $row[$sql_field],
@@ -643,11 +653,12 @@ switch ($mode)
FROM ' . ZEBRA_TABLE . "
WHERE zebra_id = $user_id
AND user_id = {$user->data['user_id']}";
-
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
- $foe = ($row['foe']) ? true : false;
- $friend = ($row['friend']) ? true : false;
+
+ $foe = $row ? (bool) $row['foe'] : false;
+ $friend = $row ? (bool) $row['friend'] : false;
+
$db->sql_freeresult($result);
if ($config['load_onlinetrack'])
@@ -660,7 +671,7 @@ switch ($mode)
$db->sql_freeresult($result);
$member['session_time'] = (isset($row['session_time'])) ? $row['session_time'] : 0;
- $member['session_viewonline'] = (isset($row['session_viewonline'])) ? $row['session_viewonline'] : 0;
+ $member['session_viewonline'] = (isset($row['session_viewonline'])) ? $row['session_viewonline'] : 0;
unset($row);
}
@@ -865,6 +876,15 @@ switch ($mode)
$page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']);
$template_html = 'memberlist_view.html';
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $user->lang('MEMBERLIST'),
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
+ ));
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $member['username'],
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$user_id"),
+ ));
+
break;
case 'contactadmin':
@@ -914,6 +934,41 @@ switch ($mode)
$template_html = $form->get_template_file();
$form->render($template);
+ if ($user_id)
+ {
+ $navlink_name = $user->lang('SEND_EMAIL');
+ $navlink_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&u=$user_id");
+ }
+ else if ($topic_id)
+ {
+ $sql = 'SELECT f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name, f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options, f.forum_options, t.topic_title
+ FROM ' . FORUMS_TABLE . ' as f,
+ ' . TOPICS_TABLE . ' as t
+ WHERE t.forum_id = f.forum_id';
+ $result = $db->sql_query($sql);
+ $topic_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ generate_forum_nav($topic_data);
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $topic_data['topic_title'],
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"),
+ ));
+
+ $navlink_name = $user->lang('EMAIL_TOPIC');
+ $navlink_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&t=$topic_id");
+ }
+ else if ($mode === 'contactadmin')
+ {
+ $navlink_name = $user->lang('CONTACT_ADMIN');
+ $navlink_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contactadmin");
+ }
+
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $navlink_name,
+ 'U_BREADCRUMB' => $navlink_url,
+ ));
+
break;
case 'livesearch':
@@ -951,6 +1006,11 @@ switch ($mode)
$page_title = $user->lang['MEMBERLIST'];
$template_html = 'memberlist_body.html';
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $page_title,
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
+ ));
+
/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
@@ -1267,6 +1327,11 @@ switch ($mode)
unset($module);
}
+ $template->assign_block_vars('navlinks', array(
+ 'BREADCRUMB_NAME' => $group_helper->get_name($group_row['group_name']),
+ 'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=group&g=$group_id"),
+ ));
+
$template->assign_vars(array(
'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
'GROUP_NAME' => $group_helper->get_name($group_row['group_name']),