3  * COPS (Calibre OPDS PHP Server) class file
 
   5  * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 
   6  * @author     Sébastien Lucas <sebastien@slucas.fr>
 
  13      * The directory containing calibre's metadata.db file, with sub-directories
 
  14      * containing all the formats.
 
  15      * BEWARE : it has to end with a /
 
  16      * You can enable multiple database with this notation instead of a simple string :
 
  17      * $config['calibre_directory'] = array ("My database name" => "/home/directory/calibre1/", "My other database name" => "/home/directory/calibre2/");
 
  19     $config['file_directory'] = './';
 
  23      * The internal directory set in nginx config file
 
  24      * Leave empty if you don't know what you're doing
 
  26     $config['calibre_internal_directory'] = ''; 
 
  29      * Full URL prefix (with trailing /)
 
  30      * usefull especially for Opensearch where a full URL is sometimes required
 
  31      * For example Mantano requires it.
 
  33     $config['cops_full_url'] = ''; 
 
  36      * Number of recent books to show
 
  38     $config['cops_recentbooks_limit'] = '50'; 
 
  43     $config['cops_title_default'] = "COPS";
 
  48     $config['cops_subtitle_default'] = ""; 
 
  51      * Wich header to use when downloading books outside the web directory
 
  52      * Possible values are :
 
  53      *   X-Accel-Redirect   : For Nginx
 
  54      *   X-Sendfile         : For Lightttpd or Apache (with mod_xsendfile)
 
  55      *   No value (default) : Let PHP handle the download
 
  57     $config['cops_x_accel_redirect'] = "";
 
  60      * Height of thumbnail image for OPDS
 
  62     $config['cops_opds_thumbnail_height'] = "70";
 
  65      * Height of thumbnail image for HTML
 
  67     $config['cops_html_thumbnail_height'] = "164";
 
  70      * Icon for both OPDS and HTML catalog
 
  71      * Note that this has to be a real icon (.ico)
 
  73     $config['cops_icon'] = "favicon.ico";
 
  76      * Show icon for authors, series, tags and books on OPDS feed
 
  80     $config['cops_show_icons'] = "1";
 
  84      * Check following link for other timezones :
 
  85      * http://www.php.net/manual/en/timezones.php
 
  87     $config['default_timezone'] = "Europe/Moscow";
 
  90      * Prefered format for HTML catalog
 
  91      * The two first will be displayed in book entries
 
  92      * The other only appear in book detail
 
  94     $config['cops_prefered_format'] = array ("EPUB", "PDF", "AZW3", "AZW", "MOBI", "CBR", "CBZ");
 
  97      * use URL rewriting for downloading of ebook in HTML catalog
 
  98      * See Github wiki for more information
 
 102     $config['cops_use_url_rewriting'] = "0";
 
 105      * generate a invalid OPDS stream to allow bad OPDS client to use search
 
 106      * Example of non compliant OPDS client : FBReader (was working in May 2012), Moon+ Reader
 
 107      * Example of good OPDS client : Mantano
 
 108      *  1 : enable support for non compliant OPDS client
 
 109      *  0 : always generate valid OPDS code
 
 111     $config['cops_generate_invalid_opds_stream'] = "0"; 
 
 114      * Max number of items per page
 
 117     $config['cops_max_item_per_page'] = "-1"; 
 
 120      * split authors by first letter
 
 124     $config['cops_author_split_first_letter'] = "1";  
 
 127      * Enable the Lightboxes (for popups)
 
 131     $config['cops_use_fancyapps'] = "1";  
 
 134      * Update Epub metadata before download
 
 138     $config['cops_update_epub-metadata'] = "0";
 
 141      * Filter on tags to book list
 
 142      * Only works with the OPDS catalog
 
 143      * Usage : array ("I only want to see books using the tag : Tag1"     => "Tag1", 
 
 144      *                "I only want to see books not using the tag : Tag1" => "!Tag1",
 
 145      *                "I want to see every books"                         => "",
 
 147      * Example : array ("All" => "", "Unread" => "!Read", "Read" => "Read")
 
 149     $config['cops_books_filter'] = array ();
 
 152      * Custom Columns to add  as an array containing the lookup names 
 
 153      * configured in Calibre
 
 155      * For example : array ("genre", "mycolumn");  
 
 157      * Note that for now only the first, second and forth type of custom columns are supported
 
 159     $config['cops_calibre_custom_column'] = array ();
 
 162      * Rename .epub to .kepub.epub if downloaded from a Kobo eReader
 
 163      * The ebook will then be recognized a Kepub so with chaptered paging, statistics, ...
 
 164      * You have to enable URL rewriting if you want to enable kepup.epub download
 
 168     $config['cops_provide_kepub'] = "0";
 
 171      * Enable and configure Send To Kindle (or Email) feature.
 
 173      * Don't forget to authorize the sender email you configured in your Kindle's  Approved Personal Document E-mail List.  
 
 175      * If you want to use a simple smtp server (provided by your ISP for example), you can configure it like that :
 
 176      * $config['cops_mail_configuration'] = array( "smtp.host"     => "smtp.free.fr",
 
 177      *                                           "smtp.username" => "",
 
 178      *                                           "smtp.password" => "",
 
 179      *                                           "smtp.secure"   => "",
 
 180      *                                           "address.from"  => "cops@slucas.fr"
 
 183      * For Gmail (ssl is mandatory) :
 
 184      * $config['cops_mail_configuration'] = array( "smtp.host"     => "smtp.gmail.com",
 
 185      *                                           "smtp.username" => "YOUR GMAIL ADRESS",
 
 186      *                                           "smtp.password" => "YOUR GMAIL PASSWORD",
 
 187      *                                           "smtp.secure"   => "ssl",
 
 188      *                                           "address.from"  => "cops@slucas.fr"
 
 191     $config['cops_mail_configuration'] = NULL;
 
 194      * Use filter in HTML catalog
 
 198     $config['cops_html_tag_filter'] = "0";