Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

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

Thread: Search engine

  1. #1
    Member Elvedin's Avatar
    Join Date
    Jan 2013
    Location
    Bosnia And Herzegowina
    Posts
    78
    Member #
    35009
    Hello

    In this thread i will ask for an specific search engine.
    My english is not so good , but i will try to explane you in best way.

    In my site i have an search filed like that :



    And this is his code :

    HTML Code:
    <form action="#" method="get">
                  <input type="text" value="Traži" name="keyword" id="keyword" title="klju?na rije?" onfocus="clearText(this)" onblur="clearText(this)" class="txt_field" />
                  <input type="submit" name="Search" value="" alt="Search" id="searchbutton" title="Traži" class="sub_btn"  />
                </form>
    So , what i need ? I need when someone type in "car" and press this search button , it should open him specific page like "http://www.domain.com/car" .

    Did you get me ? So I have like 20 pages like domain.com/car , domain.com/house ...

    So is it possible to add keywords , when some type "car" , "cars" , "automobils" it should open him my page www.domain.com/car ..
    When some type in "house" , "big house" , "small house" it should open him my page www.domain.com/house

    Is there any way to do it ?

    Thank you very much

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    The purpose of a search function is to provide the visitor a page with a LIST of links to other pages that meet the search criteria ...

    Opening pages based on words, not a good thing and could be seen as abusive to the visitor.

    Before I go into any detail , does what I say make any sense to you ? Understand why ?

    Please advise

  4. #3
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    If you are wanting a "quick jump" menu, it would be better to provide the user a drop down list, instead of them typing in a word that you may or may not have a page for... Give them a drop down, select the page ... You control it...

  5. #4
    Member Elvedin's Avatar
    Join Date
    Jan 2013
    Location
    Bosnia And Herzegowina
    Posts
    78
    Member #
    35009
    You have right dude , well it will be nice if it will give drop down menu after a visitor type in some words.
    I already have drop down menu in my navigation menu , and if its possible to make the same drop down as i already have in this navigation menu for this search field . I made an image in photoshop , if it can looks like that > http://i.imgur.com/XfpS5Ey.jpg

    And do you need my css style ? If you need it to make it like on image , tell me . I`ll send you.
    Thank you very much

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    You would use .htaccess rewrite rules to take the word after the / and create a redirect to a PHP script. That PHP script renders your new "page". You don't really have "pages". Just like this forum you are using now ... each one of these "pages" is rendered by PHP using the codes or words you see in the URL at the top address bar of your browser.

    If you are actually creating directories and pages for each thing .. like "car", "boat", etc. that's a bad idea, and way too much work. Let PHP render pages from a database or whatever you are using.

    Maybe if you explain more about what your website is doing, that might help.


  7. #6
    Member Elvedin's Avatar
    Join Date
    Jan 2013
    Location
    Bosnia And Herzegowina
    Posts
    78
    Member #
    35009
    Hmmm , my english is bad and i dont know how to explain it good to you , but i will try .

    Well , my website is an site for selling website templates.
    And there will be categorys like "car" "enterior" "game" etc... precisely said that will be html pages car.html , enterior.html ... So what do you think , whats the best way to edit this search field ? So when some type like car he should get some results . I`ll give you my template folder if you need .

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Are they templates for static sites using XHTML/CSS HTML5, etc. or are these templates for systems like WordPress, Joomla, etc?


  9. #8
    Member Elvedin's Avatar
    Join Date
    Jan 2013
    Location
    Bosnia And Herzegowina
    Posts
    78
    Member #
    35009
    They are static sites xhtml css html5 etc...

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Your templates consist of the XHTML, CSS file(s), some javascript files, images. That's it.

    So you have each one zipped into one file. That's the one the person downloads when they purchase or download your template. When they unzip it, it contains all of the files they need. All they do is provide the content.

    For demonstration purposes, you are wanting to create a "working example". I think that's what you mean by having a directory for each template?

    Go ahead and create a directory (or folder) for each template demonstration. Your demo will be the same files that are contained in the zipped file that they user downloads.

    Now, create a simple text file database (no MySQLi needed). Have that database contain:

    directory name | template name | description of template | thumbnail | key words separated by commas

    Example:
    Code:
    house1|House One|This template is for selling and renting houses|house1.jpg|house,rent,real estate,home,rentals,owner
    autorental|Auto Rental|This template is for auto rental businesses|autorent1.jpg|auto,rent,lease,car,rental,business,sale,sales
    Each template is on one line of the .txt (text file), and fields are separate by pipes |

    A PHP script can use that text file to create your template links by opening and reading the file and dynamically generating the links on a page. It also knows which thumbnail to show in the description of the template (a thumbnail .jpg snapshot of the template).

    For a search, a person enters a word and the PHP script will search the .txt file and find any keywords that match (or are close) to the person's search word. PHP will then render the search results ... which templates to display.


  11. #10
    Member Elvedin's Avatar
    Join Date
    Jan 2013
    Location
    Bosnia And Herzegowina
    Posts
    78
    Member #
    35009
    About purchase , when some1 want to buy an website template , I`ll send him and an email with download link of zipped template .


    About search , that what you told sounds interesting . But where will be the results displayed ?
    Should i make an results page , or it will come as drop down under search field ?


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com