Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Quick search for index page - Help.

  1. #1
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Lightbulb Help! Quick search for index page - And Portugues Lang almost finishing !!!

    Olá povo!!!

    I´m new here, i´m try to create a quick search for my index page, but i don´t undertand how to do it.

    when I call the tag {templated_search_form} in my index page, show all that I set in the "edit listing template" (admin area).

    I want to create a quick search if the fields of my choices.

    How i call the tag of the fields, city, neighborhood, price etc?

    The tutorial don´t help-me, and i try search an post but i dont found something that helped me.

    ??? Please, Somebody can show a simple example in HTML code ???

    One more, i almost finishing the translate for portugues (brazil) languange, 1253 lines, olololululu GOD !!! then i finish, i post for the community OR.

    TKS´s The OR is a powerfull script.

    Brasileiro ? add ai ( xn0@hotmail.com ) MSN
    Last edited by Renato.Dias; 07-18-2006 at 09:53 AM. Reason: Help! Quick search for index page - And Portugues Lang almost finishing !!!

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Quick search for index page - Help.

    I know this has been discussed a few times already and the answer is available in the forum.

    There is no tag that will give you a quick search form. You need to create the form in your template or on the page you want and add the options that you want to search against. If you want the fields/options dynamically created from your listing data like the regular OR search form, you will need to create an addon and use the built in searchbox render functions.

  3. #3
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default Re: Quick search for index page - Help.

    where is this add-on?

    somebody can help me with this?

  4. #4
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Quick search for index page - Help.

    There is no addon that I know of. You need to create one.

  5. #5
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default Re: Quick search for index page - Help.

    pbflash tks for your help Bró!!!

    I create a form, but i´m (and many other people) not a expert in PHP, i know the basic "<? ?>"

    You can explain in the practical one!!!, you could construct a initial code of this oddon ???

    I try read this, but is to much for me.
    http://wiki.open-realty.org/index.ph..._Documentation

    Obrigado! []´s



    <form action="index.php" method="get">

    <table>
    <tbody>
    <tr>
    <td class="searchpage_field_caption">Pre&ccedil;o</td>
    <td align="left"><select name="price-min">
    <option value="">Todos</option>
    <option value="000">$ 0</option>
    <option value="5000">$ 5.000</option>
    <option value="2490000">$ 2.490.000</option>
    <option value="2495000">$ 2.495.000</option>
    <option value="2500000">$ 2.500.000</option>
    </select>
    para<br>
    <select name="price-max">
    <option value="">Todos</option>
    <option value="000">$ 0</option>
    <option value="5000">$ 5.000</option>
    <option value="10000">$ 10.000</option>
    <option value="15000">$ 15.000</option>
    <option value="2495000">$ 2.495.000</option>
    <option value="2500000">$ 2.500.000</option>
    </select></td>
    </tr>
    <tr>
    <td class="searchpage_field_caption">Bairro</td>
    <td align="left"><select name="neighborhood[]" multiple="multiple" size="6">
    <option value="Vila Gustavo">Vila Gustavo</option>
    <option value="Vila Maria">Vila Maria</option>
    <option value="Vila Medeiros">Vila Medeiros</option>
    </select></td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <input name="imagesOnly" value="yes" type="checkbox">
    <strong>Somente com imagens</strong><br>
    <input name="vtoursOnly" value="yes" type="checkbox">
    <strong>Somente tours virtuais</strong> </td>
    </tr>
    <tr>
    <td colspan="2" align="center">
    <input name="action" value="searchresults" type="hidden">
    <input name="submit" type="submit">
    </td>
    </tr>
    </tbody>
    </table>
    </form> </td>
    <td width="423"><div id="inner">
    <div id="maincol" >
    {featured_listings_vertical}
    </div>
    </div></td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td><span class="content">{content} </span></td>
    </tr>
    </table>
    </body>
    </html>

  6. #6
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Thumbs up Re: Quick search for index page - Help.

    dont, work !!!

    I´m use the Version 2.3.0, and i test this local and in the web.

    I copy the code of "Search_page_defaut.htm" and remove only

    {featured_listings_vertical}
    {templated_search_form}
    {/templated_search_form}

    I create a simple form to the "only with images" and "only with Vtours" and put this form in the code, and finally i put in the main.htm

    Now don´t exist "the missing field".

    one more, when i put only {browse_all_listings_pclass} in the main, don´t work to !!

    This is a bug???

    The code.


    {no_search_results_block}
    <div class="no_results">{lang_no_results_msg}<br />
    <a href="{save_search_link}">{lang_no_results_save_se arch_link_text}</a> {lang_no_results_save_search} </div>
    {/no_search_results_block}
    <table class="form_main">
    <tr>
    <td valign="top">
    <h3>{lang_search_listings}</h3>
    {browse_all_listings_pclass}
    <h4>{lang_find_the_perfect_property}</h4>
    <form action="index.php" method="get">
    <table>
    {search_fields}
    <tr>
    <td align="center" colspan="2"><table>
    {search_fields}
    <tbody>
    <tr>
    <td align="center">
    <input name="imagesOnly" value="yes" type="checkbox">
    <strong>only images</strong><br>
    <input name="vtoursOnly" value="yes" type="checkbox">
    <strong>Only Vtours </strong> </td>

    </tr>
    <tr>
    <td align="center"> {search_type}
    <input name="action2" value="searchresults" type="hidden">
    <input name="submit" type="submit">
    </td>
    </tr>
    </tbody>
    {/search_fields}
    </table></td>
    </tr>
    <tr>
    <td align="center" colspan="2">
    </td>
    </tr>
    </table>
    </form></td>
    </tr>
    </table>

    Search_page_default.htm and this, is the same code.

    TK´s

  7. #7
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Quick search for index page - Help.

    when i put only {browse_all_listings_pclass} in the main
    No bug. Where in the OR docs does it say this tag can be used in main.html? Also other tags like {search_fields} are specific to the search page and will not work in main.html. You need to look at the OR documentation and see what tags are valid in what templates.

    This is what you need for a search from in main.html:

    <form action="index.php" method="get">

    Enter your search fields here.

    <input name="action" value="searchresults" type="hidden">
    <input name="submit" type="submit">
    </form>

  8. #8
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default Re: Quick search for index page - Help.

    Quote Originally Posted by pbflash

    This is what you need for a search from in main.html:

    <form action="index.php" method="get">

    Enter your search fields here.
    <input name="action" value="searchresults" type="hidden">
    <input name="submit" type="submit">
    </form>
    Phpflash - i read the documentation and i try search some thing in the forum before my post, i don´t found nothing, i don´t found one line with example for the "how i put the search fields of my choice in the main page" !!!

    <form action="index.php" method="get">
    <input name="imagesOnly" value="yes" type="checkbox"> <strong>Only images</strong><br>
    <input name="vtoursOnly" value="yes" type="checkbox"> <strong>Only Vtours</strong>
    <input name="action" value="searchresults" type="hidden">
    <input name="submit" type="submit">
    </form>
    This don´t work, Please man show-me the light !!!

  9. #9
    Join Date
    Mar 2006
    Posts
    122

    Default Re: Quick search for index page - Help.

    It's the submit button that's the problem
    HTML Code:
    <input name="submit" type="submit">
    Submit is passed in the GET string
    Code:
    action=searchresults&submit=Submit+Query
    If you look in search_page_default.html, it actually says
    HTML Code:
    <input type="submit" />
    No 'name' attribute, so it's not placed in the GET string

    The only snag is, if I put this in main.html, the main search page doesn't work - when submit is pressed on the class search page, 'action' is going up as blank, instead of 'search_step_2'. (This is in IE6, FF is ok)

    And I've just tried the submit button with 'name' in FF, and no value is passed, although the name is.
    I think this is going to get more complicated than it first appears.

  10. #10
    Join Date
    Jul 2006
    Posts
    2

    Default Re: Quick search for index page - Help.

    Put this code wherever you want for a quick search:

    Code:
    <form action="index.php" method="get">
    <strong>Text Search</strong> <input type="text" name="searchtext" /><br />
    <input type="hidden" name="action" value="searchresults" />
    <input type="hidden" name="pclass[]" value="" />
    <input type="submit" />
    </form>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •