A few minor updates

git-svn-id: file:///svn/phpbb/trunk@4080 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-06-05 00:53:39 +00:00
parent d806c0a55f
commit 6ca40653e9
6 changed files with 89 additions and 35 deletions

View file

@ -718,7 +718,8 @@ function show_profile($data)
{ {
if ((empty($rank['rank_special']) && empty($data['user_rank']) && $data['user_posts'] >= $rank['rank_min']) || (!empty($rank['rank_special']) && $data['user_rank'] == $rank['rank_id'])) if ((empty($rank['rank_special']) && empty($data['user_rank']) && $data['user_posts'] >= $rank['rank_min']) || (!empty($rank['rank_special']) && $data['user_rank'] == $rank['rank_id']))
{ {
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $rank['rank_image'] . '" border="0" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" /><br />' : ''; $rank_title = (!empty($rank['rank_title'])) ? $rank['rank_title'] : '';
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $rank['rank_image'] . '" border="0" alt="' .$rank_title . '" title="' . $rank_title . '" /><br />' : '';
break; break;
} }
} }
@ -785,25 +786,26 @@ function show_profile($data)
'ONLINE_IMG' => (intval($data['session_time']) >= time() - ($config['load_online_time'] * 60)) ? $user->img('btn_online', $user->lang['USER_ONLINE']) : $user->img('btn_offline', $user->lang['USER_ONLINE']), 'ONLINE_IMG' => (intval($data['session_time']) >= time() - ($config['load_online_time'] * 60)) ? $user->img('btn_online', $user->lang['USER_ONLINE']) : $user->img('btn_offline', $user->lang['USER_ONLINE']),
'RANK_IMG' => $rank_img, 'RANK_IMG' => $rank_img,
'PM_IMG' => $pm_img,
'EMAIL_IMG' => $email_img,
'WWW_IMG' => $www_img,
'ICQ_STATUS_IMG'=> $icq_status_img,
'ICQ_IMG' => $icq_img,
'AIM_IMG' => $aim_img,
'MSN_IMG' => $msn_img,
'YIM_IMG' => $yim_img,
'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,
'PM_IMG' => $pm_img, 'RANK' => $rank_title,
'PM' => $pm, 'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email, 'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www, 'WWW' => $www,
'ICQ_STATUS_IMG'=> $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq, 'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim, 'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn, 'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim, 'YIM' => $yim,
'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false 'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false

View file

@ -19,12 +19,21 @@
<tr> <tr>
<td class="gen" align="center"><!-- IF USER_COLOR neq '' --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td> <td class="gen" align="center"><!-- IF USER_COLOR neq '' --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td>
</tr> </tr>
<!-- IF RANK -->
<tr>
<td class="postdetails" align="center">{RANK}</td>
</tr>
<!-- ENDIF -->
<!-- IF RANK_IMG -->
<tr> <tr>
<td align="center">{RANK_IMG}</td> <td align="center">{RANK_IMG}</td>
</tr> </tr>
<!-- ENDIF -->
<!-- IF AVATAR_IMG -->
<tr> <tr>
<td align="center">{AVATAR_IMG}</td> <td align="center">{AVATAR_IMG}</td>
</tr> </tr>
<!-- ENDIF -->
<tr> <tr>
<td align="center">{ONLINE_IMG}</td> <td align="center">{ONLINE_IMG}</td>
</tr> </tr>

View file

@ -35,7 +35,7 @@
<!-- IF S_TOPIC_ICONS --> <!-- IF S_TOPIC_ICONS -->
<td class="cat" colspan="7"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <td class="cat" colspan="7"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td class="nav" valign="middle">&nbsp;{S_WATCH_FORUM}</td> <td class="nav" valign="middle">&nbsp;<!-- IF S_WATCH_FORUM -->{S_WATCH_FORUM}<!-- ENDIF --></td>
<td class="nav" align="right" valign="middle"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a>&nbsp;</td> <td class="nav" align="right" valign="middle"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a>&nbsp;</td>
</tr> </tr>
</table></td> </table></td>

View file

@ -85,18 +85,48 @@
<th width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th> <th width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
<th nowrap="nowrap">{L_MESSAGE}</th> <th nowrap="nowrap">{L_MESSAGE}</th>
</tr> </tr>
<!-- BEGIN postrow --> <!-- BEGIN postrow -->
<!-- IF postrow.S_ROW_COUNT is even --> <!-- IF postrow.S_ROW_COUNT is even -->
<tr class="row1"> <tr class="row1">
<!-- ELSE --> <!-- ELSE -->
<tr class="row2"> <tr class="row2">
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF postrow.S_BELOW_MIN_KARMA -->
<td colspan="2" height="25" align="center"><span class="gensmall">{postrow.L_IGNORE_POST}</span></td> <!-- IF postrow.S_IGNORE_POST -->
<!-- ELSEIF postrow.S_WRONG_ENCODING --> <td class="gensmall" colspan="2" height="25" align="center">{postrow.L_IGNORE_POST}</td>
<td colspan="2" height="25" align="center"><span class="gensmall">{postrow.L_IGNORE_POST}</span></td>
<!-- ELSE --> <!-- ELSE -->
<td rowspan="2" width="150" align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><b class="name">{postrow.POSTER_NAME}</b><span class="postdetails"><br />{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><!-- IF postrow.POSTER_POSTS --><br />{L_JOINED}: {postrow.POSTER_JOINED}<!-- ENDIF --><!-- IF postrow.POSTER_POSTS --><br />{L_POSTS}: {postrow.POSTER_POSTS}<!-- ENDIF --><!-- IF postrow.POSTER_FROM --><br />{L_LOCATION}: {postrow.POSTER_FROM}<!-- ENDIF --></span></td> <td rowspan="2" align="left" valign="top"><a name="{postrow.U_POST_ID}"></a>
<table width="150" cellspacing="0" cellpadding="4" border="0">
<tr>
<td align="center"><b class="name">{postrow.POSTER_NAME}</b></td>
</tr>
<!-- IF postrow.POSTER_RANK -->
<tr>
<td class="postdetails" align="center">{postrow.POSTER_RANK}</td>
</tr>
<!-- ENDIF -->
<!-- IF postrow.RANK_IMAGE -->
<tr>
<td align="center">{postrow.RANK_IMAGE}</td>
</tr>
<!-- ENDIF -->
<!-- IF postrow.POSTER_AVATAR -->
<tr>
<td align="center">{postrow.POSTER_AVATAR}</td>
</tr>
<!-- ENDIF -->
</table>
<span class="postdetails">
<!-- IF postrow.POSTER_POSTS --><br />{L_JOINED}: {postrow.POSTER_JOINED}<!-- ENDIF -->
<!-- IF postrow.POSTER_POSTS --><br />{L_POSTS}: {postrow.POSTER_POSTS}<!-- ENDIF -->
<!-- IF postrow.POSTER_FROM --><br />{L_LOCATION}: {postrow.POSTER_FROM}<!-- ENDIF -->
</span>
</td>
<td width="100%" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <td width="100%" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td>{postrow.POST_ICON_IMG}&nbsp;</td> <td>{postrow.POST_ICON_IMG}&nbsp;</td>
@ -106,16 +136,21 @@
</tr> </tr>
</table></td> </table></td>
</tr> </tr>
<!-- IF postrow.S_ROW_COUNT is even --> <!-- IF postrow.S_ROW_COUNT is even -->
<tr class="row1"> <tr class="row1">
<!-- ELSE --> <!-- ELSE -->
<tr class="row2"> <tr class="row2">
<!-- ENDIF --> <!-- ENDIF -->
<td><table width="100%" cellspacing="0" cellpadding="5" border="0"> <td><table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr> <tr>
<td height="120" valign="top"><table width="100%" cellspacing="0" cellpadding="2"> <td height="120" valign="top"><table width="100%" cellspacing="0" cellpadding="2">
<tr> <tr>
<td><span class="postbody">{postrow.MESSAGE}</span><!-- IF postrow.S_HAS_ATTACHMENTS --><!-- INCLUDE viewtopic_attach_body.html --><!-- ENDIF --><!-- IF postrow.SIGNATURE --><span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span><!-- ENDIF --><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td> <td><span class="postbody">{postrow.MESSAGE}</span>
<!-- IF postrow.S_HAS_ATTACHMENTS --><!-- INCLUDE viewtopic_attach_body.html --><!-- ENDIF -->
<!-- IF postrow.SIGNATURE --><span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span><!-- ENDIF -->
<span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>
@ -143,11 +178,13 @@
</tr> </tr>
</table></td> </table></td>
</tr> </tr>
<!-- IF postrow.S_ROW_COUNT is even --> <!-- IF postrow.S_ROW_COUNT is even -->
<tr class="row1"> <tr class="row1">
<!-- ELSE --> <!-- ELSE -->
<tr class="row2"> <tr class="row2">
<!-- ENDIF --> <!-- ENDIF -->
<td class="nav" width="150" align="center" valign="middle"><a href="#top">{L_BACK_TO_TOP}</a></td> <td class="nav" width="150" align="center" valign="middle"><a href="#top">{L_BACK_TO_TOP}</a></td>
<td width="100%" height="28" valign="bottom" nowrap="nowrap"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <td width="100%" height="28" valign="bottom" nowrap="nowrap"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
@ -166,7 +203,9 @@
<tr> <tr>
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td> <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr> </tr>
<!-- END postrow --> <!-- END postrow -->
<tr align="center"><form method="post" action="{S_TOPIC_ACTION}"> <tr align="center"><form method="post" action="{S_TOPIC_ACTION}">
<td class="cat" colspan="2" height="28"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="liteoption" type="submit" value="{L_GO}" name="sort" /></td> <td class="cat" colspan="2" height="28"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="liteoption" type="submit" value="{L_GO}" name="sort" /></td>
</form></tr> </form></tr>

View file

@ -187,8 +187,12 @@ if ($forum_data['forum_type'] == FORUM_POST)
// Forum rules, subscription info and word censors // Forum rules, subscription info and word censors
$s_watching_forum = $s_watching_forum_img = ''; $s_watching_forum = $s_watching_forum_img = '';
if ($config['email_enable'] && $config['allow_forum_notify'])
{
$notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL; $notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;
watch_topic_forum('forum', $s_watching_forum, $s_watching_forum_img, $user->data['user_id'], $forum_id, $notify_status); watch_topic_forum('forum', $s_watching_forum, $s_watching_forum_img, $user->data['user_id'], $forum_id, $notify_status);
}
$s_forum_rules = ''; $s_forum_rules = '';
gen_forum_rules('forum', $forum_id); gen_forum_rules('forum', $forum_id);
@ -549,7 +553,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
// after reading a topic // after reading a topic
if ($user->data['user_id'] != ANONYMOUS && $update_forum) if ($user->data['user_id'] != ANONYMOUS && $update_forum)
{ {
markread('mark', $forum_id, false, time()); markread('mark', $forum_id);
} }
} }

View file

@ -250,7 +250,7 @@ if ($topic_attachment)
// Are we watching this topic? // Are we watching this topic?
$s_watching_topic = $s_watching_topic_img = ''; $s_watching_topic = $s_watching_topic_img = '';
if ($config['email_enable']) if ($config['email_enable'] && $config['allow_topic_notify'])
{ {
watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $user->data['user_id'], $topic_id, $notify_status); watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $user->data['user_id'], $topic_id, $notify_status);
} }
@ -617,7 +617,7 @@ $force_encoding = '';
$bbcode_bitfield = $i = 0; $bbcode_bitfield = $i = 0;
// Go ahead and pull all data for this topic // Go ahead and pull all data for this topic
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_karma, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_jabber, u.user_regdate, u.user_msnm, u.user_allow_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, p.* $sql = "SELECT u.username, u.user_id, u.user_colour, u.user_posts, u.user_from, u.user_karma, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_jabber, u.user_regdate, u.user_msnm, u.user_allow_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, p.*
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.topic_id = $topic_id WHERE p.topic_id = $topic_id
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1') . " " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1') . "
@ -652,7 +652,7 @@ do
$rowset[] = array( $rowset[] = array(
'post_id' => $row['post_id'], 'post_id' => $row['post_id'],
'post_time' => $row['post_time'], 'post_time' => $row['post_time'],
'poster' => $poster, 'poster' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster,
'user_id' => $row['user_id'], 'user_id' => $row['user_id'],
'topic_id' => $row['topic_id'], 'topic_id' => $row['topic_id'],
'forum_id' => $row['forum_id'], 'forum_id' => $row['forum_id'],
@ -893,7 +893,7 @@ foreach ($rowset as $key => $row)
if (!empty($row['below_karma'])) if (!empty($row['below_karma']))
{ {
$template->assign_block_vars('postrow', array( $template->assign_block_vars('postrow', array(
'S_BELOW_MIN_KARMA' => true, 'S_IGNORE_POST' => true,
'S_ROW_COUNT' => $i++, 'S_ROW_COUNT' => $i++,
'L_IGNORE_POST' => sprintf($user->lang['POST_BELOW_KARMA'], $row['poster'], intval($row['user_karma']), '<a href="viewtopic.' . $phpEx . $SID . '&amp;p=' . $row['post_id'] . '&amp;view=karma#' . $row['post_id'] . '">', '</a>')) 'L_IGNORE_POST' => sprintf($user->lang['POST_BELOW_KARMA'], $row['poster'], intval($row['user_karma']), '<a href="viewtopic.' . $phpEx . $SID . '&amp;p=' . $row['post_id'] . '&amp;view=karma#' . $row['post_id'] . '">', '</a>'))
@ -910,7 +910,7 @@ foreach ($rowset as $key => $row)
else else
{ {
$template->assign_block_vars('postrow', array( $template->assign_block_vars('postrow', array(
'S_WRONG_ENCODING' => true, 'S_IGNORE_POST' => true,
'S_ROW_COUNT' => $i++, 'S_ROW_COUNT' => $i++,
'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&amp;p=' . $row['post_id'] . '&amp;view=encoding#' . $row['post_id'] . '">', '</a>')) 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&amp;p=' . $row['post_id'] . '&amp;view=encoding#' . $row['post_id'] . '">', '</a>'))