I'm working on converting my d6 module to work for d7 and I could use some guidance. The code below is from the d6 module version. Now, in d7, I get a undeclared function error on the node_prepare() call. Taking it out resolves the error but then my content type doesn't have the additional fields $content_type, $amount_of_time, $unit_of_time based on errors I get when viewing instances of the type.
I'm assuming I'm missing a change in the documentation (http://drupal.org/update/modules/6/7) but if someone could point me in the right direction, I'd appreciate it.
/**
* implementation of hook_view()
*/
function post_reminder_view($node, $teaser = FALSE, $page = FALSE) {
$node = node_prepare($node, $teaser);
$content_type = node_type_get_type(check_plain($node->content_type)); //display human_readable name, not internal name
$amount_of_time = check_plain($node->amount_of_time);
$unit_of_time = check_plain($node->unit_of_time);
$active = check_plain($node->active);
$node->content['post_reminder'] = array(
'#value' => theme('post_reminder_info', $content_type, $amount_of_time, $unit_of_time, $active),
'#weight' => 1,
);
return $node;
}
Errors when editing/creating type: