I'm making my first node module, but when I fill in the fields and press "submit", I see no content created?
could someone look at my code and tell me if I'm doing something wrong?
Any help would be most appreciated!
<?php
/**
* @file
* Enables users to submit space share tasks.
*/
/**
* Implementation of hook_help().
*/
function sstask_help($section) {
switch ($section) {
case 'admin/modules#description':
return t('Enables the creation of spaceshare tasks.');
case 'node/add#sstask':
return t('Create a spaceshare task.');
}
}
/**
* Implementation of hook_node_name().
*/
function sstask_node_name($node) {
return t('spaceshare task');
}
/**
* Implementation of hook_perm().
*/
function sstask_perm() {
return array('create spaceshare tasks', 'edit own spaceshare tasks');
}
/**
* Implementation of hook_access().
*/
function sstask_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create spaceshare tasks');
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own spaceshare tasks') && ($user->uid == $node->uid)) {
return TRUE;
}
}
}
/**
* Implementation of hook_menu().
*/
function sstask_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/sstask', 'title' => t('spaceshare task'),'access' => user_access('create spaceshare tasks'));