Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

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.

Tagged:

Best Answers

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    Answer ✓

    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).

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    Answer ✓

    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;
    }
    

Answers

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    Answer ✓

    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).

  • Options

    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.

  • Options

    And special thanks to @Bleistivt for making CSSEdit - simple, useful and handy plugin! <3

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Sorry, I have no possibility to look at the mobile search results right now. Maybe simply using .Excerpt { would be enough...

  • Options
    rasteronrasteron forum.rastercode.com ✭✭
    edited March 2015

    @mirX try using

    .SearchResults .Excerpt { 
    

    or simply .Excerpt as R_J pointed out, maybe that will solve the mobile issue.

  • Options

    The same results with .Excerpt { :3

    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.

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    Answer ✓

    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;
    }
    
  • Options

    @R_J said:
    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;
    }
    

    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). <3

Sign In or Register to comment.