* zaba - ZabaSearch.com people search (Shawn K. Hall)
Attached.
This one was originally done by Gregory Krohne about 2 and a half years
ago, but it was lacking a couple parameters, and it just didn't operate
naturally. I've revised it quite a bit to make it take almost freeform
input. If you're creating searches that need to parse near freeform
input, take a look at the source here.
Here's a few examples:
zaba George P. Burdell
zaba George W. Bush, DC
zaba George W. Bush, DC, 1946
zaba jack, john smith, sonora, ca, 1930
The syntax of the last one there really demonstrates the advanced
features in ZabaSearch - the ability to submit more than one first name,
separated by commas.
Regards,
Shawn K. Hall
http://12PointDesign.com/
'// ========================================================
"You have to change the map, not the world."
-- Marcus Kaarto
<search function="zaba">
<name>ZabaSearch</name>
<category>People and Places</category>
<contributor>Gregory Krohne and Shawn K. Hall</contributor>
<link>http://www.zabasearch.com/</link>
<email>[EMAIL PROTECTED]</email>
<description>
Find a person by name anywhere in the United States.
<div class="helpboxDescLabels">Switches:</div>
<table class="helpboxDescTable">
<tr><td>/yyyy</td><td>Year of Birth - defaults to any</td></tr>
</table>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>zaba George P. Burdell</td></tr>
<tr><td>zaba George W. Bush, DC</td></tr>
<tr><td>zaba George W. Bush, DC, 1946</td></tr>
<tr><td>zaba jack, john smith, sonora, ca, 1930</td></tr>
</table>
</description>
<script><![CDATA[
function zaba(q){
if( nullArgs("zaba", q) )
return;
var sname = "";
var city = "";
var state = "";
var doby = "";
var gg= 0;
var d = new Date();
var y = d.getYear();
var a ="00";
for(var i=1900; i<y; i++){
a+=", "+i;
}
var args = parseArgs(q, a);
for (var i = 0; i < args.switches.length; i++){
sw = args.switches[i];
switch(sw.name){
default:
if(!isNaN(sw.name)){
var doby=sw.name;
}
}
}
var zab = args.q.split(", ");
zab.reverse();
var zz = "";
zl = zab.length;
for (var i=0; i < zl; i++){
gg=0;
zz = zab[i];
if(((doby=="") || (doby=="00")) && (!isNaN(zz)) && (gg==0)){
var doby=zz;
gg=1;
}
if(((state=="") || (state=="any")) && (zz.length==2) && (gg==0)){
var state=zz.toUpperCase();
gg=1;
}
if((city=="") && (zab.length>0) && (gg==0)){
var city=zz;
gg=1;
}
if((gg==0)){
if(sname!=""){
sname=zz + ", " + sname;
}else{
sname=zz;
}
gg=1;
}
}
openSearchWindow(
"http://www.zabasearch.com/query1_zaba.php"
+ "?sname=" + sname
+ "&city=" + city
+ "&state=" + state
+ "&doby=" + doby
+ "&ref=zaba&se=O&name_style=1"
);
}
]]></script>
<copyright>
The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
</copyright>
</search>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
To unsubscribe visit:
https://lists.sourceforge.net/lists/listinfo/dqsd-users
DQSD-Users@lists.sourceforge.net
http://sourceforge.net/mailarchive/forum.php?forum_id=8601