Since the retirement of Livelink Companion, Livelink has lacked the ability to search a Livelink instance directly from the browser in a manner like that of the Google Toolbar. However, with the enhancements in IE 7 and Firefox 2 it has become much easier to add your own custom search providers to the browser to allow you to search any configured Livelink instance directly from the browsers built in search engine dialog.

In this tutorial we are going to look at how to add a Livelink instance as a Search Provider in both Internet Explorer 7 and Firefox 2 for a Livelink 95 SP1 instance, although the code should be easily adaptable to other versions of Livelink. Firstly we need to create the base XML which contains the configuration for the Search Provider. This XML file is in the OpenSearch format, the sample configuration file we will use will contain the following elements :

XML Attribute XML Attribute Value
ShortName This is the name that appears on the list of Search Providers.
Description This is a longer description of the Search Provider.
Url This is the URL that will be called including the provided search term.
Image This is the small image that will appear in the Search Providers dropdown in browsers, such as Firefox, that support them.
Developer This is the name of the developer(s) who developed the configuration file.
Contact This is the email address of the named developer(s)

An example of the XML file is shown below :

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>Web Search</ShortName>
    <Description>Example.Com Search Engine</Description>
    <Url type="text/html" template="http://example.com/?q={searchTerms}"/>
    <Image width="16" height="16">http://example.com/example.png</Image>
    <Developer>Example.Com Developers</Developer>
    <Contact>developers@example.com</Contact>
</OpenSearchDescription>

In the case of Livelink the URL value for a search contains several parameters which form the URL that is passed to Livelink as a search request, these can be seen by examining the r object within the Builder or Livelink SDK. In this tutorial we will only be looking at a simple search using the Search Livelink for option, at the simplest level we need to populate the following values :

Livelink Parameter Parameter Value
fullTextMode allwords
func search
lookfor1 allwords
objAction NewSearch
objType 258
scopeSelection 2217|2000|Within%20Enterprise
search_type newGUI
SearchBarSearch true
SearchBarSearch_list {'TRUE','TRUE'}
slice 2217|2000|Within%20Enterprise
startAt 1
TypeOfSearch newGUI
where1 {searchTerms}

There are a few parameters here that are worth a specific mention. Firstly the where1 parameter must be set to the value specified, {searchTerms}, as this is the placeholder that is replaced with what the user has entered into the search bar.The parameters scopeSelection and slice must be the same and they are formatted as per one of the following examples :

<slice to search>|<start node id>|Within <obj name>
<slice to search>

The following table lists a few sample values for these parameters :

Sample Value Description
2217|2000|Within%20Enterprise From Here search of the Enterprise Slice (dataid 2217) at the Enterprise Workspace (dataid 2000).
2217|7912|Within New Compound Document From Here search of the Enterprise Slice (dataid 2217) within a Livelink Compound Document called New Compound Document (dataid 7912).
2217 Search of the Enterprise Slice (dataid 2217) only from anywhere in the system.

Putting this all together we get a simple XML file similar to the one shown below :

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>My Local 95</ShortName>
    <Description>Search my Local Livelink 95 instance</Description>
    <Url type="text/html" template="http://localhost/Livelink95/livelink.exe?fullTextMode=allwords&func=search&lookfor1=allwords
        &objAction=NewSearch&objType=258&scopeSelection=2217|2000|Within%20Enterprise&SearchBarSearch=true
        &SearchBarSearch_list={'TRUE','TRUE'}&search_type=newGUI&slice=2217|2000|Within%20Enterprise&TypeOfSearch=newGUI
        &where1={searchTerms}&startAt=1"/>
    <Image width="16" height="16">http://localhost/Livelink95/local95.png</Image>
    <Developer>Greg Griffiths</Developer>
    <Contact>livelink@greggriffiths.org</Contact>
</OpenSearchDescription>

Now that we have created the XML configuration file we need to have some method of presenting this to the user so that they can click on a link and have the Search Provider added to their list. We do this by using the Javascript method window.external.AddSearchProvider('<URL>') which is defined on MSDN and is supported by both Internet Explorer and Firefox. Putting this function into a simple HTML page we would get a page like the following :

<html>
    <head>
        <title>Add Search Engine</title>
    </head>
    <body>
        <a href="#" onclick="javascript:window.external.AddSearchProvider('http://localhost/addengine/local95.xml');">add the engine</a>
    </body>
</html>

However, unless you have a current Livelink session on that specific server, you would need to login when you use the Search Engine for the first time. This can be avoided if you hardcode the username and password of the user into the URL as described in this Knowledge Centre Article, the only caveat is to leave the value {searchTerms} unescaped in the new URL.

Using the above we can now perform searches of any specified Livelink server, including those such as Knowledge Centre, for which David Templeton, the OpenText search guru has provided the this link to add the KC as a Search Provider.


This article contains information from the IE 7 Blog as well as input from the OpenText search guru, David Templeton.