SermonAudio.com allows for submission of new sermons through their SOAP API. This will mainly help those who would like to automate or bulk upload many sermons at once. By using Views, CCK, and Views Bulk Operations you can set up a view that allows you to easily submit your sermons.
$view = new view; $view->name = 'sermonaudio_bulk_import_example'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'title' => array( 'label' => 'Title', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_node' => 0, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'sid' => array( 'label' => 'Sermon ID', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'exclude' => 0, 'id' => 'sid', 'table' => 'sermonaudio', 'field' => 'sid', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'status', 'table' => 'node', 'field' => 'status', 'relationship' => 'none', ), 'type' => array( 'operator' => 'in', 'value' => array( 'sermon' => 'sermon', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('items_per_page', 20); $handler->override_option('use_pager', '1'); $handler->override_option('style_plugin', 'bulk'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'title' => 'title', 'sid' => 'sid', ), 'info' => array( 'title' => array( 'sortable' => 0, 'separator' => '', ), 'sid' => array( 'separator' => '', ), ), 'default' => '-1', 'execution_type' => '1', 'display_type' => '0', 'hide_select_all' => 0, 'skip_confirmation' => 0, 'display_result' => 1, 'merge_single_action' => 1, 'selected_operations' => array( 'sermonaudio_submit_sermon_action' => 'sermonaudio_submit_sermon_action', 'nodequeue_add_action' => 0, 'node_assign_owner_action' => 0, 'views_bulk_operations_delete_node_action' => 0, 'node_mass_update:a27b9efabcd054685a549378b174ad11' => 0, 'system_message_action' => 0, 'views_bulk_operations_action' => 0, 'views_bulk_operations_script_action' => 0, 'node_make_sticky_action' => 0, 'node_make_unsticky_action' => 0, 'node_mass_update:c4d3b28efb86fd703619a50b74d43794' => 0, 'views_bulk_operations_fields_action' => 0, 'views_bulk_operations_taxonomy_action' => 0, 'views_bulk_operations_argument_selector_action' => 0, 'node_promote_action' => 0, 'node_mass_update:14de7d028b4bffdf2b4a266562ca18ac' => 0, 'node_mass_update:9c585624b9b3af0b4687d5f97f35e047' => 0, 'node_publish_action' => 0, 'system_goto_action' => 0, 'nodequeue_remove_action' => 0, 'node_unpromote_action' => 0, 'node_mass_update:8ce21b08bb8e773d10018b484fe4815e' => 0, 'node_save_action' => 0, 'system_send_email_action' => 0, 'node_mass_update:0ccad85c1ebe4c9ceada1aa64293b080' => 0, 'node_unpublish_action' => 0, 'node_unpublish_by_keyword_action' => 0, 'pathauto_node_update_alias_multiple:620e193b20ba9caa374fea9ca0ad38f0' => 0, ), 'views_bulk_operations_fields_action' => array( 'php_code' => 0, 'display_fields' => array(), ), )); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'sermonaudio/import_example'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', ));
There is also a hook that can be used during this mass import where you can modify the values of the sermon before it gets submitted to SermonAudio. This can be implemented in your custom module as seen below:
function yourmodulename_sermonaudio_submit_sermon_alter($sermon) { // modify $sermon array as needed // you must return $sermon to keep your changes return $sermon; }