[Koha-patches] [PATCH] Add Babeltheque OPAC enhanced content
Frédéric Demians
f.demians at tamil.fr
Fri Mar 20 21:50:36 CET 2009
www.babeltheque.com is a LibraryThings for Libraries equivalent.
This patch enables this service on OPAC.
It uses v3.01.00.026 slot.
Modify kohaversion.pl
---
admin/systempreferences.pl | 1 +
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
.../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 +
installer/data/mysql/updatedatabase.pl | 7 +++++++
.../opac-tmpl/prog/en/includes/opac-bottom.inc | 5 +++++
.../opac-tmpl/prog/en/modules/opac-detail.tmpl | 11 +++++++++++
kohaversion.pl | 2 +-
opac/opac-detail.pl | 7 +++++++
8 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 806afc3..2577073 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -222,6 +222,7 @@ $tabsysprefs{AWSAccessKeyID} = "EnhancedContent";
$tabsysprefs{AmazonLocale} = "EnhancedContent";
$tabsysprefs{AmazonAssocTag} = "EnhancedContent";
$tabsysprefs{AmazonSimilarItems} = "EnhancedContent";
+$tabsysprefs{Babeltheque} = "EnhancedContent";
$tabsysprefs{OPACAmazonContent} = "EnhancedContent";
$tabsysprefs{OPACAmazonSimilarItems} = "EnhancedContent";
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index c79a727..ee4971c 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -8,6 +8,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable Anonymous suggestions',NULL,'free');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('authoritysep','--','Used to separate a list of authorities in a display. Usually --',10,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoBarcode','OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','incremental|annual|hbyymmincr|OFF','Choice');
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 3469106..df41f1d 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -9,6 +9,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonDevKey', '', 'Voir : aws-portal.amazon.com/gp/aws/developer/registration/index.html', '', '');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonAssocTag', '', 'Voir : associates.amazon.com/gp/flex/associates/apply-login.html', '', '');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AnonSuggestions', '0', 'Attribuée au n° de l''emprunteur anonyme pour activer les suggestions anonymes. 0, pas de suggestions anonymes.', '', 'free');
+VALUES('Babeltheque',0,'Active les contenus Babelthèque - Voir babeltheque.com pour s''abonner','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AuthDisplayHierarchy', '0', 'Affiche la hiérarchie des autorités. A activer uniquement si vous avez un thésaurus hiérarchique. Sera généralement à 0', '', '');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('authoritysep', '--', 'Le séparateur utilisé dans les autorités. Habituellement --', '10', 'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoBarcode', 'OFF', 'Utilisé pour générer automatiquement les codes barre: incremental sera de la forme 1, 2, 3; annual de la forme 2007-0001, 2007-0002, hbyymmincr de la forme HB09010001 où HB=la branche d'appartenance', 'incremental|annual|hbyymmincr|OFF', 'Choice');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 8be1225..c573c96 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2234,6 +2234,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.01.00.026";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','','YesNo')");
+ print "Upgrade to $DBversion done (Added Babeltheque syspref)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
index e4551c0..c3a6380 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
@@ -43,5 +43,10 @@
</div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="Babeltheque" -->
+<script type="text/javascript" src="http://www.babeltheque.com/bw_30.js"></script>
+<!-- /TMPL_IF -->
+
</body>
</html>
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index 73fdeca..6516ee6 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -235,6 +235,8 @@
<!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="Babeltheque" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#babeltheque">Babelthèque</a></li><!-- /TMPL_IF -->
+
</ul>
<div id="holdings">
@@ -468,6 +470,15 @@
</div>
<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="Babeltheque" -->
+<div id="babeltheque">
+ <div id="BW_notes"></div>
+ <div id="BW_critiques"></div>
+ <div id="BW_citations"></div>
+ <div id="BW_etiquettes"></div>
+</div>
+<!-- /TMPL_IF -->
+
<!-- TMPL_IF NAME="OPACFRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" --><div id="editions">
<h2>Other Editions of this Work</h2>
diff --git a/kohaversion.pl b/kohaversion.pl
index 592bb0c..747e7b2 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.014';
+ our $VERSION = '3.01.00.026';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 24f59b0..9d2fbbd 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -289,6 +289,13 @@ if ( C4::Context->preference("OPACAmazonContent") == 1 ) {
$template->param( AMAZON_SIMILAR_PRODUCTS => \@similar_products );
$template->param( AMAZON_EDITORIAL_REVIEWS => $editorial_reviews );
}
+# Babelthèque
+if ( C4::Context->preference("Babeltheque") ) {
+ $template->param(
+ Babeltheque => 1,
+ );
+}
+
# Shelf Browser Stuff
if (C4::Context->preference("OPACShelfBrowser")) {
# pick the first itemnumber unless one was selected by the user
--
1.5.6.5
More information about the Koha-patches
mailing list