Is there any way to control the search results?
Hi everyone. I am using Vanilla 2.1.8p2 and Brand Friendly 1.2.
When I search something, I have results with full comments or discussions (some are not small) and it makes search results very difficult to see. When I search in mobile I get the same story. I just want to see results with title + some content text is so enough. But, I cannot find any options for do this. Is there any way to control it?
Thanks in advance.
Best Answers
-
R_J Admin
The easiest thing would be to add a CSS snippet:
.Search .Excerpt { max-height: 4em; overflow: hidden; }
Either by using a custom theme or with bleistivts useful plugin CSSEdit. The negative effect will be that it might cut the result so that you cannot see the text with the search text (which makes the search far more useless).
1 -
R_J Admin
Do you know enough CSS to understand why the first snippet worked? If yes, simply look at the html source (try inserting "view-soruce:" before the url in your mobile browser) and find out in which class the results are.
The second question is not trivial and you should be more clear in what you ask for. At first you need the class that you have to style. Than try adding things like
.WhatEverThatClassNameMayBe * { text-decoration: none; font-size: 1.2em; color: #000; background: #fff; }
1
Answers
The easiest thing would be to add a CSS snippet:
Either by using a custom theme or with bleistivts useful plugin CSSEdit. The negative effect will be that it might cut the result so that you cannot see the text with the search text (which makes the search far more useless).
Thanks @R_J, this solved the problem but not on mobile.
I added your CSS snippet via CSSEdit and checked the checkbox 'Enable on mobile theme' but it doesnt work.
And special thanks to @Bleistivt for making CSSEdit - simple, useful and handy plugin!
Sorry, I have no possibility to look at the mobile search results right now. Maybe simply using
.Excerpt {
would be enough...@mirX try using
or simply .Excerpt as R_J pointed out, maybe that will solve the mobile issue.
The same results with
.Excerpt {
And one more question: to remove pics from search results I added
.SearchResults img {display: none}
but how to remove formatting if I need the simple text only?Thanks in advans.
Do you know enough CSS to understand why the first snippet worked? If yes, simply look at the html source (try inserting "view-soruce:" before the url in your mobile browser) and find out in which class the results are.
The second question is not trivial and you should be more clear in what you ask for. At first you need the class that you have to style. Than try adding things like
Thank you @R_J for your valuable and quick replies!
The second question is resolved with your assistance and it's completely clear for me now what approach I should take to set the mobile search results (trying to fix myself).