mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
Various updates, changed jump to first unread as per Ashe's suggestion/request ... hope people don't start linking to it making me regret reverting to this implementation :D Moved many decisions on what icons to output to templates ... feedback wrt any performance impacts happily accepted.
git-svn-id: file:///svn/phpbb/trunk@4051 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
79eeeb0b7c
commit
2a896ad260
@ -1157,7 +1157,7 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||
trigger_error($user->lang['NO_TOPIC']);
|
||||
}
|
||||
|
||||
$forum_id = intval($row['forum_id']);
|
||||
$forum_id = $row['forum_id'];
|
||||
$topic_title = $row['topic_title'];
|
||||
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
@ -1234,18 +1234,24 @@ function topic_review($topic_id, $is_inline_review = false)
|
||||
}
|
||||
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'MINI_POST_IMG' => $user->img('icon_post', $user->lang['POST']),
|
||||
'POSTER_NAME' => $poster,
|
||||
'POST_DATE' => $user->format_date($row['post_time']),
|
||||
'POST_SUBJECT' => $post_subject,
|
||||
'POST_ID' => $row['post_id'],
|
||||
'MESSAGE' => nl2br($message),
|
||||
'MINI_POST_IMG' => $user->img('icon_post', $user->lang['POST']),
|
||||
'POSTER_NAME' => $poster,
|
||||
'POST_DATE' => $user->format_date($row['post_time']),
|
||||
'POST_SUBJECT' => $post_subject,
|
||||
'POST_ID' => $row['post_id'],
|
||||
'MESSAGE' => str_replace("\n", '<br />', $message),
|
||||
|
||||
'U_QUOTE' => ($auth->acl_get('f_quote', $forum_id)) ? "javascript:addquote(" . $row['post_id'] . ", '$poster')" : '',
|
||||
|
||||
'S_ROW_COUNT' => $i)
|
||||
);
|
||||
unset($rowset[$i]);
|
||||
}
|
||||
|
||||
//
|
||||
$template->assign_var('QUOTE_IMG', $user->img('btn_quote', $user->lang['QUOTE_POST']));
|
||||
|
||||
//
|
||||
page_header($page_title);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
@ -72,7 +72,7 @@ function addquote(post_id, username) {
|
||||
<td height="28" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%">{postrow.MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
|
||||
<td valign="top" align="right" nowrap="nowrap"><input type="button" class="button" name="addquote" value="{L_QUOTE}" style="width: 50px" onClick="addquote({postrow.POST_ID}, '{postrow.POSTER_NAME}');" /></td>
|
||||
<td valign="top" align="right" nowrap="nowrap"><!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><hr /></td>
|
||||
|
@ -2,21 +2,21 @@
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td align="left" valign="bottom"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><br /><!-- IF S_IS_POSTABLE --><!-- IF MODERATORS neq '' --><span class="gensmall"><b>{L_MODERATORS}: {MODERATORS}</b></span><!-- ENDIF --><!-- ENDIF --></td>
|
||||
<td colspan="2"><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><!-- IF S_IS_POSTABLE --><!-- IF MODERATORS neq ''--><br /><b class="gensmall">{L_MODERATORS}: {MODERATORS}</b><!-- ENDIF --><!-- ENDIF --></td>
|
||||
<td class="gensmall" align="right" valign="bottom"><!-- IF S_IS_POSTABLE -->{MOD_CP}<!-- ENDIF --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gensmall" valign="bottom"><b>{LOGGED_IN_USER_LIST}</b></td>
|
||||
<td class="gensmall" align="right" valign="bottom" nowrap="nowrap"><b>{PAGINATION}</b></td>
|
||||
<td class="nav" valign="middle" nowrap="nowrap">{PAGE_NUMBER}</td>
|
||||
<td class="gensmall" nowrap="nowrap">[ {TOTAL_TOPICS} ] </td>
|
||||
<td class="gensmall" width="100%" align="right" nowrap="nowrap"><b>{PAGINATION}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- IF S_IS_POSTABLE -->
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<td width="50" align="left" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td class="gensmall" align="right" valign="bottom" nowrap="nowrap"><!-- IF S_IS_POSTABLE --><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a><!-- ENDIF --></td>
|
||||
<td width="10" align="left" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
@ -27,6 +27,19 @@
|
||||
|
||||
<!-- IF S_IS_POSTABLE -->
|
||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<!-- 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" align="right" valign="middle"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<!-- ELSE -->
|
||||
<td class="cat" colspan="6"></td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<!-- IF S_TOPIC_ICONS -->
|
||||
<th colspan="3" height="25" align="center" nowrap="nowrap"> {L_TOPICS} </th>
|
||||
@ -38,7 +51,9 @@
|
||||
<th width="50" align="center" nowrap="nowrap"> {L_VIEWS} </th>
|
||||
<th align="center" nowrap="nowrap"> {L_LAST_POST} </th>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN topicrow -->
|
||||
|
||||
<!-- IF topicrow.S_TOPIC_TYPE_SWITCH eq 1 -->
|
||||
<tr>
|
||||
<td class="row3" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><b class="gensmall">{L_ANNOUNCEMENTS}</b></td>
|
||||
@ -48,29 +63,31 @@
|
||||
<td class="row3" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><b class="gensmall">{L_TOPICS}</b></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<tr>
|
||||
<td class="row1" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
|
||||
<td class="row1" width="25" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
|
||||
<!-- IF S_TOPIC_ICONS -->
|
||||
<td class="row1" align="center" valign="middle">{topicrow.TOPIC_ICON_IMG}</td>
|
||||
<td class="row1" width="25" align="center" valign="middle">{topicrow.TOPIC_ICON_IMG}</td>
|
||||
<!-- ENDIF -->
|
||||
<td class="row1" width="100%">
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_TOPIC_REPORTED -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr align="left" valign="middle">
|
||||
<td><!-- IF topicrow.S_TOPIC_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a> <!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a> <!-- ENDIF --></td>
|
||||
<td width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.ATTACH_ICON_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.ATTACH_ICON_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</span>
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<td class="row1" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_TOPIC_REPORTED -->
|
||||
<td align="left" valign="middle">
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a> <!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a> <!-- ENDIF -->
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
<td width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.ATTACH_ICON_IMG}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td class="row2" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
|
||||
<td class="row1" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
|
||||
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
|
||||
<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGINELSE -->
|
||||
|
||||
<tr>
|
||||
<!-- IF S_TOPIC_ICONS -->
|
||||
<td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
|
||||
@ -79,23 +96,42 @@
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- END topicrow -->
|
||||
|
||||
<tr align="center"><form method="post" action="{S_TOPIC_ACTION}">
|
||||
<!-- IF S_TOPIC_ICONS --><td class="cat" colspan="8" height="28"><!-- ELSE --><td class="cat" colspan="7" height="28"><!-- ENDIF --><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input type="submit" class="liteoption" value="{L_GO}" name="sort" /></td>
|
||||
<!-- IF S_TOPIC_ICONS --><td class="cat" colspan="8" height="28"><!-- ELSE --><td class="cat" colspan="7" height="28"><!-- ENDIF --><span class="gensmall">{L_DISPLAY_TOPICS}:</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" name="sort" value="{L_GO}" /></td>
|
||||
</form></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<td align="left" width="50" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="left"><span class="nav">{PAGE_NUMBER}</span> <span class="gensmall">[ {TOTAL_TOPICS} ]</span></td>
|
||||
<td class="nav" align="right" nowrap="nowrap">{S_WATCH_FORUM}</td>
|
||||
<td colspan="3"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="nav" nowrap="nowrap">{PAGE_NUMBER}</td>
|
||||
<td class="gensmall" nowrap="nowrap"> [ {TOTAL_TOPICS} ]</td>
|
||||
<td class="nav" width="100%" align="right" valign="bottom" nowrap="nowrap">{PAGINATION}</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<br clear="all" />
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<td class="cat"><span class="cattitle">{L_WHO_IS_ONLINE}</span></td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
<td class="gensmall" align="left">{LOGGED_IN_USER_LIST}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
|
||||
|
@ -6,15 +6,20 @@
|
||||
<td class="gensmall" align="right" valign="bottom">{MCP}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="gensmall" valign="bottom"><b>{LOGGED_IN_USER_LIST}</b></td>
|
||||
<td class="gensmall" align="right" valign="bottom" nowrap="nowrap"><b>{PAGINATION}</b></td>
|
||||
<td colspan="2"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="nav" nowrap="nowrap">{PAGE_NUMBER}</td>
|
||||
<td class="gensmall" nowrap="nowrap"> [ {TOTAL_POSTS} ]</td>
|
||||
<td class="nav" width="100%" align="right" valign="bottom" nowrap="nowrap">{PAGINATION}</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0">
|
||||
<table width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<td align="left" valign="middle" nowrap="nowrap"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a> <a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -22,8 +27,8 @@
|
||||
<tr align="right">
|
||||
<td class="cat" colspan="2" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><span class="nav"> <a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a> :: <a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a></span></td>
|
||||
<td align="right"><span class="nav"><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> :: <a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> </span></td>
|
||||
<td class="nav" nowrap="nowrap"> <!-- IF S_WATCH_TOPIC -->{S_WATCH_TOPIC} | <!-- ENDIF --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a> | <a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a></td>
|
||||
<td class="nav" align="right" nowrap="nowrap"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> | <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> | <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
@ -86,17 +91,18 @@
|
||||
<!-- ELSE -->
|
||||
<tr class="row2">
|
||||
<!-- ENDIF -->
|
||||
<!-- IF postrow.S_BELOW_MIN_KARMA -->
|
||||
<!-- 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 -->
|
||||
<!-- ELSEIF postrow.S_WRONG_ENCODING -->
|
||||
<td colspan="2" height="25" align="center"><span class="gensmall">{postrow.L_IGNORE_POST}</span></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 /><br />{L_JOINED}: {postrow.POSTER_JOINED}<!-- IF postrow.POSTER_POSTS --><br />{L_POSTS}: {postrow.POSTER_POSTS}<!-- ENDIF --><!-- IF postrow.POSTER_FROM --><br />{L_LOCATION}: {postrow.POSTER_FROM}<!-- ENDIF --></span></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 width="100%" height="28"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>{postrow.POST_ICON} </td>
|
||||
<td class="gensmall" width="100%" valign="middle"><b>{L_POST_SUBJECT}:</b> {postrow.POST_SUBJECT}</td>
|
||||
<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
|
||||
<td>{postrow.POST_ICON_IMG} </td>
|
||||
<td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b> </td>
|
||||
<td class="gensmall" width="100%" valign="middle">{postrow.POST_SUBJECT}</td>
|
||||
<td valign="top" nowrap="nowrap"> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_IP --><a href="{postrow.U_IP}">{IP_IMG}</a> <!-- ENDIF --></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
@ -114,7 +120,7 @@
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><table width="100%" cellspacing="0" cellpadding="0" border="0" >
|
||||
<td><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr valign="middle">
|
||||
<!-- IF postrow.S_POST_UNAPPROVED -->
|
||||
<td width="5">{UNAPPROVED_IMG}</td>
|
||||
@ -124,7 +130,14 @@
|
||||
<td width="5">{REPORTED_IMG}</td>
|
||||
<td class="gensmall" nowrap="nowrap"> <b><a style="color:red" href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></b> </td>
|
||||
<!-- ENDIF -->
|
||||
<td align="right" nowrap="nowrap"><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><span class="gensmall"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td>
|
||||
<td width="100%"> </td>
|
||||
<td width="10" nowrap="nowrap"><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a></td>
|
||||
<td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td>
|
||||
<!-- IF not postrow.S_POST_REPORTED -->
|
||||
<!-- IF postrow.U_REPORT -->
|
||||
<td> <a href="{postrow.U_REPORT}">{REPORT_IMG}</a></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
@ -138,18 +151,17 @@
|
||||
<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>
|
||||
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
|
||||
<td valign="middle" nowrap="nowrap"><!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_WWW --><a href="{postrow.U_WWW}" target="_userwww">{WWW_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_AIM --><a href="{postrow.U_AIM}">{AIM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_YIM --><a href="{postrow.U_YIM}">{YIM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_MSN --><a href="{postrow.U_MSN}">{MSN_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_JABBER --><a href="{postrow.U_JABBER}">{JABBER_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_ICQ --><script language="JavaScript" type="text/javascript"><!--
|
||||
|
||||
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 )
|
||||
document.write(' {postrow.ICQ_IMG}');
|
||||
document.write(' <a href="{postrow.U_ICQ}">{ICQ_IMG}</a>');
|
||||
else
|
||||
document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
|
||||
document.write('</td><td> </td><td width="100%" valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute"><a href="{postrow.U_ICQ}">{ICQ_IMG}</a></div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
|
||||
|
||||
//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
|
||||
<td width="100%" align="right" nowrap="nowrap"><!-- span class="gensmall">{postrow.RATING}</span --><!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a><!-- ENDIF !--></td>
|
||||
//--></script><noscript><a href="{postrow.U_ICQ}">{ICQ_IMG}</a></noscript><!-- ENDIF --></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||
@ -160,18 +172,36 @@
|
||||
</form></tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<td align="left" valign="middle" nowrap="nowrap"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a> <a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"> <a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> -> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></td>
|
||||
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="left"><span class="nav">{PAGE_NUMBER}</span> <span class="gensmall">[ {TOTAL_POSTS} ]</span></td>
|
||||
<td class="nav" nowrap="nowrap">{S_WATCH_TOPIC}</td>
|
||||
<td colspan="3"><table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="nav" nowrap="nowrap">{PAGE_NUMBER}</td>
|
||||
<td class="gensmall" nowrap="nowrap"> [ {TOTAL_POSTS} ]</td>
|
||||
<td class="nav" width="100%" align="right" valign="bottom" nowrap="nowrap">{PAGINATION}</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<br clear="all" />
|
||||
|
||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<td class="cat"><span class="cattitle">{L_WHO_IS_ONLINE}</span></td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
<td class="gensmall" align="left">{LOGGED_IN_USER_LIST}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<table width="100%" cellspacing="2" border="0" align="center">
|
||||
|
@ -25,18 +25,16 @@ include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
|
||||
// Start initial var setup
|
||||
$forum_id = (isset($_REQUEST['f'])) ? max(intval($_REQUEST['f']), 0) : 0;
|
||||
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
||||
$mark_read = (!empty($_GET['mark'])) ? $_GET['mark'] : '';
|
||||
|
||||
|
||||
// Start session
|
||||
$user->start();
|
||||
$auth->acl($user->data);
|
||||
|
||||
|
||||
// Put these here so we can use user defaults if set
|
||||
// Start initial var setup
|
||||
$forum_id = (isset($_REQUEST['f'])) ? max(intval($_REQUEST['f']), 0) : 0;
|
||||
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
||||
$mark_read = (!empty($_GET['mark'])) ? htmlspecialchars($_GET['mark']) : '';
|
||||
|
||||
$sort_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : ((!empty($user->data['user_show_days'])) ? $user->data['user_show_days'] : 0);
|
||||
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : ((!empty($user->data['user_sortby_type'])) ? $user->data['user_sortby_type'] : 't');
|
||||
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : ((!empty($user->data['user_sortby_dir'])) ? $user->data['user_sortby_dir'] : 'd');
|
||||
@ -171,7 +169,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||
|
||||
meta_refresh(3, "viewforum.$phpEx$SID&f=$forum_id");
|
||||
|
||||
$message = $user->lang['TOPICS_MARKED_READ'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . "viewforum.$phpEx$SID&f=$forum_id" . '">', '</a> ');
|
||||
$message = $user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . "viewforum.$phpEx$SID&f=$forum_id" . '">', '</a> ');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
@ -415,7 +413,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||
}
|
||||
|
||||
|
||||
$newest_post_img = ($unread_topic) ? "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&view=unread\">" . $user->img('icon_post_newest', 'VIEW_NEWEST_POST') . '</a> ' : '';
|
||||
$newest_post_img = ($unread_topic) ? "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&view=unread#unread\">" . $user->img('icon_post_newest', 'VIEW_NEWEST_POST') . '</a> ' : '';
|
||||
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
||||
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
|
||||
|
||||
|
@ -49,6 +49,7 @@ if (!$topic_id && !$post_id)
|
||||
|
||||
|
||||
// Find topic id if user requested a newer or older topic
|
||||
$unread_post_id = '';
|
||||
if (isset($_GET['view']) && !$post_id)
|
||||
{
|
||||
if ($_GET['view'] == 'unread')
|
||||
@ -94,21 +95,21 @@ if (isset($_GET['view']) && !$post_id)
|
||||
$message = $user->lang['NO_UNREAD_POSTS'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id\">", '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
redirect("viewtopic.$phpEx$SID&p=" . $row['post_id'] . "#" . $row['post_id']);
|
||||
$unread_post_id = $post_id = $row['post_id'];
|
||||
}
|
||||
|
||||
redirect("index.$phpEx$SID");
|
||||
}
|
||||
else if ($_GET['view'] == 'next' || $_GET['view'] == 'previous')
|
||||
{
|
||||
$sql_condition = ($_GET['view'] == 'next') ? '>' : '<';
|
||||
$sql_ordering = ($_GET['view'] == 'next') ? 'ASC' : 'DESC';
|
||||
|
||||
$sql = "SELECT t.topic_id
|
||||
FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . TOPICS_TABLE . " t2
|
||||
WHERE t2.topic_id = $topic_id
|
||||
AND t.forum_id = t2.forum_id
|
||||
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
|
||||
AND t.topic_last_post_time $sql_condition t2.topic_last_post_time
|
||||
ORDER BY t.topic_last_post_time $sql_ordering";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@ -175,11 +176,15 @@ if ($user->data['user_id'] != ANONYMOUS)
|
||||
|
||||
|
||||
|
||||
// Note2: after much inspection, having to find a valid forum_id when making return_to_topic links for global announcements in mcp is a pain. The easiest solution is to let admins choose under what forum topics should be seen when forum_id is not specified (preferably a public forum)
|
||||
// Note2: after much inspection, having to find a valid forum_id when making return_to_topic links
|
||||
// for global announcements in mcp is a pain. The easiest solution is to let admins choose under
|
||||
// what forum topics should be seen when forum_id is not specified (preferably a public forum)
|
||||
if (!$forum_id)
|
||||
{
|
||||
$forum_id = 2;
|
||||
}
|
||||
|
||||
|
||||
$sql = 'SELECT t.topic_id, t.forum_id AS real_forum_id, t.topic_title, t.topic_attachment, t.topic_status, ' . (($auth->acl_get('m_approve')) ? 't.topic_replies_real AS topic_replies' : 't.topic_replies') . ', t.topic_last_post_id, t.topic_time, t.topic_type, t.poll_max_options, t.poll_start, t.poll_length, t.poll_title, f.forum_name, f.forum_desc, f.forum_parents, f.parent_id, f.left_id, f.right_id, f.forum_status, f.forum_id, f.forum_style, f.forum_password' . $extra_fields . '
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f' . $join_sql_table . "
|
||||
WHERE $join_sql
|
||||
@ -233,18 +238,21 @@ if (!empty($post_id))
|
||||
$start = floor(($prev_posts - 1) / $config['posts_per_page']) * $config['posts_per_page'];
|
||||
}
|
||||
|
||||
|
||||
// Fill extension informations, if this topic has attachments
|
||||
$extensions = array();
|
||||
|
||||
if ($topic_attachment)
|
||||
{
|
||||
obtain_attach_extensions($extensions);
|
||||
}
|
||||
|
||||
|
||||
// Are we watching this topic?
|
||||
$s_watching_topic = '';
|
||||
$s_watching_topic_img = '';
|
||||
watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $user->data['user_id'], $topic_id, $notify_status);
|
||||
$s_watching_topic = $s_watching_topic_img = '';
|
||||
if ($config['email_enable'])
|
||||
{
|
||||
watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $user->data['user_id'], $topic_id, $notify_status);
|
||||
}
|
||||
|
||||
|
||||
// Post ordering options
|
||||
@ -424,10 +432,23 @@ $template->assign_vars(array(
|
||||
'MCP' => ($auth->acl_get('m_', $forum_id)) ? sprintf($user->lang['MCP'], "<a href=\"mcp.$phpEx?sid=" . $user->session_id . "&f=$forum_id&t=$topic_id&start=$start&$u_sort_param&posts_per_page=" . $config['posts_per_page'] . '">', '</a>') : '',
|
||||
'MODERATORS' => (sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
|
||||
|
||||
'POST_IMG' => $post_img,
|
||||
'REPLY_IMG' => $reply_img,
|
||||
'REPORT_IMG' => $user->img('btn_report', $user->lang['REPORT_TO_ADMIN']),
|
||||
|
||||
'POST_IMG' => $post_img,
|
||||
'REPLY_IMG' => $reply_img,
|
||||
'QUOTE_IMG' => $user->img('btn_quote', $user->lang['QUOTE_POST']),
|
||||
'EDIT_IMG' => $user->img('btn_edit', $user->lang['EDIT_POST']),
|
||||
'DELETE_IMG' => $user->img('btn_delete', $user->lang['DELETE_POST']),
|
||||
'IP_IMG' => $user->img('btn_ip', $user->lang['VIEW_IP']),
|
||||
'PROFILE_IMG' => $user->img('btn_profile', $user->lang['READ_PROFILE']),
|
||||
'SEARCH_IMG' => $user->img('btn_search', $user->lang['SEARCH_USER_POSTS']),
|
||||
'PM_IMG' => $user->img('btn_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
|
||||
'EMAIL_IMG' => $user->img('btn_email', $user->lang['SEND_EMAIL']),
|
||||
'WWW_IMG' => $user->img('btn_www', $user->lang['VISIT_WEBSITE']),
|
||||
'ICQ_IMG' => $user->img('btn_icq', $user->lang['ICQ']),
|
||||
'AIM_IMG' => $user->img('btn_aim', $user->lang['AIM']),
|
||||
'MSN_IMG' => $user->img('btn_msnm', $user->lang['MSNM']),
|
||||
'YIM_IMG' => $user->img('btn_yim', $user->lang['YIM']) ,
|
||||
'JABBER_IMG' => $user->img('btn_jabber', $user->lang['JABBER']) ,
|
||||
'REPORT_IMG' => $user->img('btn_report', $user->lang['REPORT_POST']),
|
||||
'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_BEEN_REPORTED']),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_NOT_BEEN_APPROVED']),
|
||||
|
||||
@ -444,7 +465,7 @@ $template->assign_vars(array(
|
||||
|
||||
'U_TOPIC' => $server_path . "viewtopic.$phpEx?f=$forum_id&t=$topic_id",
|
||||
'U_FORUM' => $server_path,
|
||||
'U_VIEW_UNREAD_POST' => "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&view=unread",
|
||||
'U_VIEW_UNREAD_POST' => "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&view=unread#unread",
|
||||
'U_VIEW_TOPIC' => "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&start=$start&$u_sort_param&hilit=$highlight",
|
||||
'U_VIEW_FORUM' => $view_forum_url,
|
||||
'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,
|
||||
@ -456,12 +477,11 @@ $template->assign_vars(array(
|
||||
'U_POST_REPLY_TOPIC' => $reply_topic_url)
|
||||
);
|
||||
|
||||
|
||||
// Does this topic contain a poll?
|
||||
if (!empty($poll_start))
|
||||
{
|
||||
$sql = "SELECT *
|
||||
FROM " . POLL_OPTIONS_TABLE . "
|
||||
$sql = 'SELECT *
|
||||
FROM ' . POLL_OPTIONS_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
ORDER BY poll_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
@ -474,8 +494,8 @@ if (!empty($poll_start))
|
||||
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
$sql = "SELECT poll_option_id
|
||||
FROM " . POLL_VOTES_TABLE . "
|
||||
$sql = 'SELECT poll_option_id
|
||||
FROM ' . POLL_VOTES_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
AND vote_user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
@ -584,8 +604,8 @@ if (!empty($poll_start))
|
||||
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
|
||||
'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
|
||||
|
||||
'L_MAX_VOTES' => ($poll_max_options == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $poll_max_options),
|
||||
'L_POLL_LENGTH' => ($poll_length) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_length + $poll_start)) : '',
|
||||
'L_MAX_VOTES' => ($poll_max_options == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $poll_max_options),
|
||||
'L_POLL_LENGTH' => ($poll_length) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_length + $poll_start)) : '',
|
||||
|
||||
'S_HAS_POLL' => true,
|
||||
'S_CAN_VOTE' => $s_can_vote,
|
||||
@ -593,7 +613,7 @@ if (!empty($poll_start))
|
||||
'S_IS_MULTI_CHOICE' => ($poll_max_options > 1) ? true : false,
|
||||
'S_POLL_ACTION' => "viewtopic.$phpEx$SID&t=$topic_id&$u_sort_param",
|
||||
|
||||
'U_VIEW_RESULTS' => "viewtopic.$phpEx$SID&t=$topic_id&$u_sort_param&vote=viewresult")
|
||||
'U_VIEW_RESULTS' => "viewtopic.$phpEx$SID&t=$topic_id&$u_sort_param&vote=viewresult")
|
||||
);
|
||||
|
||||
unset($poll_info);
|
||||
@ -608,7 +628,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_regdate, u.user_msnm, u.user_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_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') . "
|
||||
@ -693,22 +713,14 @@ do
|
||||
'rank_image' => '',
|
||||
'sig' => '',
|
||||
'posts' => '',
|
||||
'profile_img' => '',
|
||||
'profile' => '',
|
||||
'pm_img' => '',
|
||||
'pm' => '',
|
||||
'email_img' => '',
|
||||
'email' => '',
|
||||
'www_img' => '',
|
||||
'www' => '',
|
||||
'icq_status_img'=> '',
|
||||
'icq_img' => '',
|
||||
'icq' => '',
|
||||
'aim_img' => '',
|
||||
'aim' => '',
|
||||
'msn_img' => '',
|
||||
'msn' => '',
|
||||
'search_img' => '',
|
||||
'search' => ''
|
||||
);
|
||||
}
|
||||
@ -728,42 +740,29 @@ do
|
||||
$user_sig = ($row['user_allowsmile'] || $config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_sig) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_sig);
|
||||
}
|
||||
|
||||
$profile_url = "memberlist.$phpEx$SID&mode=viewprofile&u=$poster_id";
|
||||
$pm_url = "ucp.$phpEx$SID&mode=message&action=send&u=$poster_id";
|
||||
$aim_url = "memberlist.$phpEx$SID&mode=contact&action=aim&u=$poster_id";
|
||||
$msn_url = "memberlist.$phpEx$SID&mode=contact&action=msnm&u=$poster_id";
|
||||
$yim_url = 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg';
|
||||
$search_url = "search.$phpEx$SID&search_author=" . urlencode($row['username']) .'&showresults=posts';
|
||||
|
||||
$user_cache[$poster_id] = array(
|
||||
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||
'posts' => (!empty($row['user_posts'])) ? $row['user_posts'] : '',
|
||||
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
||||
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||
'posts' => (!empty($row['user_posts'])) ? $row['user_posts'] : '',
|
||||
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
||||
|
||||
'sig' => $user_sig,
|
||||
'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
|
||||
'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
|
||||
'sig' => $user_sig,
|
||||
'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
|
||||
'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
|
||||
|
||||
'avatar' => '',
|
||||
'avatar' => '',
|
||||
|
||||
'profile_img' => '<a href="' . $profile_url . '">' . $user->img('btn_profile', $user->lang['READ_PROFILE']) . '</a>',
|
||||
'profile' => '<a href="' . $profile_url . '">' . $user->lang['READ_PROFILE'] . '</a>',
|
||||
'pm_img' => '<a href="' . $pm_url . '">' . $user->img('btn_pm', $user->lang['SEND_PRIVATE_MESSAGE']) . '</a>',
|
||||
'pm' => '<a href="' . $pm_url . '">' . $user->lang['SEND_PRIVATE_MESSAGE'] . '</a>',
|
||||
'www_img' => ($row['user_website']) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->img('btn_www', $user->lang['VISIT_WEBSITE']) . '</a>' : '',
|
||||
'www' => ($row['user_website']) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->lang['VISIT_WEBSITE'] . '</a>' : '',
|
||||
'aim_img' => ($row['user_aim']) ? '<a href="' . $aim_url . '">' . $user->img('btn_aim', $user->lang['AIM']) . '</a>' : '',
|
||||
'aim' => ($row['user_aim']) ? '<a href="' . $aim_url . '">' . $user->lang['AIM'] . '</a>' : '',
|
||||
'msn_img' => ($row['user_msnm']) ? '<a href="' . $msn_url . '">' . $user->img('btn_msnm', $user->lang['MSNM']) . '</a>' : '',
|
||||
'msn' => ($row['user_msnm']) ? '<a href="' . $msn_url . '">' . $user->lang['MSNM'] . '</a>' : '',
|
||||
'yim_img' => ($row['user_yim']) ? '<a href="' . $yim_url . '" target="_contact" onclick="im_popup(\'' . $yim_url . '\', 790, 350)">' . $user->img('btn_yim', $user->lang['YIM']) . '</a>' : '',
|
||||
'yim' => ($row['user_yim']) ? '<a href="' . $yim_url . '" target="_contact" onclick="im_popup(\'' . $yim_url . '\', 790, 350)">' . $user->lang['YIM'] . '</a>' : '',
|
||||
'search_img' => ($auth->acl_get('f_search', $forum_id)) ? '<a href="' . $search_url . '">' . $user->img('btn_search', $user->lang['SEARCH_USER_POSTS']) . '</a>' : '',
|
||||
'search' => ($auth->acl_get('f_search', $forum_id)) ? '<a href="' . $search_url . '">' . $user->lang['SEARCH_USER_POSTS'] . '</a>' : ''
|
||||
'profile' => "memberlist.$phpEx$SID&mode=viewprofile&u=$poster_id",
|
||||
'pm' => "ucp.$phpEx$SID&mode=message&action=send&u=$poster_id",
|
||||
'www' => $row['user_website'],
|
||||
'aim' => ($row['user_aim']) ? "memberlist.$phpEx$SID&mode=contact&action=aim&u=$poster_id" : '',
|
||||
'msn' => ($row['user_msnm']) ? "memberlist.$phpEx$SID&mode=contact&action=msnm&u=$poster_id" : '',
|
||||
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg' : '',
|
||||
'jabber' => ($row['user_jabber']) ? "memberlist.$phpEx$SID&mode=contact&action=jabber&u=$poster_id" : '',
|
||||
'search' => ($auth->acl_get('u_search')) ? "search.$phpEx$SID&search_author=" . urlencode($row['username']) .'&showresults=posts' : ''
|
||||
|
||||
);
|
||||
|
||||
if ($row['user_avatar_type'] && $auth->acl_get('u_setavatar') && $user->data['user_viewavatars'])
|
||||
if ($row['user_avatar_type'] && $user->data['user_viewavatars'])
|
||||
{
|
||||
switch ($row['user_avatar_type'])
|
||||
{
|
||||
@ -801,27 +800,21 @@ do
|
||||
|
||||
if ((!empty($row['user_allow_viewemail']) || $auth->acl_get('m_', $forum_id)) && $config['email_enable'])
|
||||
{
|
||||
$email_url = ($config['board_email_form']) ? "memberlist.$phpEx$SID&mode=email&u=" . $poster_id : 'mailto:' . $row['user_email'];
|
||||
$user_cache[$poster_id]['email_img'] = '<a href="' . $email_url . '">' . $user->img('btn_email', $user->lang['SEND_EMAIL']) . '</a>';
|
||||
$user_cache[$poster_id]['email'] = '<a href="' . $email_url . '">' . $user->lang['SEND_EMAIL'] . '</a>';
|
||||
$user_cache[$poster_id]['email'] = ($config['board_email_form']) ? "memberlist.$phpEx$SID&mode=email&u=" . $poster_id : 'mailto:' . $row['user_email'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_cache[$poster_id]['email_img'] = '';
|
||||
$user_cache[$poster_id]['email'] = '';
|
||||
}
|
||||
|
||||
if (!empty($row['user_icq']))
|
||||
{
|
||||
$icq_url = "memberlist.$phpEx$SID&mode=contact&action=icq&u=$poster_id";
|
||||
$user_cache[$poster_id]['icq_status_img'] = '<a href="' . $icq_url . '"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
|
||||
$user_cache[$poster_id]['icq_img'] = '<a href="' . $icq_url . '">' . $user->img('btn_icq', $user->lang['ICQ']) . '</a>';
|
||||
$user_cache[$poster_id]['icq'] = '<a href="' . $icq_url . '">' . $user->lang['ICQ'] . '</a>';
|
||||
$user_cache[$poster_id]['icq'] = "memberlist.$phpEx$SID&mode=contact&action=icq&u=$poster_id";
|
||||
$user_cache[$poster_id]['icq_status_img'] = '<a href="' . $user_cache[$poster_id]['icq'] . '"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_cache[$poster_id]['icq_status_img'] = '';
|
||||
$user_cache[$poster_id]['icq_img'] = '';
|
||||
$user_cache[$poster_id]['icq'] = '';
|
||||
}
|
||||
}
|
||||
@ -960,47 +953,6 @@ foreach ($rowset as $key => $row)
|
||||
$user_cache[$poster_id]['sig_parsed'] = TRUE;
|
||||
}
|
||||
|
||||
// Non-user specific images/text
|
||||
$temp_url = 'posting.' . $phpEx . $SID . '&mode=quote&p=' . $row['post_id'];
|
||||
$quote_img = '<a href="' . $temp_url . '">' . $user->img('btn_quote', $user->lang['REPLY_WITH_QUOTE']) . '</a>';
|
||||
$quote = '<a href="' . $temp_url . '">' . $user->lang['REPLY_WITH_QUOTE'] . '</a>';
|
||||
|
||||
if (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($post_time > time() - $config['edit_time'] || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id))
|
||||
{
|
||||
$temp_url = "posting.$phpEx$SID&mode=edit&f=" . $row['forum_id'] . "&p=" . $row['post_id'];
|
||||
$edit_img = '<a href="' . $temp_url . '">' . $user->img('btn_edit', $user->lang['EDIT_DELETE_POST']) . '</a>';
|
||||
$edit = '<a href="' . $temp_url . '">' . $user->lang['EDIT_DELETE_POST'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$edit_img = '';
|
||||
$edit = '';
|
||||
}
|
||||
|
||||
if ($auth->acl_get('m_ip', $forum_id))
|
||||
{
|
||||
$temp_url = "mcp.$phpEx?sid=" . $user->session_id . "&mode=post_details&p=" . $row['post_id'] . "&t=$topic_id#ip";
|
||||
$ip_img = '<a href="' . $temp_url . '">' . $user->img('btn_ip', $user->lang['VIEW_IP']) . '</a>';
|
||||
$ip = '<a href="' . $temp_url . '">' . $user->lang['VIEW_IP'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip_img = '';
|
||||
$ip = '';
|
||||
}
|
||||
|
||||
if (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id']) || $auth->acl_get('m_delete', $forum_id))
|
||||
{
|
||||
$temp_url = "posting.$phpEx$SID&mode=delete&p=" . $row['post_id'];
|
||||
$delpost_img = '<a href="' . $temp_url . '">' . $user->img('btn_delete', $user->lang['DELETE_POST']) . '</a>';
|
||||
$delpost = '<a href="' . $temp_url . '">' . $user->lang['DELETE_POST'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$delpost_img = '';
|
||||
$delpost = '';
|
||||
}
|
||||
|
||||
|
||||
// Parse the message and subject
|
||||
$message = $row['post_text'];
|
||||
@ -1062,14 +1014,6 @@ foreach ($rowset as $key => $row)
|
||||
}
|
||||
|
||||
|
||||
// Define the little post icon
|
||||
$mini_post_img = ($row['post_time'] > $user->data['user_lastvisit'] && $row['post_time'] > $topic_last_read) ? $user->img('icon_post_new', $user->lang['New_post']) : $user->img('icon_post', $user->lang['Post']);
|
||||
|
||||
// Little post link and anchor name
|
||||
$mini_post_url = 'viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '#' . $row['post_id'];
|
||||
$u_post_id = (!empty($newest_post_id) && $newest_post_id == $row['post_id']) ? 'newest' : $row['post_id'];
|
||||
|
||||
|
||||
// Dump vars into template
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'POSTER_NAME' => $row['poster'],
|
||||
@ -1088,52 +1032,39 @@ foreach ($rowset as $key => $row)
|
||||
|
||||
'RATING' => $rating,
|
||||
|
||||
'MINI_POST_IMG' => $mini_post_img,
|
||||
'EDIT_IMG' => $edit_img,
|
||||
'EDIT' => $edit,
|
||||
'QUOTE_IMG' => $quote_img,
|
||||
'QUOTE' => $quote,
|
||||
'IP_IMG' => $ip_img,
|
||||
'IP' => $ip,
|
||||
'DELETE_IMG' => $delpost_img,
|
||||
'DELETE' => $delpost,
|
||||
'MINI_POST_IMG' => ($row['post_time'] > $user->data['user_lastvisit'] && $row['post_time'] > $topic_last_read) ? $user->img('icon_post_new', $user->lang['NEW_POST']) : $user->img('icon_post', $user->lang['POST']),
|
||||
'POST_ICON_IMG' => (!empty($row['icon_id'])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||
'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'],
|
||||
|
||||
'PROFILE_IMG' => $user_cache[$poster_id]['profile_img'],
|
||||
'PROFILE' => $user_cache[$poster_id]['profile'],
|
||||
'SEARCH_IMG' => $user_cache[$poster_id]['search_img'],
|
||||
'SEARCH' => $user_cache[$poster_id]['search'],
|
||||
'PM_IMG' => $user_cache[$poster_id]['pm_img'],
|
||||
'PM' => $user_cache[$poster_id]['pm'],
|
||||
'EMAIL_IMG' => $user_cache[$poster_id]['email_img'],
|
||||
'EMAIL' => $user_cache[$poster_id]['email'],
|
||||
'WWW_IMG' => $user_cache[$poster_id]['www_img'],
|
||||
'WWW' => $user_cache[$poster_id]['www'],
|
||||
'ICQ_STATUS_IMG'=> $user_cache[$poster_id]['icq_status_img'],
|
||||
'ICQ_IMG' => $user_cache[$poster_id]['icq_img'],
|
||||
'ICQ' => $user_cache[$poster_id]['icq'],
|
||||
'AIM_IMG' => $user_cache[$poster_id]['aim_img'],
|
||||
'AIM' => $user_cache[$poster_id]['aim'],
|
||||
'MSN_IMG' => $user_cache[$poster_id]['msn_img'],
|
||||
'MSN' => $user_cache[$poster_id]['msn'],
|
||||
'YIM_IMG' => $user_cache[$poster_id]['yim_img'],
|
||||
'YIM' => $user_cache[$poster_id]['yim'],
|
||||
'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($post_time > time() - $config['edit_time'] || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? "posting.$phpEx$SID&mode=edit&f=" . $row['forum_id'] . "&p=" . $row['post_id'] : '',
|
||||
'U_QUOTE' => ($auth->acl_get('f_quote', $forum_id)) ? "posting.$phpEx$SID&mode=quote&p=" . $row['post_id'] : '',
|
||||
'U_IP' => ($auth->acl_get('m_ip', $forum_id)) ? "mcp.$phpEx?sid=" . $user->session_id . "&mode=post_details&p=" . $row['post_id'] . "&t=$topic_id#ip" : '',
|
||||
'U_DELETE' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id']) || $auth->acl_get('m_delete', $forum_id)) ? "posting.$phpEx$SID&mode=delete&p=" . $row['post_id'] : '',
|
||||
|
||||
'POST_ICON' => (!empty($row['icon_id'])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
|
||||
'U_PROFILE' => $user_cache[$poster_id]['profile'],
|
||||
'U_SEARCH' => $user_cache[$poster_id]['search'],
|
||||
'U_PM' => $user_cache[$poster_id]['pm'],
|
||||
'U_EMAIL' => $user_cache[$poster_id]['email'],
|
||||
'U_WWW' => $user_cache[$poster_id]['www'],
|
||||
'U_ICQ' => $user_cache[$poster_id]['icq'],
|
||||
'U_AIM' => $user_cache[$poster_id]['aim'],
|
||||
'U_MSN' => $user_cache[$poster_id]['msn'],
|
||||
'U_YIM' => $user_cache[$poster_id]['yim'],
|
||||
'U_JABBER' => $user_cache[$poster_id]['jabber'],
|
||||
|
||||
'L_MINI_POST_ALT' => $mini_post_alt,
|
||||
'U_REPORT' => "report.$phpEx$SID&p=" . $row['post_id'],
|
||||
'U_MCP_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? "mcp.$phpEx$SID&mode=post_details&p=" . $row['post_id'] : '',
|
||||
'U_MCP_APPROVE' => "mcp.$phpEx$SID&mode=approve&p=" . $row['post_id'],
|
||||
'U_MINI_POST' => "viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
||||
'U_POST_ID' => ($unread_post_id == $row['post_id']) ? 'unread' : $row['post_id'],
|
||||
|
||||
'S_ROW_COUNT' => $i++,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? TRUE : FALSE,
|
||||
'S_POST_UNAPPROVED' => ($row['post_approved']) ? FALSE : TRUE,
|
||||
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_', $forum_id)) ? TRUE : FALSE,
|
||||
|
||||
'U_REPORT' => "report.$phpEx$SID&p=" . $row['post_id'],
|
||||
'U_MCP_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? "mcp.$phpEx$SID&mode=post_details&p=" . $row['post_id'] : '',
|
||||
'U_MCP_APPROVE' => "mcp.$phpEx$SID&mode=approve&p=" . $row['post_id'],
|
||||
'U_MINI_POST' => $mini_post_url,
|
||||
'U_POST_ID' => $u_post_id)
|
||||
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_', $forum_id)) ? TRUE : FALSE)
|
||||
);
|
||||
|
||||
|
||||
// Process Attachments for this post
|
||||
if (sizeof($attachments[$row['post_id']]))
|
||||
{
|
||||
@ -1201,13 +1132,13 @@ foreach ($rowset as $key => $row)
|
||||
{
|
||||
$display_cat = NONE_CAT;
|
||||
|
||||
if (intval($config['img_display_inlined']))
|
||||
if ($config['img_display_inlined'])
|
||||
{
|
||||
if ( (intval($config['img_link_width']) != 0) || (intval($config['img_link_height']) != 0) )
|
||||
if ($config['img_link_width'] || $config['img_link_height'])
|
||||
{
|
||||
list($width, $height) = image_getdimension($filename);
|
||||
|
||||
$display_cat = (($width == 0) && ($height == 0)) ? IMAGE_CAT : ((($width <= intval($config['img_link_width'])) && ($height <= intval($config['img_link_height']))) ? IMAGE_CAT : NONE_CAT);
|
||||
$display_cat = (!$width && !$height) ? IMAGE_CAT : (($width <= $config['img_link_width'] && $height <=$config['img_link_height']) ? IMAGE_CAT : NONE_CAT);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1339,7 +1270,7 @@ unset($user_cache);
|
||||
// if this is the first 'page view'
|
||||
if (!preg_match("#&t=$topic_id#", $user->data['session_page']))
|
||||
{
|
||||
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . "
|
||||
SET topic_views = topic_views + 1
|
||||
WHERE topic_id = $topic_id";
|
||||
$db->sql_query($sql);
|
||||
@ -1347,9 +1278,9 @@ if (!preg_match("#&t=$topic_id#", $user->data['session_page']))
|
||||
// Update the attachment download counts
|
||||
if (count($update_count))
|
||||
{
|
||||
$sql = "UPDATE " . ATTACHMENTS_DESC_TABLE . "
|
||||
$sql = 'UPDATE ' . ATTACHMENTS_DESC_TABLE . '
|
||||
SET download_count = download_count + 1
|
||||
WHERE attach_id IN (" . implode(', ', array_unique($update_count)) . ")";
|
||||
WHERE attach_id IN (' . implode(', ', array_unique($update_count)) . ')';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user