Jump to content
Дизайн и модификация Invision Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Strategius

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

Recommended Posts

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

Share this post


Link to post

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

<if test="$this->request['t']">
   Код поиска
</if>

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

  • Upvote 1

Share this post


Link to post
В globalTemplate добавляете

Мне нужно в topicViewTemplate.

 

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

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

Share this post


Link to post

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

Share this post


Link to post

Вот такую ошибку выдает при попытке поиска:

 

post-59150-0-45273200-1487693654_thumb.png

Share this post


Link to post

Видно же в адресной строке ссылка кривая. Не хватает index.php?

  • Upvote 1

Share this post


Link to post

Заменил

 

{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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...