Currently OPML import uses the TITLE and TEXT attributes of OPML entries as feed title and description.
Adding following form elements
function feedapi_import_feeds_form() {
...
$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'),
);
...
}
and changing the following lines of function _feedapi_import_opml_process()
$node->title = $feed['TITLE'];
$node->body = $feed['TEXT'];
as follows will allow the user to override the information from feed with information from OPML file.
if ($args['override_title']) {
$node->title = $feed['TITLE'];
}
if ($args['override_body']) {
$node->body = $feed['TEXT'];
}
Apologies for not submitting a patch file today.
Comments
Comment #1
mustafau commentedThe patch is attached.
Comment #2
summit commentedHi, Will this patch be committed to feedapi 5?
Thanks for considering this! Greetings, Martijn
Comment #3
aron novakThanks a lot, useful and correct patch! It's committed now.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.