Recent.template.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2011 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.1 Alpha 1
  11. */
  12. function template_main()
  13. {
  14. global $context, $settings, $options, $txt, $scripturl;
  15. echo '
  16. <div id="recent" class="main_section">
  17. <div class="pagesection">
  18. <div>', $txt['pages'], ': ', $context['page_index'], '</div>
  19. </div>';
  20. foreach ($context['posts'] as $post)
  21. {
  22. // This is far from ideal, but oh well - create buttons for the post.
  23. $button_set = array();
  24. if ($post['can_delete'])
  25. $button_set['delete'] = array('text' => 'remove', 'image' => 'delete.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['remove_message'] . '?\');"', 'url' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id']);
  26. if ($post['can_reply'])
  27. $button_set['reply'] = array('text' => 'reply', 'image' => 'reply_sm.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start']);
  28. if ($post['can_quote'])
  29. $button_set['quote'] = array('text' => 'reply_quote', 'image' => 'quote.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id']);
  30. if ($post['can_mark_notify'])
  31. $button_set['notify'] = array('text' => 'notify_replies', 'image' => 'notify_sm.gif', 'lang' => true, 'url' => $scripturl . '?action=notify;topic=' . $post['topic'] . '.' . $post['start']);
  32. echo '
  33. <table width="100%" cellpadding="4" cellspacing="1" border="0" class="bordercolor">
  34. <tr class="titlebg2">
  35. <td class="middletext">
  36. <div class="floatleft" style="width: 3ex;">&nbsp;', $post['counter'], '&nbsp;</div>
  37. <div class="floatleft">&nbsp;', $post['category']['link'], ' / ', $post['board']['link'], ' / <strong>', $post['link'], '</strong></div>
  38. <div class="righttext">&nbsp;', $txt['on'], ': ', $post['time'], '&nbsp;</div>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="catbg" colspan="3">
  43. <span class="middletext"> ', $txt['started_by'], ' ' . $post['first_poster']['link'] . ' - ' . $txt['last_post'] . ' ' . $txt['by'] . ' ' . $post['poster']['link'] . ' </span>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="windowbg2" colspan="3" valign="top" height="80">
  48. <div class="post">' . $post['message'] . '</div>
  49. </td>
  50. </tr>';
  51. // Are we using tabs?
  52. if (!empty($settings['use_tabs']))
  53. {
  54. echo '
  55. </table>';
  56. if (!empty($button_set))
  57. echo '
  58. <div class="readbuttons clearfix marginbottom">
  59. ', template_button_strip($button_set, 'top'), '
  60. </div>';
  61. }
  62. else
  63. {
  64. if (!empty($button_set))
  65. echo '
  66. <tr>
  67. <td class="catbg" colspan="3" align="right">
  68. <table><tr><td>
  69. ', template_button_strip($button_set, 'top'), '
  70. </td></tr></table>
  71. </td>
  72. </tr>';
  73. echo '
  74. </table>';
  75. }
  76. echo '
  77. <br />';
  78. }
  79. echo '
  80. <div class="pagesection">
  81. <div class="floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>
  82. </div>
  83. </div>';
  84. }
  85. function template_unread()
  86. {
  87. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  88. $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
  89. if ($showCheckboxes)
  90. echo '
  91. <div id="recent" class="main_content">
  92. <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
  93. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  94. <input type="hidden" name="qaction" value="markread" />
  95. <input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
  96. if ($settings['show_mark_read'])
  97. {
  98. // Generate the button strip.
  99. $mark_read = array(
  100. 'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']),
  101. );
  102. if ($showCheckboxes)
  103. $mark_read['markselectread'] = array(
  104. 'text' => 'quick_mod_markread',
  105. 'image' => 'markselectedread.gif',
  106. 'lang' => true,
  107. 'url' => 'javascript:document.quickModForm.submit();',
  108. );
  109. }
  110. echo '
  111. <div id="readbuttons_top" class="readbuttons clearfix margintop">
  112. <div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
  113. if (!empty($mark_read) && !empty($settings['use_tabs']))
  114. template_button_strip($mark_read, 'bottom');
  115. echo '
  116. </div>';
  117. echo '
  118. <table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor">
  119. <tr><td>
  120. <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
  121. <tr class="titlebg">';
  122. if (!empty($context['topics']))
  123. {
  124. echo '
  125. <td width="10%" colspan="2">&nbsp;</td>
  126. <td>
  127. <a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
  128. </td><td width="14%">
  129. <a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
  130. </td><td width="4%" align="center">
  131. <a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
  132. </td><td width="4%" align="center">
  133. <a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
  134. </td><td width="24%">
  135. <a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
  136. </td>';
  137. if ($showCheckboxes)
  138. echo '
  139. <td>
  140. <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
  141. </td>';
  142. }
  143. else
  144. echo '
  145. <td width="100%" colspan="7">', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '</td>';
  146. echo '
  147. </tr>';
  148. foreach ($context['topics'] as $topic)
  149. {
  150. // Do we want to separate the sticky and lock status out?
  151. if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
  152. $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
  153. if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
  154. $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
  155. echo '
  156. <tr>
  157. <td class="windowbg2" valign="middle" align="center" width="6%">
  158. <img src="' . $settings['images_url'] . '/topic/' . $topic['class'] . '.gif" alt="" />
  159. </td><td class="windowbg2" valign="middle" align="center" width="4%">
  160. <img src="' . $topic['first_post']['icon_url'] . '" alt="" align="middle" />
  161. </td><td class="windowbg', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '
  162. <img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '
  163. <img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], '</span></td>
  164. <td class="windowbg2" valign="middle" width="14%">
  165. ', $topic['first_post']['member']['link'], '</td>
  166. <td class="windowbg" valign="middle" width="4%" align="center">
  167. ', $topic['replies'], '</td>
  168. <td class="windowbg" valign="middle" width="4%" align="center">
  169. ', $topic['views'], '</td>
  170. <td class="windowbg2" valign="middle" width="22%">
  171. <a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" style="float: right;" /></a>
  172. <span class="smalltext">
  173. ', $topic['last_post']['time'], '<br />
  174. ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
  175. </span>
  176. </td>';
  177. if ($showCheckboxes)
  178. echo '
  179. <td class="windowbg2" valign="middle" align="center">
  180. <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
  181. </td>';
  182. echo '
  183. </tr>';
  184. }
  185. if (!empty($context['topics']) && !$context['showing_all_topics'])
  186. echo '
  187. <tr class="titlebg">
  188. <td colspan="', $showCheckboxes ? '8' : '7', '" align="right" class="middletext"><a href="', $scripturl, '?action=unread;all', $context['querystring_board_limits'], '">', $txt['unread_topics_all'], '</a></td>
  189. </tr>';
  190. if (empty($settings['use_tabs']) && !empty($mark_read))
  191. echo '
  192. <tr>
  193. <td class="catbg" colspan="', $showCheckboxes ? '8' : '7', '" align="right">
  194. <table><tr><td>
  195. ', template_button_strip($mark_read, 'top'), '
  196. </td></tr></table>
  197. </td>
  198. </tr>';
  199. echo '
  200. </table>
  201. </td></tr>
  202. </table>
  203. <div class="readbuttons clearfix marginbottom">
  204. <div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
  205. if (!empty($settings['use_tabs']) && !empty($mark_read))
  206. template_button_strip($mark_read, 'top');
  207. echo '
  208. </div>
  209. <br />';
  210. if ($showCheckboxes)
  211. echo '
  212. </form>';
  213. echo '
  214. <div class="tborder clearfix" id="topic_icons">
  215. <div class="titlebg2 clearfix">
  216. <div class="floatleft smalltext">
  217. <ul class="reset">
  218. ', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
  219. <li><img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '</li>' : '', '
  220. <li><img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt['normal_topic'] . '</li>
  221. <li><img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '</li>
  222. <li><img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '</li>
  223. </ul>
  224. </div>
  225. <div class="floatleft smalltext">
  226. <ul class="reset">
  227. <li><img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . '</li>' . ($modSettings['enableStickyTopics'] == '1' ? '
  228. <li><img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '</li>' : '') . ($modSettings['pollMode'] == '1' ? '
  229. <li><img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '</li>
  230. </ul>
  231. </div>
  232. </div>
  233. </div>';
  234. }
  235. function template_replies()
  236. {
  237. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  238. $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
  239. if ($showCheckboxes)
  240. echo '
  241. <div id="recent">
  242. <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
  243. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  244. <input type="hidden" name="qaction" value="markread" />
  245. <input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
  246. if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read']))
  247. {
  248. // Generate the button strip.
  249. $mark_read = array(
  250. 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  251. );
  252. if ($showCheckboxes)
  253. $mark_read['markselectread'] = array(
  254. 'text' => 'quick_mod_markread',
  255. 'image' => 'markselectedread.gif',
  256. 'lang' => true,
  257. 'url' => 'javascript:document.quickModForm.submit();',
  258. );
  259. }
  260. if (!empty($settings['use_tabs']))
  261. {
  262. echo '
  263. <div id="readbuttons_top" class="readbuttons clearfix margintop">
  264. <div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
  265. if (!empty($mark_read))
  266. template_button_strip($mark_read, 'bottom');
  267. echo '
  268. </div>';
  269. }
  270. echo '
  271. <table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor">
  272. <tr><td>
  273. <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
  274. <tr class="titlebg">';
  275. if (!empty($context['topics']))
  276. {
  277. echo '
  278. <td width="10%" colspan="2">&nbsp;</td>
  279. <td><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
  280. <td width="14%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
  281. <td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
  282. <td width="4%" align="center"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>
  283. <td width="24%"><a href="', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
  284. if ($showCheckboxes)
  285. echo '
  286. <td>
  287. <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
  288. </td>';
  289. }
  290. else
  291. echo '
  292. <td width="100%" colspan="7">' . $txt['msg_alert_none'] . '</td>';
  293. echo '
  294. </tr>';
  295. foreach ($context['topics'] as $topic)
  296. {
  297. // separate lock and sticky again?
  298. if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
  299. $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
  300. if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
  301. $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
  302. echo '
  303. <tr>
  304. <td class="windowbg2" valign="middle" align="center" width="6%">
  305. <img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" /></td>
  306. <td class="windowbg2" valign="middle" align="center" width="4%">
  307. <img src="', $topic['first_post']['icon_url'], '" alt="" align="middle" /></td>
  308. <td class="windowbg', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '3' : '', '" width="48%" valign="middle">
  309. ', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '', '
  310. ', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a> <span class="smalltext">', $topic['pages'], '
  311. ', $txt['in'], ' ', $topic['board']['link'], '</span></td>
  312. <td class="windowbg2" valign="middle" width="14%">
  313. ', $topic['first_post']['member']['link'], '</td>
  314. <td class="windowbg" valign="middle" width="4%" align="center">
  315. ', $topic['replies'], '</td>
  316. <td class="windowbg" valign="middle" width="4%" align="center">
  317. ', $topic['views'], '</td>
  318. <td class="windowbg2" valign="middle" width="22%">
  319. <a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" style="float: right;" /></a>
  320. <span class="smalltext">
  321. ', $topic['last_post']['time'], '<br />
  322. ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
  323. </span>
  324. </td>';
  325. if ($showCheckboxes)
  326. echo '
  327. <td class="windowbg2" valign="middle" align="center">
  328. <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
  329. </td>';
  330. echo '
  331. </tr>';
  332. }
  333. if (empty($settings['use_tabs']) && !empty($mark_read))
  334. echo '
  335. <tr>
  336. <td class="catbg" colspan="', $showCheckboxes ? '8' : '7', '" align="right">
  337. <table><tr><td>
  338. ', template_button_strip($mark_read, 'top'), '
  339. </td></tr></table>
  340. </td>
  341. </tr>';
  342. echo '
  343. </table>
  344. </td></tr>
  345. </table>
  346. <div class="readbuttons clearfix marginbottom">
  347. <div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], '</div>';
  348. if (!empty($settings['use_tabs']) && !empty($mark_read))
  349. template_button_strip($mark_read, 'top');
  350. echo '
  351. </div>
  352. <br />';
  353. if ($showCheckboxes)
  354. echo '
  355. </form>';
  356. echo '
  357. <div class="tborder clearfix" id="topic_icons">
  358. <div class="titlebg2 clearfix">
  359. <div class="floatleft smalltext">
  360. <ul class="reset">
  361. ', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
  362. <li><img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '</li>' : '', '
  363. <li><img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt['normal_topic'] . '</li>
  364. <li><img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '</li>
  365. <li><img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '</li>
  366. </ul>
  367. </div>
  368. <div class="floatleft smalltext">
  369. <ul class="reset">
  370. <li><img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . '</li>' . ($modSettings['enableStickyTopics'] == '1' ? '
  371. <li><img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '</li>' : '') . ($modSettings['pollMode'] == '1' ? '
  372. <li><img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '</li>
  373. </ul>
  374. </div>
  375. </div>
  376. </div>';
  377. }
  378. ?>