How to make Groowe toolbar plugins
Learn how to make XML plugin files
Last update: 2006-10-28
I hope that I will develop some toolbar builder in the future, but in the meanwhile if you know a little bit of XML, you can easily make your own Groowe plugin.
Feel free to send me all interesting plugins you develop and I will be happy to host them on plugin page so other Groowe users can use them. I will also be happy to host additional logos and icons that come with your plugin.
Make plugin XML file
The best way to explain XML file is on example.
<?xml version="1.0" encoding="UTF-8"?>
<Toolbar Name="Icerocket" Category="Search Engines" Language="en-us" Version="1.00">
<Icon IconID="http://www.icerocket.com/favicon.ico" />
<Logo LogoID="http://groowe.com/ff-plugins/logos/icerocket.png" />
<Items>
<Item ID="1" Caption="Search Blogs" Hint="Search Blogs" IconID="WebSearch"
URL="http://blogs.icerocket.com/search?q=$utf8query">
<Item ID="2" IconID="WebSearch" Caption="Web search" Hint="Search web"
URL="http://www.icerocket.com/search?tab=web&q=$utf8query"/>
<Item ID="3" IconID="GoogleNews" Caption="News" Hint="Search news articles"
URL="http://www.icerocket.com/search?tab=news&q=$utf8query"/>
<Item ID="4" IconID="Search" Caption="Images" Hint="Search images"
URL="http://www.icerocket.com/search?tab=image&q=$utf8query"/>
<Item ID="5" IconID="MediaPlayer1" Caption="Multimedia" Hint="Search multimedia"
URL="http://www.icerocket.com/media/search?tab=media&q=$utf8query"/>
</Item>
<Item ID="6" IconID="SearchUtil" Caption="Advanced search" Hint="Advanced Blog search"
URL="http://www.icerocket.com/advancedsearch?tab=blog&q=$utf8query"/>
</Items>
<Order>1;0;6</Order>
<Hosts>
<Host>icerocket.com</Host>
</Hosts>
<KeywordsFieldName>q</KeywordsFieldName>
</Toolbar>
Notes
Keep in mind that XML attributes should be encoded. Usual mistake is to use & instead of & in URLs. For example:
<Item ID="2" IconID="WebSearch" Caption="Web search" Hint="Search web" URL="http://www.icerocket.com/search?tab=web&q=$utf8query"/> <!-- WRONG -->
<Item ID="2" IconID="WebSearch" Caption="Web search" Hint="Search web" URL="http://www.icerocket.com/search?tab=web&q=$utf8query"/> <!-- OK -->Plugin has to be legal XML file, without syntax errors. You can always check XML file by opening file in Firefox. Firefox should render any regular XML file or report an error if you have XML syntax errors inside.
<?xml version="1.0" encoding="UTF-8"?>
Standard XML header. Plugin files should use UTF-8 encoding. Since version 1.5.0 Groowe supports international UTF-8 characters, so you can make your plugin on any language you want using Latin, Cyrillic or any other letter.<Toolbar />
Root toolbar plugin element.
<Toolbar Name="Icerocket" Category="Search Engines" Language="en-us" Version="1.00">
| <Toolbar /> attributes | |
| Name | The toolbar name. This name would actually be used to save XML file on your machine so it has to be regular file name string, without special characters like * or ? |
| Category | Plugin category. You can use any string to make your own category. Common values are: - Search Engines - Download Sites - Shopping Sites - Multimedia - Torrents - Knowledge base - Tags & Bookmarks |
| Language | Plugin regional settings, for example en-us. Not used, but it will be. |
| Version | Plugin version. Always start with 1.00 then increase. Not used, but it will be. |
<Icon />
Specify toolbar plugin icon.
<Icon IconID="http://www.icerocket.com/favicon.ico" />
| <Icon /> attributes | |
| IconID | IconID is the URL to the icon. It can be any kind of URL, http://, chrome://, file:// etc. Icon should be 16x16 transparent image, usually ICO, GIF or PNG files. Usually, you can use favicon.ico of the site, for example http://www.icerocket.com/favicon.ico
Some icons are already built in into Groowe toolbar, and you can reference them only by using their name, without URL [list]. Also, some icons are available on Groowe site [list]. |
<Logo />
Specify toolbar plugin logo.
<Logo LogoID="http://groowe.com/ff-plugins/logos/icerocket.png" />
| <Logo /> attributes | |
| LogoID | LogoID is the URL to the logo file. It can be any kind of URL, http://, chrome://, file:// etc. Logo should be 16 pixels in height, transparent image, usually GIF or PNG. If you can't find specific logo or don't know how to resize some image from the web, you can use favicon.ico of the site, just to display some image.
Some logos are already built in into Groowe toolbar, and you can reference them only by using their name, without URL [list]. Also, some logos are available on Groowe site [list]. |
<Items />
Collection of toolbar buttons (items).
<Item />
Definition of toolbar button.
<Item ID="2" IconID="WebSearch" Caption="Web search" Hint="Search web" URL="http://www.icerocket.com/search?tab=web&q=$utf8query" />
| <Item /> attributes | |||||||||||
| ID | Each button should have its unique numeric ID within plugin. Use 0 for separator. | ||||||||||
| Caption | Button text. | ||||||||||
| IconID | Button icon. All IconID specification for <Icon /> element also applies here. | ||||||||||
| Hint | Text will be displayed as tooltip when you move mouse over button. | ||||||||||
| URL | URL that Groowe will launch when user press the button. URL contains some variables that Groowe will replace with actual values:
| ||||||||||
If <Item /> element contain <Item /> sub-nodes, like in the example from the beginning of this specification, Groowe will make a drop-down button. Otherwise, it will be only a regular menu button.
<Order />
Default order of buttons. Semi column separated string of button IDs that represents default order of buttons. Use 0 to insert separator.
<Order>1;0;6</Order>
If <Order /> is not specified, natural order of buttons in XML will be used.
You don't have to include all of the buttons in <Order />. In that case, that button won't be displayed by default in toolbar, but user can always add the button, as well as he can change the buttons order or exclude some button in Groowe "Customization & Option" dialog.
For example:
<Order>1</Order>Only first button will be displayed to the user by default, but user can later add second button if he likes.
<Hosts />
Collection of <Host /> elements. Not required. Enter all the hosts which are in relation with the site. When user visits some site which can be fount in Hosts collection, it will immediately switch to this toolbar.
<Hosts> <Host>icerocket.com</Host> </Hosts>
<KeywordsFieldName />
Name of the URL variable which specify the search keywords. Not required.
Example: http://www.google.com/search?q=groowe%20toolbar
<KeywordsFieldName>q</KeywordsFieldName>
If specified, Groowe will automatically extract keywords from URLs and put them into search box history. Of course, this is used if you have launched search from web site or on some other way, searches launched from Groowe are automatically placed into search box history.
Installing plugin XML file
There are two ways to install Groowe plugins. First way is also used on Groowe plugin page. You should navigate your Firefox browser to this URL:
http://groowe.com/firefox-plugin-dl/?url=url_of_your_pluginExamples:
http://groowe.com/firefox-plugin-dl/?url=http://www.myblogsite.com/myplugin.xml
http://groowe.com/firefox-plugin-dl/?url=file:///C:/plugins/myplugin.xml
http://groowe.com/firefox-plugin-dl/?url=http://localhost/myplugin.xml
Navigating to this kind of URL will trigger Groowe to load plugin from specified URL.
If specified XML is regular Groowe plugin XML file, it will be loaded into toolbar; otherwise, the error will be reported.
GrooweFiles folder
Groowe saves plugins to GrooweFiles directory. This folder is created when you download your first Groowe plugin, so you won't find it if you haven't installed any plugin yet.
GrooweFiles folder location depends on your system. On Windows, location is usually:
C:\Documents and Settings\<user-name>\Application Data\Mozilla\Firefox\Profiles\ip7i05a5.default\GrooweFiles
On linux, location is usually:
/home/<user-name>/.mozilla/firefox/sjnfe6j6.default/GrooweFiles
You can also save your plugins manually to GrooweFiles folder and they will show up on next Firefox restart. If you place XML file which is not regular Groowe plugin XML or XML with syntax errors, Groowe will ignore your plugin, without any error message.
Groowe versions prior to 1.5.0 have created GrooweFiles folder with insignificant permissions, so installation of plugins was impossible. You should manually set folder permissions by using
$ chmod 700 /home/<user-name>/.mozilla/firefox/sjnfe6j6.default/GrooweFilesor just delete the folder, and the latest Groowebare will create directory as it should.
Special thanks to Chandra Shekhar for solving this issue.




