Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (83 sloc) 2.91 KB
<?php // $Id$
/**
* @file ting.module
* Module to integrate the Ting search engine in our Drupal site.
* the reload style
*/
/**
* Implementation of hook_menu().
*/
function ting_menu() {
$path = drupal_get_path('module', 'ting') . '/includes';
$items = array();
$items['admin/settings/ting/default'] = array(
'title' => 'Ting',
'page callback' => 'drupal_get_form',
'page arguments' => array('ting_admin_settings_form_normal'),
'access arguments' => array('access administration pages'),
'file' => 'ting.admin.inc',
'file path' => $path,
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/settings/ting/addi'] = array(
'title' => 'Additional Information settings',
'description' => 'The Additional Information service is used to retrieve cover images and other information about objects.',
'access arguments' => array('access administration pages'),
'page callback' => 'drupal_get_form',
'page arguments' => array('ting_admin_settings_form_addi'),
'file' => 'ting.admin.inc',
'file path' => $path,
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['admin/settings/ting/proxy'] = array(
'title' => 'Proxy service',
'description' => 'Restricted-access resources referenced by Ting may be accessed through the library\'s proxy server',
'access arguments' => array('access administration pages'),
'page callback' => 'drupal_get_form',
'page arguments' => array('ting_admin_settings_form_proxy'),
'file' => 'ting.admin.inc',
'file path' => $path,
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$items['admin/settings/ting/material'] = array(
'title' => 'Material',
'description' => '',
'access arguments' => array('access administration pages'),
'page callback' => 'drupal_get_form',
'page arguments' => array('ting_admin_settings_form_material'),
'file' => 'ting.admin.inc',
'file path' => $path,
'type' => MENU_LOCAL_TASK,
'weight' => 4,
);
return $items;
}
/**
* Implementation of hook_search().
*/
function ting_search($op = 'search', $keys = null) {
switch ($op) {
case 'name':
return t('Ting');
case 'status':
case 'admin':
case 'search':
// We're not providing any sort of admin interface or actual
// search results, since this is just a dummy module to get the
// search/ting URL.
return array();
}
}
/**
* Implementation of hook_ctools_plugin_directory().
*
* Tells CTools (and thus Panels) where to look for plugin code.
*/
function ting_ctools_plugin_directory($module, $plugin) {
if ($module == 'ctools' || $module == 'panels') {
return 'plugins/' . $plugin;
}
}