The Arcive of vBulletin Modifications Site. |
|
Add "Post Excerpt" to search results Details »»
|
|||||||||||||||||||||||||||||||
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. Screenshots
Show Your Support
|
|||||||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Reserved
|
|
#3
|
|||
|
|||
|
thank you verymuch
|
|
#4
|
|||
|
|||
|
|
|
#5
|
|||
|
|||
|
Aw, thanks! This is really useful ^^
How can I made it checked by default? Thanks!Sorry for my english. |
|
#6
|
|||
|
|||
|
Absolutly nice. Tagged
![]() Is there a way to get this also for 2 languages? I am running a german/english board, and it would be nice if the sentence "Show post excerpt" changes, when someone is changing the board language. Thanks a lot |
|
#7
|
|||
|
|||
|
Thanks for the mod. Not as streamline as in vb3, but for a user mod it's great work!
For those interested in making the search tick the box by default, just insert Code:
checked="checked" E.g. I wrote had it as: Code:
<input type="checkbox" name="showposts" checked="checked"
value="1" id="cb_postexcerpt" {vb:raw showpostschecked} />
|
|
#8
|
||||
|
||||
|
Installed and working well on vB4.0.3 PL1 - Thank You.
|
|
#9
|
||||
|
||||
|
Is this confirmed as woring on vB4.0.5 and 4.0.6, Please?
|
|
#10
|
||||
|
||||
|
Didn't work on my 4.0.6.
![]() By The way, in vB4.0.6 the following codes are replaced with the code shown underneath... OP's original code in: (SEARCH _RESULTS_POSTBIT) 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:
<vb:if condition="$show['inlinemod']">
<span class="nodecontrols">
<input type="checkbox" id="post_imod_checkbox_{vb:raw post.postid}" name="imodcheck[{vb:raw post.postid}]" />
</span>
</label>
</vb:if>
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['nocache']">
<div class="blockrow">
<label for="cb_nocache" class="rightcol">
<input type="checkbox" name="nocache" value="1" id="cb_nocache" tabindex="1" {vb:raw nocachechecked}/> {vb:rawphrase do_not_use_cached_results}
</label>
</div>
</vb:if>
OP's original code in: (SEARCH_INPUT_POST) 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['nocache']">
<div class="blockrow">
<label for="cb_nocache" class="rightcol">
<input type="checkbox" name="nocache" value="1" id="cb_nocache" tabindex="1" {vb:raw nocachechecked}/> {vb:rawphrase do_not_use_cached_results}
</label>
</div>
</vb:if>
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|