123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- function taxonomy_csv_help($path, $arg) {
- global $language;
- switch ($path) {
- case 'admin/structure/taxonomy/csv_import':
- $output = '<p>' . t('Use this form to import a taxonomy, a structure or a list of terms into a vocabulary from a simple <a href="!link" title="Wikipedia definition">CSV</a> file, a url or a copy-and-paste text.', array(
- '!link' => url('http://en.wikipedia.org/wiki/Comma-separated_values'),
- )) . '</p>'
- . '<ul>'
- . '<li>' . t('For performance reasons, it is recommended to disable some other taxonomy related modules before import of big taxonomies and to reactivate them after process.') . '</li>'
- . '<li>' . t('For a better user experience, it is recommended to avoid duplicate terms. This module can manage them efficiently, but hidden errors can occur when a complex vocabulary with duplicates is updated by the administrator or by the module.') . '</li>'
- . '<li>' . '<strong>' . t('Warning') . '</strong>' . ': ' . t('If you want to update an existing vocabulary, make sure you have a backup before you proceed so you can roll back, if necessary.') . '</li>'
- . '</ul>'
- . theme('more_help_link', array('url' => 'admin/help/taxonomy_csv')) . '<br />';
- return $output;
- case 'admin/structure/taxonomy/csv_export':
- $output = '<p>' . t('Use this form to export a taxonomy, a structure or a list of terms to a simple <a href="!link" title="Wikipedia definition">CSV</a> file.', array(
- '!link' => url('http://en.wikipedia.org/wiki/Comma-separated_values'),
- )) . '</p>'
- . '<p>' . t('Set vocabulary to export in first tab, format to use in second tab and order of terms in third tab.') . '</p>'
- . theme('more_help_link', array('url' => 'admin/help/taxonomy_csv')) . '<br />';
- return $output;
- case 'admin/help#taxonomy_csv':
- $check = drupal_realpath(drupal_get_path('module', 'taxonomy_csv') . '/taxonomy_csv.help.' . $language->prefix . '.html');
- $output = file_get_contents($check ? $check : drupal_realpath(drupal_get_path('module', 'taxonomy_csv') . '/taxonomy_csv.help.html'));
- return $output;
- }
- }
- function taxonomy_csv_permission() {
- return array(
- 'import taxonomy by csv' => array(
- 'title' => t('Import taxonomy by CSV'),
- ),
- 'export taxonomy by csv' => array(
- 'title' => t('Export taxonomy by CSV'),
- ),
- );
- }
- function taxonomy_csv_menu() {
- $items = array();
- $items['admin/structure/taxonomy/csv_import'] = array(
- 'title' => 'CSV import',
- 'description' => 'Import taxonomies, hierarchical structure or simple lists of terms and properties with CSV file or text.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('taxonomy_csv_import_form'),
- 'access arguments' => array('import taxonomy by csv'),
- 'weight' => 12,
- 'type' => MENU_LOCAL_TASK,
- 'file' => 'import/taxonomy_csv.import.admin.inc',
- );
- $items['admin/structure/taxonomy/csv_export'] = array(
- 'title' => 'CSV export',
- 'description' => 'Export terms and properties to a CSV file.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('taxonomy_csv_export_form'),
- 'access arguments' => array('export taxonomy by csv'),
- 'weight' => 13,
- 'type' => MENU_LOCAL_TASK,
- 'file' => 'export/taxonomy_csv.export.admin.inc',
- );
- return $items;
- }
|