diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-06-05 00:53:39 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-06-05 00:53:39 +0000 |
commit | 6ca40653e93c5e544911b8c53348f9a7dd0b9771 (patch) | |
tree | 34af43b768d73d78b7b804779b6e5ee752e68d1b /phpBB | |
parent | d806c0a55ff7d829902cb9c09851a3e73d254bd1 (diff) | |
download | forums-6ca40653e93c5e544911b8c53348f9a7dd0b9771.tar forums-6ca40653e93c5e544911b8c53348f9a7dd0b9771.tar.gz forums-6ca40653e93c5e544911b8c53348f9a7dd0b9771.tar.bz2 forums-6ca40653e93c5e544911b8c53348f9a7dd0b9771.tar.xz forums-6ca40653e93c5e544911b8c53348f9a7dd0b9771.zip |
A few minor updates
git-svn-id: file:///svn/phpbb/trunk@4080 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/memberlist.php | 30 | ||||
-rw-r--r-- | phpBB/templates/subSilver/memberlist_view.html | 9 | ||||
-rw-r--r-- | phpBB/templates/subSilver/viewforum_body.html | 2 | ||||
-rw-r--r-- | phpBB/templates/subSilver/viewtopic_body.html | 51 | ||||
-rw-r--r-- | phpBB/viewforum.php | 10 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 16 |
6 files changed, 86 insertions, 32 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 254cd88625..e28daa9aef 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -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'])) { - $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; } } @@ -785,28 +786,29 @@ 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']), 'RANK_IMG' => $rank_img, - - 'JOINED' => $user->format_date($data['user_regdate'], $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, - 'PM_IMG' => $pm_img, - 'PM' => $pm, 'EMAIL_IMG' => $email_img, - 'EMAIL' => $email, 'WWW_IMG' => $www_img, - 'WWW' => $www, 'ICQ_STATUS_IMG'=> $icq_status_img, 'ICQ_IMG' => $icq_img, - 'ICQ' => $icq, 'AIM_IMG' => $aim_img, - 'AIM' => $aim, 'MSN_IMG' => $msn_img, - 'MSN' => $msn, 'YIM_IMG' => $yim_img, - 'YIM' => $yim, - 'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false + 'JOINED' => $user->format_date($data['user_regdate'], $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, + + 'RANK' => $rank_title, + 'PM' => $pm, + 'EMAIL' => $email, + 'WWW' => $www, + 'ICQ' => $icq, + 'AIM' => $aim, + 'MSN' => $msn, + 'YIM' => $yim, + + 'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false ); return $template_vars; diff --git a/phpBB/templates/subSilver/memberlist_view.html b/phpBB/templates/subSilver/memberlist_view.html index 03f540b4bd..c98041845f 100644 --- a/phpBB/templates/subSilver/memberlist_view.html +++ b/phpBB/templates/subSilver/memberlist_view.html @@ -19,12 +19,21 @@ <tr> <td class="gen" align="center"><!-- IF USER_COLOR neq '' --><b style="color: #{USER_COLOR}"><!-- ELSE --><b><!-- ENDIF -->{USERNAME}</b></td> </tr> + <!-- IF RANK --> + <tr> + <td class="postdetails" align="center">{RANK}</td> + </tr> + <!-- ENDIF --> + <!-- IF RANK_IMG --> <tr> <td align="center">{RANK_IMG}</td> </tr> + <!-- ENDIF --> + <!-- IF AVATAR_IMG --> <tr> <td align="center">{AVATAR_IMG}</td> </tr> + <!-- ENDIF --> <tr> <td align="center">{ONLINE_IMG}</td> </tr> diff --git a/phpBB/templates/subSilver/viewforum_body.html b/phpBB/templates/subSilver/viewforum_body.html index 9326561eea..4536399f64 100644 --- a/phpBB/templates/subSilver/viewforum_body.html +++ b/phpBB/templates/subSilver/viewforum_body.html @@ -35,7 +35,7 @@ <!-- IF S_TOPIC_ICONS --> <td class="cat" colspan="7"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> - <td class="nav" valign="middle"> {S_WATCH_FORUM}</td> + <td class="nav" valign="middle"> <!-- 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> </td> </tr> </table></td> diff --git a/phpBB/templates/subSilver/viewtopic_body.html b/phpBB/templates/subSilver/viewtopic_body.html index 4910515f50..5632c4c658 100644 --- a/phpBB/templates/subSilver/viewtopic_body.html +++ b/phpBB/templates/subSilver/viewtopic_body.html @@ -85,18 +85,48 @@ <th width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th> <th nowrap="nowrap">{L_MESSAGE}</th> </tr> + <!-- BEGIN postrow --> + <!-- IF postrow.S_ROW_COUNT is even --> <tr class="row1"> <!-- ELSE --> <tr class="row2"> <!-- ENDIF --> - <!-- IF postrow.S_BELOW_MIN_KARMA --> - <td colspan="2" height="25" align="center"><span class="gensmall">{postrow.L_IGNORE_POST}</span></td> - <!-- ELSEIF postrow.S_WRONG_ENCODING --> - <td colspan="2" height="25" align="center"><span class="gensmall">{postrow.L_IGNORE_POST}</span></td> + + <!-- IF postrow.S_IGNORE_POST --> + <td class="gensmall" colspan="2" height="25" align="center">{postrow.L_IGNORE_POST}</td> <!-- 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"> <tr> <td>{postrow.POST_ICON_IMG} </td> @@ -106,16 +136,21 @@ </tr> </table></td> </tr> + <!-- IF postrow.S_ROW_COUNT is even --> <tr class="row1"> <!-- ELSE --> <tr class="row2"> <!-- ENDIF --> + <td><table width="100%" cellspacing="0" cellpadding="5" border="0"> <tr> <td height="120" valign="top"><table width="100%" cellspacing="0" cellpadding="2"> <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> </table></td> </tr> @@ -143,11 +178,13 @@ </tr> </table></td> </tr> + <!-- IF postrow.S_ROW_COUNT is even --> <tr class="row1"> <!-- ELSE --> <tr class="row2"> <!-- ENDIF --> + <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"> <tr> @@ -166,7 +203,9 @@ <tr> <td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td> </tr> + <!-- END postrow --> + <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} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="liteoption" type="submit" value="{L_GO}" name="sort" /></td> </form></tr> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 12b72b5bae..cd3b6ee532 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -187,8 +187,12 @@ if ($forum_data['forum_type'] == FORUM_POST) // Forum rules, subscription info and word censors $s_watching_forum = $s_watching_forum_img = ''; - $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); + + if ($config['email_enable'] && $config['allow_forum_notify']) + { + $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); + } $s_forum_rules = ''; gen_forum_rules('forum', $forum_id); @@ -549,7 +553,7 @@ if ($forum_data['forum_type'] == FORUM_POST) // after reading a topic if ($user->data['user_id'] != ANONYMOUS && $update_forum) { - markread('mark', $forum_id, false, time()); + markread('mark', $forum_id); } } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 326ccca9d6..f9b25b6e8c 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -250,7 +250,7 @@ if ($topic_attachment) // Are we watching this topic? $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); } @@ -617,7 +617,7 @@ $force_encoding = ''; $bbcode_bitfield = $i = 0; // 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 WHERE p.topic_id = $topic_id " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1') . " @@ -652,7 +652,7 @@ do $rowset[] = array( 'post_id' => $row['post_id'], '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'], 'topic_id' => $row['topic_id'], 'forum_id' => $row['forum_id'], @@ -893,8 +893,8 @@ foreach ($rowset as $key => $row) if (!empty($row['below_karma'])) { $template->assign_block_vars('postrow', array( - 'S_BELOW_MIN_KARMA' => true, - 'S_ROW_COUNT' => $i++, + 'S_IGNORE_POST' => true, + 'S_ROW_COUNT' => $i++, 'L_IGNORE_POST' => sprintf($user->lang['POST_BELOW_KARMA'], $row['poster'], intval($row['user_karma']), '<a href="viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '&view=karma#' . $row['post_id'] . '">', '</a>')) ); @@ -910,10 +910,10 @@ foreach ($rowset as $key => $row) else { $template->assign_block_vars('postrow', array( - 'S_WRONG_ENCODING' => true, - 'S_ROW_COUNT' => $i++, + 'S_IGNORE_POST' => true, + 'S_ROW_COUNT' => $i++, - 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '&view=encoding#' . $row['post_id'] . '">', '</a>')) + 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '&view=encoding#' . $row['post_id'] . '">', '</a>')) ); continue; |