Search.template.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  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, $modSettings;
  15. echo '
  16. <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" name="searchform" id="searchform">
  17. <div class="cat_bar">
  18. <h3 class="catbg">
  19. <span class="ie6_header floatleft">', !empty($settings['use_buttons']) ? '<img src="' . $settings['images_url'] . '/buttons/search.png" alt="" class="icon" />' : ' ', $txt['set_parameters'], '</span>
  20. </h3>
  21. </div>';
  22. if (!empty($context['search_errors']))
  23. echo '
  24. <p class="errorbox">', implode('<br />', $context['search_errors']['messages']), '</p>';
  25. // Simple Search?
  26. if ($context['simple_search'])
  27. {
  28. echo '
  29. <fieldset id="simple_search">
  30. <span class="upperframe"><span></span></span>
  31. <div class="roundframe">
  32. <div id="search_term_input">
  33. <strong>', $txt['search_for'], ':</strong>
  34. <input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
  35. ', $context['require_verification'] ? '' : '&nbsp;<input type="submit" name="s_search" value="' . $txt['search'] . '" class="button_submit" />
  36. </div>';
  37. if (empty($modSettings['search_simple_fulltext']))
  38. echo '
  39. <p class="smalltext">', $txt['search_example'], '</p>';
  40. if ($context['require_verification'])
  41. echo '
  42. <div class="verification>
  43. <strong>', $txt['search_visual_verification_label'], ':</strong>
  44. <br />', template_control_verification($context['visual_verification_id'], 'all'), '<br />
  45. <input id="submit" type="submit" name="s_search" value="' . $txt['search'] . '" class="button_submit" />
  46. </div>';
  47. echo '
  48. <a href="', $scripturl, '?action=search;advanced" onclick="this.href += \';search=\' + escape(document.forms.searchform.search.value);">', $txt['search_advanced'], '</a>
  49. <input type="hidden" name="advanced" value="0" />
  50. </div>
  51. <span class="lowerframe"><span></span></span>
  52. </fieldset>';
  53. }
  54. // Advanced search!
  55. else
  56. {
  57. echo '
  58. <span class="upperframe"><span></span></span>
  59. <div class="roundframe">
  60. <dl class="settings" id="search_options">
  61. <dt class="righttext">
  62. <strong><label for="searchfor">', $txt['search_for'], ':</label></strong>
  63. </dt>
  64. <dd>
  65. <input type="text" name="search" id="searchfor" ', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />';
  66. if (empty($modSettings['search_simple_fulltext']))
  67. echo '
  68. <em class="smalltext">', $txt['search_example'], '</em>';
  69. echo '
  70. </dd>
  71. <dt class="righttext"><label for="searchtype">',
  72. $txt['search_match'], ':</label>
  73. </dt>
  74. <dd>
  75. <select name="searchtype" id="searchtype">
  76. <option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['all_words'], '</option>
  77. <option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['any_words'], '</option>
  78. </select>
  79. </dd>
  80. <dt class="righttext"><label for="userspec">',
  81. $txt['by_user'], ':</label>
  82. </dt>
  83. <dd>
  84. <input id="userspec" type="text" name="userspec" value="', empty($context['search_params']['userspec']) ? '*' : $context['search_params']['userspec'], '" size="40" class="input_text" />
  85. </dd>
  86. <dt class="righttext"><label for="sort">',
  87. $txt['search_order'], ':</label>
  88. </dt>
  89. <dd>
  90. <select id="sort" name="sort">
  91. <option value="relevance|desc">', $txt['search_orderby_relevant_first'], '</option>
  92. <option value="num_replies|desc">', $txt['search_orderby_large_first'], '</option>
  93. <option value="num_replies|asc">', $txt['search_orderby_small_first'], '</option>
  94. <option value="id_msg|desc">', $txt['search_orderby_recent_first'], '</option>
  95. <option value="id_msg|asc">', $txt['search_orderby_old_first'], '</option>
  96. </select>
  97. </dd>
  98. <dt class="righttext options">',
  99. $txt['search_options'], ':
  100. </dt>
  101. <dd class="options">
  102. <label for="show_complete">', $txt['search_show_complete_messages'], '
  103. <input type="checkbox" name="show_complete" id="show_complete" value="1"', !empty($context['search_params']['show_complete']) ? ' checked="checked"' : '', ' class="input_check" />
  104. </label><br />
  105. <label for="subject_only">', $txt['search_subject_only'], '
  106. <input type="checkbox" name="subject_only" id="subject_only" value="1"', !empty($context['search_params']['subject_only']) ? ' checked="checked"' : '', ' class="input_check" />
  107. </label>
  108. </dd>
  109. <dt class="righttext between">',
  110. $txt['search_post_age'], ':
  111. </dt>
  112. <dd><label for="minage">',
  113. $txt['search_between'], '</label><input type="text" name="minage" id="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="4" class="input_text" />&nbsp;<label for="maxage">', $txt['search_and'], '&nbsp;</label><input type="text" name="maxage" id="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="4" class="input_text" /> ', $txt['days_word'], '
  114. </dd>
  115. </dl>
  116. </fieldset>
  117. <script type="text/javascript"><!-- // --><![CDATA[
  118. createEventListener(window);
  119. window.addEventListener("load", initSearch, false);
  120. // ]]></script>
  121. <input type="hidden" name="advanced" value="1" />';
  122. // Require an image to be typed to save spamming?
  123. if ($context['require_verification'])
  124. {
  125. echo '
  126. <p>
  127. <strong>', $txt['verification'], ':</strong>
  128. ', template_control_verification($context['visual_verification_id'], 'all'), '
  129. </p>';
  130. }
  131. // If $context['search_params']['topic'] is set, that means we're searching just one topic.
  132. if (!empty($context['search_params']['topic']))
  133. echo '
  134. <p>', $txt['search_specific_topic'], ' &quot;', $context['search_topic']['link'], '&quot;.</p>
  135. <input type="hidden" name="topic" value="', $context['search_topic']['id'], '" />';
  136. echo '
  137. </div>
  138. <span class="lowerframe"><span></span></span>
  139. ';
  140. if (empty($context['search_params']['topic']))
  141. {
  142. echo '
  143. <fieldset class="flow_hidden">
  144. <span class="upperframe"><span></span></span>
  145. <div class="roundframe">
  146. <div class="title_bar">
  147. <h4 class="titlebg">
  148. <span class="ie6_header floatright">
  149. <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><img src="', $settings['images_url'], '/expand.png" id="expandBoardsIcon" alt="" class="icon"/></a>
  150. </span>
  151. <span>
  152. <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><strong>', $txt['choose_board'], '</strong></a>
  153. </span>
  154. </h4>
  155. </div>
  156. <div class="flow_auto" id="searchBoardsExpand"', $context['boards_check_all'] ? ' style="display: none;"' : '', '>
  157. <ul class="ignoreboards floatleft">';
  158. $i = 0;
  159. $limit = ceil($context['num_boards'] / 2);
  160. foreach ($context['categories'] as $category)
  161. {
  162. echo '
  163. <li class="category">
  164. <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'searchform\'); return false;">', $category['name'], '</a>
  165. <ul>';
  166. foreach ($category['boards'] as $board)
  167. {
  168. if ($i == $limit)
  169. echo '
  170. </ul>
  171. </li>
  172. </ul>
  173. <ul class="ignoreboards floatright">
  174. <li class="category">
  175. <ul>';
  176. echo '
  177. <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
  178. <label for="brd', $board['id'], '"><input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '</label>
  179. </li>';
  180. $i ++;
  181. }
  182. echo '
  183. </ul>
  184. </li>';
  185. }
  186. echo '
  187. </ul>
  188. </div>
  189. <br class="clear" />';
  190. echo '
  191. <div class="padding">
  192. <input type="checkbox" name="all" id="check_all" value=""', $context['boards_check_all'] ? ' checked="checked"' : '', ' onclick="invertAll(this, this.form, \'brd\');" class="input_check floatleft" />
  193. <label for="check_all" class="floatleft"><em>', $txt['check_all'], '</em></label>
  194. <input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit" />
  195. </div>
  196. <br class="clear_right" />
  197. </div>
  198. <span class="lowerframe"><span></span></span>
  199. </fieldset>';
  200. }
  201. echo '
  202. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
  203. <script type="text/javascript"><!-- // --><![CDATA[
  204. var oAddMemberSuggest = new smc_AutoSuggest({
  205. sSelf: \'oAddMemberSuggest\',
  206. sSessionId: smf_session_id,
  207. sSessionVar: smf_session_var,
  208. sControlId: \'userspec\',
  209. sSearchType: \'member\',
  210. bItemList: false
  211. });
  212. // ]]></script>';
  213. }
  214. echo '
  215. </form>';
  216. }
  217. function template_results()
  218. {
  219. global $context, $settings, $options, $txt, $scripturl, $message;
  220. if (isset($context['did_you_mean']) || empty($context['topics']))
  221. {
  222. echo '
  223. <div id="search_results">
  224. <div class="cat_bar">
  225. <h3 class="catbg">
  226. ', $txt['search_adjust_query'], '
  227. </h3>
  228. </div>
  229. <span class="upperframe"><span></span></span>
  230. <div class="roundframe">';
  231. // Did they make any typos or mistakes, perhaps?
  232. if (isset($context['did_you_mean']))
  233. echo '
  234. <p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>';
  235. echo '
  236. <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
  237. <dl class="settings">
  238. <dt class="righttext">
  239. <strong>', $txt['search_for'], ':</strong>
  240. </dt>
  241. <dd>
  242. <input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
  243. </dd>
  244. </dl>
  245. <input type="submit" name="edit_search" value="', $txt['search_adjust_submit'], '" class="button_submit" />
  246. <br class="clear_right" />
  247. <input type="hidden" name="searchtype" value="', !empty($context['search_params']['searchtype']) ? $context['search_params']['searchtype'] : 0, '" />
  248. <input type="hidden" name="userspec" value="', !empty($context['search_params']['userspec']) ? $context['search_params']['userspec'] : '', '" />
  249. <input type="hidden" name="show_complete" value="', !empty($context['search_params']['show_complete']) ? 1 : 0, '" />
  250. <input type="hidden" name="subject_only" value="', !empty($context['search_params']['subject_only']) ? 1 : 0, '" />
  251. <input type="hidden" name="minage" value="', !empty($context['search_params']['minage']) ? $context['search_params']['minage'] : '0', '" />
  252. <input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '" />
  253. <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '" />';
  254. if (!empty($context['search_params']['brd']))
  255. foreach ($context['search_params']['brd'] as $board_id)
  256. echo '
  257. <input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '" />';
  258. echo '
  259. </form>
  260. </div>
  261. <span class="lowerframe"><span></span></span>
  262. </div><br />';
  263. }
  264. if ($context['compact'])
  265. {
  266. // Quick moderation set to checkboxes? Oh, how fun :/.
  267. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  268. echo '
  269. <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">';
  270. echo '
  271. <div class="cat_bar">
  272. <h3 class="catbg">
  273. <span class="floatright">';
  274. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  275. echo '
  276. <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />';
  277. echo '
  278. </span>
  279. <span class="ie6_header floatleft"><img src="' . $settings['images_url'] . '/buttons/search.png" alt="?" class="centericon" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
  280. </h3>
  281. </div>';
  282. // was anything even found?
  283. if (!empty($context['topics']))
  284. echo'
  285. <div class="pagesection">
  286. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  287. </div>';
  288. else
  289. echo '
  290. <span class="upperframe"><span></span></span>
  291. <div class="roundframe">', $txt['find_no_results'], '</div>
  292. <span class="lowerframe"><span></span></span>';
  293. // while we have results to show ...
  294. while ($topic = $context['get_topics']())
  295. {
  296. $color_class = '';
  297. if ($topic['is_sticky'])
  298. $color_class = 'stickybg';
  299. if ($topic['is_locked'])
  300. $color_class .= 'lockedbg';
  301. echo '
  302. <div class="search_results_posts">
  303. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  304. <span class="topslice"><span></span></span>
  305. <div class="content flow_auto">';
  306. foreach ($topic['matches'] as $message)
  307. {
  308. echo '
  309. <div class="topic_details floatleft" style="width: 94%">
  310. <div class="counter">', $message['counter'], '</div>
  311. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.msg', $message['id'], '#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  312. <span class="smalltext">&#171;&nbsp;',$txt['by'],'&nbsp;<strong>', $message['member']['link'], '</strong>&nbsp;',$txt['on'],'&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  313. </div>';
  314. if (!empty($options['display_quick_mod']))
  315. {
  316. echo '
  317. <div class="floatright">';
  318. if ($options['display_quick_mod'] == 1)
  319. {
  320. echo '
  321. <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
  322. }
  323. else
  324. {
  325. if ($topic['quick_mod']['remove'])
  326. echo '
  327. <a href="', $scripturl, '?action=quickmod;actions[', $topic['id'], ']=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.png" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
  328. if ($topic['quick_mod']['lock'])
  329. echo '
  330. <a href="', $scripturl, '?action=quickmod;actions[', $topic['id'], ']=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.png" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></a>';
  331. if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
  332. echo '
  333. <br />';
  334. if ($topic['quick_mod']['sticky'])
  335. echo '
  336. <a href="', $scripturl, '?action=quickmod;actions[', $topic['id'], ']=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.png" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';
  337. if ($topic['quick_mod']['move'])
  338. echo '
  339. <a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.png" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
  340. }
  341. echo '
  342. </div>';
  343. }
  344. if ($message['body_highlighted'] != '')
  345. echo '
  346. <br class="clear" />
  347. <div class="list_posts double_height">', $message['body_highlighted'], '</div>';
  348. }
  349. echo '
  350. </div>
  351. <span class="botslice"><span></span></span>
  352. </div>
  353. </div>';
  354. }
  355. if (!empty($context['topics']))
  356. echo '
  357. <div class="pagesection">
  358. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  359. </div>';
  360. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  361. {
  362. echo '
  363. <div class="middletext titlebg2" style="padding: 4px;">
  364. <div class="floatright">
  365. <select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
  366. <option value="">--------</option>', $context['can_remove'] ? '
  367. <option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', $context['can_lock'] ? '
  368. <option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', $context['can_sticky'] ? '
  369. <option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', $context['can_move'] ? '
  370. <option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', $context['can_merge'] ? '
  371. <option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
  372. <option value="markread">', $txt['quick_mod_markread'], '</option>
  373. </select>';
  374. if ($context['can_move'])
  375. {
  376. echo '
  377. <select id="moveItTo" name="move_to" disabled="disabled">';
  378. foreach ($context['move_to_boards'] as $category)
  379. {
  380. echo '
  381. <optgroup label="', $category['name'], '">';
  382. foreach ($category['boards'] as $board)
  383. echo '
  384. <option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
  385. echo '
  386. </optgroup>';
  387. }
  388. echo '
  389. </select>';
  390. }
  391. echo '
  392. <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '" />
  393. <input type="submit" style="font-size: 0.8em;" value="', $txt['quick_mod_go'], '" onclick="return this.form.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit" />
  394. </div>
  395. <br class="clear" />
  396. </div>';
  397. }
  398. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  399. echo '
  400. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  401. </form>';
  402. }
  403. else
  404. {
  405. echo '
  406. <div class="cat_bar">
  407. <h3 class="catbg">
  408. <span class="ie6_header floatleft"><img class="centericon" src="' . $settings['images_url'] . '/buttons/search.png" alt="?" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
  409. </h3>
  410. </div>
  411. <div class="pagesection">
  412. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  413. </div>';
  414. if (empty($context['topics']))
  415. echo '
  416. <div class="information">(', $txt['search_no_results'], ')</div>';
  417. while ($topic = $context['get_topics']())
  418. {
  419. foreach ($topic['matches'] as $message)
  420. {
  421. echo '
  422. <div class="search_results_posts">
  423. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  424. <span class="topslice"><span></span></span>
  425. <div class="content">
  426. <div class="counter">', $message['counter'], '</div>
  427. <div class="topic_details">
  428. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.', $message['start'], ';topicseen#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  429. <span class="smalltext">&#171;&nbsp;', $txt['message'], ' ', $txt['by'], ' <strong>', $message['member']['link'], ' </strong>', $txt['on'], '&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  430. </div>
  431. <div class="list_posts">', $message['body_highlighted'], '</div>';
  432. if ($topic['can_reply'] || $topic['can_mark_notify'])
  433. echo '
  434. <div class="quickbuttons_wrap">
  435. <ul class="reset smalltext quickbuttons">';
  436. // If they *can* reply?
  437. if ($topic['can_reply'])
  438. echo '
  439. <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '" class="reply_button">', $txt['reply'], '</a></li>';
  440. // If they *can* quote?
  441. if ($topic['can_quote'])
  442. echo '
  443. <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'] . ';quote=' . $message['id'] . '" class="quote_button">', $txt['quote'], '</a></li>';
  444. // Can we request notification of topics?
  445. if ($topic['can_mark_notify'])
  446. echo '
  447. <li><a href="', $scripturl . '?action=notify;topic=' . $topic['id'] . '.' . $message['start'], '" class="notify_button">', $txt['notify'], '</a></li>';
  448. if ($topic['can_reply'] || $topic['can_mark_notify'])
  449. echo '
  450. </ul>
  451. </div>';
  452. echo '
  453. <br class="clear" />
  454. </div>
  455. <span class="botslice"><span></span></span>
  456. </div>
  457. </div>';
  458. }
  459. }
  460. echo '
  461. <div class="pagesection">
  462. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  463. </div>';
  464. }
  465. // Show a jump to box for easy navigation.
  466. echo '
  467. <br class="clear" />
  468. <div class="smalltext righttext" id="search_jump_to">&nbsp;</div>
  469. <script type="text/javascript"><!-- // --><![CDATA[
  470. if (typeof(window.XMLHttpRequest) != "undefined")
  471. aJumpTo[aJumpTo.length] = new JumpTo({
  472. sContainerId: "search_jump_to",
  473. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  474. iCurBoardId: 0,
  475. iCurBoardChildLevel: 0,
  476. sCurBoardName: "', $context['jump_to']['board_name'], '",
  477. sBoardChildLevelIndicator: "==",
  478. sBoardPrefix: "=> ",
  479. sCatSeparator: "-----------------------------",
  480. sCatPrefix: "",
  481. sGoButtonLabel: "', $txt['quick_mod_go'], '"
  482. });
  483. // ]]></script>';
  484. }
  485. ?>