Publishing System Settings Logout Login Register
Learn to make a FireFox Search Plugin, and how to install it! Detailed Tutorial!
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on March 2nd, 2007
7310 views
Firefox
Installing The Search Plugin

So now everything is made, obviously it needs to be installed for it to work. It doesn't just magically appear in your browser.

Now to install a plugin we need to use Javascript. Obviously you will need javascript enabled for it to be able to install. I will give you the script that installs it, you may say its very similar to Mozilla's version... but actually it is. There is only 1 way to install these plug ins.

function addEngine(url, img, name, desc)
{
��� if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
�� � �� window.sidebar.addSearchEngine (
�� � � � �� url,
�� � � � �� img,
�� � � � �� name,
�� � � � �� desc� � � � 
�� � �� );
��� }
��� else
��� {
�� � �� alert("You need a Mozilla based browser such as firefox to use this.");
��� }
}


Now this code needs to go in script tags on a page. Like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
��� <head>
�� � �� <title>Firefox Search Plugins :: Search TechTuts, Pixel2Life, TutorialFX and more...</title>
�� � � �� <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
�� � �� <script type="text/javascript">
�� � � � �� function addEngine(url, img, name, desc) {
�� � � � � � �� if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
�� � � � � � � � �� window.sidebar.addSearchEngine (
�� � � � � � � � � � �� url,
�� � � � � � � � � � �� img,
�� � � � � � � � � � �� name,
�� � � � � � � � � � �� desc� � � � 
�� � � � � � � � �� );
�� � � � � � �� }
�� � � � � � �� else
�� � � � � � �� {
�� � � � � � � � �� alert("You need a Mozilla based browser such as firefox to use this.");
�� � � � � � �� }
�� � � � �� }
�� � �� </script>
��� </head>
<body>
<br />
<a href="#"
onclick="addEngine('http://pluginr.com/Search_Plugins/Plugins/p2lforum.src',
'http://www.pixel2life.com/favicon.ico', 'Pixel2Life Forum', 'Search
Pixel2Life.com Forum'); return false;">Install Now</a>� � 

<br /><br />
</body>
</html>


If you open a new file, save as install.html and put the above code inside it. Press install now and the plugin will install for you.

All you need to do, is edit the onclick="" on the link. Pretty straight forward.. it goes like:

addEngine(url to src, icon, name, description);

As simple as that...

Thanks For Reading

And that's it. Thank you very much for reading and hopefully this tutorial was easier to understand than Mozilla's guide.

If you ever need help just post on the Forums where someone will be willing to help.


Thanks again for reading!

Pages: 1 2 3 4
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Adam

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top