PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Two Quick Noob Questions

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

  • Two Quick Noob Questions

    Loving the product so far. Two small things:
    1. The search results always include words from the css menu. So for example, if someone searches for 'records' they get -every- page because 'records' happens to be a menu item. The menu is in an SSI included shtml file. Is there any way to get around this sort of problem?

    2. Again with the SSI menu. I created my own search_template which works fine, but for -some- reason refuses to recognise the #include for the ss shtml menu. Is there some way to work around that also?

    TIA,

    ---JC

  • #3
    THANKS!

    RE: #2... I don't quite get it.

    http://www.jchmusic.com

    I have a little search form at the top of each page

    <div style="position: absolute; width: 97px; height: 26px; z-index: 99; left:793px; top:10px; padding: 0; margin: 0;" id="layersearch">
    <form method="get" action="search.php">
    <input type="text" name="zoom_query" size="20" />
    <input type="submit" value="Search" />
    </form>
    </div>

    ...and then I have the search_html.html page which I modifed and tried to add the #include to.

    But I got lost in the FAQ but where it says...

    An example using SSI (eg. "mysearch.shtml") with the PHP search script:
    <!--#include virtual="header.html" -->
    Welcome to my search page
    <!--#include virtual="search.php?${QUERY_STRING}" -->
    ...
    <!--#include virtual="footer.html" -->
    Is this referring to the search box above or to the search_template?

    I then talks about modifying the linkback and now my head is SPINNING. Can you help?

    TIA,

    ---JC

    Comment


    • #4
      You can't use #include's in the template file. You have to use the scripting wrapping method from the FAQ above.

      But if this is too complex. The easier solution is to just paste the HTML code you posted above (in the <div> tags) straight into the template file.

      Comment


      • #5
        Originally posted by wrensoft View Post
        You can't use #include's in the template file. You have to use the scripting wrapping method from the FAQ above.
        I get that. I just need a clearer example than the FAQ. It's confusing to me what I'm supposed to exactly 'wrap'. Perhaps you could give me a -very- short example?

        Originally posted by wrensoft View Post
        But if this is too complex. The easier solution is to just paste the HTML code you posted above (in the <div> tags) straight into the template file.
        Where the <ZOOMSEARCH> tag is? How does put the search -form- into the search_template get me where I want to go.

        Sorry to be so thick. Maybe it's because my search box is not a self-contained page, but rather is itself an include snippet on every page and not a part of Search_Template.

        Can you help?

        THANKS!

        ---JC

        Comment


        • #6
          Perhaps you could give me a -very- short example?
          The example we provided was only 3 lines. But I can shorten it to two if you like,
          <!--#include virtual="YourHeaderFile.html" -->
          <!--#include virtual="search.php?${QUERY_STRING}" -->

          If this doesn't make sense. Then you shouldn't be using server side includes. Use my 2nd suggestion instead.

          But just looking at your site again now has confused me. You said in your first E-mail that your navigation menu was not appearing on the search results page, becuase it was a SSI. But I can see it on your site when i do a search. So I don't really understand the problem. Or maybe you have already fixed the problem after you made the post above?

          Comment


          • #7
            Hey JC, ...from Husker Du to Motown! That's quite a history. Playing those incredible James Jamerson basslines for the Tempts and the Four Tops must have been a blast.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #8
              No, it's not the -length- it's the fact that I don't know -where- to put the bits of code. I think it's something very 'duh' . I was hoping for something like an example of the change to search_html

              The reason it 'looks' like it's OK is because I cut n pasted the menu.shtml into the search page to get it to work. So I'm still a bit clueless.

              Sorry again if this seems 'thick'.

              THANKS!

              ---JC

              Comment


              • #9
                I think the part you are missing is the fact that you need to create a new file (NOT named "search_template.html") which will contain the SSI code. This is represented in the FAQ by "mysearch.shtml", etc.

                Without knowing whether your server allows SSI in files ended with ".shtml", I will instead assume that SSI is enabled for ".htm" files since they are the extensions I see on your website.

                So, you would need to create a new file, named, for example, "jchsearch.htm".

                You can make this file just like the other pages on your website, and contain the same SSI's etc.

                In the place where you want the search results to appear, place this SSI line:

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

                That really should be it.

                This "jchsearch.htm" page is now your new search page and it acts as a wrapper to the "search.php" page which is working behind the scenes. You should change your search boxes elsewhere on your site to point to "jchsearch.htm" instead of "search.php".

                As explained in the FAQ, you will also need to modify the "search_template.html" file: even if just to leave the <!--ZOOMSEARCH--> tag there and nothing else. This file is still required, but it doesn't serve much purpose since the majority of your layout is likely specified by your "jchsearch.htm" file now.

                I hope that clears things up.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment


                • #10
                  I'M SUCH A MORON!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                  Thanks for your patience.

                  FWIW: What would've helped -me- would've been one teeny weeny extra line in the FAQ like...

                  First, you should create a custom search page as either a SHTML, PHP or ASP file (eg. "mysearch.php"). This will contain the main layout of your page with the necessary #include for headers, footers, etc. Within this new page, you can embed the Zoom search script, just as you would with a header HTML file. Then change the action in your search form to reference this new search page.


                  Thanks to you both. This is fantastic.

                  Comment


                  • #11
                    Glad to hear you've got to the bottom of it.

                    We didn't mention the search forms because not all of our users require these additional search forms: some just rely on the form found on the default search page. So it can lead to confusion for those users. Having said that, we should still probably add a reminder in the extra steps section along the lines of: "If you have search forms placed elsewhere on your site..."
                    --Ray
                    Wrensoft Web Software
                    Sydney, Australia
                    Zoom Search Engine

                    Comment

                    Working...
                    X