home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / software / dave / dqsd.exe / searches / cs.xml < prev    next >
Text File  |  2002-12-18  |  5KB  |  144 lines

  1. <search function="cs">
  2.   <name>Consumer Search</name>
  3.   <category>Shopping</category>
  4.   <contributor>Gregory Krohne</contributor>
  5.   <link>http://www.consumersearch.com</link>
  6.   <email>Gregory.Krohne@afrc.af.mil</email>
  7.   <description>
  8.   Search Consumer Search's meta-reviews of other reviews.
  9.     <div class="helpboxDescLabels">Switches:</div>
  10.     <table class="helpboxDescTable">
  11.       <tr><td>/match:all</td><td> - </td><td>Search pages based on type of match. Use
  12.         <div style="padding: 0 0 0 20px">
  13.           /match:all - all search terms<br/>   
  14.           /match:any - any search terms<br/>   
  15.           /match:boolean - boolean match of terms
  16.         </div> 
  17.       </td></tr>
  18.       <tr><td>/format</td><td> - </td><td>Search format to return. Use
  19.         <div style="padding: 0 0 0 20px">
  20.           /format:long - long form<br/>   
  21.           /format:short - short form
  22.         </div> 
  23.       </td></tr>
  24.       <tr><td>/sort</td><td> - </td><td>Order of pages returned. Use
  25.         <div style="padding: 0 0 0 20px">
  26.           /sort:relevancy - most relevant results first<br/>   
  27.           /sort:date - newest results first<br/>   
  28.           /sort:title - closest title matches first
  29.         </div> 
  30.       </td></tr>
  31.     </table>
  32.     <div class="helpboxDescLabels">Examples:</div>
  33.     <table class="helpboxDescTable">
  34.       <tr><td>cs /sort:date mutual funds</td></tr>
  35.       <tr><td>cs washing machines /match:all /form:short</td></tr>
  36.       <tr><td>cs TV and (DVD or VCR) /match:boolean</td></tr>
  37.     </table>
  38.   </description>
  39.   <form name="csf"
  40.         method="get"
  41.         action="http://www.consumersearch.com/perl/htwrap.cgi">
  42.     <input type="hidden" name="config" value="htdig-www" />
  43.     <input type="hidden" name="restrict" value="" />
  44.     <input type="hidden" name="exclude" value="" />
  45.     <input type="hidden" name="words" value="" />
  46.     <input type="hidden" name="method" value="and" />
  47.     <COMMENT>
  48.       The input element above, "method", was a SELECT element with the following options...
  49.       <select name="method">
  50.         <option value="and">All</option>
  51.         <option value="or">Any</option>
  52.         <option value="boolean">Boolean</option>
  53.       </select>
  54.     </COMMENT>
  55.  
  56.     <input type="hidden" name="format" value="builtin-long" />
  57.     <COMMENT>
  58.       The input element above, "format", was a SELECT element with the following options...
  59.       <select name="format">
  60.         <option value="builtin-long">Long</option>
  61.         <option value="builtin-short">Short</option>
  62.       </select>
  63.     </COMMENT>
  64.  
  65.     <input type="hidden" name="sort" value="score" />
  66.     <COMMENT>
  67.       The input element above, "sort", was a SELECT element with the following options...
  68.       <select name="sort">
  69.         <option value="score">Relevancy</option>
  70.         <option value="time">Date</option>
  71.         <option value="title">Title</option>
  72.       </select>
  73.     </COMMENT>
  74.  
  75.   </form>
  76.   <script><![CDATA[
  77.     function cs(q)
  78.     {
  79.       var args = parseArgs(q, "match, format, sort");
  80.       if( nullArgs("cs", q) )
  81.         return;
  82.  
  83.       for (var iSwitch = 0; iSwitch < args.switches.length; iSwitch++)
  84.       {
  85.         switch( args.switches[iSwitch].name )
  86.         {
  87.           case "match":
  88.               switch( args.switches[iSwitch].value )
  89.             {
  90.                 case "all":
  91.                     document.csf.method.value = "and";
  92.                     break;
  93.                 case "any":
  94.                     document.csf.method.value = "or";
  95.                     break;
  96.                 case "boolean":
  97.                     document.csf.method.value = "boolean";
  98.                     break;
  99.             }
  100.             break;
  101.           case "format":
  102.               switch( args.switches[iSwitch].value )
  103.             {
  104.                 case "long":
  105.                     document.csf.format.value = "builtin-long";
  106.                     break;
  107.                 case "short":
  108.                     document.csf.format.value = "builtin-short";
  109.                     break;
  110.             }
  111.             break;
  112.           case "sort":
  113.               switch( args.switches[iSwitch].value )
  114.             {
  115.                 case "relevancy":
  116.                     document.csf.sort.value = "score";
  117.                     break;
  118.                 case "date":
  119.                     document.csf.sort.value = "time";
  120.                     break;
  121.                 case "title":
  122.                     document.csf.sort.value = "title";
  123.                     break;
  124.             }
  125.             break;
  126.           default:
  127.             break;
  128.         }
  129.       }
  130.  
  131.       document.csf.words.value = args.q;
  132.       submitForm(csf);
  133.     }
  134.   ]]></script>
  135.   <copyright>
  136.     The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
  137.     Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  138.   </copyright>
  139.   <created_by>
  140.     This search file was initially created on 12/17/02 at 14:25:18
  141.     by Dave's Quick Search Deskbar Search Wizard version 1.0.1 ,
  142.     Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  143.   </created_by>
  144. </search>