Bugzilla – Attachment 106092 Details for
Bug 11994
Fix OpenSearch discovery in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11994: Fix OpenSearch discovery in the OPAC
Bug-11994-Fix-OpenSearch-discovery-in-the-OPAC.patch (text/plain), 4.25 KB, created by
Martin Renvoize (ashimema)
on 2020-06-19 13:26:12 UTC
(
hide
)
Description:
Bug 11994: Fix OpenSearch discovery in the OPAC
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-19 13:26:12 UTC
Size:
4.25 KB
patch
obsolete
>From 3314de886e6443c97dd2bce030ce34b805f0b6a1 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 28 Apr 2020 14:41:47 +0000 >Subject: [PATCH] Bug 11994: Fix OpenSearch discovery in the OPAC > >This patch corrects the markup for the OpenSearchDescription XML >document and adds (back) the link in the OPAC header which points to it. >This will enable compatible browsers to offer the addition of the OPAC's >keyword search as a search engine option. > >I've found documentation suggesting this feature is available (or at >least was at one time) in Chrome and Safari, but in my test it only >works in Firefox. > >To test, apply the patch and make sure the OPACBaseURL preference is >set correctly. > > - Open the OPAC in Firefox (these instructions assume the latest > version, currently v.75). > - On the right side of the address bar you should see ". . ." Click it > to trigger the menu. > - You should see an "Add search engine" entry with your OPAC's icon. > - Click to add the search engine. > > - Type a keyword to search in the address bar > - A box should pop up below the address bar showing icons at the bottom > for performing a search in various search engines. One of these icons > should be the icon for your Koha OPAC. > - Click the Koha OPAC icon and confirm that it triggers a keyword > search in your OPAC. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../bootstrap/en/includes/doc-head-close.inc | 1 + > .../bootstrap/en/modules/opac-opensearch.tt | 23 +++++++++++-------- > 2 files changed, 15 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >index ee84825445..681f425d48 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >@@ -46,6 +46,7 @@ > [% END %] > [% END %] > [% IF ( Koha.Preference('OPACBaseURL') ) %] >+ <link rel="search" type="application/opensearchdescription+xml" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription" title="Search [% LibraryNameTitle | html %]"> > <link rel="unapi-server" type="application/xml" title="unAPI" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/unapi" /> > [% END %] > [% PROCESS cssinclude %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >index fb50f1e678..7b43110ddc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >@@ -5,15 +5,20 @@ > [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] > > [% IF ( opensearchdescription ) %] >-<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> >- <ShortName>[% LibraryName | html %] Search</ShortName> >- <Description>Search the [% LibraryName | html %]</Description> >- <Tags>koha opac [% LibraryName | html %]</Tags> >- <Contact>[% KohaAdminEmailAddress | html %]</Contact> >- <Url type="application/rss+xml" >- template="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?q={searchTerms}&pw={startPage?}&format=rss"/> >-</OpenSearchDescription> >- >+ <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> >+ <ShortName>[% LibraryNameTitle | html %]</ShortName> >+ <Description>Search the [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha library[% END %] catalog</Description> >+ <InputEncoding>UTF-8</InputEncoding> >+ <Image width="16" height="16" type="image/x-icon"> >+ [% IF ( Koha.Preference('OpacFavicon') ) %] >+ [% Koha.Preference('OpacFavicon') | url %] >+ [% ELSE %] >+ [% Koha.Preference('OPACBaseURL') | url %][% interface | url %]/[% theme | url %]/images/favicon.ico >+ [% END %] >+ </Image> >+ <Url method="get" type="text/html" template="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-search.pl?q={searchTerms}" /> >+ <Query role="example" searchTerms="cat" /> >+ </OpenSearchDescription> > [% ELSE %] > > [% IF ( rss ) %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11994
:
103866
|
103873
|
103874
|
104132
|
104133
|
104134
|
104135
|
104138
|
104139
|
104140
| 106092 |
106093
|
106094