Hi everyone,
I started playing around with module development and I went directly for Drupal 7. I do have the D6 book and there is an example named 'annotate'. I am trying to convert this to Drupal 7 and despite documentation for some of the functions for D7 to contain wrong (or none at all) information I've managed to convert the code to the point where I am supposed to get the annotation form. Unfortunately, the form doent appear in the nodes and I cannot figure out why. Below is the code which I have:
<?php
// $Id: annotate.module,v 1.0 2010/09/08 22:22:55 pimmy Exp $
/**
* @file
* Allows people to add personal notes to nodes.
*/
/**
* Implementation of hook_menu().
*/
function annotate_menu() {
$items['admin/settings/annotate'] = array(
'title' => 'Personal note settings',
'description' => 'Change how notes behave.',
'page callback' => 'drupal_get_form',
'page arguments' => array('annotate_admin_settings'),
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
'file' => 'annotate.admin.inc',
);
return $items;
}
/**
* Implementation of hook_nodeapi().
*/
function annotate_node_view($node, $mode) {
global $user;
// Abort if the user is an anonymous user (not logged in) or