User manual
Customizing Koha Software
koha @linux: /home /koha /kohaclone # vi installer /data /mysql/
updatedatabase30.pl
We add a block as follows at the bottom of the file. The field
$DBvers ion is
important; Koha's web installer, when deciding whether to upgrade the Koha
database, checks if the database's current version is below the highest
$DBvers ion
value indicated in this file. If it is below this number, it initiates the database
upgrade process.
Set the
$DBvers ion
by incrementing the last 3 digits of the number in the previous
block in the file. So if the last block in the file starts with this line:
$DBversion = "3.00.06.010 ";
if (C4:: Context -> preference( "Version ")
< TransformToNum($DBversion))
We create our new block as follows:
$DBversion = "3.00.06.011 ";
if (C4:: Context -> preference( "Version ")
< TransformToNum($DBversion))
{
$dbh ->do( "INSERT INTO systempreferences (variable,value,exp
lanation,options,type) VALUES
(' GoogleIndicTransliteration','0'
,'Allow display of Google Indic Transliteration Tool in the OPAC
Masthead',NULL,'YesNo'); ");
print "Upgrade to $DBversion done (Adding Google Indic
Transliteration Sys Pref) \n ";
SetVersion ($ DBversion);
And finally, we edit the
systempreferences .pl in the folder
admin.
This file
controls the tab in which this new preference will be displayed in the Global
System preferences module in Koha.
koha@linux:/home/koha/kohaclone # vi admin/systempreferences.pl
Add this line to show this preference in the OPAC tab in the Global System
Preferences module in Koha:
$tabsysprefs{XSLTResultsDisplay}
= "OPAC";
[ 238 ]