Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mweyburg

    (@mweyburg)

    We also have the searchboxes on this pod page as you can see in this part of the code:

    <form method="get" id="searchform" action="/kap/searchresultrelations">
    <div><div>Identifiant rapport </div> <input type="text" size="18" value="<?php echo wp_specialchars($relid, 1); ?>" name="relid" id="relid" /> </div>
    <div><div>Nom </div><input type="text" size="18" value="<?php echo wp_specialchars($nom, 1); ?>" name="nom" id="nom" /> </div>
    <div><div>Code postal </div><input type="text" size="18" value="<?php echo wp_specialchars($postal, 1); ?>" name="postal" id="postal" /> </div>
    <div><div>Ville </div><input type="text" size="18" value="<?php echo wp_specialchars($ville, 1); ?>" name="ville" id="ville" />
    <input type="submit" id="searchsubmit" value="rechercher relation" class="btn" />
    </div>
    </form>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter mweyburg

    (@mweyburg)

    <?php
    $relid = pods_url_variable('relid', 'get');
    $nom = pods_url_variable('nom', 'get');
    $postal = pods_url_variable('postal', 'get');
    $ville = pods_url_variable('ville', 'get');
    ?>
    
    <form method="get" id="searchform" action="/kap/searchresultrelations">
        <div><div>Identifiant rapport </div>  <input type="text" size="18" value="<?php echo wp_specialchars($relid, 1); ?>" name="relid" id="relid" /> </div>
        <div><div>Nom </div><input type="text" size="18" value="<?php echo wp_specialchars($nom, 1); ?>" name="nom" id="nom" /> </div>
        <div><div>Code postal </div><input type="text" size="18" value="<?php echo wp_specialchars($postal, 1); ?>" name="postal" id="postal" /> </div>
            <div><div>Ville </div><input type="text" size="18" value="<?php echo wp_specialchars($ville, 1); ?>" name="ville" id="ville" />
    <input type="submit" id="searchsubmit" value="rechercher relation" class="btn" />
    </div>
    </form>
    
    <?php
    pdf24Plugin_begin();
    
    ?>
    
    <table>
    <?php
    $relations = new Pod('relation');
    
    if ($relid != "" && is_numeric($relid)) {
        $params = array('where' => ' relationid = ' . $relid);
    }
    else
    {
    
     if ($nom !="")
         $nompart = ' name LIKE "%' . $nom . '%" ';
     if ($postal !="" && $nom !="")
         $postalpart = ' AND zipcode LIKE "%' . $postal . '%" ';
     if ($postal !="" && $nom ="")
         $postalpart = ' zipcode LIKE "%' . $postal . '%" ';
      if ($ville !="" && $postal !="")
         $citypart = ' AND city LIKE "%' . $ville . '%" ';
     if ($ville !="" && $postal =="" && $nom !="")
         $citypart = ' AND city LIKE "%' . $ville . '%" ';
     if ($ville !="" && $postal =="" && $nom =="")
         $citypart = ' city LIKE "%' . $ville . '%" ';
    
    $params = array('where' => $nompart . $postalpart  . $citypart);
    }
    $relations->findRecords($params, 20);
    echo $relations->showTemplate("relations_searchresult");
    ?>
    </table>
    <?php
    echo $relations->getPagination();
    ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter mweyburg

    (@mweyburg)

    sure…..

    I’ve created a couple of search boxes on a wordpress page that does a call to a POD page URL including query string parameters. These query string parameters are the values that the user has typed in the search box.
    I have 3 search boxes: name (the name of a person), zipcode and city.
    I also created a POD page where I received those query string parameters. The query string parameters are used in the search query.
    It is pretty straightforward. Not a real fancy search, but it works for us.

    This is the code we have on our POD Page (next post):

    Thread Starter mweyburg

    (@mweyburg)

    Thanks for the answers. I fixed our problem by making a custom search page that does the job with POD queries (PHP). So we don’t use an indexed search now. At this moment that is enough for us. Would be nice if this could be integrated with the content indexing process in the future.

    Thread Starter mweyburg

    (@mweyburg)

    Thanx for your answer. I have to check that. I just istalled Relevanssi, so perhaps we can make it work like you told me.

Viewing 5 replies - 1 through 5 (of 5 total)