('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'),
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'),
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
-('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
+('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
('OPACItemHolds','1','0|1|force','Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.','Choice'),
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
SetVersion ($DBversion);
}
-
-$DBversion = "3.17.00.XXX";
-if ( CheckVersion($DBversion) ) {
- $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')"
- );
- print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n";
- SetVersion($DBversion);
-}
-
$DBversion = '3.17.00.014';
if ( CheckVersion($DBversion) ) {
$dbh->do("
SetVersion($DBversion);
}
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')"
+ );
+ print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n";
+ SetVersion($DBversion);
+}
=head1 FUNCTIONS
yes: Highlight
no: "Don't highlight"
- words the patron searched for in their search results and detail pages; To prevent certain words from ever being highlighted, enter a list of stopwords here
- - pref: HighlightedStopWords
+ - pref: NotHighlightedWords
class: multi
- (separate columns with |)
-
var x;
for (x in q_array) {
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
toHighlight.highlight(q_array[x]);
}
for (x in q_array) {
q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if( $.inArray(q_array[x], myStopwords) == -1 ) {
$(".title").highlight(q_array[x]);
$(".author").highlight(q_array[x]);
function highlightOn() {
var x;
for (x in q_array) {
- q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
- q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
- if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
- $("td").highlight(q_array[x]);
- }
+ q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
+ q_array[x] = q_array[x].toLowerCase();
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
+ if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
+ $("td").highlight(q_array[x]);
+ }
}
$(".highlight_toggle").toggle();
}
for (x in q_array) {
q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
$(".title").highlight(q_array[x]);
$(".author").highlight(q_array[x]);
for (x in q_array) {
q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if( $.inArray(q_array[x], myStopwords) == -1 ) {
$(".title").highlight(q_array[x]);
$(".author").highlight(q_array[x]);
for (x in q_array) {
q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
$("td").highlight(q_array[x]);
}
for (x in q_array) {
q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
q_array[x] = q_array[x].toLowerCase();
- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
$(".title").highlight(q_array[x]);
$(".author").highlight(q_array[x]);