PDA

View Full Version : Correct OpenSearch description


TiKu
11-26-2014, 09:18 PM
Hi,

I'm trying to create an OpenSearch description XML document for a vBulletin forum and could need some help.
So far my document looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>My Forum</ShortName>
<Description>Durchsucht alle Inhalte meines Forums</Description>
<Url xmlns:parameters="http://a9.com/-/spec/opensearch/extensions/parameters/1.0/"
type="text/html"
template="http://myurl/vbulletin/search.php?do=process"
parameters:method="POST"
parameters:enctype="application/x-www-form-urlencoded">
<parameters:Parameter name="do" value="process"/>
<parameters:Parameter name="query" value="{searchTerms}"/>
</Url>
</OpenSearchDescription>
Together with the corresponding meta tag in the headinclude template, this makes the forum search appear in Firefox search bar. However, searching is not really working. It always forwards to the extended search page and tells me that the number of results would have been too large (which is a lie). I guess it has to do with the missing securitytoken parameter, but this is just a wild guess.

So is there anybody who already has done this and can help me on fixing the OpenSearch description?

Regards
TiKu

kh99
11-26-2014, 11:10 PM
Looking at this mod: https://vborg.vbsupport.ru/showthread.php?t=119144 I found that using this for the Url tag works:
<Url type="text/html"
method="post"
template="http://myurl/vbulletin/search.php?do=process">
<Param name="query" value="{searchTerms}"/>
<Param name="quicksearch" value="1"/>
</Url>


Just out of curiosity I played around a little trying to figure out what exactly was the problem with what you had, but I couldn't (I realized after a while that I had forgotten that vbulletin caches searches, so that's probably why I couldn't figure it out).

TiKu
11-27-2014, 05:32 AM
Thank you. It's even easier. I thought I would need POST because of the cashing, but the default GET works as well:
<Url type="text/html" template="http://myurl/vbulletin/search.php?do=process&quicksearch=1&query={searchTerms}" />
Probably the quicksearch parameter is required to make it work.

Regards
TiKu