|
1 | 1 | <?php |
2 | | - if (!isset($config)) |
3 | | - $config = array(); |
4 | | - /* |
5 | | - *************************************************** |
6 | | - * Please read config_default.php for all possible |
7 | | - * configuration items. |
8 | | - * For changes in config_default.php see CHANGELOG.md |
9 | | - * on the upstream project site. |
10 | | - * https://github.com/mikespub-org/seblucas-cops/blob/main/config_default.php |
11 | | - *************************************************** |
12 | | - */ |
13 | | - /* |
14 | | - * The directory containing calibre's metadata.db file, with sub-directories |
15 | | - * containing all the formats. |
16 | | - * BEWARE : it has to end with a / |
17 | | - */ |
18 | | - $config['calibre_directory'] = '/books/'; |
19 | 2 |
|
20 | | - $config['calibre_internal_directory'] = '/books/'; |
| 3 | +if (!isset($config)) { |
| 4 | + $config = []; |
| 5 | +} |
21 | 6 |
|
22 | | - /* |
23 | | - * Catalog's title |
24 | | - */ |
25 | | - $config['cops_title_default'] = "COPS"; |
| 7 | +/* |
| 8 | + *************************************************** |
| 9 | + * Please read config/default.php for all possible |
| 10 | + * configuration items. |
| 11 | + * For changes in config/default.php see CHANGELOG.md |
| 12 | + * on the upstream project site. |
| 13 | + * https://github.com/mikespub-org/seblucas-cops/blob/main/config/default.php |
| 14 | + *************************************************** |
| 15 | + */ |
26 | 16 |
|
27 | | - /* |
28 | | - * use URL rewriting for downloading of ebook in HTML catalog |
29 | | - * See README for more information |
30 | | - * 1 : enable |
31 | | - * 0 : disable |
32 | | - */ |
33 | | - $config['cops_use_url_rewriting'] = "0"; |
| 17 | +/* |
| 18 | + * The directory containing calibre's metadata.db file, with sub-directories |
| 19 | + * containing all the formats. |
| 20 | + * BEWARE : it has to end with a / |
| 21 | + */ |
| 22 | +$config['calibre_directory'] = '/books/'; |
34 | 23 |
|
35 | | - /* |
36 | | - * Which header to use when downloading books outside the web directory |
37 | | - * Possible values are : |
38 | | - * X-Accel-Redirect : For Nginx |
39 | | - * X-Sendfile : For Lightttpd or Apache (with mod_xsendfile) |
40 | | - * No value (default) : Let PHP handle the download |
41 | | - */ |
| 24 | +/* |
| 25 | + * Catalog's title |
| 26 | + */ |
| 27 | +$config['cops_title_default'] = "COPS"; |
42 | 28 |
|
43 | | - $config['cops_x_accel_redirect'] = "X-Accel-Redirect"; |
| 29 | +/* |
| 30 | + * Which header to use when downloading books outside the web directory |
| 31 | + * Possible values are : |
| 32 | + * X-Accel-Redirect : For Nginx |
| 33 | + * X-Sendfile : For Lightttpd or Apache (with mod_xsendfile) |
| 34 | + * No value (default) : Let PHP handle the download |
| 35 | + */ |
| 36 | +$config['cops_x_accel_redirect'] = "X-Accel-Redirect"; |
44 | 37 |
|
45 | | - /* Enable cache folder |
46 | | - * especially useful for lower power hosts |
47 | | - */ |
48 | | - $config['cops_thumbnail_handling'] = ""; |
49 | | - $config['cops_thumbnail_cache_directory'] = "/config/cache/"; |
| 38 | +/* Enable cache folder |
| 39 | + * especially useful for lower power hosts |
| 40 | + */ |
| 41 | +$config['cops_thumbnail_handling'] = ""; |
| 42 | +$config['cops_thumbnail_cache_directory'] = "/config/cache/"; |
50 | 43 |
|
51 | | - /* |
52 | | - * Enable and configure Send To Kindle (or Email) feature. |
53 | | - * |
54 | | - * Don't forget to authorize the sender email you configured in your Kindle's Approved Personal Document E-mail List. |
55 | | - * |
56 | | - * If you want to use a simple smtp server (provided by your ISP for example), you can configure it like that : |
57 | | - * $config['cops_mail_configuration'] = array( "smtp.host" => "smtp.free.fr", |
58 | | - * "smtp.username" => "", |
59 | | - * "smtp.password" => "", |
60 | | - * "smtp.secure" => "", |
61 | | - * "address.from" => "[email protected]" |
62 | | - * ); |
63 | | - * |
64 | | - * For Gmail (ssl is mandatory) : |
65 | | - * $config['cops_mail_configuration'] = array( "smtp.host" => "smtp.gmail.com", |
66 | | - * "smtp.username" => "YOUR GMAIL ADRESS", |
67 | | - * "smtp.password" => "YOUR GMAIL PASSWORD", |
68 | | - * "smtp.secure" => "ssl", |
69 | | - * "address.from" => "[email protected]" |
70 | | - * ); |
71 | | - * |
72 | | - * You'll also need to enable Allow Less Secure Apps in you Gmail account. |
73 | | - */ |
74 | | - $config['cops_mail_configuration'] = array( "smtp.host" => "", |
75 | | - "smtp.username" => "", |
76 | | - "smtp.password" => "", |
77 | | - "smtp.secure" => "ssl", |
78 | | - "address.from" => "[email protected]" |
79 | | - ); |
| 44 | +/* |
| 45 | + * Enable and configure Send To Kindle (or Email) feature. |
| 46 | + * |
| 47 | + * Don't forget to authorize the sender email you configured in your Kindle's Approved Personal Document E-mail List. |
| 48 | + * |
| 49 | + * If you want to use a simple smtp server (provided by your ISP for example), you can configure it like that : |
| 50 | + * $config['cops_mail_configuration'] = [ |
| 51 | + * "smtp.host" => "smtp.free.fr", |
| 52 | + * "smtp.username" => "", |
| 53 | + * "smtp.password" => "", |
| 54 | + * "smtp.secure" => "", |
| 55 | + * "smtp.port" => "", // Not mandatory, if smtp.secure is set then defaults to 465 |
| 56 | + * "address.from" => "[email protected]", |
| 57 | + * "subject" => "Sent by COPS : " // Not mandatory |
| 58 | + * ]; |
| 59 | + * |
| 60 | + * For Gmail (ssl is mandatory) : |
| 61 | + * $config['cops_mail_configuration'] = [ |
| 62 | + * "smtp.host" => "smtp.gmail.com", |
| 63 | + * "smtp.username" => "YOUR GMAIL ADRESS", |
| 64 | + * "smtp.password" => "YOUR GMAIL PASSWORD", |
| 65 | + * "smtp.secure" => "ssl", |
| 66 | + * "address.from" => "[email protected]" |
| 67 | + * ]; |
| 68 | + * |
| 69 | + * For GMX (tls and 587 is mandatory) : |
| 70 | + * $config['cops_mail_configuration'] = [ |
| 71 | + * "smtp.host" => "mail.gmx.com", |
| 72 | + * "smtp.username" => "YOUR GMX ADRESS", |
| 73 | + * "smtp.password" => "YOUR GMX PASSWORD", |
| 74 | + * "smtp.secure" => "tls", |
| 75 | + * "smtp.port" => "587", |
| 76 | + * "address.from" => "[email protected]" |
| 77 | + * ]; |
| 78 | + */ |
| 79 | +$config['cops_mail_configuration'] = [ |
| 80 | + "smtp.host" => "", |
| 81 | + "smtp.username" => "", |
| 82 | + "smtp.password" => "", |
| 83 | + "smtp.secure" => "ssl", |
| 84 | + "address.from" => "[email protected]", |
| 85 | +]; |
80 | 86 |
|
81 | | - /* |
82 | | - * Use external 'kepubify' tool to convert .epub files to .kepub.epub format for Kobo |
83 | | - * Example: |
84 | | - * $config['cops_kepubify_path'] = '/usr/bin/kepubify'; |
85 | | - */ |
86 | | - //$config['cops_kepubify_path'] = ''; |
87 | | - $config['cops_kepubify_path'] = '/usr/bin/kepubify'; |
88 | | - |
89 | | - /* |
90 | | - * Set front controller to remove index.php/ from route URLs generated in COPS |
91 | | - * |
92 | | - * Note: this assumes your web server config will rewrite /... to /index.php/... |
93 | | - * - Apache: .htaccess |
94 | | - * - Nginx: nginx.conf |
95 | | - * - PHP built-in: router.php |
96 | | - * - ... |
97 | | - * |
98 | | - * @todo update nginx/site-confs/default.conf.sample to make use of front controller |
99 | | - */ |
100 | | - $config['cops_front_controller'] = ''; |
101 | | - //$config['cops_front_controller'] = 'index.php'; |
| 87 | +/* |
| 88 | + * Use external 'kepubify' tool to convert .epub files to .kepub.epub format for Kobo |
| 89 | + * Example: |
| 90 | + * $config['cops_kepubify_path'] = '/usr/bin/kepubify'; |
| 91 | + */ |
| 92 | +//$config['cops_kepubify_path'] = ''; |
| 93 | +$config['cops_kepubify_path'] = '/usr/bin/kepubify'; |
102 | 94 |
|
| 95 | +/* |
| 96 | + * Set front controller to remove index.php/ from route URLs generated in COPS |
| 97 | + * |
| 98 | + * Note: this assumes your web server config will rewrite /... to /index.php/... |
| 99 | + * - Apache: .htaccess |
| 100 | + * - Nginx: nginx.conf |
| 101 | + * - PHP built-in: router.php |
| 102 | + * - ... |
| 103 | + * |
| 104 | + * @todo update nginx/site-confs/default.conf.sample to make use of front controller |
| 105 | + */ |
| 106 | +$config['cops_front_controller'] = ''; |
| 107 | +//$config['cops_front_controller'] = 'index.php'; |
0 commit comments