BakerTaylorEnabled
GoogleJackets
HTML5MediaEnabled
- IDreamBooksReadometer
- IDreamBooksResults
- IDreamBooksReviews
LibraryThingForLibrariesEnabled
LocalCoverImages
OPACLocalCoverImages
--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do( "DELETE FROM systempreferences WHERE variable in ('IDreamBooksReadometer','IDreamBooksResults','IDreamBooksReviews')" );
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 24854 - Remove IDreamBooks* system preferences)\n";
+}
('HTML5MediaEnabled','not','not|opac|staff|both','Show a tab with a HTML5 media player for files catalogued in field 856','Choice'),
('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','','Media file extensions','free'),
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
-('IDreamBooksReadometer','0','','Display Readometer from IDreamBooks.com','YesNo'),
-('IDreamBooksResults','0','','Display IDreamBooks.com rating in search results','YesNo'),
-('IDreamBooksReviews','0','','Display book review snippets from IDreamBooks.com','YesNo'),
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
choices:
yes: in tabs.
no: in line with the bibliographic information.
- IDreamLibraries:
- -
- - pref: IDreamBooksReviews
- choices:
- yes: Add
- no: "Don't add"
- - a tab on the OPAC details with book reviews from critics aggregated by <a href='https://idreambooks.com/'>IDreamBooks.com</a>.
- -
- - pref: IDreamBooksReadometer
- choices:
- yes: Add
- no: "Don't add"
- - a "Readometer" that summarizes the reviews gathered by <a href='https://idreambooks.com/'>IDreamBooks.com</a> to the OPAC details page.
- -
- - pref: IDreamBooksResults
- choices:
- yes: Add
- no: "Don't add"
- - the rating from <a href='https://idreambooks.com/'>IDreamBooks.com</a> to OPAC search results.
Syndetics:
-
- pref: SyndeticsEnabled
[% IF ( defaulttab == 'media' ) %]<li id="tab_html5media" class="ui-tabs-active">[% ELSE %]<li id="tab_html5media">[% END %]<a href="#html5media">Play media</a></li>
[% END %]
- [% IF ( IDreamBooksReviews ) %]
- <li id='tab_idb_critic_reviews' style="display:none;"><a href='#idb_critic_reviews'>Book reviews by critics ( XXX )</a></li>
- [% END %]
</ul>
[% IF ( serialcollection ) %]
</div><!-- / #images -->
[% END # / IF OPACLocalCoverImages && localimages.size %]
- [% IF ( IDreamBooksReviews ) %]
- <div id="idb_critic_reviews">
- <div id="idb_review_snippets"></div>
- <span><a id="seemoreidb">More book reviews at iDreamBooks.com</a></span>
- </div>
- [% END %]
</div> <!-- / #bibliodescriptions -->
[% IF ( NovelistSelectProfile && NovelistSelectView == 'below' && ( normalized_isbn || normalized_upc ) ) %]
[% END # / IF ( OpacStarRatings != 'disable' )%]
-[% IF ( IDreamBooksReviews || IDreamBooksReadometer ) %]
- var isbn = $(".isbn:last").text().split(" ")[1];
- if (isbn) {
- isbn = isbn.replace(/\W*$/, '');
- isbn = isbn.replace(/-/, '');
-
- if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
- // Use Microsoft XDR for IE version 8 or above
- var xdr = new XDomainRequest();
- xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e");
- xdr.onload = function() {
- json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... };
- eval(json); // json is now a regular JSON object
- parseIDBJSON(json); // parse using same function as for jQuery's success event
- }
- xdr.send();
- } else {
- $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){
- parseIDBJSON(json);
- });
- }
- }
-[% END # / IDreamBooksReviews || IDreamBooksReadometer%]
-
});
- [% IF ( IDreamBooksReviews || IDreamBooksReadometer ) %]
- function parseIDBJSON( json ) {
- if(json.total_results > 0 && json.book.rating > 0){
- var isbn = $(".isbn:last").text().split(" ")[1];
- isbn = isbn.replace(/\W+/g, '');
-
- [% IF ( IDreamBooksReadometer ) %]
- $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+_(" by ")+json.book.author+'" title="'+_("Rating based on reviews of ")+json.book.title+'"></a>');
- [% END %]
-
- [% IF ( IDreamBooksReviews ) %]
- //build new tab for critic reviews
- $("#tab_idb_critic_reviews a").text($("#tab_idb_critic_reviews a").text().replace('XXX', json.book.review_count));
-
- //append happy-sad cloud review
-
- $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>"+_("rating based on reviews at iDreamBooks.com")+"</a></span>");
-
- //insert data into Book reviews tab
- $.each(json.book.critic_reviews, function(){
- $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>"+_("Review date: ")+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>"+_("Review result: ")+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='"+_("iDreamBooks.com rating")+"' title='"+this.pos_or_neg+"' /></a></div></div>");
- });
- $("#seemoreidb").attr('href', json.book.detail_link);
- $("#tab_idb_critic_reviews").show();
- [% END %]
- }
- }
- [% END # / IF IDreamBooksReviews || IDreamBooksReadometer %]
$(document).ready(function() {
if( OPACPopupAuthorsSearch == "1" ){
[% END %]
[% END %]
-
- [% IF ( IDreamBooksResults && SEARCH_RESULT.normalized_isbn ) %]
- <div class="idbresult" style="display: none;">
- [% IF ( IDreamBooksReviews ) %]
- <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]#idb_critic_reviews">
- [% ELSE %]
- <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
- [% END %]
- [% SEARCH_RESULT.normalized_isbn | html %]</a>
- </div>
- [% END %]
</div>
[% IF ( COinSinOPACResults && SEARCH_RESULT.coins ) %]
<!-- COinS / Openurl -->
e.preventDefault();
});
- [% IF ( IDreamBooksResults ) %]
- $('.idbresult').each(function() {
- var isbn = $(this).children('a').text().replace(/\s*/,'');
- var element = this;
-
- if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
- // Use Microsoft XDR for IE version 8 or above
- var xdr = new XDomainRequest();
- xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e");
- xdr.onload = function() {
- json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... };
- eval(json); // json is now a regular JSON object
- if(json.total_results > 0 && json.book.rating > 0){
- $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%");
- $(element).show();
- } else {
- $(element).remove();
- }
- }
- xdr.send();
- } else {
- $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){
- if(json.total_results > 0 && json.book.rating > 0){
- $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%");
- $(element).show();
- } else {
- $(element).remove();
- }
- });
- }
- });
- [% END %]
-
var param1 = "";
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>";
$template->{VARS}->{localimages} = \@images;
}
-$template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews');
-$template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer');
-$template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults');
$template->{VARS}->{OPACPopupAuthorsSearch} = C4::Context->preference('OPACPopupAuthorsSearch');
if (C4::Context->preference('OpacHighlightedWords')) {
$template->{VARS}->{DidYouMean} =
( defined C4::Context->preference('OPACdidyoumean')
&& C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
-$template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews');
-$template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer');
-$template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults');
if ($offset == 0) {
$template->param(firstPage => 1);
BakerTaylorEnabled
GoogleJackets
HTML5MediaEnabled
- IDreamBooksReadometer
- IDreamBooksResults
- IDreamBooksReviews
LibraryThingForLibrariesEnabled
LocalCoverImages
OPACLocalCoverImages