PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Displaying specific template tags on SHTML Link Back page

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

  • Displaying specific template tags on SHTML Link Back page

    Hi, when using an shtml link back page including search.cgi, is there a way to retrieve a specific template tag rather than all of the ones that have been specified on the search_template.html page as occurs when including the search.cgi?${QUERY_STRING}. For example, I would like to display on the shtml link back page the Summary, include a php file, then display the Recommended Links, include a php file, and then below that display the Results. If the search_template page was an shtml I would do it all from that page, but since I need to include php files, I have to create the shtml link back. How can I do this? Is there a way to include the search.cgi and reference a specific tag? Thank you.

  • #2
    Short answer is no. There is no way the CGI can inject output into your shtml more than once.

    So you can adjust the order of those things within 'search_template.html' but you wouldn't be able to have what you describe (summary, include php, recommended links, include some other php, etc.)

    If you were using the PHP version, you could modify the script.

    The CGI is available as C/C++ source (in the SDK) but compiling this requires a development environment and experience with C.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thank you Ray. I was originally using the PHP version and had modified the code. As the number of sites to be indexed increased, I had to switch over to the CGI version. I programmed with C at uni. Which program do you recommend for compiling the CGI?

      Comment


      • #4
        You will need to license the SDK in order to obtain the source code.

        Which program do you recommend for compiling the CGI?
        See "Rebuilding the code" on Zoom Search Engine SDK page.

        Comment


        • #5
          Excellent, thank you. I will spend some time reading the Users Guide.

          Comment


          • #6
            Compiling the CGI on various platforms is not for the faint of heart -- if you are using a Linux server, you need to be able to compile for that distribution and version of Linux, etc. Get shared libraries correct, have a good development environment, and be able to debug. A Windows server requires a Windows development environment, etc. The SDK is best suited to someone who is a full-time developer on the platform in question.

            Given that -- if your only requirement is formatting, perhaps you should consider scripting your PHP to send a request to the CGI and then parse the XML output returned. You can then format your layout in any way you like.

            Please see the Users Guide for XML output information, basically if you send an additional parameter ("zoom_xml=1"), e.g. "search.cgi?zoom_query=test&zoom_xml=1" you will then be able to retrieve XML output for your post-processing purposes.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              Thank you Ray,

              I will definitely check out post processing the XML output. When I was using search.php I was able to edit the PHP to allow me to use an SSI search_template.shtml version and incorporate some really nice PHP scripts. Since I am now using search.cgi I would like to be able use the search_template.shtml that I was using with the search.php. Would it be possible in a future release of Zoom Indexer for there to be an option for advanced users to output the search_template as an SHTML to take advantage of SSI? I acknowledge that users can use a Link Back URL to an SHTML, but I believe that having the search_template as an SHTML would be a really nice feature.

              Comment


              • #8
                While I can see the use in your context, you are honestly the first person we have request for this feature, so I can't say it is something we plan to do in the near future (unless lots of other users start to request this).

                There's also some technical issues in doing a HTTP request to retrieve the template (this would be the only way we can have a template file be SHTML, etc.) and it would not be very efficient. Not to mention making this user configurable for many different use cases (people could be hosting CGI's in different folders, etc.)

                Given that you would consider having the search make an additional HTTP request to generate the page -- it would seem to me that the XML output (and post-processing the results) would be a tidier design and allowing you complete control of what to display.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment

                Working...
                X