The Firefox search bar is a very useful feature. Just click Ctrl+K, type in the text to search for, then click Enter. The same feature would be very useful for locating Mantis issues. This post explains how you can get the search bar working with Mantis.
Preview Image of Mantis Search Plugin
A Firefox search plugin is implemented via two files: - name.src: A mandatory XML file that has the definition of the plugin. (this example mantis.src) - name.png: An image file that is 16×16 pixels (other formats are supported, e.g.: .jpg and .gif). This file is optional.
Following is the content of the .src file:
# Mozilla/Mantis plug-in by Victor Boctor (http://www.futureware.biz) <search name="Mantis" description="Official Mantis Bugtracker" method="GET" action="http://bugs.mantisbt.org/view.php" queryEncoding="utf-8" queryCharset="utf-8"> <input name="id" user> </search>
The src file above defines the name and description of the plugin. It also defines the form that will post the user input to Mantis. The form is defined by choosing an action domain, the post method, and the encoding. The form has one field “id” which is set to the value of the user input. We use this for the BugID#. You can change this search plugin (or define another) which links to your own Mantis installation. Just change the action domain to “http://www.yoursite.com/mantis/view.php”.
Says 'post' but actually uses 'get'…
Place the 'src' and optional image files in the searchplugins directory: “C:\Program Files\Mozilla Firefox\searchplugins” or “/Applications/FireFox/Contents/MacOS/searchplugins” Your path may be different based on the path chosen during installation and the Operating System on which Firefox is installed.
Download now the src and image file. ( just copy the source but where is the icon?)
These are tested on Firefox v1.0.6. (and the source on FireFox v188.8.131.52 )
When this feature is integrated directly into Mantis, the following features will be available:
It would be nice if someone can re-do the same plug-in for Internet Explorer 7 which has the same search bar concept.