Here are two files (form.htm and create.php) you need to upload to your (PHP supported) server. Type the path to your "db_search.php" file and the database name. When you submit this information, you will have to click on the install link on the next page. Now select the newly created plugin and type any word you want to search within your database.
form.htm
Code: Select all
<html>
<body>
<h2>Create Search Plugin for Firefox</h2>
<b>If you are using phpMyAdmin, type the details of your phpMyAdmin path and database name...</b><p>
<FORM name="e;myform"e; ACTION="e;create.php"e; METHOD="e;POST"e;>
Search plugin Name:<INPUT TYPE="e;TEXT"e; NAME="e;qname"e; value="e;bookmarks"e;><p>
<SUP>*</SUP>Database ID:<INPUT TYPE="e;TEXT"e; SIZE=55 NAME="e;databaseID"e; value="e;http://saraswaticlasses.com/phpMyAdmin/db_search.php"e;><p>
Database Name:<INPUT TYPE="e;TEXT"e; NAME="e;dname"e; value="e;private"e;><p>
<INPUT TYPE="e;SUBMIT"e; VALUE="e;create file"e; NAME="e;sendit"e;>
</form><p>
<SUP>*</SUP>The path to the "e;db_search.php"e; file within your phpMyAdmin installation.
</body>
</html>Code: Select all
<html>
<head>
<script type="text/javascript">
<!--
function errorMsg()
{
alert("Netscape 6 or Mozilla is needed to install this plugin");
}
function addEngine(<?php echo $qname ?>,ext,cat)
{
if ((typeof window.sidebar == "object") && (typeof
window.sidebar.addSearchEngine == "function"))
{
//cat="Web";
//cat=prompt('In what category should this engine be installed?','Web')
window.sidebar.addSearchEngine(
"http://saraswaticlasses.com/download/plugin/"+<?php echo $qname ?>+".src",
"http://saraswaticlasses.com/download/plugin/"+<?php echo $qname ?>+"."+ext,
name,
cat );
}
else
{
errorMsg();
}
}
//-->
</script>
</head>
<body>
<?php
$file = fopen($qname.'.src','w');
$my_stuff = <<<END
<search name="$qname"
description="Quickbase Search"
method="GET"
action="$databaseID">
<input name="search_option" value="1">
<input name="submit_search" value="Go">
<input name="db" value="$dname">
<input name="search_str" user>
</search>
END;
fwrite($file, $my_stuff);
fclose($file);
?>
<a href="javascript:addEngine('<?php echo $qname; ?>','gif','Web')">Install Plugin</a><p>
Please wait....
</body>
</html>