Strategius Posted February 20, 2017 Share Posted February 20, 2017 Подскажите, пожалуйста, как вввести дополнительную строку поиска в темы, с ключом поиска по конкретной теме? Нужно создать независимую строку поиска ответов по этой теме. Link to comment Share on other sites More sharing options...
newbie Posted February 20, 2017 Share Posted February 20, 2017 В globalTemplate добавляете <if test="$this->request['t']"> Код поиска </if>За основу берите код из шаблона quickSearch 1 Link to comment Share on other sites More sharing options...
Strategius Posted February 20, 2017 Author Share Posted February 20, 2017 В globalTemplate добавляетеМне нужно в topicViewTemplate. За основу берите код из шаблона quickSearch Я пытался сверстать шаблон (удалял все лишнее), но правильно составить именно для поиска по этой теме не получается... Что бы ни пробовал, выбивает ошибку при попытке поиска. Link to comment Share on other sites More sharing options...
newbie Posted February 21, 2017 Share Posted February 21, 2017 Мне нужно в topicViewTemplate.Добавляйте туда. Я подумал, что нужно под основной поиск добавить. Чем меньше информации предоставляете, тем больше догадок. Как-то так <div id='search' class='right'> <form action="{parse url="app=core&module=search&do=search&fromMainBar=1" base="preferHttps"}" method="post" id='search-box' > <fieldset> <span id='search_wrap' class='right'> <input type='text' id='main_search' name='search_term' class='inactive' size='17' tabindex='100' /> <if test="$this->request['showtopic'] or ( isset( $this->request['search_app'] ) and substr( $_POST['search_app'], 0, 13 ) == 'forums:topic:' )"> <if test="$this->request['showtopic']"> <input type='hidden' name='search_app' value="forums:topic:{$this->request['showtopic']}" /> <else /> <input type='hidden' name='search_app' value="forums:topic:{parse expression="substr( $_POST['search_app'], 13 )"}" /> </if> </if> <input type='submit' class='submit_input clickable' value='{$this->lang->words['sj_search']}' /> </span> </fieldset> </form> </div> 1 Link to comment Share on other sites More sharing options...
Strategius Posted February 21, 2017 Author Share Posted February 21, 2017 Вот такую ошибку выдает при попытке поиска: Link to comment Share on other sites More sharing options...
newbie Posted February 22, 2017 Share Posted February 22, 2017 Видно же в адресной строке ссылка кривая. Не хватает index.php? 1 Link to comment Share on other sites More sharing options...
Strategius Posted February 22, 2017 Author Share Posted February 22, 2017 (edited) Заменил {parse url="app=core&module=search&do=search&fromMainBar=1" base="preferHttps"}На {parse url="index.php?app=core&module=search&do=search&fromMainBar=1" base="preferHttps"}Теперь все работает, спасибо большое! Edited February 22, 2017 by Strategius Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now