'Roblib Islandscholar Search Target configuration', 'description' => 'Configuration for the Roblib Islandscholar site search target', 'page callback' => 'drupal_get_form', 'page arguments' => array('roblib_search_islandscholar_config_form'), 'access arguments' => array('access administration pages'), 'type' => MENU_NORMAL_ITEM, ); $items['roblib_search/islandscholar/ajax/%'] = array( 'title' => 'islandscholar ajax', 'page callback' => 'roblib_search_islandscholar_ajax', 'page arguments' => array(3), 'type' => MENU_CALLBACK, 'access arguments' => array('search roblib islandscholar'), ); return $items; } function roblib_search_islandscholar_config_form($form, &$form_state) { $form['roblib_search_islandscholar_url'] = array( '#type' => 'textfield', '#title' => t('Islandscholar Solr url'), '#default_value' => variable_get('roblib_search_islandscholar_url', 'http://www.islandscholar.ca:8080/solr/'), '#description' => t('The base Islandscholar Solr URL, for example http://www.islandscholar.ca:8080/solr/'), '#required' => TRUE, ); $form['roblib_search_islandscholar_num_results'] = array( '#type' => 'textfield', '#title' => t('Number of results to return'), '#default_value' => variable_get('roblib_search_islandscholar_num_results', '5'), '#description' => t('The number of results to display in the Bento box'), '#required' => TRUE, ); return system_settings_form($form); } /** * Implements hook_permission(). */ function roblib_search_islandscholar_permission() { return array( 'search roblib islandscholar' => array( 'title' => t('Search the islandscholar target'), 'description' => t('Search all Roblib islandscholar target. This permission exposes the search blocks and allows you to see search results.'), ), 'administer roblib search_islandscholar' => array( 'title' => t('Administer Roblib Search Evergreen'), 'description' => t('Administer settings for the Roblib islandscholar search client.'), ), ); } /** * Implements hook_theme(). */ function roblib_search_islandscholar_theme() { // set path $path = drupal_get_path('module', 'roblib_search_islandscholar'); $file = 'theme.inc'; return array( // results page 'roblib_search_islandscholar' => array( 'path' => $path . '/theme', 'file' => $file, 'template' => 'roblib-search-islandscholar', 'variables' => array('results' => NULL), ) ); } function roblib_search_islandscholar_block_info() { $blocks['roblib_islandscholar_results'] = array( // info: The name of the block. 'info' => t('Islandscholar Solr Search Results block'), // Block caching options (per role, per user, etc.) 'cache' => DRUPAL_CACHE_PER_ROLE, // default ); return $blocks; } function roblib_search_islandscholar_preprocess_panels_pane(&$variables, $hook){ if($variables['pane']->subtype == 'roblib_search_islandscholar-roblib_islandscholar_results'){ $variables['title_prefix'] = '
provides an Islandscholar target for the Roblib search module
' ); } }