Announcement

Collapse
No announcement yet.

How to wrap post content in multiple lines with ellipsis in Search Module Default view

Collapse
This is a sticky topic.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod How to wrap post content in multiple lines with ellipsis in Search Module Default view

    By default, the Search Module truncates post content within a single line with ellipsis in Default view. Showing just one line may not be enough to give users an idea what the post is about.

    To wrap the post content in 3 lines with ellipsis, simply add this custom CSS in css_additional.css template.

    Code:
    .search-widget .b-post-sm__post-content.ellipsis {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        white-space: normal;
        margin-top: 5px;
    }​​

    Adjust the value 3 accordingly.

    If you want a little spacing between the post content and the Channel section, add the following CSS code:
    Code:
    .search-widget .list-item-footer {
        margin-top: 5px;
    }​

    Screenshot:
    Which one do you think displays the post content preview better?

    Click image for larger version  Name:	image.png Views:	0 Size:	274.2 KB ID:	28853

    Compatibility:
    This code is compatible with self-hosted vB5 and vB6 as well as vBCloud.

    Enjoy this FREE mod!

    Please send me a ☕ if you find this mod useful!
    Last edited by glennrocksvb; 01-29-2024, 09:25 PM.

    #2
    thanks nice mod

    i tried without the space

    here the results

    Click image for larger version

Name:	Immagine 2024-01-30 133004.png
Views:	133
Size:	59.8 KB
ID:	28858Click image for larger version

Name:	Immagine 2024-01-30 133022.png
Views:	132
Size:	59.2 KB
ID:	28856
    Attached Files

    Comment


      #3
      i understood..

      that depends of this setting ... mine is setted TOPICS instead of Default

      Click image for larger version  Name:	Immagine 2024-01-30 134737.png Views:	0 Size:	11.6 KB ID:	28860

      Comment


        #4
        done. thanks for the mod.

        Comment


          #5
          This mod is only designed to wrap the preview post content text for Default View option in the Search module. Topic view does not include preview text. It just shows the topic title so there's no post content to wrap in multiple lines with ellipsis.

          Comment


            #6
            If the topic title in the thread is a large size it messes up. Same size is showing up in sidebar.

            Comment


            • glennrocksvb
              glennrocksvb commented
              Editing a comment
              Can you post a screenshot, please?

          Users Viewing This Page

          Collapse

          There is 1 user viewing this forum topic.

          • Guest Guest

          Latest Posts

          Collapse

          Working...
          X
          Searching...Please wait.
          An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

          Please push the back button and reload the previous window.'
          An unexpected error was returned: 'Your submission could not be processed because the token has expired.

          Please push the back button and reload the previous window.'
          An internal error has occurred and the module cannot be displayed.
          There are no results that meet this criteria.
          Search Result for "|||"