Newer
Older
<?php
// $Id$
/**
* @file
*/
/**
* Implementation of hook_help().
*/
function feeds_ui_help($path, $arg) {
switch ($path) {
case 'admin/build/feeds':
Alex Barth
committed
$output = '<p>'. t('Create one or more configurations for importing content into Drupal. You can use these configurations 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;
case 'admin/content/feeds':
$output = '<p>'. t('Import content into Drupal.') .'</p>';
return $output;
}
}
/**
* Implementation of hook_menu().
*/
function feeds_ui_menu() {
$items = array();
$items['admin/build/feeds'] = array(
'title' => 'Feeds',
Alex Barth
committed
'description' => 'Configure feeds to import or aggregate RSS and Atom feeds, import CSV files or more.',
'page callback' => 'feeds_ui_overview_page',
'access arguments' => array('administer feeds'),
'file' => 'feeds_ui.admin.inc',
);
Alex Barth
committed
$items['admin/build/feeds/list'] = array(
'title' => t('List'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/build/feeds/create'] = array(
Alex Barth
committed
'title' => t('New configuration'),
'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,
Alex Barth
committed
$items['admin/build/feeds/clone/%feeds_importer'] = array(
'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,
);
Alex Barth
committed
$items['admin/build/feeds/export/%feeds_importer'] = array(
'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,
Alex Barth
committed
$items['admin/build/feeds/edit/%feeds_importer'] = array(
'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,
);
Alex Barth
committed
$items['admin/build/feeds/delete/%feeds_importer'] = array(
'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,
);
/**
* Implementation of hook_theme().
*/
function feeds_ui_theme() {
return array(
Alex Barth
committed
'feeds_ui_mapping_form' => array(
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_edit_page' => array(
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_plugin_form' => array(
'file' => 'feeds_ui.admin.inc',
),
'feeds_ui_container' => array(
'file' => 'feeds_ui.admin.inc',
),
);
}
/**
* Title callback.
*/
Alex Barth
committed
function feed_ui_title($importer) {
return t('Edit !importer', array('!importer' => $importer->config['name']));
}
/**
* Clone title callback.
*/
function feed_ui_clone_title($importer) {
return t('Clone !importer', array('!importer' => $importer->config['name']));