1) Исправления в связи со сменой API MySQL
[openlib.git] / www / config_default.php
1 <?php
2 /**
3  * COPS (Calibre OPDS PHP Server) class file
4  *
5  * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6  * @author     Sébastien Lucas <sebastien@slucas.fr>
7  */
8
9     if (!isset($config))
10         $config = array();
11   
12     /*
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/");
18      */
19     $config['file_directory'] = './';
20     
21     /*
22      * SPECIFIC TO NGINX
23      * The internal directory set in nginx config file
24      * Leave empty if you don't know what you're doing
25      */
26     $config['calibre_internal_directory'] = ''; 
27
28     /*
29      * Full URL prefix (with trailing /)
30      * usefull especially for Opensearch where a full URL is sometimes required
31      * For example Mantano requires it.
32      */
33     $config['cops_full_url'] = ''; 
34     
35     /*
36      * Number of recent books to show
37      */
38     $config['cops_recentbooks_limit'] = '50'; 
39     
40     /*
41      * Catalog's title
42      */
43     $config['cops_title_default'] = "COPS";
44
45     /*
46      * Catalog's subtitle
47      */
48     $config['cops_subtitle_default'] = ""; 
49     
50     /*
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
56      */
57     $config['cops_x_accel_redirect'] = "";
58     
59     /*
60      * Height of thumbnail image for OPDS
61      */
62     $config['cops_opds_thumbnail_height'] = "70";
63     
64     /*
65      * Height of thumbnail image for HTML
66      */
67     $config['cops_html_thumbnail_height'] = "164";
68
69     /*
70      * Icon for both OPDS and HTML catalog
71      * Note that this has to be a real icon (.ico)
72      */
73     $config['cops_icon'] = "favicon.ico";
74
75     /*
76      * Show icon for authors, series, tags and books on OPDS feed
77      *  1 : enable
78      *  0 : disable
79      */
80     $config['cops_show_icons'] = "1";
81     
82     /*
83      * Default timezone 
84      * Check following link for other timezones :
85      * http://www.php.net/manual/en/timezones.php
86      */
87     $config['default_timezone'] = "Europe/Moscow";
88     
89     /*
90      * Prefered format for HTML catalog
91      * The two first will be displayed in book entries
92      * The other only appear in book detail
93      */
94     $config['cops_prefered_format'] = array ("EPUB", "PDF", "AZW3", "AZW", "MOBI", "CBR", "CBZ");
95     
96     /*
97      * use URL rewriting for downloading of ebook in HTML catalog
98      * See Github wiki for more information
99      *  1 : enable
100      *  0 : disable
101      */
102     $config['cops_use_url_rewriting'] = "0";
103     
104     /*
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
110      */
111     $config['cops_generate_invalid_opds_stream'] = "0"; 
112     
113     /*
114      * Max number of items per page
115      * -1 unlimited
116      */
117     $config['cops_max_item_per_page'] = "-1"; 
118
119     /*
120      * split authors by first letter
121      * 1 : Yes
122      * 0 : No
123      */
124     $config['cops_author_split_first_letter'] = "1";  
125     
126     /*
127      * Enable the Lightboxes (for popups)
128      * 1 : Yes (enable)
129      * 0 : No
130      */
131     $config['cops_use_fancyapps'] = "1";  
132     
133     /*
134      * Update Epub metadata before download
135      * 1 : Yes (enable)
136      * 0 : No
137      */
138     $config['cops_update_epub-metadata'] = "0";
139     
140     /*
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"                         => "",
146      *
147      * Example : array ("All" => "", "Unread" => "!Read", "Read" => "Read")
148      */
149     $config['cops_books_filter'] = array ();
150     
151     /*
152      * Custom Columns to add  as an array containing the lookup names 
153      * configured in Calibre
154      *
155      * For example : array ("genre", "mycolumn");  
156      *
157      * Note that for now only the first, second and forth type of custom columns are supported
158      */
159     $config['cops_calibre_custom_column'] = array ();
160     
161     /*
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
165      * 1 : Yes (enable)
166      * 0 : No
167      */
168     $config['cops_provide_kepub'] = "0";
169
170     /* 
171      * Enable and configure Send To Kindle (or Email) feature.
172      *
173      * Don't forget to authorize the sender email you configured in your Kindle's  Approved Personal Document E-mail List.  
174      *
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"
181      *                                           );
182      *
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"
189      *                                           );
190      */
191     $config['cops_mail_configuration'] = NULL;
192                                                 
193     /*
194      * Use filter in HTML catalog
195      * 1 : Yes (enable)
196      * 0 : No
197      */
198     $config['cops_html_tag_filter'] = "0";