Add "Post Excerpt" to search results
This mod is will add a post excerpt to the search results when searching for posts (like it was in VB 3.x).
What do I need to do? There are two parts to this mod.
Installation PART 1 AdminCP -> Styles & Templates -> Style Manager -> *YOUR STYLE* - I used the Default Style -> Search Templates -> SEARCH _RESULTS_POSTBIT FIND: Code:
<vb:if condition="$show['inlinemod']"> <!-- fourth block --> <label class="threadimod td"> <input type="checkbox" id="post_imod_checkbox_{vb:raw post.postid}" name="imodcheck[{vb:raw post.postid}]" /> </label> </vb:if> Code:
<div style="clear:both; border:1px dashed #c4c4c4; padding:10px; margin:10px 5px 5px 5px; background-color:#fefdf2;"> {vb:raw post.pagetext} </div> * Yes I hardcoded the styling, the assumption being this will get added back to the core. ** If you don't care about having the excerpt show when using the global advanced search you can stop here. Otherwise continue.. PART 2 AdminCP -> Styles & Templates -> Style Manager -> *YOUR STYLE* - I used the Default Style -> Search Templates -> SEARCH_COMMON FIND: Code:
<vb:if condition="$show['nocache']"> <div class="blockrow"> <label for="cb_nocache"> <input type="checkbox" name="nocache" value="1" id="cb_nocache" {vb:raw nocachechecked}/> {vb:rawphrase do_not_use_cached_results} </label> </div> </vb:if> Code:
<vb:if condition="!$show['searchthread']"> <div class="blockrow"> <label for="cb_postexcerpt">Show post excerpt <input type="checkbox" name="showposts" value="1" id="cb_postexcerpt" {vb:raw showpostschecked} /> </label> </div> </vb:if> AdminCP -> Styles & Templates -> Style Manager -> *YOUR STYLE* - I used the Default Style -> Search Templates -> SEARCH_INPUT_POST FIND: Code:
<vb:if condition="$show['nocache']"> <div class="blockrow"> <label for="cb_nocache"> <input type="checkbox" name="nocache" value="1" id="cb_nocache" {vb:raw nocachechecked}/>{vb:rawphrase do_not_use_cached_results} </label> </div> </vb:if> Code:
<vb:if condition="!$show['searchthread']"> <div class="blockrow"> <label for="cb_postexcerpt">Show post excerpt <input type="checkbox" name="showposts" value="1" id="cb_postexcerpt" {vb:raw showpostschecked} /> </label> </div> </vb:if> And that is it - Job Done ! Please click "Installed" and rate this Thread. Thank You. Download No files for download. Screenshots |