You are on page 1of 6

Step by step procedure to create koha-plugin-coverflow

Step 1

Please download the kpz file from the link - https://github.com/bywatersolutions/koha-plugin-


coverflow/releases

Latest is – koha-coverflow-plugin-v2.4.1.kpz

---------------------------------------------

Step 2

To set up the Koha plugin system you must first make some changes to your install.

Sudo su

leafpad /etc/koha/sites/library/koha-conf.xml

In the xml file Change <enable_plugins>0<enable_plugins> to <enable_plugins>1</enable_plugins>

Confirm that the path to <pluginsdir> exists, is correct, and is writable by the web server in the same file.

Restart your webserver using the command - service apache2 restart

Enable “UseKohaPlugins” under systempreferences

---------------------------------------------

Step 3

Now generate a report using the below query.

SELECT biblionumber, SUBSTRING_INDEX(isbn, ' ', 1) AS isbn, title

FROM virtualshelfcontents

LEFT JOIN biblio USING (biblionumber)

LEFT JOIN biblioitems USING (biblionumber)


WHERE shelfnumber=1

Here “shelfnumber=1” is the list number what you can create using
lists.

If you are using the local cover images, generate report using the below query:

SELECT biblionumber, SUBSTRING_INDEX(isbn, ' ', 1) AS isbn, title, biblioimages.imagenumber as


localcover

FROM virtualshelfcontents

LEFT JOIN biblio USING (biblionumber)

LEFT JOIN biblioitems USING (biblionumber)

LEFT JOIN biblioimages USING (biblionumber)

WHERE shelfnumber=1

---------------------------------------------

Step 4

Upload the kpz file downloaded under “Tool Plugins” in tools.

Now once the plugin is uploaded you will see a screen as below.
Now click on Actions and then Configure as shown below:

You can change the height and width of the images.

Now add the below html code in the editor:

- id: 1

selector: #coverflow

options:

buttons: true

autoplay: 4000

loop: true

- id: 2

selector: #coverflow2

options:

buttons: true

autoplay: 4000

loop: true

Here Id is the report number you generated using SQL query.


Selector: #Coverflow is the widget name that will appread in the opac page.

You can define style of the coverflow using the style option

by adding style after Options. Styles available are – Coverflow(Default), wheel, flat

Eg:

id: 2

selector: #coverflow2

options:

style: wheel

buttons: true

autoplay: 4000

loop: true

Step 5

Now edit the library.conf file


sudo su

leafpad /etc/apache2/sites-enabled/library.conf

ScriptAlias /coverflow.pl
"/var/lib/koha/library/plugins/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl"

Alias /plugin "/var/lib/koha/library/plugins"

# The stanza below is needed for Apache 2.4+

<Directory /var/lib/koha/library/plugins>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

IN the above script – Make sure the path of the coverflow.pl is correct.

----------------------------------------------------------------------

Step 6

Now go to Global System Preferences - under OpacMainUserBlock add the below line.

<span id="coverflow">Loading...</span>

<span id="coverflow2">Loading...</span>

Source: http://bywatersolutions.com/2016/06/28/koha-coverflow-setup/

Posted 15th March 2017 by Suresh Kumar Tejomurtula

View comments

1.
RAJENDRAJune 9, 2017 at 10:36 PM

sir i have installed koha in centos 6, there is no as such file as /etc/apache2/sites-enabled/library.conf


instead it is /etc/httpd file. Please guide me and how can i check koha instance name in my installation?

You might also like