]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/3rdparty/config.php
update to 3.2 version of full-text-rss, issue #694
[github/wallabag/wallabag.git] / inc / 3rdparty / config.php
index e618117b7190da886aa40731fba02896f4521664..ec680d8659cbc3f3b84dad4d678bf58ff7bae760 100755 (executable)
@@ -19,7 +19,7 @@ if (!isset($options)) $options = new stdClass();
 // Enable service\r
 // ----------------------\r
 // Set this to false if you want to disable the service.\r
-// If set to false, no feed is produced and users will \r
+// If set to false, no feed is produced and users will\r
 // be told that the service is disabled.\r
 $options->enabled = true;\r
 \r
@@ -43,10 +43,64 @@ $options->default_entries = 5;
 // ----------------------\r
 // The maximum number of feed items to process when no access key is supplied.\r
 // This limits the user-supplied &max=x value. For example, if the user\r
-// asks for 20 items to be processed (&max=20), if max_entries is set to \r
+// asks for 20 items to be processed (&max=20), if max_entries is set to\r
 // 10, only 10 will be processed.\r
 $options->max_entries = 10;\r
 \r
+// Full content\r
+// ----------------------\r
+// By default Full-Text RSS includes the extracted content in the output.\r
+// You can exclude this from the output by passing '&content=0' in the querystring.\r
+//\r
+// Possible values...\r
+// Always include: true\r
+// Never include: false\r
+// Include unless user overrides (&content=0): 'user' (default)\r
+//\r
+// Note: currently this does not disable full content extraction. It simply omits it\r
+// from the output.\r
+$options->content = 'user';\r
+\r
+// Excerpts\r
+// ----------------------\r
+// By default Full-Text RSS does not include excerpts in the output.\r
+// You can enable this by passing '&summary=1' in the querystring.\r
+// This will include a plain text excerpt from the extracted content.\r
+//\r
+// Possible values...\r
+// Always include: true (recommended for new users)\r
+// Never include: false\r
+// Don't include unless user overrides (&summary=1): 'user' (default)\r
+//\r
+// Important: if both content and excerpts are requested, the excerpt will be\r
+// placed in the description element and the full content inside content:encoded.\r
+// If excerpts are not requested, the full content will go inside the description element.\r
+//\r
+// Why are we not returning both excerpts and content by default?\r
+// Mainly for backward compatibility.\r
+// Excerpts should appear in the feed item's description element. Previous versions\r
+// of Full-Text RSS did not return excerpts, so the description element was always\r
+// used for the full content (as recommended by the RSS advisory). When returning both,\r
+// we need somewhere else to place the content (content:encoded).\r
+// Having both enabled should not create any problems for news readers, but it may create\r
+// problems for developers upgrading from one of our earlier versions who may now find\r
+// their applications are returning excerpts instead of the full content they were\r
+// expecting. To avoid such surprises for users who are upgrading Full-Text RSS,\r
+// excerpts must be explicitly requested in the querystring by default.\r
+//\r
+// Why not use a different element name for excerpts?\r
+// According to the RSS advisory:\r
+// "Publishers who employ summaries should store the summary in description and\r
+// the full content in content:encoded, ordering description first within the item.\r
+// On items with no summary, the full content should be stored in description."\r
+// See: http://www.rssboard.org/rss-profile#namespace-elements-content-encoded\r
+//\r
+// For more consistent element naming, we recommend new users set this option to true.\r
+// The full content can still be excluded via the querystring, but the element names\r
+// will not change: when $options->summary = true, the description element will always\r
+// be reserved for the excerpt and content:encoded always for full content.\r
+$options->summary = 'user';\r
+\r
 // Rewrite relative URLs\r
 // ----------------------\r
 // With this enabled relative URLs found in the extracted content\r
@@ -67,7 +121,7 @@ $options->exclude_items_on_fail = 'user';
 // Enable multi-page support\r
 // -------------------------\r
 // If enabled, we will try to follow next page links on multi-page articles.\r
-// Currently this only happens for sites where next_page_link has been defined \r
+// Currently this only happens for sites where next_page_link has been defined\r
 // in a site config file.\r
 $options->multipage = true;\r
 \r
@@ -125,10 +179,10 @@ $options->detect_language = 1;
 \r
 // Registration key\r
 // ---------------\r
-// The registration key is optional. It is not required to use Full-Text RSS, \r
-// and does not affect the normal operation of Full-Text RSS. It is currently \r
-// only used on admin pages which help you update site patterns with the \r
-// latest version offered by FiveFilters.org. For these admin-related \r
+// The registration key is optional. It is not required to use Full-Text RSS,\r
+// and does not affect the normal operation of Full-Text RSS. It is currently\r
+// only used on admin pages which help you update site patterns with the\r
+// latest version offered by FiveFilters.org. For these admin-related\r
 // tasks to complete, we will require a valid registration key.\r
 // If you would like one, you can purchase the latest version of Full-Text RSS\r
 // at http://fivefilters.org/content-only/\r
@@ -144,12 +198,12 @@ $options->registration_key = '';
 // ----------------------\r
 // Certain pages/actions, e.g. updating site patterns with our online tool, will require admin credentials.\r
 // To use these pages, enter a password here and you'll be prompted for it when you try to access those pages.\r
-// If no password or username is set, pages requiring admin privelages will be inaccessible. \r
+// If no password or username is set, pages requiring admin privelages will be inaccessible.\r
 // The default username is 'admin'.\r
 // If overriding with an environment variable, separate username and password with a colon, e.g.:\r
 // ftr_admin_credentials: admin:my-secret-password\r
 // Example: $options->admin_credentials = array('username'=>'admin', 'password'=>'my-secret-password');\r
-$options->admin_credentials = array('username'=>'admin', 'password'=>'admin');\r
+$options->admin_credentials = array('username'=>'admin', 'password'=>'');\r
 \r
 // URLs to allow\r
 // ----------------------\r
@@ -178,12 +232,12 @@ $options->key_required = false;
 // ----------------------\r
 // By default, when processing feeds, we assume item titles in the feed\r
 // have not been truncated. So after processing web pages, the extracted titles\r
-// are not used in the generated feed. If you prefer to have extracted titles in \r
-// the feed you can either set this to false, in which case we will always favour \r
-// extracted titles. Alternatively, if set to 'user' (default) we'll use the \r
+// are not used in the generated feed. If you prefer to have extracted titles in\r
+// the feed you can either set this to false, in which case we will always favour\r
+// extracted titles. Alternatively, if set to 'user' (default) we'll use the\r
 // extracted title if you pass '&use_extracted_title' in the querystring.\r
 // Possible values:\r
-// * Favour feed titles: true \r
+// * Favour feed titles: true\r
 // * Favour extracted titles: false\r
 // * Favour feed titles with user override: 'user' (default)\r
 // Note: this has no effect when the input URL is to a web page - in these cases\r
@@ -192,17 +246,17 @@ $options->favour_feed_titles = 'user';
 \r
 // Access keys (password protected access)\r
 // ------------------------------------\r
-// NOTE: You do not need an API key from fivefilters.org to run your own \r
+// NOTE: You do not need an API key from fivefilters.org to run your own\r
 // copy of the code. This is here if you'd like to restrict access to\r
 // _your_ copy.\r
 // Keys let you group users - those with a key and those without - and\r
 // restrict access to the service to those without a key.\r
 // If you want everyone to access the service in the same way, you can\r
 // leave the array below empty and ignore the access key options further down.\r
-// The options further down let you control how the service should behave \r
+// The options further down let you control how the service should behave\r
 // in each mode.\r
-// Note: Explicitly including the index number (1 and 2 in the examples below) \r
-// is highly recommended (when generating feeds, we encode the key and \r
+// Note: Explicitly including the index number (1 and 2 in the examples below)\r
+// is highly recommended (when generating feeds, we encode the key and\r
 // refer to it by index number and hash).\r
 $options->api_keys = array();\r
 // Example:\r
@@ -232,13 +286,13 @@ $options->max_entries_with_key = 10;
 // filter the resulting HTML for XSS attacks, making it redundant for\r
 // Full-Text RSS do the same. Similarly with frameworks/CMS which display\r
 // feed content - the content should be treated like any other user-submitted content.\r
-// \r
+//\r
 // If you are writing an application yourself which is processing feeds generated by\r
 // Full-Text RSS, you can either filter the HTML yourself to remove potential XSS attacks\r
 // or enable this option. This might be useful if you are processing our generated\r
 // feeds with JavaScript on the client side - although there's client side xss\r
 // filtering available too, e.g. https://code.google.com/p/google-caja/wiki/JsHtmlSanitizer\r
-// \r
+//\r
 // If enabled, we'll pass retrieved HTML content through htmLawed with\r
 // safe flag on and style attributes denied, see\r
 // http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s3.6\r
@@ -253,8 +307,8 @@ $options->xss_filter = 'user';
 // Allowed parsers\r
 // ----------------------\r
 // Full-Text RSS attempts to use PHP's libxml extension to process HTML.\r
-// While fast, on some sites it may not always produce good results. \r
-// For these sites, you can specify an alternative HTML parser: \r
+// While fast, on some sites it may not always produce good results.\r
+// For these sites, you can specify an alternative HTML parser:\r
 // parser: html5lib\r
 // The html5lib parser is bundled with Full-Text RSS.\r
 // see http://code.google.com/p/html5lib/\r
@@ -273,7 +327,7 @@ $options->cors = false;
 \r
 // Use APC user cache?\r
 // ----------------------\r
-// If enabled we will store site config files (when requested \r
+// If enabled we will store site config files (when requested\r
 // for the first time) in APC's user cache. Keys prefixed with 'sc.'\r
 // This improves performance by reducing disk access.\r
 // Note: this has no effect if APC is unavailable on your server.\r
@@ -346,7 +400,7 @@ $options->rewrite_url = array(
 // Valid actions:\r
 // * 'exclude' - exclude this item from the result\r
 // * 'link' - create HTML link to the item\r
-$options->content_type_exc = array( \r
+$options->content_type_exc = array(\r
                                                           'application/pdf' => array('action'=>'link', 'name'=>'PDF'),\r
                                                           'image' => array('action'=>'link', 'name'=>'Image'),\r
                                                           'audio' => array('action'=>'link', 'name'=>'Audio'),\r
@@ -375,13 +429,13 @@ $options->cache_cleanup = 100;
 /// DO NOT CHANGE ANYTHING BELOW THIS ///////////\r
 /////////////////////////////////////////////////\r
 \r
-if (!defined('_FF_FTR_VERSION')) define('_FF_FTR_VERSION', '3.1');\r
+if (!defined('_FF_FTR_VERSION')) define('_FF_FTR_VERSION', '3.2');\r
 \r
 if (basename(__FILE__) == 'config.php') {\r
        if (file_exists(dirname(__FILE__).'/custom_config.php')) {\r
                require_once dirname(__FILE__).'/custom_config.php';\r
        }\r
-       \r
+\r
        // check for environment variables - often used on cloud platforms\r
        // environment variables should be prefixed with 'ftr_', e.g.\r
        // ftr_max_entries: 1\r