Search.template.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2012 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. <span class="floatright">
  144. <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><img src="', $settings['images_url'], '/expand.png" id="expandBoardsIcon" alt="" class="icon"/></a>
  145. </span>
  146. <span>
  147. <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><strong>', $txt['choose_board'], '</strong></a>
  148. </span>
  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'], '">
  174. <input type="checkbox" id="brd', $board['id'], '" name="brd[', $board['id'], ']" value="', $board['id'], '"', $board['selected'] ? ' checked="checked"' : '', ' class="input_check" /> ', $board['name'], '
  175. </label>
  176. </li>';
  177. $i ++;
  178. }
  179. echo '
  180. </ul>
  181. </li>';
  182. }
  183. echo '
  184. </ul>
  185. </div>
  186. <br class="clear" />';
  187. echo '
  188. <div class="padding flow_auto">
  189. <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" />
  190. <label for="check_all" class="floatleft"><em>', $txt['check_all'], '</em></label>
  191. <input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit" />
  192. </div>
  193. </div>
  194. </fieldset>';
  195. }
  196. echo '
  197. <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></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. <div class="roundframe">';
  225. // Did they make any typos or mistakes, perhaps?
  226. if (isset($context['did_you_mean']))
  227. echo '
  228. <p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>';
  229. echo '
  230. <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
  231. <dl class="settings">
  232. <dt class="righttext">
  233. <strong>', $txt['search_for'], ':</strong>
  234. </dt>
  235. <dd>
  236. <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" />
  237. </dd>
  238. </dl>
  239. <div class="flow_auto" >
  240. <input type="submit" name="edit_search" value="', $txt['search_adjust_submit'], '" class="button_submit" />
  241. <input type="hidden" name="searchtype" value="', !empty($context['search_params']['searchtype']) ? $context['search_params']['searchtype'] : 0, '" />
  242. <input type="hidden" name="userspec" value="', !empty($context['search_params']['userspec']) ? $context['search_params']['userspec'] : '', '" />
  243. <input type="hidden" name="show_complete" value="', !empty($context['search_params']['show_complete']) ? 1 : 0, '" />
  244. <input type="hidden" name="subject_only" value="', !empty($context['search_params']['subject_only']) ? 1 : 0, '" />
  245. <input type="hidden" name="minage" value="', !empty($context['search_params']['minage']) ? $context['search_params']['minage'] : '0', '" />
  246. <input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '" />
  247. <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '" />
  248. </div>';
  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. </div><br />';
  257. }
  258. if ($context['compact'])
  259. {
  260. // Quick moderation set to checkboxes? Oh, how fun :/.
  261. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  262. echo '
  263. <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">';
  264. echo '
  265. <div class="cat_bar">
  266. <h3 class="catbg">
  267. <span class="floatright">';
  268. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
  269. echo '
  270. <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />';
  271. echo '
  272. </span>
  273. <img src="' . $settings['images_url'] . '/buttons/search.png" alt="?" class="centericon" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'
  274. </h3>
  275. </div>';
  276. // was anything even found?
  277. if (!empty($context['topics']))
  278. echo'
  279. <div class="pagesection">
  280. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  281. </div>';
  282. else
  283. echo '
  284. <div class="roundframe">', $txt['find_no_results'], '</div>';
  285. // while we have results to show ...
  286. while ($topic = $context['get_topics']())
  287. {
  288. $color_class = '';
  289. if ($topic['is_sticky'])
  290. $color_class = 'stickybg';
  291. if ($topic['is_locked'])
  292. $color_class .= 'lockedbg';
  293. echo '
  294. <div class="search_results_posts">
  295. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  296. <div class="content flow_auto">';
  297. foreach ($topic['matches'] as $message)
  298. {
  299. echo '
  300. <div class="topic_details floatleft" style="width: 94%">
  301. <div class="counter">', $message['counter'], '</div>
  302. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.msg', $message['id'], '#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  303. <span class="smalltext">&#171;&nbsp;',$txt['by'],'&nbsp;<strong>', $message['member']['link'], '</strong>&nbsp;',$txt['on'],'&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  304. </div>';
  305. if (!empty($options['display_quick_mod']))
  306. {
  307. echo '
  308. <div class="floatright">';
  309. if ($options['display_quick_mod'] == 1)
  310. {
  311. echo '
  312. <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check" />';
  313. }
  314. else
  315. {
  316. if ($topic['quick_mod']['remove'])
  317. echo '
  318. <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>';
  319. if ($topic['quick_mod']['lock'])
  320. echo '
  321. <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>';
  322. if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
  323. echo '
  324. <br />';
  325. if ($topic['quick_mod']['sticky'])
  326. echo '
  327. <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>';
  328. if ($topic['quick_mod']['move'])
  329. echo '
  330. <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>';
  331. }
  332. echo '
  333. </div>';
  334. }
  335. if ($message['body_highlighted'] != '')
  336. echo '
  337. <br class="clear" />
  338. <div class="list_posts double_height">', $message['body_highlighted'], '</div>';
  339. }
  340. echo '
  341. </div>
  342. </div>
  343. </div>';
  344. }
  345. if (!empty($context['topics']))
  346. echo '
  347. <div class="pagesection">
  348. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  349. </div>';
  350. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  351. {
  352. echo '
  353. <div class="titlebg2" style="padding: 4px;">
  354. <div class="floatright flow_auto">
  355. <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
  356. <option value="">--------</option>';
  357. foreach ($context['qmod_actions'] as $qmod_action)
  358. if ($context['can_' . $qmod_action])
  359. echo '
  360. <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>';
  361. echo '
  362. </select>';
  363. if ($context['can_move'])
  364. echo '
  365. <span id="quick_mod_jump_to">&nbsp;</span>';
  366. echo '
  367. <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '" />
  368. <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return this.form.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit" style="float: none;font-size: .8em;"/>
  369. </div>
  370. </div>';
  371. }
  372. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
  373. echo '
  374. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  375. </form>';
  376. }
  377. else
  378. {
  379. echo '
  380. <div class="cat_bar">
  381. <h3 class="catbg">
  382. <img class="centericon" src="' . $settings['images_url'] . '/buttons/search.png" alt="?" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'
  383. </h3>
  384. </div>
  385. <div class="pagesection">
  386. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  387. </div>';
  388. if (empty($context['topics']))
  389. echo '
  390. <div class="information">(', $txt['search_no_results'], ')</div>';
  391. while ($topic = $context['get_topics']())
  392. {
  393. foreach ($topic['matches'] as $message)
  394. {
  395. echo '
  396. <div class="search_results_posts">
  397. <div class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', ' core_posts">
  398. <div class="content">
  399. <div class="counter">', $message['counter'], '</div>
  400. <div class="topic_details">
  401. <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.', $message['start'], ';topicseen#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
  402. <span class="smalltext">&#171;&nbsp;', $txt['message'], ' ', $txt['by'], ' <strong>', $message['member']['link'], ' </strong>', $txt['on'], '&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
  403. </div>
  404. <div class="list_posts">', $message['body_highlighted'], '</div>';
  405. if ($topic['can_reply'] || $topic['can_mark_notify'])
  406. echo '
  407. <div class="quickbuttons_wrap">
  408. <ul class="reset smalltext quickbuttons">';
  409. // If they *can* reply?
  410. if ($topic['can_reply'])
  411. echo '
  412. <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '" class="reply_button">', $txt['reply'], '</a></li>';
  413. // If they *can* quote?
  414. if ($topic['can_quote'])
  415. echo '
  416. <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'] . ';quote=' . $message['id'] . '" class="quote_button">', $txt['quote'], '</a></li>';
  417. // Can we request notification of topics?
  418. if ($topic['can_mark_notify'])
  419. echo '
  420. <li><a href="', $scripturl . '?action=notify;topic=' . $topic['id'] . '.' . $message['start'], '" class="notify_button">', $txt['notify'], '</a></li>';
  421. if ($topic['can_reply'] || $topic['can_mark_notify'])
  422. echo '
  423. </ul>
  424. </div>';
  425. echo '
  426. <br class="clear" />
  427. </div>
  428. </div>
  429. </div>';
  430. }
  431. }
  432. echo '
  433. <div class="pagesection">
  434. <span>', $txt['pages'], ': ', $context['page_index'], '</span>
  435. </div>';
  436. }
  437. // Show a jump to box for easy navigation.
  438. echo '
  439. <br class="clear" />
  440. <div class="smalltext righttext" id="search_jump_to">&nbsp;</div>
  441. <script type="text/javascript"><!-- // --><![CDATA[';
  442. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move'])
  443. echo '
  444. if (typeof(window.XMLHttpRequest) != "undefined")
  445. aJumpTo[aJumpTo.length] = new JumpTo({
  446. sContainerId: "quick_mod_jump_to",
  447. sClassName: "qaction",
  448. sJumpToTemplate: "%dropdown_list%",
  449. sCurBoardName: "', $context['jump_to']['board_name'], '",
  450. sBoardChildLevelIndicator: "==",
  451. sBoardPrefix: "=> ",
  452. sCatSeparator: "-----------------------------",
  453. sCatPrefix: "",
  454. bNoRedirect: true,
  455. bDisabled: true,
  456. sCustomName: "move_to"
  457. });';
  458. echo '
  459. if (typeof(window.XMLHttpRequest) != "undefined")
  460. aJumpTo[aJumpTo.length] = new JumpTo({
  461. sContainerId: "search_jump_to",
  462. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  463. iCurBoardId: 0,
  464. iCurBoardChildLevel: 0,
  465. sCurBoardName: "', $context['jump_to']['board_name'], '",
  466. sBoardChildLevelIndicator: "==",
  467. sBoardPrefix: "=> ",
  468. sCatSeparator: "-----------------------------",
  469. sCatPrefix: "",
  470. sGoButtonLabel: "', $txt['quick_mod_go'], '"
  471. });
  472. // ]]></script>';
  473. }
  474. ?>