mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Expose the warning level and user notes in appropriate places (assuming
the user has the correct permissions) git-svn-id: file:///svn/phpbb/trunk@5345 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
791b1bbe73
commit
e7565d31d0
4 changed files with 16 additions and 3 deletions
|
@ -229,6 +229,7 @@ class ucp_main
|
||||||
'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
|
'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
|
||||||
'JOINED' => $user->format_date($user->data['user_regdate'], $user->lang['DATE_FORMAT']),
|
'JOINED' => $user->format_date($user->data['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||||
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit, $user->lang['DATE_FORMAT']),
|
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit, $user->lang['DATE_FORMAT']),
|
||||||
|
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
|
||||||
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
|
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
|
||||||
'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
|
'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
|
||||||
'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
|
'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
|
||||||
|
|
|
@ -295,7 +295,7 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
$sql = 'SELECT username, user_id, user_type, user_colour, user_permissions, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_allow_viewemail, user_allow_viewonline, user_posts, user_regdate, user_rank, user_from, user_occ, user_interests, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_avatar, user_avatar_width, user_avatar_height, user_avatar_type, user_lastvisit
|
$sql = 'SELECT username, user_id, user_type, user_colour, user_permissions, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_allow_viewemail, user_allow_viewonline, user_posts, user_warnings, user_regdate, user_rank, user_from, user_occ, user_interests, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_avatar, user_avatar_width, user_avatar_height, user_avatar_type, user_lastvisit
|
||||||
FROM ' . USERS_TABLE . "
|
FROM ' . USERS_TABLE . "
|
||||||
WHERE user_id = $user_id
|
WHERE user_id = $user_id
|
||||||
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||||
|
@ -1215,6 +1215,7 @@ function show_profile($data)
|
||||||
'JOINED' => $user->format_date($data['user_regdate'], $user->lang['DATE_FORMAT']),
|
'JOINED' => $user->format_date($data['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||||
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit, $user->lang['DATE_FORMAT']),
|
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit, $user->lang['DATE_FORMAT']),
|
||||||
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
|
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
|
||||||
|
'WARNINGS' => ($data['user_warnings']) ? $data['user_warnings'] : 0,
|
||||||
|
|
||||||
'ONLINE_IMG' => ($poster_id == ANONYMOUS) ? '' : (($online) ? $user->img('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE')),
|
'ONLINE_IMG' => ($poster_id == ANONYMOUS) ? '' : (($online) ? $user->img('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE')),
|
||||||
'RANK_IMG' => $rank_img,
|
'RANK_IMG' => $rank_img,
|
||||||
|
@ -1222,6 +1223,8 @@ function show_profile($data)
|
||||||
|
|
||||||
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$user_id",
|
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$user_id",
|
||||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? "{$phpbb_root_path}search.$phpEx$SID&search_author=" . urlencode($username) . "&show_results=posts" : '',
|
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? "{$phpbb_root_path}search.$phpEx$SID&search_author=" . urlencode($username) . "&show_results=posts" : '',
|
||||||
|
'U_NOTES' => $auth->acl_gets('m_', 'a_') ? "{$phpbb_root_path}mcp.$phpEx$SID&i=notes&mode=user_notes&u=$user_id" : '',
|
||||||
|
'U_WARN' => $auth->acl_gets('m_', 'a_') ? "{$phpbb_root_path}mcp.$phpEx$SID&i=warn&mode=warn_user&u=$user_id" : '',
|
||||||
'U_PM' => ($auth->acl_get('u_sendpm')) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=compose&u=$user_id" : '',
|
'U_PM' => ($auth->acl_get('u_sendpm')) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=compose&u=$user_id" : '',
|
||||||
'U_EMAIL' => $email,
|
'U_EMAIL' => $email,
|
||||||
'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
|
'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
|
||||||
|
|
|
@ -48,11 +48,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="gen" align="right" nowrap="nowrap">{L_VISITED}: </td>
|
<td class="gen" align="right" nowrap="nowrap">{L_VISITED}: </td>
|
||||||
<td width="100%"><b class="gen">{VISITED}</td>
|
<td width="100%"><b class="gen">{VISITED}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- IF U_NOTES -->
|
||||||
|
<tr>
|
||||||
|
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
|
||||||
|
<td width="100%"><b class="gen">{WARNINGS}</b><br /><span class="genmed">[ <a href="{U_NOTES}">{L_VIEW_NOTES}</a> | <a href="{U_WARN}">{L_WARN_USER}</a> ]</td>
|
||||||
|
</tr>
|
||||||
|
<!-- ENDIF -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
|
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
|
||||||
<td><!-- IF POSTS_PCT neq 0 --><b class="gen">{POSTS}</b><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span><!-- ELSE --><b class="gen">{POSTS}<b><!-- ENDIF --></td>
|
<td><!-- IF POSTS_PCT neq 0 --><b class="gen">{POSTS}</b><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span><!-- ELSE --><b class="gen">{POSTS}</b><!-- ENDIF --></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_ACTIVE_IN_FORUM}: </td>
|
<td class="gen" align="right" valign="top" nowrap="nowrap">{L_ACTIVE_IN_FORUM}: </td>
|
||||||
|
|
|
@ -886,6 +886,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
$user_cache[$poster_id] = array(
|
$user_cache[$poster_id] = array(
|
||||||
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||||
'posts' => $row['user_posts'],
|
'posts' => $row['user_posts'],
|
||||||
|
'warnings' => $row['user_warnings'],
|
||||||
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
||||||
|
|
||||||
'sig' => $user_sig,
|
'sig' => $user_sig,
|
||||||
|
@ -1262,6 +1263,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
'POSTER_POSTS' => $user_cache[$poster_id]['posts'],
|
'POSTER_POSTS' => $user_cache[$poster_id]['posts'],
|
||||||
'POSTER_FROM' => $user_cache[$poster_id]['from'],
|
'POSTER_FROM' => $user_cache[$poster_id]['from'],
|
||||||
'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
|
'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
|
||||||
|
'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'],
|
||||||
|
|
||||||
'POST_DATE' => $user->format_date($row['post_time']),
|
'POST_DATE' => $user->format_date($row['post_time']),
|
||||||
'POST_SUBJECT' => $row['post_subject'],
|
'POST_SUBJECT' => $row['post_subject'],
|
||||||
|
@ -1300,6 +1302,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
||||||
'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$i + 1])) ? $rowset[$i + 1]['post_id'] : '',
|
'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$i + 1])) ? $rowset[$i + 1]['post_id'] : '',
|
||||||
'U_PREV_POST_ID' => $prev_post_id,
|
'U_PREV_POST_ID' => $prev_post_id,
|
||||||
|
'U_NOTES' => ($auth->acl_gets('m_', 'a_')) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=notes&mode=user_notes&u=" . $poster_id : '',
|
||||||
'U_WARN' => ($auth->acl_gets('m_', 'a_', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=warn&mode=warn_post&p=" . $row['post_id'] : '',
|
'U_WARN' => ($auth->acl_gets('m_', 'a_', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=warn&mode=warn_post&p=" . $row['post_id'] : '',
|
||||||
|
|
||||||
'POST_ID' => $row['post_id'],
|
'POST_ID' => $row['post_id'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue