PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

add search bar in the webpage

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

  • add search bar in the webpage

    Hi there, my english is not very good so Ill try to be short and understandeble.
    I use GET function to include files to one table on my site.
    like this
    PHP Code:

    if(isset($_GET['id']))
       
    $id $_GET['id'];
    if(isset(
    $_GET['di']))
       
    $di $_GET['di'];
    if(isset(
    $_GET['dd']))
       
    $dd $_GET['dd'];


    if(!isset(
    $id)) {
       include(
    "novosti/index.php");
    }
    else if(!isset(
    $di)) {
       include(
    $id "/index.php");
    }
    else if(!isset(
    $dd)) {
    include(
    $id "/" $di ".php");
    }
    else{
       include(
    $id "/" $di "/" $dd ".php");

    And Now i would like to display results of search in this table, I tried by setting action to index.php?id=zoom&di=search but it wont work. search.php is placed in zoom/search.php and using both POST and GET method but i cant make this work.
    Hope u understand my problem.
    Thanks in advance

  • #2
    This section on Zoom and scripting might help,
    http://www.wrensoft.com/zoom/support/faq_ssi.html

    ---
    David

    Comment


    • #3
      I didnt find anything useful here.
      See, I have one index file without header, footer and body, evrything is on the sam sheet. Menu which is in bottom calls other pages and show them in one table with GET function.
      When I try to search zoom gives mi this in adress bar ....zoom/search.php?zoom_query=blabla&x=0&y=0 so i wonder how can I show results in table on main page. When I set adress to ....index.php?id=zoom&di=search i recive this message "Zoom files missing error: Zoom is missing one or more of the required index data files.
      Please make sure the generated index files are uploaded to the same path as this search script." but otherwise when i directly point to search.php it works fine.

      Comment


      • #4
        As the error suggests, the search script can not find the index files required. The files must be in the same directory as the search script.

        However, since you are including "zoom/search.php" from "index.php", this means the script is now being executed in a directory level ABOVE the "zoom" folder where the rest of the search files (*.zdat, settings.php, etc.) are located.

        You can correct this by putting ALL the files in the same folder, and including "search.php" rather than "zoom/search.php". Alternatively, you can just move all your index files into the same folder where "index.php" is located.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          when I set action="index.php?id=zoom&di=search it calls index.php?zoom_query=a&x=12&y=11.
          And when I type in adress bar index.php?id=zoom&di=search it open search where I want but when I submit something to search it opens /index.php?zoom_query=a&zoom_per_page=10&zoom_and=0 &zoom_sort=0 . Please suggest me something

          Comment


          • #6
            I resolve this by simple include function
            I unclude search.php in index.php and it works fine

            Comment


            • #7
              one more questio please
              In result page, there are links to page contains some term and link goes apsolute like www.mydomain.com/XY/YX/xx.php, how can I modify this so that the link goes index.php?id=XY&di=YX
              thanx in advance

              Comment


              • #8
                The URLs used on the result page are those which are encountered by the indexer as it spiders your site.

                Zoom doesn't include any function to transform these URLs using a function you describe.

                The best I can suggest would be to manually edit the zoom_pages.zdat file after indexing.

                ----
                David

                Comment

                Working...
                X