cvs: pearweb /include pear-format-html.php /public_html search.php
| From: | Martin Jansen | Date: | Sun, 14 Mar 2004 11:33:32 +0000 |
| Subject: | cvs: pearweb /include pear-format-html.php /public_html search.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17385@lists.php.net to get a copy of this message | ||
mj Sun Mar 14 06:33:32 2004 EDT
Modified files:
/pearweb/public_html search.php
/pearweb/include pear-format-html.php
Log:
* Adding site-wide search mechanism through Google.
http://cvs.php.net/diff.php/pearweb/public_html/search.php?r1=1.5&r2=1.6&ty=u
Index: pearweb/public_html/search.php
diff -u pearweb/public_html/search.php:1.5 pearweb/public_html/search.php:1.6
--- pearweb/public_html/search.php:1.5 Sun Mar 30 11:06:01 2003
+++ pearweb/public_html/search.php Sun Mar 14 06:33:31 2004
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: search.php,v 1.5 2003/03/30 16:06:01 mj Exp $
+ $Id: search.php,v 1.6 2004/03/14 11:33:31 mj Exp $
*/
if (!isset($HTTP_POST_VARS['search_in'])) {
@@ -46,6 +46,16 @@
break;
+ case "site" :
+ /**
+ * We forward the query to google.com
+ */
+ $location = "http://google.com/search?as_sitesearch=pear.php.net";
+ $query = "&as_q=" . urlencode($_POST['search_string']);
+ header("Location: " . $location . $query);
+
+ break;
+
default :
response_header("Search");
echo "<h2>Search</h2>\n";
http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.83&r2=1.84&ty=u
Index: pearweb/include/pear-format-html.php
diff -u pearweb/include/pear-format-html.php:1.83 pearweb/include/pear-format-html.php:1.84
--- pearweb/include/pear-format-html.php:1.83 Sun Feb 29 07:55:59 2004
+++ pearweb/include/pear-format-html.php Sun Mar 14 06:33:32 2004
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: pear-format-html.php,v 1.83 2004/02/29 12:55:59 jan Exp $
+ $Id: pear-format-html.php,v 1.84 2004/03/14 11:33:32 mj Exp $
*/
/* Send charset */
@@ -165,6 +165,7 @@
<small>in the</small>
<select name="search_in" class="small">
<option value="packages">Packages</option>
+ <option value="site">This site (using Google)</option>
<option value="pear-dev">Developer mailing list</option>
<option value="pear-general">General mailing list</option>
<option value="pear-cvs">CVS commits mailing list</option>