@@ -, +, @@
the OPAC
---
.../atomicupdate/bug_26454-add_OpacMetaDescription_syspref.perl | 7 +++++++
installer/data/mysql/sysprefs.sql | 1 +
.../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 4 ++++
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc | 3 +++
4 files changed, 15 insertions(+)
create mode 100755 installer/data/mysql/atomicupdate/bug_26454-add_OpacMetaDescription_syspref.perl
--- a/installer/data/mysql/atomicupdate/bug_26454-add_OpacMetaDescription_syspref.perl
+++ a/installer/data/mysql/atomicupdate/bug_26454-add_OpacMetaDescription_syspref.perl
@@ -0,0 +1,7 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do( "INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('OpacMetaDescription','','','This description will show in search engine results (160 characters).','Textarea');" );
+
+ # Always end with this (adjust the bug info)
+ NewVersion( $DBversion, 26454, "Add system preference to set meta description for the OPAC");
+}
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -414,6 +414,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
+('OpacMetaDescription','','','This description will show in search engine results (160 characters).','Textarea'),
('OpacMoreSearches', '', NULL, 'Add additional elements to the OPAC more searches bar', 'Textarea'),
('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'),
('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -74,6 +74,10 @@ OPAC:
syntax: text/html
class: code
-
+ - "This description will show in search engine results (160 characters)."
+ - pref: OpacMetaDescription
+ type: textarea
+ -
- By default, show bibliographic records
- pref: BiblioDefaultView
choices:
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
@@ -5,6 +5,9 @@
+[% IF ( Koha.Preference('OpacMetaDescription') ) %]
+
+[% END %]
[% IF ( bidi ) %]
[% Asset.css("lib/jquery/jquery-ui-rtl-1.12.1.min.css") | $raw %]
--