public function FeedsHTTPFetcher::configForm in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::configForm()
- 7 plugins/FeedsHTTPFetcher.inc \FeedsHTTPFetcher::configForm()
Override parent::configForm().
Overrides FeedsConfigurable::configForm
File
- plugins/
FeedsHTTPFetcher.inc, line 196
Class
- FeedsHTTPFetcher
- Fetches data via HTTP.
Code
public function configForm(&$form_state) {
$form = array();
$form['auto_detect_feeds'] = array(
'#type' => 'checkbox',
'#title' => t('Auto detect feeds'),
'#description' => t('If the supplied URL does not point to a feed but an HTML document, attempt to extract a feed URL from the document.'),
'#default_value' => $this->config['auto_detect_feeds'],
);
$form['use_pubsubhubbub'] = array(
'#type' => 'checkbox',
'#title' => t('Use PubSubHubbub'),
'#description' => t('Attempt to use a <a href="http://en.wikipedia.org/wiki/PubSubHubbub">PubSubHubbub</a> subscription if available.'),
'#default_value' => $this->config['use_pubsubhubbub'],
);
$form['advanced'] = array(
'#title' => t('Advanced settings'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['auto_scheme'] = array(
'#type' => 'textfield',
'#title' => t('Automatically add scheme'),
'#description' => t('If the supplied URL does not contain the scheme, use this one automatically. Keep empty to force the user to input the scheme.'),
'#default_value' => $this->config['auto_scheme'],
);
$form['advanced']['designated_hub'] = array(
'#type' => 'textfield',
'#title' => t('Designated hub'),
'#description' => t('Enter the URL of a designated PubSubHubbub hub (e. g. superfeedr.com). If given, this hub will be used instead of the hub specified in the actual feed.'),
'#default_value' => $this->config['designated_hub'],
'#states' => array(
'visible' => array(
':input[name="use_pubsubhubbub"]' => array(
'checked' => TRUE,
),
),
),
);
// Per importer override of global http request timeout setting.
$form['advanced']['request_timeout'] = array(
'#type' => 'textfield',
'#title' => t('Request timeout'),
'#description' => t('Timeout in seconds to wait for an HTTP get request to finish.') . '<br />' . t('<strong>Note:</strong> if left empty, the global timeout setting will be used, which is @timeout seconds. You can set the global timeout setting by setting the variable "@variable".', array(
'@timeout' => variable_get('http_request_timeout', 30),
'@variable' => 'http_request_timeout',
)),
'#default_value' => $this->config['request_timeout'],
'#element_validate' => array(
'element_validate_integer_positive',
),
'#maxlength' => 3,
'#size' => 30,
);
$form['advanced']['accept_invalid_cert'] = array(
'#type' => 'checkbox',
'#title' => t('Accept invalid SSL certificates'),
'#description' => t('<strong>IMPORTANT:</strong> This setting will force cURL to completely ignore all SSL errors. This is a <strong>major security risk</strong> and should only be used during development.'),
'#default_value' => $this->config['accept_invalid_cert'],
);
$form['advanced']['cache_http_result'] = array(
'#type' => 'checkbox',
'#title' => t('Cache HTTP result of request'),
'#description' => '<p>' . t('Disabling this cache means that the downloaded source will not be cached (for example: on the file system or on memcache), but will be redownloaded on every feeds import attempt. This can be helpful if the source to download is dynamically generated and will always be different, or if it is very large (50 MB+) which would cost additional webspace.') . '</p><p>' . t("If you're having issues with Feeds not processing changes from the source file, or if you are experiencing caching issues, you can disable the caching of this feeds content.") . '</p>',
'#default_value' => $this->config['cache_http_result'],
);
return $form;
}