home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / software / dave / dqsd.exe / searches / php.xml < prev    next >
Text File  |  2003-04-20  |  2KB  |  71 lines

  1. <search function="php">
  2.   <name>PHP Reference</name>
  3.   <description>
  4.     Lookup on php.net.<br/>
  5.     <div class="helpboxDescLabels">Switches:</div>
  6.     <table class="helpboxDescTable">
  7.       <tr><td>/pear</td><td> - </td><td>Search PEAR packages</td></tr>
  8.       <tr><td>/smarty</td><td> - </td><td>Search Smarty manual</td></tr>
  9.       </table>
  10.     <div class="helpboxDescLabels">Example:</div>
  11.     <table class="helpboxDescTable">
  12.           <tr><td>php fopen</td></tr>
  13.           <tr><td>php /s cycle</td></tr>
  14.           <tr><td>php /p DB</td></tr>
  15.       </table>
  16.   </description>
  17.   <category>Computers<category>Programming</category></category>
  18.   <link>http://www.php.net/</link>
  19.  
  20.   <form name="phpsmartyf" action="http://smarty.php.net/search.php" method="post">
  21.     <input type="hidden" name="show" value="manual" />
  22.     <input type="hidden" name="pattern" value="" />
  23.   </form>
  24.   <form name="phppearf" action="http://pear.php.net/search.php" method="post">
  25.     <input type="hidden" name="search_in" value="packages" />
  26.     <input type="hidden" name="search_string" value="" />
  27.   </form>
  28.   <script><![CDATA[
  29.     function php(q)
  30.     {
  31.       if( nullArgs("php",q) )
  32.         return false;
  33.  
  34.       var args = parseArgs(q, "pear, smarty");
  35.       if( args.switches.length >= 1 ) {
  36.         switch( args.switches[0].name )
  37.         {
  38.         case "pear":
  39.           if (args.q != "") {
  40.             document.phppearf.search_string.value = args.q;
  41.             submitForm(phppearf);
  42.           } else {
  43.             openSearchWindow("http://pear.php.net/");
  44.           }
  45.           break;
  46.         case "smarty":
  47.           if (args.q != "") {
  48.             document.phpsmartyf.pattern.value = args.q;
  49.             submitForm(phpsmartyf);
  50.           } else {
  51.             openSearchWindow("http://smarty.php.net/");
  52.           }
  53.           break;
  54.         default:
  55.             if (nullArgs("php", "?"))
  56.               return false;
  57.           break;
  58.         }
  59.       }
  60.       else
  61.         openSearchWindow("http://www.php.net/" + args.q.replace(/\s+/g, "+"));
  62.     }
  63.   ]]></script>
  64.  
  65.   <copyright>
  66.     Copyright (c) 2002 David Bau
  67.     Distributed under the terms of the
  68.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  69.   </copyright>
  70. </search>
  71.