PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Changing the name of the default search template

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

  • Changing the name of the default search template

    Hello All,

    I am using the cgi version of the zoom indexer (excellent) on an intranet site that also uses a CMS. The search results page that I want to use is managed by the CMS system and I am putting the results of the search in a frame on this page.

    The problem is that the CMS system wants the page name to be index.shtml and I must be blind, because I can't find where to change the name of the default search template, other than modifying the settings.zdat file directly.

    And, of course, this file is updated eveytime I update the indexes.

    So, how can I change the name of the default template?

    Thanks
    Lee

  • #2
    OK, forget changing the name of the search template file. I have bigger problems!!

    The way that I was trying to do this wasn't going to work anyway. So, I'm looking at the FAQs on SSI / CGI and trying to use the following directive:



    On every page of the site, I have a small search form:

    <form method="GET" action="/Search/index.shtml?QUERY_STRING=zoom_query" style="display:inline">
    <input type="text" name="zoom_query" style="width:80px; height:18px; font-size:10px">
    <input style="font-size:10px" type="submit" value="Go">
    </form>

    When I try to search, the URL is /Search/index.shtml?zoom_query=XYZ

    And the page displays all of my CMS includes, but the search include is actually including the search.exe file (meaning it's not executing the cgi and including the search results, it's including a bunch of garbage - ie: the search.exe file itself)

    I've followed the FAQ instructions (I think) for SSI and CGI.

    I don't know if this is a problem with the way I'm passing the QUERY_STRING, a problem with the way the server (IIS6 on Win2K3) is setup, or what??

    any help would be greatly appreciated.

    TIA
    Lee

    Comment


    • #3
      So, how can I change the name of the default template?
      There normally isn't any reason to change the name of this internal file. The end user never sees the file.

      If you are changing the name of the template file in an attempt to include scripting or server side includes into it, don't bother it won't work. There is a better solution to this problem here,
      http://www.wrensoft.com/zoom/support/faq_ssi.html

      (But I can see from your 2nd post that you have already worked this out)

      -----
      David

      Comment


      • #4
        ...but the search include is actually including the search.exe file (meaning it's not executing the cgi...
        Sounds like a server side configuration problem. Did you try naming it as .CGI rather than a .EXE ?

        Calling a .CGI or .EXE from a Window IIS server using a SSI is a fairly rare thing to do. I'll do some searching on the web to see if there are any documented configuration issues relating to this.

        Failing that you might need to write a small PHP or ASP script to call the search.exe instead.

        -------
        David

        Comment


        • #5
          hi David,


          But I can see from your 2nd post that you have already worked this out
          Well, yes, I sort of have it worked out. I still can't get it to work correctly using the SSI FAQ. The result of the search is what appears to be a copy of the search.exe executable!

          First, I'm not sure if I'm passing the QUERY_STRING value correctly

          Second, I don't know why, but it seems that the SSI is actually including the search.exe, rather than running it and including the results.

          any help would be appreciated!!

          TIA
          Lee

          Comment


          • #6
            Instead of using the #include server side directive you might consider using the #exec directive instead.



            But read this first becuase #exec might be turned off on your server.
            http://support.microsoft.com/kb/233969/

            Of course you could always ask Microsoft. As it is really an IIS issue.

            ----
            David

            Comment


            • #7
              OK, I've got it sort of working.

              I added the registry key, no problem.
              I was actually trying to use the #EXEC directive before (without the registry update, so thanks for that!!)

              After changing the registry, I was getting:

              Failed to execute script: Http Status Code = 404

              so, I changed #EXEC CMD= to #EXEC cgi=

              and the include now executes, but the query string is not being passed to the executable.

              Whether I call the shtml page from one of my page searches or if I use the search form generated by , I get no results.

              So, I'm almost there!! any ideas?

              TIA
              Lee

              Comment


              • #8
                I did some research into this problem (using SSI to include the CGI on IIS web servers).

                First thing is that the "#include virtual" method documented in the FAQ only works on Apache servers. We will need to update our FAQ to say this.

                As noted above, this method did not work on IIS servers. It seems like the closest equivalent operation available on IIS would be either:

                <!--#exec cmd="...">

                Which as noted above, requires certain settings to be enabled on the IIS server via registry changes. Alternatively, there is this method:

                <!--#exec cgi="...">

                This is typically available and will allow the execution of the CGI on most default servers. However, this does not solve the issue of needing to pass the search parameters to the CGI application. It turns out that it is possible to pass the hardcoded parameters (eg. <!--#exec cgi="/cgi/search.cgi?param1+param2) but not dynamic values like the QUERY_STRING in the URL.

                So it seems like it is not possible to do this with IIS as you can on Apache.

                Instead, we would recommend using a bit of ASP (which is normally enabled on most IIS servers) to execute the CGI. This method is documented here (see "embed search.cgi within an ASP file"):
                http://www.wrensoft.com/zoom/support...i.html#ssi_cgi
                This should successfully set the QUERY_STRING environment variable and execute the CGI correctly.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment


                • #9
                  Here's something else to consider. Is it necessary for your search results page to be part of the CMS?

                  Because, you could have search forms on any of the pages in your CMS managed site, and then only the results are loaded on a page outside of your CMS.

                  It would seem like if your CMS is restricted to .shtml files, then alot of scripts would not be able to work with it either.
                  --Ray
                  Wrensoft Web Software
                  Sydney, Australia
                  Zoom Search Engine

                  Comment


                  • #10
                    Hi,

                    Has anyone figured out how to get this working in a CMS?

                    Everything on my test trial is working fine, except that the results page is shown without my theme.

                    It would be great if the search_template.html could be in a format like search_template.php, search_template.asp, etc. to fit the design of a particular site.

                    I'm using the CGI version as my site will grow beyond the specs, but the site is on a linux server, running php.

                    Thanks.

                    Comment


                    • #11
                      Every CMS is different, so this is not a general reference or topic, and there is no single answer.

                      Zoom can work alongside or within any CMS. But the degree of integration can differ depending on how flexible the CMS is to sticking in external scripts and pages.

                      As mentioned above, if you wish to use PHP in your search template, this is the supported method:
                      http://www.wrensoft.com/zoom/support...i.html#ssi_cgi
                      --Ray
                      Wrensoft Web Software
                      Sydney, Australia
                      Zoom Search Engine

                      Comment


                      • #12
                        Hi Raymond,

                        Is it possible that you all can help me integrate the results page to fit my site's design if I purchase the professional cgi search?

                        This is important to me.

                        Thanks.

                        Comment


                        • #13
                          Most people don't need it. For the most part you can read the users guide, and get the information you need to install the software on all but the most complex of sites.

                          But yes, we do offer an installation service. A sinple install is about 1 hour $75 USD. For complex installs with customisation of images & look of the results, we need to discuss your requirements to come up with a quote.

                          ----
                          David

                          Comment


                          • #14
                            I'll keep on searching for another script that allows me to customize the search results without paying a ridiculous $75 charge!

                            Comment


                            • #15
                              The results can be customised without any real problem. You can do it yourself.

                              Our point was that you might need to read the users guide. 99.5% of all people who purchase the software install it themselves. Of course we provide free E-Mail support and answer questions here in the forum.

                              But as it seemed you didn't have time to install the software and read the guide, we offered to do the work for you. We believe that charge is reasonable for the service provided. If you have no budget for your project, and no time to read the guide youself, then I would humbly suggest your project is probably doomed.

                              ---
                              David

                              Comment

                              Working...
                              X