full-text-rss/config.php

195 lines
7.3 KiB
PHP
Raw Normal View History

2011-01-11 19:06:12 +01:00
<?php
2011-03-23 23:39:01 +01:00
/* Full-Text RSS config */
2011-11-04 18:10:31 +01:00
// ......IMPORTANT......................................
// .....................................................
2011-03-23 23:39:01 +01:00
// Please do not change this file (config.php) directly.
// Save a copy as custom_config.php and make your
// changes to that instead. It will automatically
2011-11-04 18:10:31 +01:00
// override anything in config.php. Because config.php
// always gets loaded anyway, you can simply specify
// options you'd like to override in custom_config.php.
// .....................................................
2011-01-11 19:06:12 +01:00
2011-11-04 18:40:29 +01:00
// Create config object
$options = new stdClass();
2011-01-11 19:06:12 +01:00
// Enable service
// ----------------------
// Set this to false if you want to disable the service.
// If set to false, no feed is produced and users will
// be told that the service is disabled.
$options->enabled = true;
// Default entries (without API key)
// ----------------------
// The number of feed items to process when no API key is supplied.
$options->default_entries = 5;
// Max entries (without API key)
// ----------------------
// The maximum number of feed items to process when no API key is supplied.
$options->max_entries = 10;
// Rewrite relative URLs
// ----------------------
// With this enabled relative URLs found in the extracted content
// block are automatically rewritten as absolute URLs.
$options->rewrite_relative_urls = true;
2011-03-23 23:39:01 +01:00
// Exclude items if extraction fails
// ---------------------------------
// Excludes items from the resulting feed
// if we cannot extract any content from the
// item URL.
// Possible values...
// Enable: true
// Disable: false (default)
// User decides: 'user' (this option will appear on the form)
$options->exclude_items_on_fail = 'user';
// Extraction pattern
// ---------------------------------
// Specify what should get extracted
// Possible values:
// Auto detect: 'auto'
// Custom: css string (e.g. 'div#content')
// Element within auto-detected block: 'auto ' + css string (e.g. 'auto p')
// User decides: 'user' (default, this option will appear on the form)
$options->extraction_pattern = 'user';
2011-01-11 19:06:12 +01:00
// Enable caching
// ----------------------
// Enable this if you'd like to cache results
// for 10 minutes. Initially it's best
// to keep this disabled to make sure everything works
// as expected.
$options->caching = false;
// Cache directory
// ----------------------
// Only used if caching is true
$options->cache_dir = dirname(__FILE__).'/cache';
// Message to prepend (without API key)
// ----------------------
// HTML to insert at the beginning of each feed item when no API key is supplied.
$options->message_to_prepend = '';
// Message to append (without API key)
// ----------------------
// HTML to insert at the end of each feed item when no API key is supplied.
$options->message_to_append = '';
2011-03-23 23:39:01 +01:00
// URLs to allow
// ----------------------
// List of URLs (or parts of a URL) which the service will accept.
// If the list is empty, all URLs (except those specified in the blocked list below)
// will be permitted.
// Empty: array();
// Non-empty example: array('example.com', 'anothersite.org');
$options->allowed_urls = array();
2011-01-11 19:06:12 +01:00
// URLs to block
// ----------------------
2011-03-23 23:39:01 +01:00
// List of URLs (or parts of a URL) which the service will not accept.
// Note: this list is ignored if allowed_urls is not empty
2011-01-11 19:06:12 +01:00
$options->blocked_urls = array();
// Error message when content extraction fails (without API key)
// ----------------------
$options->error_message = '[unable to retrieve full-text content]';
/////////////////////////////////////////////////
/// ADVANCED OPTIONS ////////////////////////////
/////////////////////////////////////////////////
2011-03-23 23:39:01 +01:00
// Alternative Full-Text RSS service URL
// ----------------------
// This option is to offer very simple load distribution for the service.
// If you've set up another instance of the Full-Text RSS service on a different
// server, you can enter its full URL here.
// E.g. 'http://my-other-server.org/full-text-rss/makefulltextfeed.php'
// If you specify a URL here, 50% of the requests to makefulltextfeed.php on
// this server will be redirected to the URL specified here.
$options->alternative_url = '';
// Cache directory level
// ----------------------
// Spread cache files over different directories (only used if caching is enabled).
// Used to prevent large number of files in one directory.
// This corresponds to Zend_Cache's hashed_directory_level
// see http://framework.zend.com/manual/en/zend.cache.backends.html
// It's best not to change this if you're unsure.
$options->cache_directory_level = 0;
// Cache cleanup
// -------------
// 0 = script will not clean cache (rename cachecleanup.php and use it for scheduled (e.g. cron) cache cleanup)
// 1 = clean cache everytime the script runs (not recommended)
// 100 = (roughly) clean cache once out of every 100 script runs
// x = (roughly) clean cache once out of every x script runs
// ...you get the idea :)
$options->cache_cleanup = 100;
/////////////////////////////////////////////////
/// DEPRECATED OPTIONS
2011-11-04 18:10:31 +01:00
/// THESE OPTIONS WILL CHANGE IN VERSION 3.0
/// WE RECOMMEND YOU DO NOT USE THEM
2011-03-23 23:39:01 +01:00
/////////////////////////////////////////////////
// Restrict service (deprecated)
// -----------------------------
// Set this to true if you'd like certain features
// to be available only to key holders.
// Affected features:
// * Link handling (disabled for non-key holders if set to true)
// * Cache time (20 minutes for non-key holders if set to true)
$options->restrict = false;
// API keys (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
// NOTE: You do not need an API key from fivefilters.org to run your own
// copy of the code. This is here if you'd like to offer others an API key
// to access _your_ copy.
// Keys let you group users - those with a key and those without - and
// restrict access to the service to those without a key.
// If you want everyone to access the service in the same way, you can
// leave the array below empty and ignore the API key options further down.
// The options further down in this file will allow you to specify
// how the service should behave in each mode.
$options->api_keys = array();
2011-03-23 23:39:01 +01:00
// Default entries (with API key) (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
// The number of feed items to process when a valid API key is supplied.
$options->default_entries_with_key = 5;
2011-03-23 23:39:01 +01:00
// Max entries (with API key) (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
// The maximum number of feed items to process when a valid API key is supplied.
$options->max_entries_with_key = 10;
2011-03-23 23:39:01 +01:00
// Message to prepend (with API key) (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
// HTML to insert at the beginning of each feed item when a valid API key is supplied.
$options->message_to_prepend_with_key = '';
2011-03-23 23:39:01 +01:00
// Message to append (with API key) (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
// HTML to insert at the end of each feed item when a valid API key is supplied.
$options->message_to_append_with_key = '';
2011-03-23 23:39:01 +01:00
// Error message when content extraction fails (with API key) (deprecated)
2011-01-11 19:06:12 +01:00
// ----------------------
$options->error_message_with_key = '[unable to retrieve full-text content]';
2011-03-23 23:39:01 +01:00
/////////////////////////////////////////////////
/// DO NOT CHANGE ANYTHING BELOW THIS ///////////
/////////////////////////////////////////////////
2011-01-11 19:06:12 +01:00
2011-11-04 18:40:29 +01:00
if (!defined('_FF_FTR_VERSION')) define('_FF_FTR_VERSION', '2.7');
2011-01-11 19:06:12 +01:00
2011-11-04 18:10:31 +01:00
if ((basename(__FILE__) == 'config.php') && (file_exists(dirname(__FILE__).'/custom_config.php'))) {
require_once(dirname(__FILE__).'/custom_config.php');
}