annotate forum/Themes/default/Recent.template.php @ 78:96118bc49f04 website

Add RGU-MFS
author Chris Cannam
date Thu, 17 Oct 2013 09:22:53 +0100
parents e3e11437ecea
children
rev   line source
Chris@76 1 <?php
Chris@76 2 /**
Chris@76 3 * Simple Machines Forum (SMF)
Chris@76 4 *
Chris@76 5 * @package SMF
Chris@76 6 * @author Simple Machines
Chris@76 7 * @copyright 2011 Simple Machines
Chris@76 8 * @license http://www.simplemachines.org/about/smf/license.php BSD
Chris@76 9 *
Chris@76 10 * @version 2.0
Chris@76 11 */
Chris@76 12
Chris@76 13 function template_main()
Chris@76 14 {
Chris@76 15 global $context, $settings, $options, $txt, $scripturl;
Chris@76 16
Chris@76 17 echo '
Chris@76 18 <div id="recent" class="main_section">
Chris@76 19 <div class="cat_bar">
Chris@76 20 <h3 class="catbg">
Chris@76 21 <span class="ie6_header floatleft"><img src="', $settings['images_url'], '/post/xx.gif" alt="" class="icon" />',$txt['recent_posts'],'</span>
Chris@76 22 </h3>
Chris@76 23 </div>
Chris@76 24 <div class="pagesection">
Chris@76 25 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 26 </div>';
Chris@76 27
Chris@76 28 foreach ($context['posts'] as $post)
Chris@76 29 {
Chris@76 30 echo '
Chris@76 31 <div class="', $post['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
Chris@76 32 <span class="topslice"><span></span></span>
Chris@76 33 <div class="content">
Chris@76 34 <div class="counter">', $post['counter'], '</div>
Chris@76 35 <div class="topic_details">
Chris@76 36 <h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
Chris@76 37 <span class="smalltext">&#171;&nbsp;', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> ', $txt['on'], '<em> ', $post['time'], '</em>&nbsp;&#187;</span>
Chris@76 38 </div>
Chris@76 39 <div class="list_posts">', $post['message'], '</div>
Chris@76 40 </div>';
Chris@76 41
Chris@76 42 if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
Chris@76 43 echo '
Chris@76 44 <div class="quickbuttons_wrap">
Chris@76 45 <ul class="reset smalltext quickbuttons">';
Chris@76 46
Chris@76 47 // If they *can* reply?
Chris@76 48 if ($post['can_reply'])
Chris@76 49 echo '
Chris@76 50 <li class="reply_button"><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span>', $txt['reply'], '</span></a></li>';
Chris@76 51
Chris@76 52 // If they *can* quote?
Chris@76 53 if ($post['can_quote'])
Chris@76 54 echo '
Chris@76 55 <li class="quote_button"><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span>', $txt['quote'], '</span></a></li>';
Chris@76 56
Chris@76 57 // Can we request notification of topics?
Chris@76 58 if ($post['can_mark_notify'])
Chris@76 59 echo '
Chris@76 60 <li class="notify_button"><a href="', $scripturl, '?action=notify;topic=', $post['topic'], '.', $post['start'], '"><span>', $txt['notify'], '</span></a></li>';
Chris@76 61
Chris@76 62 // How about... even... remove it entirely?!
Chris@76 63 if ($post['can_delete'])
Chris@76 64 echo '
Chris@76 65 <li class="remove_button"><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');"><span>', $txt['remove'], '</span></a></li>';
Chris@76 66
Chris@76 67 if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
Chris@76 68 echo '
Chris@76 69 </ul>
Chris@76 70 </div>';
Chris@76 71
Chris@76 72 echo '
Chris@76 73 <span class="botslice clear"><span></span></span>
Chris@76 74 </div>';
Chris@76 75
Chris@76 76 }
Chris@76 77
Chris@76 78 echo '
Chris@76 79 <div class="pagesection">
Chris@76 80 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 81 </div>
Chris@76 82 </div>';
Chris@76 83 }
Chris@76 84
Chris@76 85 function template_unread()
Chris@76 86 {
Chris@76 87 global $context, $settings, $options, $txt, $scripturl, $modSettings;
Chris@76 88
Chris@76 89 echo '
Chris@76 90 <div id="recent" class="main_content">';
Chris@76 91
Chris@76 92 $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
Chris@76 93
Chris@76 94 if ($showCheckboxes)
Chris@76 95 echo '
Chris@76 96 <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
Chris@76 97 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 98 <input type="hidden" name="qaction" value="markread" />
Chris@76 99 <input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
Chris@76 100
Chris@76 101 if ($settings['show_mark_read'])
Chris@76 102 {
Chris@76 103 // Generate the button strip.
Chris@76 104 $mark_read = array(
Chris@76 105 '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']),
Chris@76 106 );
Chris@76 107
Chris@76 108 if ($showCheckboxes)
Chris@76 109 $mark_read['markselectread'] = array(
Chris@76 110 'text' => 'quick_mod_markread',
Chris@76 111 'image' => 'markselectedread.gif',
Chris@76 112 'lang' => true,
Chris@76 113 'url' => 'javascript:document.quickModForm.submit();',
Chris@76 114 );
Chris@76 115 }
Chris@76 116
Chris@76 117 if (!empty($context['topics']))
Chris@76 118 {
Chris@76 119 echo '
Chris@76 120 <div class="pagesection">';
Chris@76 121
Chris@76 122 if (!empty($mark_read) && !empty($settings['use_tabs']))
Chris@76 123 template_button_strip($mark_read, 'right');
Chris@76 124
Chris@76 125 echo '
Chris@76 126 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 127 </div>';
Chris@76 128
Chris@76 129 echo '
Chris@76 130 <div class="tborder topic_table" id="unread">
Chris@76 131 <table class="table_grid" cellspacing="0">
Chris@76 132 <thead>
Chris@76 133 <tr class="catbg">
Chris@76 134 <th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
Chris@76 135 <th scope="col">
Chris@76 136 <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="" />' : '', '</a>
Chris@76 137 </th>
Chris@76 138 <th scope="col" width="14%" align="center">
Chris@76 139 <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="" />' : '', '</a>
Chris@76 140 </th>';
Chris@76 141
Chris@76 142 // Show a "select all" box for quick moderation?
Chris@76 143 if ($showCheckboxes)
Chris@76 144 echo '
Chris@76 145 <th scope="col" width="22%">
Chris@76 146 <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="" />' : '', '</a>
Chris@76 147 </th>
Chris@76 148 <th class="last_th">
Chris@76 149 <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
Chris@76 150 </th>';
Chris@76 151 else
Chris@76 152 echo '
Chris@76 153 <th scope="col" class="smalltext last_th" width="22%">
Chris@76 154 <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="" />' : '', '</a>
Chris@76 155 </th>';
Chris@76 156 echo '
Chris@76 157 </tr>
Chris@76 158 </thead>
Chris@76 159 <tbody>';
Chris@76 160
Chris@76 161 foreach ($context['topics'] as $topic)
Chris@76 162 {
Chris@76 163 // Calculate the color class of the topic.
Chris@76 164 $color_class = '';
Chris@76 165 if (strpos($topic['class'], 'sticky') !== false)
Chris@76 166 $color_class = 'stickybg';
Chris@76 167 if (strpos($topic['class'], 'locked') !== false)
Chris@76 168 $color_class .= 'lockedbg';
Chris@76 169
Chris@76 170 $color_class2 = !empty($color_class) ? $color_class . '2' : '';
Chris@76 171
Chris@76 172 echo '
Chris@76 173 <tr>
Chris@76 174 <td class="', $color_class, ' icon1 windowbg">
Chris@76 175 <img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
Chris@76 176 </td>
Chris@76 177 <td class="', $color_class, ' icon2 windowbg">
Chris@76 178 <img src="', $topic['first_post']['icon_url'], '" alt="" />
Chris@76 179 </td>
Chris@76 180 <td class="subject ', $color_class2, ' windowbg2">
Chris@76 181 <div>
Chris@76 182 ', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
Chris@76 183 <a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>
Chris@76 184 <p>
Chris@76 185 ', $txt['started_by'], ' <strong>', $topic['first_post']['member']['link'], '</strong>
Chris@76 186 ', $txt['in'], ' <em>', $topic['board']['link'], '</em>
Chris@76 187 <small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
Chris@76 188 </p>
Chris@76 189 </div>
Chris@76 190 </td>
Chris@76 191 <td class="', $color_class, ' stats windowbg">
Chris@76 192 ', $topic['replies'], ' ', $txt['replies'], '
Chris@76 193 <br />
Chris@76 194 ', $topic['views'], ' ', $txt['views'], '
Chris@76 195 </td>
Chris@76 196 <td class="', $color_class2, ' lastpost windowbg2">
Chris@76 197 <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>
Chris@76 198 ', $topic['last_post']['time'], '<br />
Chris@76 199 ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
Chris@76 200 </td>';
Chris@76 201
Chris@76 202 if ($showCheckboxes)
Chris@76 203 echo '
Chris@76 204 <td class="windowbg2" valign="middle" align="center">
Chris@76 205 <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
Chris@76 206 </td>';
Chris@76 207 echo '
Chris@76 208 </tr>';
Chris@76 209 }
Chris@76 210
Chris@76 211 if (!empty($context['topics']) && !$context['showing_all_topics'])
Chris@76 212 $mark_read['readall'] = array('text' => 'unread_topics_all', 'image' => 'markreadall.gif', 'lang' => true, 'url' => $scripturl . '?action=unread;all' . $context['querystring_board_limits'], 'active' => true);
Chris@76 213
Chris@76 214 if (empty($settings['use_tabs']) && !empty($mark_read))
Chris@76 215 echo '
Chris@76 216 <tr class="catbg">
Chris@76 217 <td colspan="', $showCheckboxes ? '6' : '5', '" align="right">
Chris@76 218 ', template_button_strip($mark_read, 'top'), '
Chris@76 219 </td>
Chris@76 220 </tr>';
Chris@76 221
Chris@76 222 if (empty($context['topics']))
Chris@76 223 echo '
Chris@76 224 <tr style="display: none;"><td></td></tr>';
Chris@76 225
Chris@76 226 echo '
Chris@76 227 </tbody>
Chris@76 228 </table>
Chris@76 229 </div>
Chris@76 230 <div class="pagesection" id="readbuttons">';
Chris@76 231
Chris@76 232 if (!empty($settings['use_tabs']) && !empty($mark_read))
Chris@76 233 template_button_strip($mark_read, 'right');
Chris@76 234
Chris@76 235 echo '
Chris@76 236 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 237 </div>';
Chris@76 238 }
Chris@76 239 else
Chris@76 240 echo '
Chris@76 241 <div class="cat_bar">
Chris@76 242 <h3 class="catbg centertext">
Chris@76 243 ', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
Chris@76 244 </h3>
Chris@76 245 </div>';
Chris@76 246
Chris@76 247 if ($showCheckboxes)
Chris@76 248 echo '
Chris@76 249 </form>';
Chris@76 250
Chris@76 251 echo '
Chris@76 252 <div class="description " id="topic_icons">
Chris@76 253 <p class="smalltext floatleft">
Chris@76 254 ', !empty($modSettings['enableParticipation']) ? '
Chris@76 255 <img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
Chris@76 256 <img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" align="middle" /> ', $txt['normal_topic'], '<br />
Chris@76 257 <img src="', $settings['images_url'], '/topic/hot_post.gif" alt="" align="middle" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
Chris@76 258 <img src="', $settings['images_url'], '/topic/veryhot_post.gif" alt="" align="middle" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
Chris@76 259 </p>
Chris@76 260 <p class="smalltext para2">
Chris@76 261 <img src="', $settings['images_url'], '/icons/quick_lock.gif" alt="" align="middle" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
Chris@76 262 <img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '<br />' : ''), ($modSettings['pollMode'] == '1' ? '
Chris@76 263 <img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : ''), '
Chris@76 264 </p>
Chris@76 265 </div>
Chris@76 266 </div>';
Chris@76 267 }
Chris@76 268
Chris@76 269 function template_replies()
Chris@76 270 {
Chris@76 271 global $context, $settings, $options, $txt, $scripturl, $modSettings;
Chris@76 272
Chris@76 273 echo '
Chris@76 274 <div id="recent">';
Chris@76 275
Chris@76 276 $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];
Chris@76 277
Chris@76 278 if ($showCheckboxes)
Chris@76 279 echo '
Chris@76 280 <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
Chris@76 281 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 282 <input type="hidden" name="qaction" value="markread" />
Chris@76 283 <input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '" />';
Chris@76 284
Chris@76 285 if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read']))
Chris@76 286 {
Chris@76 287 // Generate the button strip.
Chris@76 288 $mark_read = array(
Chris@76 289 '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']),
Chris@76 290 );
Chris@76 291
Chris@76 292 if ($showCheckboxes)
Chris@76 293 $mark_read['markselectread'] = array(
Chris@76 294 'text' => 'quick_mod_markread',
Chris@76 295 'image' => 'markselectedread.gif',
Chris@76 296 'lang' => true,
Chris@76 297 'url' => 'javascript:document.quickModForm.submit();',
Chris@76 298 );
Chris@76 299 }
Chris@76 300
Chris@76 301 if (!empty($context['topics']))
Chris@76 302 {
Chris@76 303 echo '
Chris@76 304 <div class="pagesection">';
Chris@76 305
Chris@76 306 if (!empty($mark_read) && !empty($settings['use_tabs']))
Chris@76 307 template_button_strip($mark_read, 'right');
Chris@76 308
Chris@76 309 echo '
Chris@76 310 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 311 </div>';
Chris@76 312
Chris@76 313 echo '
Chris@76 314 <div class="tborder topic_table" id="unreadreplies">
Chris@76 315 <table class="table_grid" cellspacing="0">
Chris@76 316 <thead>
Chris@76 317 <tr class="catbg">
Chris@76 318 <th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>
Chris@76 319 <th scope="col">
Chris@76 320 <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="" />' : '', '</a>
Chris@76 321 </th>
Chris@76 322 <th scope="col" width="14%" align="center">
Chris@76 323 <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="" />' : '', '</a>
Chris@76 324 </th>';
Chris@76 325
Chris@76 326 // Show a "select all" box for quick moderation?
Chris@76 327 if ($showCheckboxes)
Chris@76 328 echo '
Chris@76 329 <th scope="col" width="22%">
Chris@76 330 <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="" />' : '', '</a>
Chris@76 331 </th>
Chris@76 332 <th class="last_th">
Chris@76 333 <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
Chris@76 334 </th>';
Chris@76 335 else
Chris@76 336 echo '
Chris@76 337 <th scope="col" class="last_th" width="22%">
Chris@76 338 <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="" />' : '', '</a>
Chris@76 339 </th>';
Chris@76 340 echo '
Chris@76 341 </tr>
Chris@76 342 </thead>
Chris@76 343 <tbody>';
Chris@76 344
Chris@76 345 foreach ($context['topics'] as $topic)
Chris@76 346 {
Chris@76 347 // Calculate the color class of the topic.
Chris@76 348 $color_class = '';
Chris@76 349 if (strpos($topic['class'], 'sticky') !== false)
Chris@76 350 $color_class = 'stickybg';
Chris@76 351 if (strpos($topic['class'], 'locked') !== false)
Chris@76 352 $color_class .= 'lockedbg';
Chris@76 353
Chris@76 354 $color_class2 = !empty($color_class) ? $color_class . '2' : '';
Chris@76 355
Chris@76 356 echo '
Chris@76 357 <tr>
Chris@76 358 <td class="', $color_class, ' icon1 windowbg">
Chris@76 359 <img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
Chris@76 360 </td>
Chris@76 361 <td class="', $color_class, ' icon2 windowbg">
Chris@76 362 <img src="', $topic['first_post']['icon_url'], '" alt="" />
Chris@76 363 </td>
Chris@76 364 <td class="subject ', $color_class2, ' windowbg2">
Chris@76 365 <div>
Chris@76 366 ', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</strong>' : '', '
Chris@76 367 <a href="', $topic['new_href'], '" id="newicon', $topic['first_post']['id'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>
Chris@76 368 <p>
Chris@76 369 ', $txt['started_by'], ' <strong>', $topic['first_post']['member']['link'], '</strong>
Chris@76 370 ', $txt['in'], ' <em>', $topic['board']['link'], '</em>
Chris@76 371 <small id="pages', $topic['first_post']['id'], '">', $topic['pages'], '</small>
Chris@76 372 </p>
Chris@76 373 </div>
Chris@76 374 </td>
Chris@76 375 <td class="', $color_class, ' stats windowbg">
Chris@76 376 ', $topic['replies'], ' ', $txt['replies'], '
Chris@76 377 <br />
Chris@76 378 ', $topic['views'], ' ', $txt['views'], '
Chris@76 379 </td>
Chris@76 380 <td class="', $color_class2, ' lastpost windowbg2">
Chris@76 381 <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>
Chris@76 382 ', $topic['last_post']['time'], '<br />
Chris@76 383 ', $txt['by'], ' ', $topic['last_post']['member']['link'], '
Chris@76 384 </td>';
Chris@76 385
Chris@76 386 if ($showCheckboxes)
Chris@76 387 echo '
Chris@76 388 <td class="windowbg2" valign="middle" align="center">
Chris@76 389 <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />
Chris@76 390 </td>';
Chris@76 391 echo '
Chris@76 392 </tr>';
Chris@76 393 }
Chris@76 394
Chris@76 395 if (empty($settings['use_tabs']) && !empty($mark_read))
Chris@76 396 echo '
Chris@76 397 <tr class="catbg">
Chris@76 398 <td colspan="', $showCheckboxes ? '6' : '5', '" align="right">
Chris@76 399 ', template_button_strip($mark_read, 'top'), '
Chris@76 400 </td>
Chris@76 401 </tr>';
Chris@76 402
Chris@76 403 echo '
Chris@76 404 </tbody>
Chris@76 405 </table>
Chris@76 406 </div>
Chris@76 407 <div class="pagesection">';
Chris@76 408
Chris@76 409 if (!empty($settings['use_tabs']) && !empty($mark_read))
Chris@76 410 template_button_strip($mark_read, 'right');
Chris@76 411
Chris@76 412 echo '
Chris@76 413 <span>', $txt['pages'], ': ', $context['page_index'], '</span>
Chris@76 414 </div>';
Chris@76 415 }
Chris@76 416 else
Chris@76 417 echo '
Chris@76 418 <div class="cat_bar">
Chris@76 419 <h3 class="catbg centertext">
Chris@76 420 ', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
Chris@76 421 </h3>
Chris@76 422 </div>';
Chris@76 423
Chris@76 424 if ($showCheckboxes)
Chris@76 425 echo '
Chris@76 426 </form>';
Chris@76 427
Chris@76 428 echo '
Chris@76 429 <div class="description flow_auto" id="topic_icons">
Chris@76 430 <p class="smalltext floatleft">
Chris@76 431 ', !empty($modSettings['enableParticipation']) ? '
Chris@76 432 <img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
Chris@76 433 <img src="', $settings['images_url'], '/topic/normal_post.gif" alt="" align="middle" /> ', $txt['normal_topic'], '<br />
Chris@76 434 <img src="', $settings['images_url'], '/topic/hot_post.gif" alt="" align="middle" /> ', sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']), '<br />
Chris@76 435 <img src="', $settings['images_url'], '/topic/veryhot_post.gif" alt="" align="middle" /> ', sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']), '
Chris@76 436 </p>
Chris@76 437 <p class="smalltext para2">
Chris@76 438 <img src="', $settings['images_url'], '/icons/quick_lock.gif" alt="" align="middle" /> ', $txt['locked_topic'], '<br />', ($modSettings['enableStickyTopics'] == '1' ? '
Chris@76 439 <img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
Chris@76 440 <img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '
Chris@76 441 </p>
Chris@76 442 </div>
Chris@76 443 </div>';
Chris@76 444 }
Chris@76 445
Chris@76 446 ?>