| Name | Install Search Engine user macro |
|---|---|
| Version | 1.0 |
| Product Versions | 2.x |
| Author(s) | Jean-Baptiste Catté |
| Price | Free |
Description/Features
Add a link allowing to install a OpenSearch engine in your browser.
Installation
This is a user macro, which means you will need to add it manually to your User Macro's in the administration screen.
- Go to the System Administration screen
- Click on the 'User Macros' link in the left menu under 'Configuration'
- Select 'Create a User Macro'
- Name the macro 'install-search-engine'
- Check the 'Macro has a body' box
- Paste the following into the text area and press 'Save':
<script> <!-- function addSearchProvider() { if ((typeof window.external == "object") && (typeof window.external.AddSearchProvider == "function")) { window.external.AddSearchProvider("$param0"); } else { alert("A modern browser (such as Firefox 2 or IE 7) is needed to install an OpenSearch plugin"); } } //--> </script> <a href="javascript:addSearchProvider()">$body</a>
Usage
The macro needs the URL of an OpenSearch descriptor (example: atlassian-confluence.xml) and a text to display. So, for example:
{install-search-engine:http://confluence.atlassian.com/download/attachments/161284344/atlassian-confluence.xml}
Install Atlassian Confluence search engine
{install-search-engine}
will give a link looking like this fake one:
