You are here

function feedapi_import_feeds_form in FeedAPI 5

OPML Feed import form, also allows setting defaults to be applied to each feed

1 string reference to 'feedapi_import_feeds_form'
feedapi_menu in ./feedapi.module
Implementation of hook_menu().

File

./feedapi.module, line 275
Handle the submodules (for feed and item processing) Provide a basic management of feeds

Code

function feedapi_import_feeds_form() {
  $form['opml'] = array(
    '#type' => 'file',
    '#title' => t('OPML File'),
    '#size' => 50,
    '#description' => t('Upload an OPML file containing a list of newsfeeds to be imported.'),
  );
  $form['feed_type'] = array(
    '#type' => 'select',
    '#title' => t('Feed Type'),
    '#description' => t("The type of feed you would like to associate this import with."),
    '#options' => feedapi_get_types(),
    '#required' => TRUE,
  );
  $form['override_title'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use TITLE attribute of OPML entries as feed title'),
    '#description' => t('If checked feed title will be overriden with the information from OPML file'),
  );
  $form['override_body'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use TEXT attribute of OPML entries as feed description'),
    '#description' => t('If checked feed description will be overriden with the information from OPML file'),
  );
  $form['#attributes']['enctype'] = 'multipart/form-data';
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  if (module_exists('og')) {
    og_form_add_og_audience('feedapi_import_feeds_form', $form);
  }
  return $form;
}