PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Two minor requests

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

  • Two minor requests

    It would be nice if it were possible to...

    1) Control the size of the generated searchbox.

    2) Specify that the URL in the result title be relative rather than absolute.
    Nick

  • #2
    1.) You can do this via CSS on your search template. The following would set your search box to be 200 pixels wide:

    Code:
    input.zoom_searchbox { width: 200px; }
    2.) We decided against this because we can not be certain where the search files will be uploaded to at the end of indexing. Not everyone uses the built-in FTP upload feature, and also, people tend to move the files around. Relative links would mean that the links would break if the search files are moved to different folders on the server.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      1) Good point -- I should have thought of that!

      2) In Offline mode, couldn't you use the base URL? In fact, isn't that already used to construct the absolute URL? So writing a relative URL instead would be relatively easy?

      If people move their files to a different folder on the server, won't an absolute URL be as broken as would be a relative URL?!
      Nick

      Comment


      • #4
        No, I'm talking about when the search files are moved, not the other web pages on the site. By moving the search files, the relative links would be dependent on where the search files are located and where you started indexing (eg. the start directory or start URL). With absolute links, you can store the search files anywhere and it will still work - you can even have it hosted on a totally different site.

        In order to have relative links for the search results, these links would need to be relative to where the search page is eventually hosted - ie. relative to the equivalent start folder on the server. This can be very different paths to your local copy of the files. This is easy to get wrong for the end-user and confusing to explain (it can also vary with different web host configurations). As such, we do not recommend it in many cases.

        However, you can have relative links for an Offline mode index. You can specify a base URL such as "../" or "./" etc. relative to where your files will be located on the web server. This is primarily only recommended for when you are hosting the search engine on a CD or DVD distribution, and it is documented in Appendix B of our Users Guide:
        http://www.wrensoft.com/zoom/usersguide.html
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Originally posted by Ray
          No, I'm talking about when the search files are moved, not the other web pages on the site. By moving the search files, the relative links would be dependent on where the search files are located and where you started indexing (eg. the start directory or start URL). With absolute links, you can store the search files anywhere and it will still work - you can even have it hosted on a totally different site.

          In order to have relative links for the search results, these links would need to be relative to where the search page is eventually hosted - ie. relative to the equivalent start folder on the server. This can be very different paths to your local copy of the files. This is easy to get wrong for the end-user and confusing to explain (it can also vary with different web host configurations). As such, we do not recommend it in many cases.
          Yes, I see what you mean as regards links of the form dir1/dir2/file.html, or ./dir1/dir2/file.html, or ../dir1/dir2/file.html. It would be nice to have the flexibility to generate such links, but I can understand your desire to prevent people shooting themselves in the foot, whereupon they might blame Zoom!

          Maybe I'm not using the correct terminology, but a "relative" link of the form /dir1/dir2/file.html would not suffer from these problems. If you were dealing with a single site, it should be quite straightforward. One advantage would be that the visitor's browser could (so I've heard) use HTTP keep-alive to request a search result faster.

          Originally posted by Ray
          However, you can have relative links for an Offline mode index. You can specify a base URL such as "../" or "./" etc. relative to where your files will be located on the web server. This is primarily only recommended for when you are hosting the search engine on a CD or DVD distribution, and it is documented in Appendix B of our Users Guide:
          http://www.wrensoft.com/zoom/usersguide.html
          Thanks, that's a handy tip.
          Nick

          Comment

          Working...
          X