T#313 Move 'New titles slider for OPAC' below 'Newest Titles Pulldown'
authorKatrin Fischer <katrin.fischer.83@web.de>
Wed, 2 May 2018 22:18:53 +0000 (00:18 +0200)
committerKatrin Fischer <katrin.fischer.83@web.de>
Fri, 4 May 2018 06:11:07 +0000 (08:11 +0200)
source/miscellaneous.rst

index 60d4cf5..baf8b5e 100644 (file)
@@ -1,97 +1,5 @@
 .. include:: images.rst
 
-New titles slider for OPAC
-==========================
-
-Often times libraries will want to add a flowing widget with new
-materials at the library to their main public catalog page. To do this
-you can use a widget from any number of services (usually for a cost) or
-you can `enable plugins <#pluginsystem>`__ in Koha and use the `Cover
-Flow
-plugin <http://git.bywatersolutions.com/koha-plugins.git/shortlog/refs/heads/cover_flow>`__
-which is based on the
-`Flipster <https://github.com/drien/jquery-flipster>`__, a responsive
-jQuery coverflow plugin.
-
-Once the plugin is installed, the steps to get your coverflow to show up
-are as follows:
-
-First, you need to create one or more public reports for your coverflow
-widget or widgets to be based on. This is how the plugin knows what the
-content of your widget should contain. Each report needs only three
-columns; title, biblionumber, and isbn. It is important that you have a
-good and valid isbn, as that is the datum used to actually fetch the
-cover. In the iteration of the plugin, we are using Amazon cover images,
-but I believe in the end I will make the cover image fetcher
-configurable so we can use any data source for cover image fetching.
-
-Second, we need to configure the plugin. The plugin configuration is a
-single text area that uses YAML ( actually, it’s JSON, whcih is a subset
-of YAML ) to store the configuration options. In this example it looks
-like this:
-
-::
-
-    - id: 42
-      selector: #coverflow
-      options:
-      style: coverflow
-
-In this example, we are telling the plugin to use the report with id 42,
-and use it to create a coverflow widget to replace the HTML element with
-the id “coverflow”. The options list is passed directly to Flipster, so
-any options supported by Flipster can be set from the plugin
-configuration! In fact, in addition to the traditional coverflow,
-Flipster has a “carousel” mode which is a much more compact version of
-the coverflow. You can also configure which cover the widget will start
-on, among other options.
-
-At the time the plugins options are saved or updated, the plugin will
-then generate some minified JavaScript code that is automatically stored
-in the Koha system preference OPACUserJS. Here is an example of the
-output:
-
-::
-
-    /* JS for Koha CoverFlow Plugin
-     This JS was added automatically by installing the CoverFlow plugin
-     Please do not modify */$(document).ready(function(){$.getScript("/plugin/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/jquery-flipster/src/js/jquery.flipster.min.js",function(data,textStatus,jqxhr){$("head").append("<link id='flipster-css' href='/plugin/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/jquery-flipster/src/css/jquery.flipster.min.css' type='text/css' rel='stylesheet' />");$('#coverflow').load("/coverflow.pl?id=42",function(){var opt={'items':'.item','minfactor':15,'distribution':1.5,'scalethreshold':0,'staticbelowthreshold':false,'titleclass':'itemTitle','selectedclass':'selectedItem','scrollactive':true,'step':{'limit':4,'width':10,'scale':true}};$('#coverflow').flipster({style:'coverflow',});});});});
-    /* End of JS for Koha CoverFlow Plugin */
-
-Why do this? For speed! Rather than regenerating this code each and
-every time the page loads, we can generate it once, and use it over and
-over again.
-
-If you inspect the code closely, you’ll notice it references a script
-“coverflow.pl”. This is a script that is included with the coverflow
-plugin. Since we need to access this from the OPAC ( and we don’t want
-to set off any XSS attack alarms ), we need to modify the web server
-configuration for the public catalog and add the followup to it:
-
-::
-
-    ScriptAlias /coverflow.pl "/var/lib/koha/mykoha/plugins/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl"
-
-This line gives us access to the coverflow.pl script from the OPAC. This
-script retrieves the report data and passes it back to the public
-catalog for creating the coverflow widget. Koha::Cache is supported in
-order to make the widget load as quickly as possible!
-
-The final step is to put your selector element somewhere in your public
-catalog. In this example, I put the following in the system preference
-OpacMainUserBlock:
-
-::
-
-    <span id="coverflow">Loading...</span>
-
-Once that is in place, you need only refresh your OPAC page, and there
-you have it, your very own catalog coverflow widget! Not only do these
-coverflows look great on a computer screen, but they look great on
-mobile platforms as well, and are even touch responsive!
-
-|image1316|
-
 System Preference Defaults
 ==========================
 
@@ -3109,6 +3017,100 @@ somewhere on your OPAC. The `Farmington Public Libraries
 OPAC <http://catalog.farmingtonlibraries.org>`__ has a few examples of
 this on the left.
 
+.. _new-titles-slider-for-opac-label:
+
+New titles slider for OPAC
+--------------------------
+
+Often times libraries will want to add a flowing widget with new
+materials at the library to their main public catalog page. To do this
+you can use a widget from any number of services (usually for a cost) or
+you can `enable plugins <#pluginsystem>`__ in Koha and use the `Cover
+Flow
+plugin <http://git.bywatersolutions.com/koha-plugins.git/shortlog/refs/heads/cover_flow>`__
+which is based on the
+`Flipster <https://github.com/drien/jquery-flipster>`__, a responsive
+jQuery coverflow plugin.
+
+Once the plugin is installed, the steps to get your coverflow to show up
+are as follows:
+
+First, you need to create one or more public reports for your coverflow
+widget or widgets to be based on. This is how the plugin knows what the
+content of your widget should contain. Each report needs only three
+columns; title, biblionumber, and isbn. It is important that you have a
+good and valid isbn, as that is the datum used to actually fetch the
+cover. In the iteration of the plugin, we are using Amazon cover images,
+but I believe in the end I will make the cover image fetcher
+configurable so we can use any data source for cover image fetching.
+
+Second, we need to configure the plugin. The plugin configuration is a
+single text area that uses YAML ( actually, it’s JSON, whcih is a subset
+of YAML ) to store the configuration options. In this example it looks
+like this:
+
+::
+
+    - id: 42
+      selector: #coverflow
+      options:
+      style: coverflow
+
+In this example, we are telling the plugin to use the report with id 42,
+and use it to create a coverflow widget to replace the HTML element with
+the id “coverflow”. The options list is passed directly to Flipster, so
+any options supported by Flipster can be set from the plugin
+configuration! In fact, in addition to the traditional coverflow,
+Flipster has a “carousel” mode which is a much more compact version of
+the coverflow. You can also configure which cover the widget will start
+on, among other options.
+
+At the time the plugins options are saved or updated, the plugin will
+then generate some minified JavaScript code that is automatically stored
+in the Koha system preference OPACUserJS. Here is an example of the
+output:
+
+::
+
+    /* JS for Koha CoverFlow Plugin
+     This JS was added automatically by installing the CoverFlow plugin
+     Please do not modify */$(document).ready(function(){$.getScript("/plugin/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/jquery-flipster/src/js/jquery.flipster.min.js",function(data,textStatus,jqxhr){$("head").append("<link id='flipster-css' href='/plugin/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/jquery-flipster/src/css/jquery.flipster.min.css' type='text/css' rel='stylesheet' />");$('#coverflow').load("/coverflow.pl?id=42",function(){var opt={'items':'.item','minfactor':15,'distribution':1.5,'scalethreshold':0,'staticbelowthreshold':false,'titleclass':'itemTitle','selectedclass':'selectedItem','scrollactive':true,'step':{'limit':4,'width':10,'scale':true}};$('#coverflow').flipster({style:'coverflow',});});});});
+    /* End of JS for Koha CoverFlow Plugin */
+
+Why do this? For speed! Rather than regenerating this code each and
+every time the page loads, we can generate it once, and use it over and
+over again.
+
+If you inspect the code closely, you’ll notice it references a script
+“coverflow.pl”. This is a script that is included with the coverflow
+plugin. Since we need to access this from the OPAC ( and we don’t want
+to set off any XSS attack alarms ), we need to modify the web server
+configuration for the public catalog and add the followup to it:
+
+::
+
+    ScriptAlias /coverflow.pl "/var/lib/koha/mykoha/plugins/Koha/Plugin/Com/ByWaterSolutions/CoverFlow/coverflow.pl"
+
+This line gives us access to the coverflow.pl script from the OPAC. This
+script retrieves the report data and passes it back to the public
+catalog for creating the coverflow widget. Koha::Cache is supported in
+order to make the widget load as quickly as possible!
+
+The final step is to put your selector element somewhere in your public
+catalog. In this example, I put the following in the system preference
+OpacMainUserBlock:
+
+::
+
+    <span id="coverflow">Loading...</span>
+
+Once that is in place, you need only refresh your OPAC page, and there
+you have it, your very own catalog coverflow widget! Not only do these
+coverflows look great on a computer screen, but they look great on
+mobile platforms as well, and are even touch responsive!
+
+|image1316|
+
 .. _cataloging-and-searching-by-color-label:
 
 Cataloging and Searching by Color