array('name' => t('page'), 'base' => 'page')); } /** * Implementation of hook_access(). */ function page_access($op, $node) { global $user; if ($op == 'create') { return user_access('create pages'); } if ($op == 'update' || $op == 'delete') { if (user_access('edit own pages') && ($user->uid == $node->uid)) { return TRUE; } } } /** * Implementation of hook_menu(). */ function page_menu($may_cache) { $items = array(); if ($may_cache) { $items[] = array('path' => 'node/add/page', 'title' => t('page'), 'access' => page_access('create', NULL)); } return $items; } /** * Implementation of hook_form(). */ function page_form(&$node) { if (function_exists('taxonomy_node_form')) { $output .= implode('', taxonomy_node_form('page', $node)); } $output .= form_textarea(t('Body'), 'body', $node->body, 60, 20, '', NULL, TRUE); $output .= filter_form('format', $node->format); $output .= form_textarea(t('Log message'), 'log', $node->log, 60, 5, t('An explanation of the additions or updates being made to help other authors understand your motivations.')); return $output; }