Jump to content

Доп.поле поиска


Strategius
 Share

Recommended Posts

Подскажите, пожалуйста, как вввести дополнительную строку поиска в темы, с ключом поиска по конкретной теме? Нужно создать независимую строку поиска ответов по этой теме.

Link to comment
Share on other sites

В globalTemplate добавляете

Мне нужно в topicViewTemplate.

 

За основу берите код из шаблона quickSearch

Я пытался сверстать шаблон (удалял все лишнее), но правильно составить именно для поиска по этой теме не получается... Что бы ни пробовал, выбивает ошибку при попытке поиска.

Link to comment
Share on other sites

Мне нужно в 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>

  • Upvote 1
Link to comment
Share on other sites

Заменил

 

{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 by Strategius
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...