Jump to content

Search Intranet Site


ssabc

Recommended Posts

Hello:

I would like to have a searchbox on each page (I know how to create this in JS) where I would enter something and then be able to search the current as well as all of my INTERNAL web pages and be able to click next and have the program navigate to each match.

1.  Somehow, I believe I need a defined list of page names

2.  Next, I believe I would search the title field.

The closest thing I have been able to find is .getElementsByTagName.  Not sure if this is the best approach.

 

Is there a good starting point example of something like this?  I would like to keep it as simple as possible.  I have been reading lots of stuff on line, and just do not feel I am hitting a solution.

Thanks!  

Link to comment
Share on other sites

Looks interesting, thanks for the info.

I have built a site using .NET Objects Fusion.  What I like about it is that I can quickly add things and republish.  It also will be good for all the people here who don't and won't learn how it works.  Perhaps I can reference these js files and add some code to the html, which is supported?  Something to play with, unless you know for sure it wont work...

 

Link to comment
Share on other sites

That plugin just uses a Javascript array of objects with various properties like title, URL, etc.  It just looks for keywords in the text in that object and shows the URLs.  If that's what you're looking for then maybe it's a good fit for you.

Link to comment
Share on other sites

If you like my suggestion, pass your cursor over the heart and select the trophy.

Roddy

Link to comment
Share on other sites

This works well when I'm dealing with the web example.  When I try to map it locally, it does not act the same way.

I've tried adding "file:" in front of the local url's, does not seem to make a difference.

I'm thinking there is a slight syntax issue I'm not getting.  Code below:

 

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  
    <title>Tipue Search, a jQuery Site Search Plugin
        
    </title>
    
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link href="https://fonts.googleapis.com/css?family=Squada+One|Source+Code+Pro|Merriweather:300|Abril+Fatface" rel="stylesheet">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
      
    </script>
  
    <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">

    <link rel="stylesheet" href="//w2012/users/Steve A/Software/tipuesearch/Tipue Search 7.1/inc/standard.css">

    <script src="//w2012/users/Steve A/Software/tipuesearch/Tipue Search 7.1/demo/tipuesearch/tipuesearch_set.js">
      
    </script>
  
    <script src="//w2012/users/Steve A/Software/tipuesearch/Tipue Search 7.1/demo/tipuesearch/tipuesearch_content.js">
      
    </script>
  
    <link rel="stylesheet" href="//w2012/users/Steve A/Software/tipuesearch/Tipue Search 7.1/demo/tipuesearch/tipuesearch.css">
  
    <script src="//w2012/users/Steve A/Software/tipuesearch/Tipue Search 7.1/demo/tipuesearch/tipuesearch.js">
      
    </script>

  </head>
  
  <body>
    <div class="cont">
        <div id="head">
          <div class="block"><a href="http://www.tipue.com" class="not">
              <div class="ban">Tipue
            
              </div></a>

            </div>

        </div>

        <div class="head">
          <div class="block" style="padding-top: 79px;">
            <h3> Tipue Search

            </h3>
        
          </div>

        </div>
    
        <div class="block-790">
          <div class="slab fo-2">
            <a href="http://www.tipue.com/search/">Tipue Search.
                <span class="fa-1">A site search jQuery plugin. It's free, open source and fast.
              
                </span>
          
            </a>

          </div>    

        </div>
      
        <div class="block-978" style="padding-bottom: 59px;">
          <div style="padding-top: 10px;"><h2>A demo</h2>
          
          </div>

          <div class="fo-3" style="padding-top: 17px;">
            Enter <code>tipue</code> or <code>blog</code>.

          </div>

          <div style="padding-top: 36px;">    

          <form>
            <div class="tipue_search_group">
              <input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required>
              <button type="submit" class="tipue_search_button">
                <div class="tipue_search_icon">&#9906;
            
                </div>
              
              </button>

            </div>

          </form>

          <div id="tipue_search_content">
  
          </div>

        </div>
    
      </div>

    </div>

    <footer class="foot">
      <div class="block fo-1">
          <a href="http://www.tipue.com">Tipue

          </a> is a small web development studio based in North London.<p>&copy; 2019 Tipue. Est London.

      </div>

    </footer>

    <script>
      $(document).ready(function() {
           $('#tipue_search_input').tipuesearch();
       
      });

    </script>

  </body>

</html>

 

Thanks!

 

Link to comment
Share on other sites

The problem is, we have no intention  of using a server, as this is an intranet application.  Perhaps this solution it not good.  How can I search this.  I want to simply type in come text and page to it as for each occurrence, or list created links.

Thanks for your reply.

 

  • Confused 1
Link to comment
Share on other sites

Well, if you don't have a web server then your options are limited.  Different browsers might place different restrictions on you.

How do you access that HTML file, do you just double-click on it to open it?  What's the URL show?  You might want to open your developer tools and refresh with the Network tab open to see what it's doing, if there are any error messages they'll be on the console tab.

Link to comment
Share on other sites

Yes, just index.html.  I can qualify that it will only work under a certain browser, like chrome, or whatever you would suggest.  Just looking for something really simple.  

Somehow, there must be a way to specify the ten or so pages I will have and just search the html for matching text, and just jump through to each item in order, or create a list of links.  Either way is acceptable.

Thanks!

  

Link to comment
Share on other sites

I'm sure there is, you just need to build an object that describes everything and your browser needs to be able to load everything.  First step is to use your developer tools to figure out what's going on.

Link to comment
Share on other sites

You can download a package like XAMPP that has everything you might need.  You really only need Apache or another web server though if you're only serving static files.  Some versions of Windows have the IIS server included but you probably need to install it through the control panel first.

Link to comment
Share on other sites

Hello:

I installed this and played around with it a little. No localhost.  I did change the port from 80 to 81 and updated the configuration file, and it says Apache is running.  I also opened ports 80, 81 and 443 on the firewall.

I also looked at IIS, again, no localhost.  https://www.betterhostreview.com/turn-on-iis-windows-10.html

I just for now, would like it running on my local PC to see if I can get the search functionality to work.

IIS may be simpler, if I can get it working.  What step did I miss?

Thanks!

 

  

Link to comment
Share on other sites

This is my configuration and log file:

image.png.f264b416e90462ae4758810e10ddd83f.png

 

[Thu May 30 09:13:22.816816 2019] [ssl:warn] [pid 6056:tid 660] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 30 09:13:22.853816 2019] [core:warn] [pid 6056:tid 660] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu May 30 09:13:22.858821 2019] [ssl:warn] [pid 6056:tid 660] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 30 09:13:23.057822 2019] [mpm_winnt:notice] [pid 6056:tid 660] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/7.3.5 configured -- resuming normal operations
[Thu May 30 09:13:23.057822 2019] [mpm_winnt:notice] [pid 6056:tid 660] AH00456: Apache Lounge VC15 Server built: Mar 28 2019 11:59:33
[Thu May 30 09:13:23.057822 2019] [core:notice] [pid 6056:tid 660] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu May 30 09:13:23.062820 2019] [mpm_winnt:notice] [pid 6056:tid 660] AH00418: Parent: Created child process 15640
[Thu May 30 09:13:23.677836 2019] [ssl:warn] [pid 15640:tid 648] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 30 09:13:23.715838 2019] [ssl:warn] [pid 15640:tid 648] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu May 30 09:13:23.740838 2019] [mpm_winnt:notice] [pid 15640:tid 648] AH00354: Child: Starting 150 worker threads.

 

As I mentioned, I am listening on port 81 instead of 80.  That is simply a guess.  Is port 81 even valid?

 

image.png

Edited by ssabc
Link to comment
Share on other sites

It will listen on whatever port you tell it to, but you'll need to change the URLs in the browser also.  Skype is the most common application that listens on port 80 and blocks other applications from using it.

Link to comment
Share on other sites

Sorry to keep asking questions, but I have applied this in the httpd.conf file:
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 81

 

Are there other places where I also have to specify Port 81?

Thanks for the help!

 

 

 

Link to comment
Share on other sites

Step 1 - NetStat

Address        Port        PID       Name

0.0.0.0           81           16208  httpd.exe

0.0.0.0           443         16208  httpd.exe

 

Step 2 - Edit the file "httpd.conf"

In httpd.conf I have:

Listen 81

ServerName localhost:81

 

Step 3 - Edit the file "http-ssl.conf"

In http-ssl.conf I have:

 

Step 4 - Configure XAMPP Apache server settings

Main Port        SSL Port

81                     443

 

Step 4.1 - Web browser configuration: Tools / Options / Settings / Connection Settings...  

I applied this by setting LAN settings to my IP address, 192.168.50.135 and setting the port to 81

 

Step 4.2 - Added XAMPP.INI to the C:\xampp directory

[PORTS]

apache = 81

 

Let me know if you see anything obvious.  If there is a good book on how to do this, I'd lobe to know about it.  Perhaps our Firewall is the problem.  I just need to get this working so I can test Tipue for search functionality.  If it works, then we can decide where to host this intranet site.

 

Thank You!

 

Edited by ssabc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...