Hi im trying to make my own module and below is my code. When i insert into the database everything is there except for nid and vid.. id appreciate any help from you guys.. thanks..
module code:
<?php
// $Id$
/**
* @file
* Provides a "daily report" node type.
*/
/**
* Implementation of hook_node_info().
*/
//function dailyreport_node_info() {
// return array(
// 'dailyreport' => array(
// 'name' => t('Daily Report'), // Required.
// 'module' => 'dailyreport', // Required.
// 'description' => t('Submit or view daily reports'), // Required.
// 'has_title' => TRUE,
// 'title_label' => t('Module Name')
// )
// );
//}
/**
* Implementation of hook_menu().
*/
function dailyreport_menu($may_cache) {
$items = array();
// Do not cache this menu item during the development of this module.
if (!$may_cache) {
$items[] = array(
'path' => 'dailyreport',
'title' => t('Daily Reports'),
'callback' => 'dailyreport_front',
'access' => user_access('submit report'),
);
$items[] = array(
'path' => 'dailyreport/submit',
'title' => t('Submit Report'),
'callback' => 'submitform_page',
//'callback arguments' => array('dailyreport_entry_form'),
'access' => user_access('submit report'),
);
$items[] = array(
'path' => 'dailyreport/view',