Hi all. I have created my module but I have problem with create the administation section.
I have these functions:
/**
* Implementation of hook_perm().
*/
function zbnews_perm() {
return array('create zbnews', 'edit own zbnews','administer zbnews');
}
/**
* Implementation of hook_access().
*/
function zbnews_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create zbnews');
}
/*
if ($op == 'update' || $op == 'delete') {
if ((user_access('edit own zbnews') && ($user->uid == $node->uid)) || user_access('administer zbnews')) {
return TRUE;
}
}
*/
}
function zbnews_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'node/add/zbnews', 'title' => t('Aggiungi una notizia'),
'access' => user_access('create zbnews'));
}
$items[] = array(
'path' => 'zbnews/goto',
'title' => t('Pagina di redirect'),
'callback' => 'zbnews_goto',
'type' => MENU_CALLBACK,
'callback arguments' => $node ,
'access' => user_access('create zbnews'));
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
if ($node->nid) {
$items[] = array('path' => 'node/'. arg(1) .'/edit', 'title' => t('edit'),
'callback' => 'zbnews_form',
'access' => node_access('administer zbnews', $node),