Search.template.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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. <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><img src="', $settings['images_url'], '/expand.png" id="expandBoardsIcon" alt="" /></a> <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><strong>', $txt['choose_board'], '</strong></a>
  149. </h4>
  150. </div>
  151. <div class="flow_auto" id="searchBoardsExpand"', $context['boards_check_all'] ? ' style="display: none;"' : '', '>
  152. <ul class="ignoreboards floatleft">';
  153. $i = 0;
  154. $limit = ceil($context['num_boards'] / 2);
  155. foreach ($context['categories'] as $category)
  156. {
  157. echo '
  158. <li class="category">
  159. <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'searchform\'); return false;">', $category['name'], '</a>
  160. <ul>';
  161. foreach ($category['boards'] as $board)
  162. {
  163. if ($i == $limit)
  164. echo '
  165. </ul>
  166. </li>
  167. </ul>
  168. <ul class="ignoreboards floatright">
  169. <li class="category">
  170. <ul>';
  171. echo '
  172. <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">
  173. <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>
  174. </li>';
  175. $i ++;
  176. }
  177. echo '
  178. </ul>
  179. </li>';
  180. }
  181. echo '
  182. </ul>
  183. </div>
  184. <br class="clear" />';
  185. echo '
  186. <div class="padding">
  187. <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" />
  188. <label for="check_all" class="floatleft"><em>', $txt['check_all'], '</em></label>
  189. <input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit" />
  190. </div>
  191. <br class="clear_right" />
  192. </div>
  193. <span class="lowerframe"><span></span></span>
  194. </fieldset>';
  195. }
  196. echo '
  197. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
  198. <script type="text/javascript"><!-- // --><![CDATA[
  199. var oAddMemberSuggest = new smc_AutoSuggest({
  200. sSelf: \'oAddMemberSuggest\',
  201. sSessionId: smf_session_id,
  202. sSessionVar: smf_session_var,
  203. sControlId: \'userspec\',
  204. sSearchType: \'member\',
  205. bItemList: false
  206. });
  207. // ]]></script>';
  208. }
  209. echo '
  210. </form>';
  211. }
  212. function template_results()
  213. {
  214. global $context, $settings, $options, $txt, $scripturl, $message;
  215. if (isset($context['did_you_mean']) || empty($context['topics']))
  216. {
  217. echo '
  218. <div id="search_results">
  219. <div class="cat_bar">
  220. <h3 class="catbg">
  221. ', $txt['search_adjust_query'], '
  222. </h3>
  223. </div>
  224. <span class="upperframe"><span></span></span>
  225. <div class="roundframe">';
  226. // Did they make any typos or mistakes, perhaps?
  227. if (isset($context['did_you_mean']))
  228. echo '
  229. <p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>';
  230. echo '
  231. <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
  232. <dl class="settings">
  233. <dt class="righttext">
  234. <strong>', $txt['search_for'], ':</strong>
  235. </dt>
  236. <dd>
  237. <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" />
  238. </dd>
  239. </dl>
  240. <input type="submit" name="edit_search" value="', $txt['search_adjust_submit'], '" class="button_submit" />
  241. <br class="clear_right" />
  242. <input type="hidden" name="searchtype" value="', !empty($context['search_params']['searchtype']) ? $context['search_params']['searchtype'] : 0, '" />
  243. <input type="hidden" name="userspec" value="', !empty($context['search_params']['userspec']) ? $context['search_params']['userspec'] : '', '" />
  244. <input type="hidden" name="show_complete" value="', !empty($context['search_params']['show_complete']) ? 1 : 0, '" />
  245. <input type="hidden" name="subject_only" value="', !empty($context['search_params']['subject_only']) ? 1 : 0, '" />
  246. <input type="hidden" name="minage" value="', !empty($context['search_params']['minage']) ? $context['search_params']['minage'] : '0', '" />
  247. <input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '" />
  248. <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '" />';
  249. if (!empty($context['search_params']['brd']))
  250. foreach ($context['search_params']['brd'] as $board_id)
  251. echo '
  252. <input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '" />';
  253. echo '
  254. </form>
  255. </div>
  256. <span class="lowerframe"><span></span></span>
  257. </div><br />';
  258. }
  259. if ($context['compact'])
  260. {
  261. // Quick moderation set to checkboxes? Oh, how fun :/.
  262. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  263. echo '
  264. <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">';
  265. echo '
  266. <div class="cat_bar">
  267. <h3 class="catbg">
  268. <span class="floatright">';
  269. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  270. echo '
  271. <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />';
  272. echo '
  273. </span>
  274. <span class="ie6_header floatleft"><img src="' . $settings['images_url'] . '/buttons/search.png" alt="?" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
  275. </h3>
  276. </div>';
  277. // was anything even found?
  278. if (!empty($context['topics']))
  279. echo'
  280. <div class="pagesection">
  281. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  282. </div>';
  283. else
  284. echo '
  285. <span class="upperframe"><span></span></span>
  286. <div class="roundframe">', $txt['find_no_results'], '</div>
  287. <span class="lowerframe"><span></span></span>';
  288. // while we have results to show ...
  289. while ($topic = $context['get_topics']())
  290. {
  291. $color_class = '';
  292. if ($topic['is_sticky'])
  293. $color_class = 'stickybg';
  294. if ($topic['is_locked'])
  295. $color_class .= 'lockedbg';
  296. echo '
  297. <div class="search_results_posts">
  298. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  299. <span class="topslice"><span></span></span>
  300. <div class="content flow_auto">';
  301. foreach ($topic['matches'] as $message)
  302. {
  303. echo '
  304. <div class="topic_details floatleft" style="width: 94%">
  305. <div class="counter">', $message['counter'], '</div>
  306. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.msg', $message['id'], '#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  307. <span class="smalltext">&#171;&nbsp;',$txt['by'],'&nbsp;<strong>', $message['member']['link'], '</strong>&nbsp;',$txt['on'],'&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  308. </div>';
  309. if (!empty($options['display_quick_mod']))
  310. {
  311. echo '
  312. <div class="floatright">';
  313. if ($options['display_quick_mod'] == 1)
  314. {
  315. echo '
  316. <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
  317. }
  318. else
  319. {
  320. if ($topic['quick_mod']['remove'])
  321. echo '
  322. <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>';
  323. if ($topic['quick_mod']['lock'])
  324. echo '
  325. <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>';
  326. if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
  327. echo '
  328. <br />';
  329. if ($topic['quick_mod']['sticky'])
  330. echo '
  331. <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>';
  332. if ($topic['quick_mod']['move'])
  333. echo '
  334. <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>';
  335. }
  336. echo '
  337. </div>';
  338. }
  339. if ($message['body_highlighted'] != '')
  340. echo '
  341. <br class="clear" />
  342. <div class="list_posts double_height">', $message['body_highlighted'], '</div>';
  343. }
  344. echo '
  345. </div>
  346. <span class="botslice"><span></span></span>
  347. </div>
  348. </div>';
  349. }
  350. if (!empty($context['topics']))
  351. echo '
  352. <div class="pagesection">
  353. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  354. </div>';
  355. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  356. {
  357. echo '
  358. <div class="middletext titlebg2" style="padding: 4px;">
  359. <div class="floatright">
  360. <select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
  361. <option value="">--------</option>', $context['can_remove'] ? '
  362. <option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', $context['can_lock'] ? '
  363. <option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', $context['can_sticky'] ? '
  364. <option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', $context['can_move'] ? '
  365. <option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', $context['can_merge'] ? '
  366. <option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
  367. <option value="markread">', $txt['quick_mod_markread'], '</option>
  368. </select>';
  369. if ($context['can_move'])
  370. {
  371. echo '
  372. <select id="moveItTo" name="move_to" disabled="disabled">';
  373. foreach ($context['move_to_boards'] as $category)
  374. {
  375. echo '
  376. <optgroup label="', $category['name'], '">';
  377. foreach ($category['boards'] as $board)
  378. echo '
  379. <option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
  380. echo '
  381. </optgroup>';
  382. }
  383. echo '
  384. </select>';
  385. }
  386. echo '
  387. <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '" />
  388. <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" />
  389. </div>
  390. <br class="clear" />
  391. </div>';
  392. }
  393. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  394. echo '
  395. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  396. </form>';
  397. }
  398. else
  399. {
  400. echo '
  401. <div class="cat_bar">
  402. <h3 class="catbg">
  403. <span class="ie6_header floatleft"><img src="' . $settings['images_url'] . '/buttons/search.png" alt="" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
  404. </h3>
  405. </div>
  406. <div class="pagesection">
  407. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  408. </div>';
  409. if (empty($context['topics']))
  410. echo '
  411. <div class="information">(', $txt['search_no_results'], ')</div>';
  412. while ($topic = $context['get_topics']())
  413. {
  414. foreach ($topic['matches'] as $message)
  415. {
  416. echo '
  417. <div class="search_results_posts">
  418. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  419. <span class="topslice"><span></span></span>
  420. <div class="content">
  421. <div class="counter">', $message['counter'], '</div>
  422. <div class="topic_details">
  423. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.', $message['start'], ';topicseen#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  424. <span class="smalltext">&#171;&nbsp;', $txt['message'], ' ', $txt['by'], ' <strong>', $message['member']['link'], ' </strong>', $txt['on'], '&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  425. </div>
  426. <div class="list_posts">', $message['body_highlighted'], '</div>';
  427. if ($topic['can_reply'] || $topic['can_mark_notify'])
  428. echo '
  429. <div class="quickbuttons_wrap">
  430. <ul class="reset smalltext quickbuttons">';
  431. // If they *can* reply?
  432. if ($topic['can_reply'])
  433. echo '
  434. <li class="reply_button"><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '">', $txt['reply'], '</a></li>';
  435. // If they *can* quote?
  436. if ($topic['can_quote'])
  437. echo '
  438. <li class="quote_button"><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'] . ';quote=' . $message['id'] . '">', $txt['quote'], '</a></li>';
  439. // Can we request notification of topics?
  440. if ($topic['can_mark_notify'])
  441. echo '
  442. <li class="notify_button"><a href="', $scripturl . '?action=notify;topic=' . $topic['id'] . '.' . $message['start'], '">', $txt['notify'], '</a></li>';
  443. if ($topic['can_reply'] || $topic['can_mark_notify'])
  444. echo '
  445. </ul>
  446. </div>';
  447. echo '
  448. <br class="clear" />
  449. </div>
  450. <span class="botslice"><span></span></span>
  451. </div>
  452. </div>';
  453. }
  454. }
  455. echo '
  456. <div class="pagesection">
  457. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  458. </div>';
  459. }
  460. // Show a jump to box for easy navigation.
  461. echo '
  462. <br class="clear" />
  463. <div class="smalltext righttext" id="search_jump_to">&nbsp;</div>
  464. <script type="text/javascript"><!-- // --><![CDATA[
  465. if (typeof(window.XMLHttpRequest) != "undefined")
  466. aJumpTo[aJumpTo.length] = new JumpTo({
  467. sContainerId: "search_jump_to",
  468. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  469. iCurBoardId: 0,
  470. iCurBoardChildLevel: 0,
  471. sCurBoardName: "', $context['jump_to']['board_name'], '",
  472. sBoardChildLevelIndicator: "==",
  473. sBoardPrefix: "=> ",
  474. sCatSeparator: "-----------------------------",
  475. sCatPrefix: "",
  476. sGoButtonLabel: "', $txt['quick_mod_go'], '"
  477. });
  478. // ]]></script>';
  479. }
  480. ?>