Allow the Reading Preferences to be configured in the config.php file

This commit is contained in:
George Baev 2017-03-15 16:13:14 +02:00
parent a9c93676a9
commit ea47307fce
No known key found for this signature in database
GPG Key ID: F5EA3C59671A4018
3 changed files with 79 additions and 11 deletions

View File

@ -46,3 +46,15 @@ defined('ENABLE_CRONJOB_HTTP_ACCESS') or define('ENABLE_CRONJOB_HTTP_ACCESS', tr
defined('BEANSTALKD_HOST') or define('BEANSTALKD_HOST', '127.0.0.1'); defined('BEANSTALKD_HOST') or define('BEANSTALKD_HOST', '127.0.0.1');
defined('BEANSTALKD_QUEUE') or define('BEANSTALKD_QUEUE', 'feeds'); defined('BEANSTALKD_QUEUE') or define('BEANSTALKD_QUEUE', 'feeds');
defined('BEANSTALKD_TTL') or define('BEANSTALKD_TTL', 120); defined('BEANSTALKD_TTL') or define('BEANSTALKD_TTL', 120);
defined('READING_REMOVE_READ_ITEMS') or define('READING_REMOVE_READ_ITEMS', 15);
defined('READING_REMOVE_UNREAD_ITEMS') or define('READING_REMOVE_UNREAD_ITEMS', 45);
defined('READING_ITEMS_PER_PAGE') or define('READING_ITEMS_PER_PAGE', 100);
defined('READING_SORTING_DIRECTION') or define('READING_SORTING_DIRECTION', 'desc');
defined('READING_DISPLAY_MODE') or define('READING_DISPLAY_MODE', 'summaries');
defined('READING_ITEM_TITLE_LINK') or define('READING_ITEM_TITLE_LINK', 'full');
defined('READING_NOTHING_READ_REDIRECT') or define('READING_NOTHING_READ_REDIRECT', 'feeds');
defined('READING_FRONTEND_UPDATECHECK_INTERVAL') or define('READING_FRONTEND_UPDATECHECK_INTERVAL', 10);
defined('READING_ORIGINAL_MARKS_READ') or define('READING_ORIGINAL_MARKS_READ', 1);
defined('READING_NOCONTENT') or define('READING_NOCONTENT', 0);
defined('READING_FAVICONS') or define('READING_FAVICONS', 1);

View File

@ -155,21 +155,21 @@ function get_default_values()
'language' => 'en_US', 'language' => 'en_US',
'timezone' => 'UTC', 'timezone' => 'UTC',
'theme' => 'original', 'theme' => 'original',
'autoflush' => 15, 'autoflush' => READING_REMOVE_READ_ITEMS,
'autoflush_unread' => 45, 'autoflush_unread' => READING_REMOVE_UNREAD_ITEMS,
'frontend_updatecheck_interval' => 10, 'frontend_updatecheck_interval' => READING_FRONTEND_UPDATECHECK_INTERVAL,
'favicons' => 1, 'favicons' => READING_FAVICONS,
'nocontent' => 0, 'nocontent' => READING_NOCONTENT,
'image_proxy' => 0, 'image_proxy' => 0,
'original_marks_read' => 1, 'original_marks_read' => READING_ORIGINAL_MARKS_READ,
'instapaper_enabled' => 0, 'instapaper_enabled' => 0,
'pinboard_enabled' => 0, 'pinboard_enabled' => 0,
'pinboard_tags' => 'miniflux', 'pinboard_tags' => 'miniflux',
'items_per_page' => 100, 'items_per_page' => READING_ITEMS_PER_PAGE,
'items_display_mode' => 'summaries', 'items_display_mode' => READING_DISPLAY_MODE,
'items_sorting_direction' => 'desc', 'items_sorting_direction' => READING_SORTING_DIRECTION,
'redirect_nothing_to_read' => 'feeds', 'redirect_nothing_to_read' => READING_NOTHING_READ_REDIRECT,
'item_title_link' => 'full', 'item_title_link' => READING_ITEM_TITLE_LINK,
); );
} }

View File

@ -72,3 +72,59 @@ define('ENABLE_XFRAME', true);
// Enable/disable HSTS HTTP header // Enable/disable HSTS HTTP header
define('ENABLE_HSTS', true); define('ENABLE_HSTS', true);
// Reading preferences
// Remove automatically read items. Values:
// 0 - Never
// -1 - Immediately
// 1 - After 1 day
// 5 - After 5 days
// 15 - After 15 days
// 30 - After 30 days
define('READING_REMOVE_READ_ITEMS', 15);
// Remove automatically unread items. Values:
// 0 - Never
// 15 - After 15 days
// 45 - After 45 days
// 60 - After 60 days
define('READING_REMOVE_UNREAD_ITEMS', 45);
// Items per page. Values: 10, 20, 30, 50, 100, 150, 200, 250
define('READING_ITEMS_PER_PAGE', 100);
// Default sorting order for items. Values:
// 'asc' - Older items first
// 'desc' - Most recent first
define('READING_SORTING_DIRECTION', 'desc');
// Display items on lists. Values:
// 'titles' - Titles
// 'summaries' - Summaries
// 'full' - Full contents
define('READING_DISPLAY_MODE', 'summaries');
// Item title link. Values:
// 'original' - Original
// 'full' - Full contents
define('READING_ITEM_TITLE_LINK', 'full');
// When there is nothing to read, redirect me to this page. Values:
// 'feeds' - Subscriptions
// 'history' - History
// 'bookmarks' - Bookmarks
// 'nowhere' - Do not redirect me
define('READING_NOTHING_READ_REDIRECT', 'feeds');
// Refresh interval in minutes for unread counter.
define('READING_FRONTEND_UPDATECHECK_INTERVAL', 10);
// Original link marks article as read. Values: 0, 1
define('READING_ORIGINAL_MARKS_READ', 1);
// Do not fetch the content of articles. Values: 0, 1
define('READING_NOCONTENT', 0);
// Download favicons.Values: 0, 1
define('READING_FAVICONS', 1);