PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

CGI and Formatting infoline

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CGI and Formatting infoline

    Hello there,

    I've been working on the formatting of the result in the cgi version on windows. So far I have been able to get what I want done using CSS, but I've run into a little problem.

    The url on the results page sometimes can be very long on my site and as a result the text is longer than I'd like, stretching out my layout. I have the div (with class="infoline") set to a specific width. For the description div (with class="description") setting the width wraps the text nicely when it gets to big. With the url, however, I don't wish to wrap the text (it's too big and doesn't have any spaces on which to nicely wrap). If I set the overflow css attribute for the infoline div, it never appears in a nice way.

    What I'd really like would be to get the url to be limited to a certain size, the way that is done for the url, cutting the text off after a certain number of characters and adding ... to the end of it. Is this a possible configuration setting? If not, I might have to use JavaScript to do this after the text is rendered, but I'd rather not do that if possible.

    Is there some other way to go about this?

    I find using CSS to format the page a little limiting by times when it comes to CGI. For example, I'd like to move the "x results found" and "2 pages of results" and think I'll resort to JavaScript manipulation of the DOM. Have you considered outputting XML then using XSL to format it for the CGI version? This might give it the formatting flexibility that the PHP and ASP versions have.

    (That said, it's a fantastic product, by the way and I love the speed the CGI offers. Keep up the good work.)

  • #2
    We don't currently provide an option to automatically truncate long URLs.

    Note that you can also modify the wrapping behaviour of the "infoline" class using the "word-wrap" and "white-space" CSS properties. You can normally make it wrap decently with some care given to the various browsers' support for CSS. Here is an example CSS style for "infoline" that should force the URL to wrap when needed:

    Code:
    .infoline {
     font-size: 80%; font-style: normal; color: #808080;
     white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
     white-space: -pre-wrap; /* Opera 4-6 */
     white-space: -o-pre-wrap; /* Opera 7 */
     white-space: pre-wrap; /* CSS3 - Text module */
     word-wrap: break-word; /* IE 5.5+ */
    }
    We should also note that the current output of the search page is in XHTML, which is technically XML and allows for various post-processing methods. We are looking into XSL and other methods for styling and layout, but it is important for us to maintain something that is more commonly used and supported, as many users are still unfamiliar with XSL and using browsers which do not support it (eg. IE 5). Thanks for the suggestion nonetheless and we appreciate the feedback.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I inserted the above CSS code into the template, and the URLs still do not get truncated. They still throw off the display of the search pages.

      Meantime I'm back to suppressing the URL from displaying.

      Comment


      • #4
        ...and the URLs still do not get truncated
        As Ray said, "we don't currently provide an option to automatically truncate long URLs".

        The code he posted was for wrapping long URLs.

        Comment


        • #5
          May I suggest to add this feature into the next release ? The URL display is simply for FYI display to users/searchers, and allowing it to be truncated doesn't harm anybody since the full URL is already embedded in the title link.

          Comment


          • #6
            As always, it depends on the number of user requests. At the moment, you do have the option to disable the displaying of URLs all together if you think the URLs are a problem for you. And there are methods to wrap the URLs if they get too long for your layout, which is probably the preferred approach. I don't know why the wrapped URL would still be throwing off your layout, but perhaps there's another problem at hand there. Was it actually wrapping? This can depend on the rest of your HTML in which the results are displayed within.

            Truncated URLs can be confusing for some end users. There is also the question as to how to truncate - simply chopping off the end of the URL and replacing it with "..." might not be very meaningful for many sites where the last part of the URL is the distinguishing feature (eg. "mysite.com/script.php?standard=stuff&blah=blah&etc=etc...&pag e=1").
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment

            Working...
            X