• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Keyword search results excerpts: how do I make them longer?

#1
When someone does a search on my forum, the excerpt of the post returned is typically only a sentence long... any way to increase it's length?

Also, the keyword is only highlighted as bold. But I want to add a yellow background highlight to it. Where would that be in the templates CSS? o_O
 

Digital Doctor

Well-known member
#2
When someone does a search on my forum, the excerpt of the post returned is typically only a sentence long... any way to increase it's length?
Interesting idea.

Also, the keyword is only highlighted as bold. But I want to add a yellow background highlight to it. Where would that be in the templates CSS? o_O
Probably easy with some CSS.
 
#3
Found the answers on my own

in Extra.css template add

Code:
.highlight {
}
and in template search_result_post, change the 150 number in this code

Code:
        <blockquote class="snippet">
            <a href="{xen:link posts, $post}">{xen:helper snippet, $post.message, 150, {xen:array 'term={$search.search_query}', 'emClass=highlight', 'stripQuote=1'}}</a>
        </blockquote>