<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: Small template bug (in search.php of default template)</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: Small template bug (in search.php of default template)</description>
<language>en</language>
<pubDate>Sat, 06 Sep 2008 06:46:52 +0000</pubDate>

<item>
<title>wyDay on "Small template bug (in search.php of default template)"</title>
<link>http://bbpress.org/forums/topic/small-template-bug-in-searchphp-of-default-template#post-4912</link>
<pubDate>Mon, 26 Feb 2007 12:46:51 +0000</pubDate>
<dc:creator>wyDay</dc:creator>
<guid isPermaLink="false">4912@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Oh no, quite the contrary. The results are shown fine too. The problem is when the titles are show a local variable &#60;code&#62;$topics&#60;/code&#62; is created:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
foreach ( $titles as $topic ) :
$count = $topic-&#38;gt;topic_posts;
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This is all fine and dandy, but, as you can see, &#60;code&#62;$topic&#60;/code&#62; is a local variable and won't be any use further down the page when the code checks whether results have been returned or not.&#60;/p&#62;
&#60;p&#62;I hope I'm making myself clear. Let me reiterate just for kicks: The title results show up fine, but the php code prints &#34;No results found.&#34; as well. Just change &#60;code&#62;$topics&#60;/code&#62; to &#60;code&#62;$titles&#60;/code&#62; in the following code in the template file &#34;search.php&#34;:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php if ( !$topics &#38;#38;&#38;#38; !$recent &#38;#38;&#38;#38; !$relevant &#38;#38;&#38;#38; !$users) : ?&#38;gt;
&#38;lt;?php _e(&#38;#39;No results found.&#38;#39;) ?&#38;gt;

&#38;lt;?php endif; ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>FCB on "Small template bug (in search.php of default template)"</title>
<link>http://bbpress.org/forums/topic/small-template-bug-in-searchphp-of-default-template#post-4911</link>
<pubDate>Mon, 26 Feb 2007 10:37:40 +0000</pubDate>
<dc:creator>FCB</dc:creator>
<guid isPermaLink="false">4911@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;So i think the database field title is not included in the search ?
&#60;/p&#62;</description>
</item>
<item>
<title>wyDay on "Small template bug (in search.php of default template)"</title>
<link>http://bbpress.org/forums/topic/small-template-bug-in-searchphp-of-default-template#post-4904</link>
<pubDate>Mon, 26 Feb 2007 05:05:39 +0000</pubDate>
<dc:creator>wyDay</dc:creator>
<guid isPermaLink="false">4904@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;After a search for a word that appears only in the topic title (but not the tags, nor post content) the results are listed, followed by:&#60;/p&#62;
&#60;p&#62;&#60;strong&#62; No results found. &#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;This is because the &#60;code&#62;if&#60;/code&#62; statement is looking for the local variable &#60;code&#62;$topics&#60;/code&#62;, instead of the correct variable &#60;code&#62;$titles&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;It's a small fix, but I didn't know how to post on the bbPress bugtracker.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
