Search Autodiscovery for church websites

2 postsstarted by jmaxwilson 3,103 viewsoriginal topic

New Member
#1
Both Internet Explorer 7 and Firefox 2 feature convenient built-in search boxes. Additional engines can be easily added to the list of searches accessible from these boxes.

Just as both browsers support RSS feed autodiscovery and subscription, they also support autodiscovery of Search Engines that can be added to their search boxes. They look for and read OpenSearch Search Engine description XML files. Whenever someone browses to a page that contains an OpenSearch autodiscovery link and xml file, the browser detects the search api, the color of the search drop-down button changes color to indicate that a search for the current page is available, and an option is automatically displayed in the drop down to allow the user to add the search to the list of search engines always available in the browser's search box.

The lds.org development team should add OpenSearch xml documents and autodiscovery links to lds.org and scriptures.lds.org websites to make it easy and convenient for visitors to add common LDS searches to their browser search boxes.

The OpenSearch description files would look like this:

ldsorgsearch.xml

Code:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
 <ShortName>lds.org</ShortName>
 <Description>Search lds.org</Description>
 <Tags>church of jesus christ of latter-day saints lds mormon</Tags>
 <Url type="text/html" template="http://lds.org/portal/site/LDSOrg/menuitem.062a5ea6a5e8d8661b622015f1e543a0?vgnextoid=84010fd41d93b010VgnVCM1000004d82620aRCRD&locale=0&hideNav=1&bucket=AllChurchContent&query={searchTerms}"/>
</OpenSearchDescription>
scripturesearch.xml

Code:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
 <ShortName>LDS Scriptures</ShortName>
 <Description>Search LDS Scriptures at scriptures.lds.org</Description>
 <Tags>church of jesus christ of latter-day saints lds mormon scriptures</Tags>
 <Url type="text/html" template="http://scriptures.lds.org/en/search?search={searchTerms}"/>
</OpenSearchDescription>
conferencesearch.xml

Code:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
 <ShortName>LDS General Conference</ShortName>
 <Description>Search General Conference Talks at lds.org</Description>
 <Tags>church of jesus christ of latter-day saints lds mormon conference</Tags>
 <Url type="text/html" template="http://www.lds.org/portal/site/LDSOrg/menuitem.062a5ea6a5e8d8661b622015f1e543a0/?vgnextoid=84010fd41d93b010VgnVCM1000004d82620aRCRD&hideNav=1&bucket=GeneralConference&query={searchTerms}"/>
</OpenSearchDescription>
Place these xml documents in a publicly accessible folder in the document root of lds.org, like lds.org/opensearch/

Then in the xsl templates that are used to generate the xhtml for the lds.org and scriptures.lds.org websites, add the following lines in the <head></head> section to enable the search autodiscovery in IE7 and Firefox2:

Code:

<link rel="search" href="http://lds.org/opensearch/ldsorgsearch.xml"
      type="application/opensearchdescription+xml"
      title="lds.org" />

<link rel="search" href="http://lds.org/opensearch/scripturesearch.xml"
      type="application/opensearchdescription+xml"
      title="LDS Scriptures" />

<link rel="search" href="http://lds.org/opensearch/conferencesearch.xml"
      type="application/opensearchdescription+xml"
      title="LDS General Conference" />
This same method could be used to add search autodiscovery to other church websites. Hope others find the information useful.
Senior Member
#2
Thanks for the great feedback! I'll pass it along.

Tom