You are here

function signup_url_node in Signup 5.2

Views URL token handler for $signup that works for signup-enabled nodes.

Parameters

$token: Ignored.

$argument: Ignored.

$arg: The corresponding element of the URL that the token is holding.

Return value

TRUE if the path element this token represents is the node ID (nid) of a signup-enabled node, otherwise FALSE.

1 string reference to 'signup_url_node'
signup_views_url_tokens in views/views.inc
Implementation of hook_views_url_tokens().

File

views/views.inc, line 375
Provides support for Views integration.

Code

function signup_url_node($token, $argument, $arg) {
  if (!is_numeric($arg)) {
    return FALSE;
  }
  $node = node_load($arg);
  if (!$node) {
    return FALSE;
  }
  return $node->signup ? TRUE : FALSE;
}