Adding Western's Search to your site

Western owns a Google Search Appliance which we use to run tailored searches against our own sites. Anything that is owned and maintained by Western, even sites on servers external to the campus or with a different domain than can be indexed by this appliance. You do need to tell us about your site to make sure that we include it in our nightly indexing of Western's sites.

First decide whether you want the search to search the entire Western site or just your site (see below to Search Entire Western Site).

Search Your Site Only

Contact us with the url of your site and Request a Collection Name . Once you've received the Collection Name, proceed with these instructions.

  1. In your website, open includes/search.html with the a web editing tool such as Dreamweaver, or with a text editor.
    • If using Dreamweaver, find and select Code in the top-left corner of your screen.
  2. Save a backup copy now, in case the changes don't work correctly.
  3. You should see the following code after you remove the comments (or copy this into your page):
  4. <div id="search_dept">
     <form method="get" action="">
       <label class="hide" for="searchfield">Search  Terms:</label>
       <input type="text" id="searchfield" name="q"  size="17"
         maxlength="50" value="search this site"
         onBlur="if(this.value=='')this.value='search this site';"
         onFocus="if(this.value=='search this site')this.value='';"
         title="Enter your keywords here"/>
       <input type="submit" id="searchgo" value="go"  title="search" />
       <input type="hidden" name="client" value="default_frontend"/>
       <input type="hidden" name="output" value="xml_no_dtd"/>
       <input type="hidden" name="proxystylesheet" value="default_frontend"/>
       <input type="hidden" name="sort" value="date:D:L:d1"/>
       <input type="hidden" name="oe" value="UTF-8"/>
       <input type="hidden" name="ie" value="UTF-8"/>
       <input type="hidden" name="ud" value="1"/>
       <input type="hidden" name="exclude_apps" value="1"/>
       <input type="hidden" name="filter" value="0"/> -->
    <!-- change the share name below to match your search "Collection" name -
         contact if you're not sure  -->
       <input type="hidden" name="site" value="sharename"/>
  5. On the last input line, replace sharename with your share name, capitalized. For example, would use provost in place of sharename:
  6.  <input type="hidden" name="site" value="provost">
  7. Save as search.html. Test it by using your search block to test and verify that all the returned pages are within your site.

Search Entire Western Site

Use this code if you wish to search the entire Western Site:

<form class="searchform" method="get" 
    action="" target="_parent">
 <div class="infolinks"> 
   <!-- For GSA -->
  <input name="site" type="hidden" value="default_collection" />  
  <input name="client" type="hidden" value="default_frontend" />             
  <input name="output" type="hidden" value="=xml_no_dtd" />            
  <input name="proxystylesheet" type="hidden" value="default_frontend" />        
    <!-- End For GSA -->
 <div id="searchrow">        
  <label class="hide" for="searchfield">Search Terms:</label>        
  <input type="text" id="searchfield" name="q" size="17" maxlength="50" value="search" 
     onFocus="if(this.value=='search')this.value=' ';"/> 
  <input type="submit" id="searchgo" value="" />