| 14 | | global $lang_search; |
| 15 | | require_once FORUM_ROOT.'lang/'.$forum_user['language'].'/search.php'; |
| 16 | | $language_js = 'var lang_search = {\'Display results\' : \''.$lang_search['Display results'].'\', \'Show as topics\' : \''.$lang_search['Show as topics'].'\', \'Show as posts\' : \''.$lang_search['Show as posts'].'\', \'Submit search\' : \''.$lang_search['Submit search'].'\', \'Perform new search\' : \''.$lang_search['Perform new search'].'\'};'; |
| | 14 | // If user can search |
| | 15 | if ((!$forum_user['is_admmod'] && $forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1') || $forum_user['is_admmod']) |
| | 16 | { |
| | 17 | global $lang_search; |
| | 18 | require_once FORUM_ROOT.'lang/'.$forum_user['language'].'/search.php'; |
| | 19 | $language_js = 'var lang_search = {\'Display results\' : \''.$lang_search['Display results'].'\', \'Show as topics\' : \''.$lang_search['Show as topics'].'\', \'Show as posts\' : \''.$lang_search['Show as posts'].'\', \'Submit search\' : \''.$lang_search['Submit search'].'\', \'Perform new search\' : \''.$lang_search['Perform new search'].'\'};'; |
| 22 | | if (strpos($tpl_main, '<body>') !== false) |
| 23 | | $tpl_main = str_replace('<body>', '<body onload="quick_search_onload();">', $tpl_main); |
| 24 | | else |
| 25 | | $tpl_main = str_replace('<body', '<body onload="quick_search_onload();"', $tpl_main); |
| 26 | | |
| | 25 | if (strpos($tpl_main, '<body>') !== false) |
| | 26 | $tpl_main = str_replace('<body>', '<body onload="quick_search_onload();">', $tpl_main); |
| | 27 | else |
| | 28 | $tpl_main = str_replace('<body', '<body onload="quick_search_onload();"', $tpl_main); |
| | 29 | } |