I’ve been getting requests to teach how the plug-in is made from my buddies. What the search tool does is that it sends http requests (GET or POST) with variables based on the plugin description to the site it searches, it's just a bypass method for search pages making access to searches much faster. So this is what i did, i first explored the HTML of the page i want to build my plugin, then... see the steps bellow...
#
# Search Plugin Developed by Ahmed Azhan Shameem.
# http://vampire-mv.blogspot.com
#
<search
version="8.0"
name="E-Directory"
description="Dhiraagu online telephone directory - by http://vampire-mv.blogspot.com"
action="http://www.dhivehinet.net.mv/index.php?action=edir"
updateCheckDays=0
queryEncoding="UTF-8"
queryCharset="UTF-8"
method="POST"
>
<input name="query" user="">
</search>
the input query is the input variable posted.
2. Create a 16x16 pixels gif file named as e-dir.gif ( this doesn't have to be really a 16x16 but it'll look nice if it's in this resolution )
3. Upload these two files to some place available online. I uploaded them to this location http://www.msquare-maldives/azhan/4. Goto edit your page where you want the link to be added and add this code.
open java script tag
function addme()
{
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
{
window.sidebar.addSearchEngine(
'http://www.msquare-maldives.com/azhan/e-dir.src',
'http://www.msquare-maldives.com/azhan/e-dir-icon.gif',
'E-Directory',
'Vampire-MV');
}
else
{
alert("Sorry, you need a Mozilla-based browser (such as Firefox) to install a search plugin.");
}
}
close java script tag
Call the function addme() using any lick or action. In a link set this as url to call a java script function javascript:addme();
5. Modify these to suit your own search. If you need help modifying ping me again. :P
Comments