Monday, July 25, 2022

How to koha OPAC New Arrivals Books Display

 

Koha CoverFlow (New Arrivals)

Create a SQL public Report

Create a report and please note down the report id (here is SQL statement for New Arrivals)
Reports › Create from SQL
Copy and paste the following line.

SELECT b.biblionumber, i.Barcode, SUBSTRING_INDEX(m.isbn, ' ', 1) AS isbn, b.title 
  FROM items i
  LEFT JOIN biblioitems m USING (biblioitemnumber)
  LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
  WHERE DATE_SUB(CURDATE(),INTERVAL 15 DAY) <= i.dateaccessioned AND m.isbn IS NOT NULL AND m.isbn != ''
  GROUP BY biblionumber
  HAVING isbn != ""
  LIMIT 30

Koha CoverFlow Setup

Download the koha-plugin-coverflow

Enable Koha plugins

You must first Enable Koha plugin and some changes, so visit the video: https://youtu.be/9LJb7X0NXGo

Upload Plugin

Go to Administration > Manage plugins > Upload a plugin > Choose > koha-coverflow-plugin-v2.4.0.kpz and upload

Once the Koha coverflow plugin was install click on Configure

In the Image options Section
            Limit image size (height in pixels) 250
Limit title length (width in pixels) 150

In the mapping Section following line copy and paste

---
- id: 27
  selector: "#coverflow"
  options: 
  style: coverflow
- id: 27
  selector: ".coverflow_class"
  options:
  buttons: true
  autoplay: 3000
  style: wheel

 

NOTE: Where id: 20 is the report id please write your SQL report id

Web Server Configuration

Open Applications > System Tools > Terminal

Apply the following command

sudo su (Enter the mysql password)
sudo leafpad /etc/apache2/sites-enabled/library.conf

Add the following line at the bottom of the file. replace the library with your koha instance name

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>

Restart memcached: 
sudo service memcached restart

Restart your webserver: 
sudo service apache2 restart

OPAC Config

Now go to Administrator > global system preferences > OpacMainUserBlock

I put the following line in the system preference OpacMainUserBlock:

<b><h2><center><u><font color="purple">New Arrivals</font></h2></b></u>
<span id="coverflow">Loading...</span></center>

No comments:

Post a Comment