// Module metainfo
/**
-* Implementation of hook_node_info().
+* Implementation of hook_node_info()
*/
function mkdru_node_info() {
return array(
}
/**
-* Implementation of hook_perm().
+* Implementation of hook_perm()
*/
function mkdru_perm() {
return array('create metasearch interface', 'edit any metasearch interface', 'edit own metasearch interface');
}
/**
-* Implementation of hook_access().
+* Implementation of hook_access()
*/
function mkdru_access($op, $node, $account) {
}
}
+/**
+* Implementation of hook_menu()
+*/
+function mkdru_menu() {
+ $items['admin/settings/mkdru'] = array(
+ 'title' => 'mkdru Settings',
+ 'description' => 'Settings for mkdru.',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('mkdru_admin_settings'),
+ 'access arguments' => array('administer site configuration'),
+ 'type' => MENU_NORMAL_ITEM,
+ 'file' => 'mkdru.admin.inc',
+ );
+ return $items;
+}
// Node config
/**
-* Implementation of hook_form().
+* Implementation of hook_form()
*/
function mkdru_form(&$node, $form_state) {
$type = node_get_types('type', $node);
* Implementation of hook_insert().
*/
function mkdru_insert($node) {
- db_query("INSERT INTO {mkdru} (nid, vid, pz2_path, use_sessions, source_max, author_max, subject_max) VALUES (%d, %d, '%s', %d, %d, %d)",
+ db_query("INSERT INTO {mkdru} (nid, vid, pz2_path, use_sessions, source_max, author_max, subject_max) VALUES (%d, %d, '%s', %d, %d, %d, %d)",
$node->nid, $node->vid, $node->pz2_path, $node->use_sessions, $node->source_max, $node->author_max, $node->subject_max);
}
*/
function theme_mkdru_page_js($node) {
$path = drupal_get_path('module', 'mkdru');
- drupal_add_js('pazpar2/js/pz2.js', 'module', 'footer');
+ // Include client library.
+ drupal_add_js(variable_get('pz2_js_path', 'pazpar2/js') . '/pz2.js', 'module', 'footer');
drupal_add_js($path . '/mkdru.theme.js', 'module', 'footer');
drupal_add_js($path . '/mkdru.client.js', 'module', 'footer');
drupal_add_js(array('mkdru' => $node->mkdru), 'setting');