Submit Your Article Forum Rules

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

Thread: free internal site search code ?

  1. #21
    Junior Member
    Join Date
    Dec 2008
    Posts
    3

    Re: free internal site search code ?

    Quote Originally Posted by arvana View Post
    You can try Swish-e (it's open-source software):

    Swish-e :: Home Page

    I haven't used it myself, but it looks very good. I'd like to hear if it works for you!
    Hello Arvana,
    I used your given url it's not work properly . Please suggest me the another site search engine code.

  2. #22

    Smile Re: free internal site search code ?

    Can someone pls suggest simple script for an internal site search without any database?

  3. #23
    Junior Member
    Join Date
    Dec 2008
    Posts
    1

    Re: free internal site search code ?

    Hi, I have simple javascript to search static pages in a website


    Code:
    var item = new Array();
    
    /* Enter the information of your static pages in item array as each entry
        following are the 2 sample entries I have made.
        The entries should contain
        item[c] = new Array("Page Name","path","Page Title","Many,Key,Words","Descriptive Comments")
    */
       
    c=0; item[c]=new Array("index.htm","","info - Everything you ever wanted to know about Sikkim","homepage","info, Everything you ever wanted to know about Sikkim.");
    
    c++; item[c]=new Array("maps.htm","","Maps","content,main,focus","maps of Sikkim.");
    
    page="<html><head><title>Search Results</title><link href='somecss.css' rel=stylesheet type=text/css></head><body bgcolor='white'><span style='background-color: #000000'><p><b><center><font color='#FFFFFF' face='Tahoma' size='2'>&nbsp; Search Result </center></b></p></font></span><center><font face='verdana' size='2'><table border=0 cellspacing=10 width=80%>";
    
    /* search is the function to search contents in website */
    function search(frm) 
    {
        if(frm.srchval.value=="" )
             alert("please enter the search word");
        else
        {
            win = window.open("","","width=400,height=340,left=200,top=80,scrollbars");
            win.document.write(page);
            txt = frm.srchval.value.split(" ");
            fnd = new Array(); total=0;
            for (i = 0; i < item.length; i++) 
            {
                fnd[i] = 0; order = new Array(0, 4, 2, 3);    
                for (j = 0; j < order.length; j++)
                for (k = 0; k < txt.length; k++)
                if ((item[i][order[j]].indexOf(txt[k]) > -1 || item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 || item[i][order[j]].toUpperCase().indexOf(txt[k]) > -1) && txt[k] != "")
                fnd[i] += (j+1);
            }
        
            for (i = 0; i < fnd.length; i++) 
            {
                n = 0; w = -1;
                for (j = 0;j < fnd.length; j++)
                if (fnd[j] > n) { n = fnd[j]; w = j; };
                if (w > -1) total += show(w, win, n);
                fnd[w    ] = 0;
            }
    
            win.document.write("</table><b><hr>Total found:</b> "+total+"<br></font></body></html>");
            win.document.close();
        }
    }
    
    function show(which,wind,num) 
    {
        link = item[which][0] ;
        line = "<tr><td><a href='" + link  + "'  target= '_blank' >" + "<b>" + item[which][2]  + "</b></a> " +"<br>" ;
        line += "<font face='verdana' size='1'>" +item[which][3] + "</font><br>"+"</td></tr>";
        wind.document.write(line);
        return 1;
    }
    I think it helps

  4. #24
    Senior Member sushil's Avatar
    Join Date
    Apr 2008
    Posts
    114

    Re: free internal site search code ?


  5. #25

    Re: free internal site search code ?

    this provides some good help.

    is there an opinion of hosted vs. owning code for site search? my preference is hosted.

    these seem like good options

    picosearch.com
    fusionbot.com
    swish-e.org/
    xav.com/scripts/search/

  6. #26
    WebProWorld MVP mikmik's Avatar
    Join Date
    Aug 2003
    Posts
    1,557

    Re: free internal site search code ?

    Fluid Dynamics
    Fluid Dynamics Search Engine

    the best I ever used, ever
    Babies don't need a vacation, but I still see them at the beach... it pisses me off! I'll go over to a little baby and say 'What are you doing here? You haven't worked a day in your life!'
    Steven Wright

  7. #27

    Re: free internal site search code ?

    Quote Originally Posted by mikmik View Post
    Fluid Dynamics


    the best I ever used, ever
    thats high praise - do you know if it works with dynamic sites?

  8. #28
    Senior Member zbatia's Avatar
    Join Date
    Jul 2003
    Posts
    137

    Re: free internal site search code ?

    Hm-m, great suggestions but either I am missing something or nobody mentioned (I am just wondering why not to use) the Google's custom search engine that redirects the results to the web page with your logo. See the implementation here:
    http://www.rtek2000.com/Trainingvide...gDiscount.html

    Try to run any search, for instance "oracle" and see the results. The implementation is simple, and you can customize it to your taste with no headache.

    Here is the link to Google's CSE: Google Custom Search Engine - Site search and more
    The Cyber Teacher. http://www.rtek2000.com - Discounted Self-Study packages for IT certs
    http://www.800-webdesign.com/free-we...resources.html -Web Master's Resources

  9. #29
    Junior Member
    Join Date
    Jan 2010
    Posts
    5

    Re: free internal site search code ?

    If you use Wordpress, you can look for a plugin. Also there are a lot of free themes with internal search plugin pre-installed.

  10. #30
    Senior Member texxs's Avatar
    Join Date
    Jul 2005
    Posts
    528

    Thumbs up Re: free internal site search code ?

    Coffee Cup software has a good one, if you really must go with one with no "database".

    I put database in quotes because site search cannot work without storing data somewhere some how. a database is the most efficient way to do this. However some, like the one Coffee Cup software makes uses a XML document to store the data, which is fine for small sites.

    For larger sites, I would go with something like "Sphider" which is free and rocks.

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Free tag code for site?
    By edhan in forum Web Programming Discussion Forum
    Replies: 2
    Last Post: 07-21-2007, 02:35 PM
  2. Internal Search
    By empyrelounge in forum Marketing Strategies Discussion Forum
    Replies: 4
    Last Post: 05-16-2006, 04:50 AM
  3. I need an INTERNAL Search for my site
    By fctoma in forum Graphics & Design Discussion Forum
    Replies: 2
    Last Post: 11-08-2004, 03:11 PM

Posting Permissions

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