Newer
Older
<?php
// $Id$
/**
* @file
*/
*/
function feeds_ui_help($path, $arg) {
switch ($path) {
$output = '<p>'. t('Create one or more Feed importers for pulling content into Drupal. You can use these importers from the !import page or - if you attach them to a content type - simply by creating a node from that content type.', array('!import' => l(t('Import'), 'import'))) .'</p>';
return $output;
}
}
*/
function feeds_ui_menu() {
$items = array();
$items['admin/structure/import'] = array(
'title' => 'Feeds',
'description' => 'Configure one or more Feeds importers to aggregate RSS and Atom feeds, import CSV files or more.',
'page callback' => 'drupal_get_form',
'page arguments' => array('feeds_ui_overview_form'),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
);
$items['admin/structure/feeds/list'] = array(
Alex Barth
committed
'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/feeds/create'] = array(
'page callback' => 'drupal_get_form',
Alex Barth
committed
'page arguments' => array('feeds_ui_create_form'),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
Alex Barth
committed
'type' => MENU_LOCAL_TASK,
'weight' => 1,
$items['admin/structure/feeds/clone/%feeds_importer'] = array(
Alex Barth
committed
'title callback' => 'feed_ui_clone_title',
'title arguments' => array(4),
'page callback' => 'drupal_get_form',
Alex Barth
committed
'page arguments' => array('feeds_ui_create_form', 4),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/structure/feeds/export/%feeds_importer'] = array(
Alex Barth
committed
'title callback' => 'feed_ui_title',
'title arguments' => array(4),
'page callback' => 'drupal_get_form',
Alex Barth
committed
'page arguments' => array('feeds_ui_export_form', 4),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
Alex Barth
committed
'type' => MENU_CALLBACK,
$items['admin/structure/feeds/edit/%feeds_importer'] = array(
Alex Barth
committed
'title callback' => 'feed_ui_title',
'title arguments' => array(4),
'page callback' => 'feeds_ui_edit_page',
'page arguments' => array(4),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/structure/feeds/delete/%feeds_importer'] = array(
Alex Barth
committed
'title' => t('Delete configuration'),
'page callback' => 'drupal_get_form',
Alex Barth
committed
'page arguments' => array('feeds_ui_delete_form', 4),
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
'type' => MENU_CALLBACK,
);
Alex Barth
committed
'feeds_ui_mapping_form' => array(
'render element' => 'form',
Alex Barth
committed
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_edit_page' => array(
'variables' => array('info' => NULL, 'active' => NULL),
Alex Barth
committed
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_plugin_form' => array(
'render element' => 'form',
Alex Barth
committed
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_container' => array(
'variables' => array('container' => NULL),
'file' => 'feeds_ui.admin.inc',
),
);
}
/**
* Title callback.
*/
Alex Barth
committed
function feed_ui_title($importer) {
return t('Edit importer: @importer', array('@importer' => $importer->config['name']));
Alex Barth
committed
}
/**
* Clone title callback.
*/
function feed_ui_clone_title($importer) {
return t('Clone importer: @importer', array('@importer' => $importer->config['name']));