module .'_form')) {
$items[] = array(
'path' => 'node/add/'. str_replace('_', '-', $type->type),
'title' => drupal_ucfirst($type->name),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'userpoints_nodelimit_creation_forbidden'
),
'access' => node_access('create', $type->type),
);
}
}
}
}
return $items;
}
/**
* Implementation of hook_userpoints().
*/
function userpoints_nodelimit_userpoints($op, $points = 0, $uid = 0, $operation = NULL, $description = NULL) {
$translation = userpoints_translation();
switch ($op) {
case 'setting':
$form = array();
$form['userpoints_nodelimit'] = array(
'#type' => 'fieldset',
'#title' => t('Userpoints Nodelimit settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['userpoints_nodelimit']['description'] = array(
'#value' => t(
'This module uses the settings of !userpoints_basic
.
It assumes the !points assigned for the creation of a node are negative;
this works, i.e., when the user gets !points he can use to contribute by creating nodes until he has sufficient !points.',
array('!userpoints_basic' => 'userpoints_basic.module') + $translation
),
'#prefix' => '