Search Results

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
iCloud
Registered User
Posts: 15
Joined: Fri Mar 26, 2010 10:52 am

Search Results

Post by iCloud » Sun Mar 28, 2010 11:08 pm

I am trying to make it so the search results are in topics by default, how could I do that? I was able to make the search.php to show in topics, but the search bar in topics and forums still show as post. :( Alright, I found a "search_results.html" in my templates folder, but I don't know what to change.
<!-- IF $CA_PAGE == '' --><!-- DEFINE $CA_PAGE = 'search' --><!-- ENDIF --><!-- INCLUDE overall_header.html -->



<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>

<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}: <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->



<!-- IF not SEARCH_IN_RESULTS -->

<div class="rightside pagination">

{SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->

</div>

<!-- ENDIF -->



<!-- IF SEARCH_TOPIC -->

<p class="indexlinks"><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>

<!-- ELSE -->

<p class="indexlinks"><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a></p>

<!-- ENDIF -->



<!-- IF SEARCH_IN_RESULTS -->

<form method="post" action="{S_SEARCH_ACTION}">

<div class="topic-actions">

<div class="search-box">

<label for="add_keywords">{L_SEARCH_IN_RESULTS}: <input type="text" name="add_keywords" id="add_keywords" value="" class="inputbox narrow" /></label>

<input class="button2" type="submit" name="submit" value="{L_SEARCH}" />

</div>

<div class="rightside pagination">

{SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->

</div>

</div>

</form>

<!-- ENDIF -->



<!-- IF S_SHOW_TOPICS -->



<!-- IF .searchresults -->

<div class="forumbg">



{$CA_BLOCK2_START}

<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></h2>

{$CA_BLOCK2_START2}



<ul class="topiclist">

<li class="header">

<dl class="icon">

<dt>{L_TOPICS}</dt>

<dd class="posts">{L_REPLIES}</dd>

<dd class="views">{L_VIEWS}</dd>

<dd class="lastpost"><span>{L_LAST_POST}</span></dd>

</dl>

</li>

</ul>

<ul class="topiclist topics">



<!-- BEGIN searchresults -->

<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">

<dl class="icon" style="background-image: url({searchresults.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">

<dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>

<!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->

<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}

<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->

<!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />

<!-- IF searchresults.PAGINATION --><strong class="pagination"><span>{searchresults.PAGINATION}</span></strong><!-- ENDIF -->

{L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} {L_POSTED_ON_DATE} {searchresults.FIRST_POST_TIME}

<!-- IF not searchresults.S_TOPIC_GLOBAL -->{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE --> ({L_GLOBAL})<!-- ENDIF -->

</dt>

<dd class="posts">{searchresults.TOPIC_REPLIES}</dd>

<dd class="views">{searchresults.TOPIC_VIEWS}</dd>

<dd class="lastpost"><span>

{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}

<!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{L_POSTED_ON_DATE} {searchresults.LAST_POST_TIME}<br /> </span>

</dd>

</dl>

</li>

<!-- END searchresults -->

</ul>



{$CA_BLOCK2_END}

</div>

<!-- ELSE -->

<div class="panel">

{$CA_BLOCK_START}

<strong>{L_NO_SEARCH_RESULTS}</strong>

{$CA_BLOCK_END}

</div>

<!-- ENDIF -->



<!-- ELSE -->



<!-- BEGIN searchresults -->

<div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->">

{$CA_POST_START}



<!-- IF searchresults.S_IGNORE_POST -->

{$CA_POST_PROFILE_EMPTY}

{$CA_POST_TEXT_START}

<div class="postbody">

<div class="post-content">

<div class="ignore">{searchresults.L_IGNORE_POST}</div>

</div>

</div>

{$CA_POST_TEXT_END}

<!-- ELSE -->

{$CA_POST_PROFILE_START}

<div class="postprofile">

<div class="profile-top">

<p class="profile-author">

{searchresults.POST_AUTHOR_FULL}

</p>

</div>

<div class="profile-details">

<p>{searchresults.POST_DATE}</p>

<!-- IF searchresults.FORUM_TITLE -->

<p><strong>{L_FORUM}:</strong> <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p>

<p><strong>{L_TOPIC}:</strong> <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></p>

<!-- ELSE -->

<p><strong>{L_GLOBAL}:</strong> <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></p>

<!-- ENDIF -->

<p><strong>{L_REPLIES}:</strong> {searchresults.TOPIC_REPLIES}</p>

<p><strong>{L_VIEWS}:</strong> {searchresults.TOPIC_VIEWS}</p>

</div>

</div>

{$CA_POST_PROFILE_END}

{$CA_POST_TEXT_START}

<div class="postbody">

<div class="post-content">

<h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>

<div class="content">{searchresults.MESSAGE}</div>

<ul class="searchresults">

<li><a href="{searchresults.U_VIEW_POST}" class="{S_CONTENT_FLOW_END}">{L_JUMP_TO_POST}</a></li>

</ul>

<div class="clear"></div>

</div>

</div>

{$CA_POST_TEXT_END}

<!-- ENDIF -->



{$CA_POST_END}

</div>

<!-- BEGINELSE -->

<div class="panel">

{$CA_BLOCK_START}

<strong>{L_NO_SEARCH_RESULTS}</strong>

{$CA_BLOCK_END}

</div>

<!-- END searchresults -->

<!-- ENDIF -->



<!-- IF PAGINATION or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->

<form method="post" action="{S_SEARCH_ACTION}">



<fieldset class="display-options">

<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->

<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->

<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->

<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>

<label>{S_SELECT_SORT_DIR}<!-- ENDIF --> <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>

<!-- ENDIF -->

</fieldset>



</form>



<hr />

<!-- ENDIF -->



<!-- IF PAGINATION or .searchresults or PAGE_NUMBER -->

<ul class="linklist">

<li class="rightside pagination">

{SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->

</li>

</ul>

<!-- ENDIF -->



<!-- INCLUDE jumpbox.html -->



<!-- INCLUDE overall_footer.html -->

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Search Results

Post by Comkid » Mon Mar 29, 2010 3:29 am

This should work:

OPEN: styles/prosilver/template/search_body.html

FIND:

Code: Select all

<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label>
			<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
REPLACE WITH:

Code: Select all

<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" /> {L_POSTS}</label>
			<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" checked="checked" /> {L_TOPICS}</label>
I ist Comkid :P

iCloud
Registered User
Posts: 15
Joined: Fri Mar 26, 2010 10:52 am

Re: Search Results

Post by iCloud » Mon Mar 29, 2010 11:28 pm

I can't find that in my styles, all I can find close to that is

Code: Select all

<dt><label for="show_results1">{L_DISPLAY_RESULTS}:</label></dt>
		<dd>
			<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label> 
			<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
		</dd>

iCloud
Registered User
Posts: 15
Joined: Fri Mar 26, 2010 10:52 am

Re: Search Results

Post by iCloud » Wed Mar 31, 2010 7:03 am

Help please

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Search Results

Post by Comkid » Wed Mar 31, 2010 8:10 am

Oh, sorry, I gave you a proSilver edit ;)

FIND:

Code: Select all

<dt><label for="show_results1">{L_DISPLAY_RESULTS}:</label></dt>
      <dd>
         <label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label> 
         <label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
      </dd>
REPLACE WITH:

Code: Select all

<dt><label for="show_results1">{L_DISPLAY_RESULTS}:</label></dt>
      <dd>
         <label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" /> {L_POSTS}</label> 
         <label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" checked="checked" /> {L_TOPICS}</label>
      </dd>
I ist Comkid :P

Locked

Return to “[3.0.x] Support Forum”