<?php
-// $Id$
-
-
-
// Module metainfo
/**
* Implements hook_node_info()
);
}
-function mkdru_ting_search_tab($keys) {
- error_log("TING SEARCH TAB invoked");
- $path = drupal_get_path('module', 'mkdru');
- // Include client library.
- drupal_add_js(variable_get('pz2_js_path', 'pazpar2/js')
- . '/pz2.js', 'module', 'footer', TRUE, TRUE, FALSE);
- drupal_add_js($path . '/jquery.ba-bbq.js', 'module', 'footer', TRUE, TRUE, FALSE);
- drupal_add_js($path . '/recipe.js', 'module', 'footer', TRUE, TRUE, FALSE);
- drupal_add_js($path . '/mkdru.theme.js', 'module', 'footer', TRUE, TRUE, FALSE);
- drupal_add_js($path . '/mkdru.client.js', 'module', 'footer', TRUE, TRUE, FALSE);
- $html = theme('mkdru_results');
- drupal_add_js(array('mkdru' =>
- array(
- 'settings' => json_encode(variable_get('mkdru_ding', NULL)),
- 'pz2_path' => variable_get('pz2_path', '/pazpar2/search.pz2'),
- 'query' => $keys
- )
- ), 'setting');
- return array("content" => $html, "title" => "Meta Search");
-}
-
/**
* Implements hook_perm()
*/
* Implements hook_menu()
*/
function mkdru_menu() {
- // Can't get tabbed menus to work in D6. The children work and the tabs
- // show up there but the top level's url results in it trying to find
- // the system module's system.inc in mkdru's directory
-// $items['admin/settings/mkdru'] = array(
-// 'title' => 'Pazpar2 Metasearch Settings',
-// 'description' => 'Settings for mkdru.',
-// 'access arguments' => array('administer site configuration'),
-// );
-// $items['admin/settings/mkdru/settings'] = array(
-// 'title' => 'Settings',
-// 'description' => 'Settings for mkdru.',
-// 'page callback' => 'drupal_get_form',
-// 'page arguments' => array('mkdru_admin_settings'),
-// 'type' => MENU_DEFAULT_LOCAL_TASK,
-// 'file' => 'mkdru.admin.inc',
-// 'weight' => 0,
-// );
-// $items['admin/settings/mkdru/ding'] = array(
-// 'title' => 'Ding Integration',
-// 'description' => 'Search settings for mkdru instance integrated into Ding.',
-// 'page callback' => 'drupal_get_form',
-// 'page arguments' => array('mkdru_ding_settings'),
-// 'type' => MENU_LOCAL_TASK,
-// 'weight' => 1,
-// );
$items['admin/settings/mkdru'] = array(
'title' => 'Pazpar2 Metasearch Settings',
'description' => 'Settings for mkdru.',
'type' => MENU_NORMAL_ITEM,
'file' => 'mkdru.admin.inc',
);
- $items['admin/settings/mkdru-ding'] = array(
- 'title' => 'Pazpar2 Metasearch Ding Integration',
- 'description' => 'Search settings for mkdru instance integrated into Ding.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('mkdru_ding_settings'),
- 'access arguments' => array('administer site configuration'),
- 'type' => MENU_NORMAL_ITEM,
- );
$items['ahah-mkdru-facet'] = array(
'page callback' => 'mkdru_add_facet_callback',
'access arguments' => array('create metasearch interface'),
-// Ding config
-function mkdru_ding_settings(&$form_state) {
- $form_state['build_info']['args']['settings'] = variable_get('mkdru_ding', NULL);
- $form = drupal_retrieve_form('mkdru_settings_form', &$form_state);
- $form['settings']['#title'] = t('Default search settings');
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => 'Save configuration',
- );
- return $form;
-}
-function mkdru_ding_settings_submit($form, &$form_state) {
- variable_set('mkdru_ding', $form_state['values']['settings']);
- drupal_set_message(t('The configuration options have been saved.'));
-}
-
-
// Node config
/**