Jump to content

Context search from Firefox browser


QBox User

Recommended Posts

I thought it might be useful to have a facility to select text in any web-page and send it as the search term to the Recording Service EPG. This would permit the launch of a query from an external TV listings page, for example, or from a programme review, saving the need for keyboard entry or clumsy cut-and-paste operation.

 

FF allows addition of user-created search plugins. Not finding anything from a forum search, I made the one below. If added as (for example) "RS_EPG_search.xml" to the profile "searchplugins" folder, it should appear as an option in the search bar. If the option is selected, it should also appear as a context menu option.

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">

<os:ShortName>RS EPG search</os:ShortName>

<os:Description>Recording Service EPG search</os:Description>

<os:InputEncoding>UTF-8</os:InputEncoding>

<os:Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%06tRNS%00%00%00%00%00%00n%A6%07%91%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%01%5CIDATx%9Cu%D2%3Dn%13%01%10%05%E0o%7F%BC%B6Ib9%C1%91QP%1A%FEB%91Ht%14%1C%80%1B%D0%22.%C0%05%A8%B9%01W%E0%00%88%06%D1%80DCE%01%82%84%A4%20HDAB%B1%C9%DA%C1%D9%8D%D7KaVZ%C9b%9A%D1hf4o%DE%7B%91%85h%B2I%8F%8C%8B%85nP%2F%EE%F2%90%1D.H9a%8FW%7C%AA%CDD%F3%14%F2%84%A7%DC%A2A%C19S%BA%DC%A1%C3%1E%B3%FA%C2c%1E%B1L%975%96h%121%24c%8D%0E%BB%20%C66%F7%19%B3%C9!%2F8%24%E4%0A7%18%93q%9D-%BE%CE%2F%3C%A0O%93%9Cg%9C%12%102!%A5%C7%80%09mv%89%1Blq%CE%8C%97%94%24%F4iS%903%23%24%A3%CB%12%F1*%01%19%7F8%26%AA8Mh%90%12%D0%A2%24b%95%B8%24%A7%20%A5M%40%87%15z%5C%E3%1B)G5Z%E3!%23Z%FCb%83%11%09%B7%B9I%8BK%0Cx%0D%0A%86%84S%BE0%E1%84%84%CB%04%D5'X%E7C%A5%F7%803B%BC%E7%8C1%07%E4%F4Ya%CAo%9E%F3%B6%02%F3%B1n%8D%7B%EC%D4%B4%5C%06%A75%E8%07%BC%A9%2B%FD%83%84%F5%0AOFV%9B%DE%E7%1D%E5%A2%F96%D8%E6%EA%5C%7F%0A~%F2%99%EF%FFs%EB%3F%E2%82%A0S%96%01%23%F2%85%EE_E%05a%84%EC%3F%A8%80%00%00%00%00IEND%AEB%60%82</os:Image>

<SearchForm>http://127.0.0.1:8089/epg_search.html?aktion=epg_search</SearchForm>

<os:Url type="text/html" method="GET" template="http://127.0.0.1:8089/epg_search.html?aktion=epg_search&searchphrase={searchTerms}&cbtitle=on&cbsubtitle=on&ignorecase=on">

</os:Url>

</SearchPlugin>

I took the liberty of including the RS icon, re-sized. Hope this is OK. [Edit: not sure if that "GET" should be a "POST", but it seems to work]

 

The address 127.0.0.1 is the loopback address if the RS service is running on the same PC. Change this to the RS server address if browsing from a remote machine. Alternatively, you can use network names - "localhost" for the same PC or the RS server name. 8089 is the default port for the RS web server interface.

 

I have a FF extension called "Advanced URL builder" that makes it easier to add custom searches. In this case, I have added the search string as an option.

There are probably other extensions that do the same thing.

 

I have included the default search filters. Additional ones can be added using the "& + control" format, but remember ampersand needs to be escaped in XML.

 

At present, the search only brings up the page, ready for changing filters or clicking on "Search". This may be preferred, but it would be nice to have the option to just send the search immediately to the database. If anyone knows how to do this, please let us know.

Edited by QBox User
Link to comment

Microsoft have made it difficult to add customised searches to IE9. This way worked for me.

 

Download a search provider from Microsoft's own library of approved search providers (type anything in the address bar then click "Add" in the drop-down search options). Now edit it in the registry. Remember to back up first!

 

Registry keys will be found at [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\]

 

Edit or add the following values

"DisplayName"="RS EPG search" '(or whatever)

"URL"="http://127.0.0.1:8089/epg_search.html?aktion=epg_search&cbtitle=on&cbsubtitle=on&ignorecase=on&searchphrase={searchterms}" ' change address for server PC

"FaviconPath"="C:\Program Files (x86)\DVBViewer\DVBVctrl.ico" ' The RS png file won't work, but this looks the same. File path may be just "..\Program Files\.." on 32-bit machines

 

The EPG search option should now appear in the context menu, if set as default search, or else via "All accelerators".

Link to comment
×
×
  • Create New...