Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeJan 16th 2007 edited
     # 1
    I've noticed that on search results HTML tags are stripped out of comment, but BBCode tags aren't. Is this behaviour something that I can change with my BBCodeParser extension or is it somewhere else? It also appears to happen with BetterBBCode.

    Thanks :)

    The screenshot below shows a BBCode comment and below it the same comment formatted in HTML.

    BBCode tags showing up in search results.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeJan 29th 2007
     # 2
    Bump — anyone have any idea on this at all?
    • CommentAuthorStahlblau
    • CommentTimeJul 27th 2008
     # 3
    Same here - any suggestions?
    • CommentAuthorjetman
    • CommentTimeAug 8th 2008 edited
     # 4
    I suppose that can help:
    1. Edit the file /themes/search_results_comments.php
    2. Replace code
    HighlightTrimmedString($Comment->Body, $HighlightWords, 300)
    with
    HighlightTrimmedString($this->Context->FormatString($Comment->Body, null, null/* or 'BBCode'*/, FORMAT_STRING_FOR_DISPLAY), $HighlightWords, 300)
    3. Save the file to /themes/vanilla(or your theme directory)/
    •  
      CommentAuthorbanjerluke
    • CommentTimeSep 28th 2008
     # 5
    ...except if a tag doesn't get closed, watch out; everything that follows will look funny. (For example, if only the opening [i] gets picked up then the whole rest of the search results page will be in italics.)
    •  
      CommentAuthor[-Stash-]
    • CommentTimeSep 30th 2008
     # 6
    I guess the results aren't parsed through the formatters like normal comments, so this would be why it's not ending each search result at the end of the excerpt. I imagine you'd need to pretty much rip the comment code out and stick it in here somewhere - bah, I'm going off the idea already just thinking about it.

    How easy would it be to strip HTML and BBcode instead? That might be beter suited for search results - I just hate seeing BBCode tags everywhere, it makes things hard to read.
Add your comments
    Username Password
  • Format comments as