PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Embedding Search Results Using a Preset Search String

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

  • Embedding Search Results Using a Preset Search String

    I wonder whether the following is possible with Zoom 5.

    I know the (say) top 500 search terms that website visitors are looking for when they visit our site (we have over 40,000 pages).

    I would like them to be able to visit a specific page that has the search results for a popular search term already displayed.

    E.g. - a student is looking for an introduction to the marketing mix
    The user comes to a page on our site titled "Marketing Mix - Introduction".
    In the body of the page, there is a listing of relevant resources on the website (there are about 30-40 notes, quizzes, glossaries etc) which is generated by Zoom.
    i.e. there is no need for them to reenter the phrase "marketing mix - introduction" (they will already have done this in google, yahoo etc).

    Is this possible?

    Jim
    Jim Riley
    Managing Director, Tutor2u Limited
    www.tutor2u.net
    UK Online Learning Resource of the Year

  • #2
    So if I understand you correctly you are wanting a script that will take the existing title of your HTML page and then call Zoom to do a search using the text in the title, then insert the search results into the same page?

    Using SSI, in a SHTML file, you can do something like this,
    <!--#include virtual="search.php?${QUERY_STRING}" -->

    Obviously you would need to set QUERY_STRING to the page title. You would also need to supress the generation of the search form from the Zoom configuration window, in order to just get the search results.

    Another approach would be to use some scripting to call the search.cgi and get it to return results in XML format. Then you can parse the display the results using a script that you write.

    Comment


    • #3
      Thanks for the guidance. How do I suppress the generation of the search form in search.php?

      Jim

      [quote=wrensoft;7281]

      Obviously you would need to set QUERY_STRING to the page title. You would also need to supress the generation of the search form from the Zoom configuration window, in order to just get the search results.
      quote]
      Jim Riley
      Managing Director, Tutor2u Limited
      www.tutor2u.net
      UK Online Learning Resource of the Year

      Comment


      • #4
        On the "Search Page" tab of the Configuration window, change the "Search form" dropdown from "Advanced" to "Do not generate". You will need to re-index for this to take effect.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Thanks - very straightforward! Reindexing now underway

          Jim
          Jim Riley
          Managing Director, Tutor2u Limited
          www.tutor2u.net
          UK Online Learning Resource of the Year

          Comment


          • #6
            Ok - had a go, but not quite right yet.

            http://www.tutor2u.net/resources/boston-matrix.shtml

            The SSI code is:

            <!--#include virtual="/search/search.php?${boston matrix}" -->

            Must be missing something here?

            Jim
            Jim Riley
            Managing Director, Tutor2u Limited
            www.tutor2u.net
            UK Online Learning Resource of the Year

            Comment


            • #7
              any thoughts on what i'm doing wrong?

              Jim
              Jim Riley
              Managing Director, Tutor2u Limited
              www.tutor2u.net
              UK Online Learning Resource of the Year

              Comment


              • #8
                I just got a 404 page not found error when I tried to look at the URL you posted above. The page does not exist.

                In my example, ${QUERY_STRING}" was a variable.

                If you hard code it, it would be,

                <!--#include virtual="/search/search.php?zoom_query=boston+matrix" -->

                Of course this assumes your web server supports and is set up to allow SSI. (most Unix & Linux servers are). Plus it further assumes you are using the PHP option in Zoom and that search.php is found in a folder called /search/.

                If your server doesn't support SSI, or these assumptions are not valid for your site, then you will need to do something similar in PHP, ASP or other scripting language which is available on your server.

                Comment

                Working...
                X