Search.template.php 21 KB

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