Log in

View Full Version : Forum Display Enhancements - Search this Forum above threads


Sofia
05-30-2009, 10:00 PM
This mod allows you to add a search by forum above threads list.
Included: a dropdown menu to go on advanced search or to search unanswered threads in the forum.

https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=214987

https://vborg.vbsupport.ru/


In the template "forumdisplay"

Find and delete:

<form action="inlinemod.php?forumid=$forumid" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="forumid" value="$forumid" />Find and delete:

<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
Find:

<!-- / controls above thread list -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal"> : $foruminfo[title]</span></td>
<td class="vbmenu_control" id="forumtools" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumtools" rel="nofollow">$vbphrase[forum_tools]</a> <script type="text/javascript"> vbmenu_register("forumtools"); </script></td>
<if condition="$show['forumsearch']">
<td class="vbmenu_control" id="forumsearch" nowrap="nowrap"><if condition="$show['quicksearch']"><a href="$show[nojs_link]#goto_forumsearch" rel="nofollow">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch"); </script><else /><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]" rel="nofollow">$vbphrase[search_this_forum]</a></if></td>
</if>
</tr>
</table>Add below:


<!-- search this forum -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<if condition="$show['popups'] AND $show['forumsearch']">
<!-- forum search menu -->
<form action="search.php?do=process" method="post">
<tr>
<td class="thead">$vbphrase[search_this_forum]</td>
</tr>
<tr align="center">
<td class="alt1" title="nohilite">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="forumchoice[]" value="$forumid" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="text" class="bginput" name="query" size="25" tabindex="1001" />
<select name="titleonly">
<option value="0" $titleonlyselected[0]>Search Entire Posts</option>
<option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
</select><if condition="$show['nocache']"> <label for="cb_nocache"><input type="checkbox" name="nocache" value="1" id="cb_nocache" />$vbphrase[do_not_use_cached_results]</label></if>
<input type="submit" class="button" value="Search" accesskey="s" tabindex="1004" />

<a href="search.php" accesskey="4" rel="nofollow" id="search_forum_h" class=""><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" title="Advanced Search" border="0" /></a>
<script type="text/javascript"> vbmenu_register("search_forum_h",1); </script>
</div>


<div class="vbmenu_popup" id="search_forum_h_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead" align="left">Search Options</td></tr>
<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]f=$forumid" rel="nofollow">$vbphrase[advanced_search]</a></td></tr>
<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=process&amp;forumchoice[]=$forumid&amp;replyless=1&amp;replylimit=0&amp;exclude=30&amp;noca che=1" rel="nofollow">Unanswered Threads</a></td></tr>

</table>
</div>


</td>
</tr>

</form>
</if>
</table>
<!-- / search this forum -->


<form action="inlinemod.php?forumid=$forumid" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="forumid" value="$forumid" />

HMBeaty
05-31-2009, 12:48 PM
Very nice Sofia. Thank you for this

ArnyVee
05-31-2009, 01:12 PM
Another nice one Sofia! :up:

Could I add this above all forum pages? Would I include this code in the header or something?

Sofia
05-31-2009, 01:22 PM
Another nice one Sofia! :up:

Could I add this above all forum pages? Would I include this code in the header or something?

You want to add a search by forum on all pages? Or a global search (like vB.org) on all pages? If you want a global search, see this mod: https://vborg.vbsupport.ru/showthread.php?t=196078&highlight=search

goxy63
05-31-2009, 06:17 PM
Nominated rated installed

Thanks

ArnyVee
05-31-2009, 07:18 PM
You want to add a search by forum on all pages? Or a global search (like vB.org) on all pages? If you want a global search, see this mod: https://vborg.vbsupport.ru/showthread.php?t=196078&highlight=search

Thank you Sofia! :)

Sofia
05-31-2009, 08:57 PM
Nominated rated installed

Thanks

Thank you, goxy :)

P?ŋĭsЋ?я
07-09-2009, 05:18 PM
very nice sofia thans installed:)

Kolbi
07-09-2009, 07:39 PM
Can someone create a TMS file? :)

kaptanblack
07-09-2009, 11:21 PM
Thans Sofia..

Kolbi
07-28-2009, 06:12 AM
Doesn´t work for me on 3.8.3?!?

Alucard^
10-25-2009, 06:30 PM
Wow, rly cool... work perfect for me on 3.8.4

Sofia, you give me the best modifications! GJ.

COL NIL SATIS
10-25-2009, 07:21 PM
Yikes thats awesome...thanks sofia..installed and nominated

Dj Smuggla
01-23-2010, 02:29 PM
This is great, thanks sofia...
Could you help me move the "Forum Tools" & "Search this Forum" links down to the "Search this Forum" line?

See screen shot:

https://vborg.vbsupport.ru/external/2010/01/36.jpg