OPAC that can be easily implemented auto-completion, would be a great and much wanted feature to have. using the OpacUserJs system preference.
Go to: Koha Administration > Global System Preferences > OPAC > OPACUserJS
Copy and Paste the following Javascript.
/**Autocomplete Search**/
$(document).ready(function(){
$("#translControl1").autocomplete({
source: function(request, response) {
$.ajax({
url: "https://en.wikipedia.org/w/api.php",
dataType: "jsonp",
data: {
'action': "opensearch",
'format': "json",
'search': request.term
},
success: function(data) {
response(data[1]);
}
});
},
open: function() {
$('.ui-autocomplete');
}
});
});
Reference
Wikipedia : https://en.wikipedia.org/w/api.php
koha-community: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25532#c15
2 Comments
thank you for sharing this wonderfull article we also provide (SEO, Digital Marketing, business, Affiliate Marketing, Earn Money Online, Instagram marketing, blogging or blogger Couses for free) and much more like news andall other tech things, i wish that you will wonder here.
ReplyDeleteThis article on adding an autocomplete search feature to Koha's OPAC is a game-changer for user experience! If you’re looking to enhance your library system, check out NinzaHost for more valuable resources.
ReplyDelete