PDA

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


Sofia
31 May 2009, 14:32
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.

http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=214987

https://www.vbulletin.org/forum/


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;nocache=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
31 May 2009, 14:48
Very nice Sofia. Thank you for this

ArnyVee
31 May 2009, 15:12
Another nice one Sofia! :up:

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

Sofia
31 May 2009, 15:22
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: http://www.vbulletin.org/forum/showthread.php?t=196078&highlight=search

goxy63
31 May 2009, 20:17
Nominated rated installed

Thanks

ArnyVee
31 May 2009, 21:18
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: http://www.vbulletin.org/forum/showthread.php?t=196078&highlight=search

Thank you Sofia! :)

Sofia
31 May 2009, 22:57
Nominated rated installed

Thanks

Thank you, goxy :)

PµŋĭsЋ£я
09 Jul 2009, 19:18
very nice sofia thans installed:)

Kolbi
09 Jul 2009, 21:39
Can someone create a TMS file? :)

kaptanblack
10 Jul 2009, 01:21
Thans Sofia..

Kolbi
28 Jul 2009, 08:12
Doesn“t work for me on 3.8.3?!?

Alucard^
25 Oct 2009, 20:30
Wow, rly cool... work perfect for me on 3.8.4

Sofia, you give me the best modifications! GJ.

COL NIL SATIS
25 Oct 2009, 21:21
Yikes thats awesome...thanks sofia..installed and nominated

Dj Smuggla
23 Jan 2010, 16:29
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://www.vbulletin.org/forum/external/2010/01/36.jpg