[Core Edit] View Unanswered Threads
This will add a new specialized Search preset link "View Unanswered Threads" to header.<br />
<br />
Open template <code class="inline-code">header_welcomeblock_member_search</code> and add at the bottom:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php"><li><a href="{$mybb->settings['bburl']}/search.php?action=findunansweredthreads">View Unanswered Threads</a></li>
</code></pre> <br />
Now open your search.php file in an editor. Go to line no. around 1252, find this line:<br />
<code class="inline-code">elseif($mybb->input['action'] == "finduserthreads"
</code><br />
<br />
and change it to:<br />
<code class="inline-code">elseif($mybb->input['action'] == "finduserthreads" || $mybb->input['action'] == "findunansweredthreads"
</code><br />
<br />
Just after that, find this line:<br />
<code class="inline-code">$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";</code><br />
<br />
and change it to:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">
if($mybb->input['action'] == "finduserthreads"
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}
else
{
$where_sql = "replies='0'";
}
</code></pre><br />
Now save the modified search.php and reupload to your forum root, replacing the existing one.<br />
<br />
Result:<br />
<br />
<img src=" " data-original-url="https://user-images.githubusercontent.com/21265591/112095966-71db1980-8bc3-11eb-936d-2c72f7197633.gif" loading="lazy" width="640" height="350" alt="[Image: 112095966-71db1980-8bc3-11eb-936d-2c72f7197633.gif]" class="mycode_img" />
This will add a new specialized Search preset link "View Unanswered Threads" to header.<br />
<br />
Open template <code class="inline-code">header_welcomeblock_member_search</code> and add at the bottom:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php"><li><a href="{$mybb->settings['bburl']}/search.php?action=findunansweredthreads">View Unanswered Threads</a></li>
</code></pre> <br />
Now open your search.php file in an editor. Go to line no. around 1252, find this line:<br />
<code class="inline-code">elseif($mybb->input['action'] == "finduserthreads"
<br />
and change it to:<br />
<code class="inline-code">elseif($mybb->input['action'] == "finduserthreads" || $mybb->input['action'] == "findunansweredthreads"
<br />
Just after that, find this line:<br />
<code class="inline-code">$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";</code><br />
<br />
and change it to:<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">
if($mybb->input['action'] == "finduserthreads"
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}
else
{
$where_sql = "replies='0'";
}
</code></pre><br />
Now save the modified search.php and reupload to your forum root, replacing the existing one.<br />
<br />
Result:<br />
<br />
<img src=" " data-original-url="https://user-images.githubusercontent.com/21265591/112095966-71db1980-8bc3-11eb-936d-2c72f7197633.gif" loading="lazy" width="640" height="350" alt="[Image: 112095966-71db1980-8bc3-11eb-936d-2c72f7197633.gif]" class="mycode_img" />