PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Implementing search results page in Joomla

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

  • Implementing search results page in Joomla

    Hey everyone,
    I believe I have figured out how to place the searchbox/button using a customHTML component. However, I now need to learn what to do with the results page. Any guidance would be greatly appreciated.

  • #2
    I've responded to your e-mail with this same question. But for the benefit of others, here is my response:

    This page might be of interest as it talks about how to configure Zoom for indexing a Joomla website:
    http://www.wrensoft.com/zoom/support...ds.html#joomla

    As for the search results page itself, there's probably several ways you can consider.

    One is that you can simply modify search_template.html to match the appearance of the rest of your Joomla site, without it being part of Joomla.

    The other method (assuming you can do this with Joomla, as I am not completely familiar with it), is you can create a page in Joomla which is named search_template.html and has the necessary <!--ZOOMSEARCH--> tag to indicate where the results will go, and this file has to be in the same directory as the search files. See the Users Guide for more details on how the template file works.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Hey Ray,
      Thank you for the responses. I am unsure at this point of how search_template.html could be implemented. Here is what I have done, though.

      I created a customHTML module and with the help of Jumi:

      I included search.php into an article. However, I have a couple of issues: first is that no data is sent from the search form to this page, as the page will show the "advanced" search options, but it does not show results from my previous query.

      Second, when I try to perform an advanced search, I get directed to my home page instead of the search results. I have been sitting and waiting a bit, as I have a subdomain I am waiting to resolve to see if that will have any effect.

      Lastly, I do receive an error when landing on the "results" page from my original form:

      "Warning: file(search_template.html) [function.file]: failed to open stream: No such file or directory in /home6/trentont/public_html/test/srch/search.php on line 694"

      You can view this page here:

      http://www.trentontechnology.com/test/index.php?option=com_jumi&fileid=3&Itemid=58

      Ignore the second error on the page, that is something I am going to clear up soon.

      Thanks

      Comment


      • #4
        Originally posted by dpinion View Post
        I included search.php into an article. However, I have a couple of issues: first is that no data is sent from the search form to this page, as the page will show the "advanced" search options, but it does not show results from my previous query.
        You need to be aware of what you're doing here. By including "search.php" within the article, it is just like you have copied and pasted the source code of "search.php" inside "index.php" (at least, only when that article id number is requested). This effectively changes the way the script work.

        The generated search form is not aware of this. It will send the search parameters to "index.php" (the page the code is executing from) but without the other parameters ("option=com_jumi&fileid=3&Itemid=58"), that Joomla page is not the same article that contains the search script. That's why you end up back on the front page.

        You should be able to define your own search form HTML (as described here) and include those parameters as hidden form values, e.g.

        <input type="hidden" name="option" value="com_jumi">
        <input type="hidden" name="fileid" value="3">
        <input type="hidden" name="Itemid" value="58">

        So that when the search form is submitted to "index.php", these values are carried across to retrieve the article that contains the search script.

        Originally posted by dpinion View Post
        Lastly, I do receive an error when landing on the "results" page from my original form:

        "Warning: file(search_template.html) [function.file]: failed to open stream: No such file or directory in /home6/trentont/public_html/test/srch/search.php on line 694"
        The problem is that all your search files are in the wrong directory. Remember the instruction is that all the Required files listed at the end of indexing (which is the search_template.html, settings.php and all the .zdat files) need to be in the same folder as the search script. Now this is fine if you are using "search.php" (which is in the same "srch" subfolder as the other files) and you can see it working here:
        http://www.trentontechnology.com/test/srch/search.php

        However, as explained above, because you included "search.php" in "index.php" (which is outside the "srch" subfolder), and you are executing the latter and not the former, the version of the search script called from "index.php" would not find the search files because it is in a different folder. If you put the search files in the same folder as "index.php", you would have better luck.

        It also appears that you have modified the source code to "search.php". We can't provide support for a modified script, just so you know.

        Many people adopt a CMS (Content Management Systems) not realizing it can make things more complicated (especially when you try to do something that is not intrinsically built-in). As mentioned before, you could have the search page independent of the CMS on your site (by using "search.php" as it is) and it could still be effectively integrated in appearance. If you want a deeper integration, be aware of the technical complexity of what you're doing by sticking one script within another.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          got it

          Thanks for all the help. Sorry to be a headache! I thought that since everything was in joomla that recreating the page layout would be a royal pain, however a "view page source" and a "copy" later I had a search page and it is working nicely:

          trentontechnology.com/test/tsearch.php

          Thanks again (nevermind the error message, had this before and know how to deal with it)!

          Zoom is truly a great product with great people behind it.

          Comment

          Working...
          X