Search.template.php 21 KB

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